diff options
Diffstat (limited to 'app/views')
56 files changed, 604 insertions, 237 deletions
diff --git a/app/views/activities/_activities.html.erb b/app/views/activities/_activities.html.erb index 21ec1fb28..f2d8e22bd 100644 --- a/app/views/activities/_activities.html.erb +++ b/app/views/activities/_activities.html.erb @@ -4,7 +4,7 @@ <dl> <% sort_activity_events(events_by_day[day]).each do |e, in_group| -%> <dt class="<%= e.event_type %> icon icon-<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>"> - <%= activity_event_type_icon e.event_type, plugin: Redmine::Activity.plugin_name(e.activity_provider_options.keys[0]) %> + <%= activity_event_type_icon e.event_type, plugin: Redmine::Activity.plugin_name(e.class) %> <%= avatar(e.event_author) if e.respond_to?(:event_author) %> <span class="time"><%= format_time(e.event_datetime, false) %></span> <%= content_tag('span', e.project, :class => 'project') if @project.nil? || @project != e.project %> diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 7bda59c95..e5b10fb55 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -7,17 +7,22 @@ <% css_class = (defined?(filedrop) && filedrop == false ? '' : (attachment_format_custom_field ? 'custom-field-filedrop' : 'filedrop')) %> <span class="attachments_form"> + <span class="attachments_icons hidden"> + <%= sprite_icon('del', icon_only: true, css_class: 'svg-del') %> + <%= sprite_icon('attachment', icon_only: true, size: 16, css_class: 'svg-attachment') %> + </span> <span class="attachments_fields"> <% if saved_attachments.present? %> <% saved_attachments.each_with_index do |attachment, i| %> <span id="attachments_p<%= i %>"> + <%= sprite_icon('attachment', icon_only: true, size: 16, css_class: 'svg-attachment') %> <%= text_field_tag("#{attachment_param}[p#{i}][filename]", attachment.filename, :class => 'filename') %> <% if attachment.container_id.present? %> - <%= link_to l(:label_delete), "#", :onclick => "$(this).closest('.attachments_form').find('.add_attachment').show(); $(this).parent().remove(); return false;", :class => 'icon-only icon-del' %> + <%= link_to sprite_icon('del', l(:button_delete), icon_only: true), "#", :onclick => "$(this).closest('.attachments_form').find('.add_attachment').show(); $(this).parent().remove(); return false;", :class => 'icon-only icon-del' %> <%= hidden_field_tag "#{attachment_param}[p#{i}][id]", attachment.id %> <% else %> <%= text_field_tag("#{attachment_param}[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description') if description %> - <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'icon-only icon-del remove-upload') %> + <%= link_to(sprite_icon('del', l(:button_delete), icon_only: true), attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'icon-only icon-del remove-upload') %> <%= hidden_field_tag "#{attachment_param}[p#{i}][token]", attachment.token %> <% end %> </span> diff --git a/app/views/attachments/other.html.erb b/app/views/attachments/other.html.erb index f0f732f6f..613c470df 100644 --- a/app/views/attachments/other.html.erb +++ b/app/views/attachments/other.html.erb @@ -14,6 +14,7 @@ :download_link => link_to_attachment( @attachment, :text => l(:label_no_preview_download), + :icon => 'download', :download => true, :class => 'icon icon-download' ) diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb index c1d412a0b..d5cb6a6a1 100644 --- a/app/views/calendars/show.html.erb +++ b/app/views/calendars/show.html.erb @@ -10,7 +10,7 @@ <div id="query_form_content"> <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> <legend onclick="toggleFieldset(this);" class="icon icon-<%= @query.new_record? ? "expanded" : "collapsed" %>"> - <%= sprite_icon(@query.new_record? ? "angle-down" : "angle-right") %> + <%= sprite_icon(@query.new_record? ? "angle-down" : "angle-right", rtl: !@query.new_record?) %> <%= l(:label_filter_plural) %> </legend> <div style="<%= @query.new_record? ? "" : "display: none;" %>"> diff --git a/app/views/context_menus/issues.html.erb b/app/views/context_menus/issues.html.erb index 3406e78d6..ee7eaa18c 100644 --- a/app/views/context_menus/issues.html.erb +++ b/app/views/context_menus/issues.html.erb @@ -12,7 +12,7 @@ <% if @allowed_statuses.present? %> <li class="folder"> <a href="#" class="submenu"><%= l(:field_status) %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <% @allowed_statuses.each do |s| -%> <li> @@ -34,7 +34,7 @@ <% if @trackers.present? %> <li class="folder"> <a href="#" class="submenu"><%= l(:field_tracker) %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <% @trackers.each do |t| -%> <li><%= context_menu_link t.name, _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'tracker_id' => t}, :back_url => @back), :method => :patch, @@ -47,7 +47,7 @@ <% if @safe_attributes.include?('priority_id') && @priorities.present? -%> <li class="folder"> <a href="#" class="submenu"><%= l(:field_priority) %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <% @priorities.each do |p| -%> <li><%= context_menu_link p.name, _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'priority_id' => p}, :back_url => @back), :method => :patch, @@ -60,7 +60,7 @@ <% if @safe_attributes.include?('fixed_version_id') && @versions.present? -%> <li class="folder"> <a href="#" class="submenu"><%= l(:field_fixed_version) %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <% @versions.sort.each do |v| -%> <li><%= context_menu_link format_version_name(v), _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'fixed_version_id' => v}, :back_url => @back), :method => :patch, @@ -75,7 +75,7 @@ <% if @safe_attributes.include?('assigned_to_id') && @assignables.present? -%> <li class="folder"> <a href="#" class="submenu"><%= l(:field_assigned_to) %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <% if @assignables.include?(User.current) %> <li><%= context_menu_link "<< #{l(:label_me)} >>", _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'assigned_to_id' => User.current}, :back_url => @back), :method => :patch, @@ -94,7 +94,7 @@ <% if @safe_attributes.include?('category_id') && @project && @project.issue_categories.any? -%> <li class="folder"> <a href="#" class="submenu"><%= l(:field_category) %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <% @project.issue_categories.each do |u| -%> <li><%= context_menu_link u.name, _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'category_id' => u}, :back_url => @back), :method => :patch, @@ -109,7 +109,7 @@ <% if @safe_attributes.include?('done_ratio') && Issue.use_field_for_done_ratio? %> <li class="folder"> <a href="#" class="submenu"><%= l(:field_done_ratio) %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <% (0..10).map{|x|x*10}.each do |p| -%> <li><%= context_menu_link "#{p}%", _bulk_update_issues_path(@issue, :ids => @issue_ids, :issue => {'done_ratio' => p}, :back_url => @back), :method => :patch, @@ -122,7 +122,7 @@ <% @options_by_custom_field.each do |field, options| %> <li class="folder <%= field.css_classes %>"> <a href="#" class="submenu"><%= field.name %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <% options.each do |text, value| %> <li><%= bulk_update_custom_field_context_menu_link(field, text, value || text) %></li> @@ -137,7 +137,7 @@ <% if @can[:add_watchers] %> <li class="folder"> <a href="#" class="submenu"><%= l(:label_issue_watchers) %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <li><%= context_menu_link sprite_icon('add', l(:button_add)), new_watchers_path(:object_type => 'issue', :object_id => @issue_ids), diff --git a/app/views/context_menus/time_entries.html.erb b/app/views/context_menus/time_entries.html.erb index 0073b87cf..d43021f59 100644 --- a/app/views/context_menus/time_entries.html.erb +++ b/app/views/context_menus/time_entries.html.erb @@ -12,7 +12,7 @@ <% if @activities.present? -%> <li class="folder"> <a href="#" class="submenu"><%= l(:field_activity) %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <% @activities.each do |u| -%> <li><%= context_menu_link u.name, {:controller => 'timelog', :action => 'bulk_update', :ids => @time_entries.collect(&:id), :time_entry => {'activity_id' => u}, :back_url => @back}, :method => :post, @@ -25,7 +25,7 @@ <% @options_by_custom_field.each do |field, options| %> <li class="folder <%= field.css_classes %>"> <a href="#" class="submenu"><%= field.name %></a> - <span class="icon-only"><%= sprite_icon('angle-right') %></span> + <span class="icon-only"><%= sprite_icon('angle-right', rtl: true) %></span> <ul> <% options.each do |text, value| %> <li><%= bulk_update_time_entry_custom_field_context_menu_link(field, text, value || text) %></li> diff --git a/app/views/custom_fields/formats/_progressbar.html.erb b/app/views/custom_fields/formats/_progressbar.html.erb new file mode 100644 index 000000000..ceae14ac8 --- /dev/null +++ b/app/views/custom_fields/formats/_progressbar.html.erb @@ -0,0 +1,6 @@ +<p> + <%= f.select :ratio_interval, + [5, 10].collect {|i| ["#{i} %", i]}, + selected: f.object.new_record? ? Redmine::FieldFormat::ProgressbarFormat.default_ratio_interval : f.object.ratio_interval, + required: true %> +</p> diff --git a/app/views/custom_fields/index.api.rsb b/app/views/custom_fields/index.api.rsb index 9f46f89f2..d4b19d62b 100644 --- a/app/views/custom_fields/index.api.rsb +++ b/app/views/custom_fields/index.api.rsb @@ -15,6 +15,7 @@ api.array :custom_fields do api.multiple field.multiple? api.default_value field.default_value api.visible field.visible? + api.editable field.editable? values = field.possible_values_options if values.present? diff --git a/app/views/doorkeeper/applications/_form.html.erb b/app/views/doorkeeper/applications/_form.html.erb new file mode 100644 index 000000000..e4f778f63 --- /dev/null +++ b/app/views/doorkeeper/applications/_form.html.erb @@ -0,0 +1,39 @@ +<%= error_messages_for 'application' %> +<div class="box tabular"> + <p><%= f.text_field :name, :required => true %></p> + + <p> + <%= f.text_area :redirect_uri, :required => true, :size => 60, :label => :'activerecord.attributes.doorkeeper/application.redirect_uri' %> + <em class="info"> + <%= t('doorkeeper.applications.help.redirect_uri') %> + </em> + </p> +</div> + +<h3><%= l(:'activerecord.attributes.doorkeeper/application.scopes') %></h3> +<p><em class="info"><%= l :text_oauth_info_scopes %></em></p> +<div class="box tabular" id="scopes"> +<fieldset><legend><%= l :label_oauth_admin_access %></legend> + <label class="floating" style="width: auto;"> + <%= check_box_tag 'doorkeeper_application[scopes][]', 'admin', @application.scopes.include?('admin'), + :id => "doorkeeper_application_scopes_admin" + %> + <%= l :text_oauth_admin_permission %> + </label> +</fieldset> +<% perms_by_module = Redmine::AccessControl.permissions.group_by {|p| p.project_module.to_s} %> +<% perms_by_module.keys.sort.each do |mod| %> + <fieldset><legend><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend> + <% perms_by_module[mod].each do |permission| %> + <label class="floating"> + <%= check_box_tag 'doorkeeper_application[scopes][]', permission.name.to_s, (permission.public? || @application.scopes.include?( permission.name.to_s)), + :id => "doorkeeper_application_scopes_#{permission.name}", + :disabled => permission.public? %> + <%= l_or_humanize(permission.name, :prefix => 'permission_') %> + </label> + <% end %> + </fieldset> +<% end %> +<br /><%= check_all_links 'scopes' %> +<%= hidden_field_tag 'doorkeeper_application[scopes][]', '' %> +</div> diff --git a/app/views/doorkeeper/applications/edit.html.erb b/app/views/doorkeeper/applications/edit.html.erb new file mode 100644 index 000000000..aebc1a841 --- /dev/null +++ b/app/views/doorkeeper/applications/edit.html.erb @@ -0,0 +1,6 @@ +<%= title [l('label_oauth_application_plural'), oauth_applications_path], @application.name %> + +<%= labelled_form_for @application, url: doorkeeper_submit_path(@application) do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> + <%= submit_tag l(:button_save) %> +<% end %> diff --git a/app/views/doorkeeper/applications/index.html.erb b/app/views/doorkeeper/applications/index.html.erb new file mode 100644 index 000000000..0ba31c0e8 --- /dev/null +++ b/app/views/doorkeeper/applications/index.html.erb @@ -0,0 +1,33 @@ +<div class="contextual"> +<%= link_to sprite_icon('add', t('.new')), new_oauth_application_path, :class => 'icon icon-add' %> +</div> + +<%= title l 'label_oauth_application_plural' %> + +<% if @applications.any? %> +<div class="autoscroll"> +<table class="list"> + <thead><tr> + <th><%= t('.name') %></th> + <th><%= t('.callback_url') %></th> + <th><%= t('.scopes') %></th> + <th></th> + </tr></thead> + <tbody> + <% @applications.each do |application| %> + <tr id="application_<%= application.id %>" class="<%= cycle("odd", "even") %>"> + <td class="name"><span><%= link_to application.name, oauth_application_path(application) %></span></td> + <td class="description"><%= truncate application.redirect_uri.split.join(', '), length: 50 %></td> + <td class="description"><%= safe_join application.scopes.map{|scope| h l_or_humanize(scope, prefix: 'permission_')}, ", " %></td> + <td class="buttons"> + <%= link_to sprite_icon('edit', t('doorkeeper.applications.buttons.edit')), edit_oauth_application_path(application), class: 'icon icon-edit' %> + <%= link_to sprite_icon('del', t('doorkeeper.applications.buttons.destroy')), oauth_application_path(application), :data => {:confirm => t('doorkeeper.applications.confirmations.destroy')}, :method => :delete, :class => 'icon icon-del' %> + </td> + </tr> + <% end %> + </tbody> +</table> +</div> +<% else %> + <p class="nodata"><%= l(:label_no_data) %></p> +<% end %> diff --git a/app/views/doorkeeper/applications/new.html.erb b/app/views/doorkeeper/applications/new.html.erb new file mode 100644 index 000000000..e2a39ac93 --- /dev/null +++ b/app/views/doorkeeper/applications/new.html.erb @@ -0,0 +1,6 @@ +<%= title [l('label_oauth_application_plural'), oauth_applications_path], t('.title') %> + +<%= labelled_form_for @application, url: doorkeeper_submit_path(@application) do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_create) %> +<% end %> diff --git a/app/views/doorkeeper/applications/show.html.erb b/app/views/doorkeeper/applications/show.html.erb new file mode 100644 index 000000000..c98e7d29c --- /dev/null +++ b/app/views/doorkeeper/applications/show.html.erb @@ -0,0 +1,54 @@ +<div class="contextual"> +<%= link_to sprite_icon('edit', t('doorkeeper.applications.buttons.edit')), edit_oauth_application_path(@application), :accesskey => accesskey(:edit), class: 'icon icon-edit' %> +<%= link_to sprite_icon('del', t('doorkeeper.applications.buttons.destroy')), oauth_application_path(@application), :data => {:confirm => t('doorkeeper.applications.confirmations.destroy')}, :method => :delete, :class => 'icon icon-del' %> +</div> + +<%= title [l('label_oauth_application_plural'), oauth_applications_path], @application.name %> + +<div class="box"> + <h3 class="icon icon-passwd"><%= sprite_icon('key', l(:label_information_plural)) %></h3> + <p> + <span class="label"><%= t('.application_id') %>:</span> + <code><%= h @application.uid %></code> + </p> + <p> + <span class="label"><%= t('.secret') %>:</span> + <code> + <% secret = flash[:application_secret].presence || @application.plaintext_secret %> + <% flash.delete :application_secret %> + <% if secret.blank? && Doorkeeper.config.application_secret_hashed? %> + <%= t('.secret_hashed') %> + <% else %> + <%= secret %> + <% end %> + </code> + <% if secret.present? && Doorkeeper.config.application_secret_hashed? %> + <strong><%= t "text_oauth_copy_secret_now" %></strong> + <% end %> + </p> + <p> + <span class="label"><%= t('.scopes') %>:</span> + <code><%= safe_join @application.scopes.map{|scope| h l_or_humanize(scope, prefix: 'permission_')}, ", " %></code> + </p> +</div> + +<h3><%= t('.callback_urls') %></h3> + +<div class="autoscroll"> +<table class="list"> + <thead><tr> + <th><%= t('.callback_url') %></th> + <th></th> + </tr></thead> + <tbody> + <% @application.redirect_uri.split.each do |uri| %> + <tr class="<%= cycle("odd", "even") %>"> + <td class="name"><span><%= uri %></span></td> + <td class="buttons"> + <%= link_to sprite_icon('shield-check', t('doorkeeper.applications.buttons.authorize')), oauth_authorization_path(client_id: @application.uid, redirect_uri: uri, response_type: 'code', scope: @application.scopes), class: 'icon icon-authorize', target: '_blank' %> + </td> + </tr> + <% end %> + </tbody> +</table> +</div> diff --git a/app/views/doorkeeper/authorizations/error.html.erb b/app/views/doorkeeper/authorizations/error.html.erb new file mode 100644 index 000000000..59cedf8f3 --- /dev/null +++ b/app/views/doorkeeper/authorizations/error.html.erb @@ -0,0 +1,6 @@ +<h2><%= t('doorkeeper.authorizations.error.title') %></h2> + +<p id="errorExplanation"><%= @pre_auth.error_response.body[:error_description] %></p> +<p><a href="javascript:history.back()"><%= l(:button_back) %></a></p> + +<% html_title t('doorkeeper.authorizations.error.title') %> diff --git a/app/views/doorkeeper/authorizations/new.html.erb b/app/views/doorkeeper/authorizations/new.html.erb new file mode 100644 index 000000000..898f2e645 --- /dev/null +++ b/app/views/doorkeeper/authorizations/new.html.erb @@ -0,0 +1,48 @@ +<%= title t('.title') %> + +<div class="warning"> +<p><strong><%=h @pre_auth.client.name %></strong></p> + +<p><%= raw t('.prompt', client_name: content_tag(:strong, class: "text-info") { @pre_auth.client.name }) %></p> + +<div class="oauth-permissions"> + <p><%= t('.able_to') %>:</p> + <ul> + <li><%= l :text_oauth_implicit_permissions %></li> + <% @pre_auth.scopes.each do |scope| %> + <% if scope == 'admin' %> + <li><%= l :label_oauth_permission_admin %></li> + <% else %> + <li><%= l_or_humanize(scope, prefix: 'permission_') %></li> + <% end %> + <% end %> + </ul> +</div> + +<% if @pre_auth.scopes.include?('admin') %> + <p><%= l :text_oauth_admin_permission_info %></p> +<% end %> +</div> + +<p> + <%= form_tag oauth_authorization_path, method: :post do %> + <%= hidden_field_tag :client_id, @pre_auth.client.uid %> + <%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri %> + <%= hidden_field_tag :state, @pre_auth.state %> + <%= hidden_field_tag :response_type, @pre_auth.response_type %> + <%= hidden_field_tag :scope, @pre_auth.scope %> + <%= hidden_field_tag :code_challenge, @pre_auth.code_challenge %> + <%= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method %> + <%= submit_tag t('doorkeeper.authorizations.buttons.authorize') %> + <% end %> + <%= form_tag oauth_authorization_path, method: :delete do %> + <%= hidden_field_tag :client_id, @pre_auth.client.uid %> + <%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri %> + <%= hidden_field_tag :state, @pre_auth.state %> + <%= hidden_field_tag :response_type, @pre_auth.response_type %> + <%= hidden_field_tag :scope, @pre_auth.scope %> + <%= hidden_field_tag :code_challenge, @pre_auth.code_challenge %> + <%= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method %> + <%= submit_tag t('doorkeeper.authorizations.buttons.deny') %> + <% end %> +</p> diff --git a/app/views/doorkeeper/authorizations/show.html.erb b/app/views/doorkeeper/authorizations/show.html.erb new file mode 100644 index 000000000..25ee88a87 --- /dev/null +++ b/app/views/doorkeeper/authorizations/show.html.erb @@ -0,0 +1,8 @@ +<%= title [l('label_oauth_authorized_application_plural'), oauth_authorized_applications_path] %> + +<fieldset class="tabular"><legend><%= l(:label_information_plural) %></legend> + <p> + <label><%= t('.title') %>:</label> + <code><%= params[:code] %></code> + </p> +</fieldset> diff --git a/app/views/doorkeeper/authorized_applications/index.html.erb b/app/views/doorkeeper/authorized_applications/index.html.erb new file mode 100644 index 000000000..0a1fc8a00 --- /dev/null +++ b/app/views/doorkeeper/authorized_applications/index.html.erb @@ -0,0 +1,31 @@ +<%= title [t(:label_my_account), my_account_path], l('label_oauth_authorized_application_plural') %> + +<% if @applications.any? %> +<div class="autoscroll"> +<table class="list"> + <thead><tr> + <th><%= t('doorkeeper.authorized_applications.index.application') %></th> + <th><%= t('doorkeeper.authorized_applications.index.created_at') %></th> + <th></th> + </tr></thead> + <tbody> + <% @applications.each do |application| %> + <tr id="application_<%= application.id %>" class="<%= cycle("odd", "even") %>"> + <td class="name"><span><%= application.name %></span></td> + <td ><%= format_date application.created_at %></td> + <td class="buttons"> + <%= link_to sprite_icon('del', t('doorkeeper.authorized_applications.buttons.revoke')), oauth_authorized_application_path(application), :data => {:confirm => t('doorkeeper.authorized_applications.confirmations.revoke')}, :method => :delete, :class => 'icon icon-del' %> + </td> + </tr> + <% end %> + </tbody> +</table> +</div> +<% else %> + <p class="nodata"><%= l(:label_no_data) %></p> +<% end %> + +<% content_for :sidebar do %> +<% @user = User.current %> +<%= render :partial => 'my/sidebar' %> +<% end %> diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index c43f10fdd..45428b03d 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -16,7 +16,7 @@ <div id="query_form_content"> <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> <legend onclick="toggleFieldset(this);" class="icon icon-<%= @query.new_record? ? "expanded" : "collapsed" %>"> - <%= sprite_icon(@query.new_record? ? "angle-down" : "angle-right") %> + <%= sprite_icon(@query.new_record? ? "angle-down" : "angle-right", rtl: !@query.new_record?) %> <%= l(:label_filter_plural) %> </legend> <div style="<%= @query.new_record? ? "" : "display: none;" %>"> @@ -26,7 +26,7 @@ <fieldset id="options" class="collapsible collapsed"> <legend onclick="toggleFieldset(this);" class="icon icon-collapsed"> - <%= sprite_icon("angle-right") %> + <%= sprite_icon("angle-right", rtl: true) %> <%= l(:label_options) %> </legend> <div style="display: none;"> @@ -308,7 +308,7 @@ style += "width:#{width}px;" style += "height:#{height}px;" style += "font-size:0.7em;" - clss = "gantt_hdr" + clss = +"gantt_hdr" clss << " nwday" if @gantt.non_working_week_days.include?(wday) %> <%= content_tag(:div, :style => style, :class => clss) do %> @@ -339,7 +339,7 @@ style += "width: #{width}px;" style += "height: #{height}px;" style += "font-size:0.7em;" - clss = "gantt_hdr" + clss = +"gantt_hdr" clss << " nwday" if @gantt.non_working_week_days.include?(g_date.cwday) %> <%= content_tag(:div, :style => style, :class => clss) do %> diff --git a/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_common_mark.html.erb b/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_common_mark.html.erb index 486b96424..a650b2751 100644 --- a/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_common_mark.html.erb +++ b/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_common_mark.html.erb @@ -81,6 +81,14 @@ <th></th><td>HTML is <del>not</del> <u>allowed</u>.</td><td>HTML is <del>not</del> <u>allowed</u>.</td> </tr> +<tr><th colspan="3">Alerts <span class="more_info">(<a href="<%= help_wiki_syntax_path(:detailed, anchor: "16") %>" target="_blank">more</a>)</span></th></tr> +<tr><th></th><td>> [!NOTE]<br>> You can use alerts like [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION].</td><td> +<div class="markdown-alert markdown-alert-note"> +<p class="markdown-alert-title">Note</p> +<p>You can use alerts like [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION].</p> +</div> +</td></tr> + </table> <p><a href="<%= help_wiki_syntax_path(:detailed) %>" onclick="window.open('<%= help_wiki_syntax_path(:detailed) %>', '', ''); return false;">More Information</a></p> diff --git a/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_detailed_common_mark.html.erb b/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_detailed_common_mark.html.erb index a47a570f1..a74094460 100644 --- a/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_detailed_common_mark.html.erb +++ b/app/views/help/wiki_syntax/common_mark/en/wiki_syntax_detailed_common_mark.html.erb @@ -27,6 +27,7 @@ <li><a href='#12'>Macros</a></li> <li><a href='#13'>Code highlighting</a></li> <li><a href='#15'>Raw HTML</a></li> + <li><a href='#16'>Alerts</a></li> </ul> <h2><a name="2" class="wiki-page"></a>Links</h2> @@ -359,8 +360,8 @@ It can be expanded by clicking a link. <p>The <strong>style</strong> attribute can be used in raw HTML to apply custom formatting. The following CSS properties are allowed:</p> <pre><code> color background-color - width - height + width min-width max-width + height min-height max-height padding padding-left padding-right padding-top padding-bottom margin margin-left margin-right margin-top margin-bottom border border-left border-right border-top border-bottom border-radius border-style border-collapse border-spacing @@ -369,5 +370,52 @@ It can be expanded by clicking a link. float </code></pre> + <h2><a name="16" class="wiki-page"></a>Alerts</h2> + + <p> + <dl> + <dt><code>NOTE</code></dt> + <dd> + <pre><code>> [!NOTE]<br>> Wiki page edits are preserved as history, allowing you to restore previous versions if needed.</code></pre> + <div class="markdown-alert markdown-alert-note"> + <p class="markdown-alert-title">Note</p> + <p>Wiki page edits are preserved as history, allowing you to restore previous versions if needed.</p> + </div> + </dd> + <dt><code>TIP</code></dt> + <dd> + <pre><code>> [!TIP]<br>> To quickly review the update history of an issue, use the "History" tab for convenient access.</code></pre> + <div class="markdown-alert markdown-alert-tip"> + <p class="markdown-alert-title">Tip</p> + <p>To quickly review the update history of an issue, use the "History" tab for convenient access.</p> + </div> + </dd> + <dt><code>WARNING</code></dt> + <dd> + <pre><code>> [!WARNING]<br>> Deleting an issue is a permanent action. Be certain it is truly necessary before proceeding.</code></pre> + <div class="markdown-alert markdown-alert-warning"> + <p class="markdown-alert-title">Warning</p> + <p>Deleting an issue is a permanent action. Be certain it is truly necessary before proceeding.</p> + </div> + </dd> + <dt><code>IMPORTANT</code></dt> + <dd> + <pre><code>> [!IMPORTANT]<br>> Changing role permissions can affect user access across all projects, so be mindful of potential impacts.</code></pre> + <div class="markdown-alert markdown-alert-important"> + <p class="markdown-alert-title">Important</p> + <p>Changing role permissions can affect user access across all projects, so be mindful of potential impacts.</p> + </div> + </dd> + <dt><code>CAUTION</code></dt> + <dd> + <pre><code>> [!CAUTION]<br>> When installing plugins, make sure to verify compatibility. Version differences can cause unexpected behavior.</code></pre> + <div class="markdown-alert markdown-alert-caution"> + <p class="markdown-alert-title">Caution</p> + <p>When installing plugins, make sure to verify compatibility. Version differences can cause unexpected behavior.</p> + </div> + </dd> + </dl> + </p> + </body> </html> diff --git a/app/views/imports/_issues_mapping.html.erb b/app/views/imports/_issues_mapping.html.erb index 86e2dd89a..539bad9fe 100644 --- a/app/views/imports/_issues_mapping.html.erb +++ b/app/views/imports/_issues_mapping.html.erb @@ -7,7 +7,7 @@ <fieldset class="box tabular collapsible collapsed"> <legend onclick="toggleFieldset(this);" class="icon icon-collapsed"> - <%= sprite_icon("angle-right") %> + <%= sprite_icon("angle-right", rtl: true) %> <%= l(:label_relations_mapping) %> </legend> <div id="relations-mapping" style="display: none;"> diff --git a/app/views/imports/_issues_relations_mapping.html.erb b/app/views/imports/_issues_relations_mapping.html.erb index fa0b0950f..9a88c6ebc 100644 --- a/app/views/imports/_issues_relations_mapping.html.erb +++ b/app/views/imports/_issues_relations_mapping.html.erb @@ -5,27 +5,27 @@ <%= mapping_select_tag @import, 'unique_id' %> </p> <p> - <label for="import_settings_mapping_parent_issue_id"><%= l(:field_parent_issue) %></label> + <label for="import_mapping_parent_issue_id"><%= l(:field_parent_issue) %></label> <%= mapping_select_tag @import, 'parent_issue_id' %> </p> <p> - <label for="import_settings_mapping_relation_duplicates"><%= l(:label_duplicates) %></label> + <label for="import_mapping_relation_duplicates"><%= l(:label_duplicates) %></label> <%= mapping_select_tag @import, 'relation_duplicates' %> </p> <p> - <label for="import_settings_mapping_relation_duplicated"><%= l(:label_duplicated_by) %></label> + <label for="import_mapping_relation_duplicated"><%= l(:label_duplicated_by) %></label> <%= mapping_select_tag @import, 'relation_duplicated' %> </p> <p> - <label for="import_settings_mapping_relation_blocks"><%= l(:label_blocks) %></label> + <label for="import_mapping_relation_blocks"><%= l(:label_blocks) %></label> <%= mapping_select_tag @import, 'relation_blocks' %> </p> <p> - <label for="import_settings_mapping_relation_blocked"><%= l(:label_blocked_by) %></label> + <label for="import_mapping_relation_blocked"><%= l(:label_blocked_by) %></label> <%= mapping_select_tag @import, 'relation_blocked' %> </p> </div> @@ -33,27 +33,27 @@ <div class="splitcontentright"> <p></p> <p> - <label for="import_settings_mapping_relation_relates"><%= l(:label_relates_to) %></label> + <label for="import_mapping_relation_relates"><%= l(:label_relates_to) %></label> <%= mapping_select_tag @import, 'relation_relates' %> </p> <p> - <label for="import_settings_mapping_relation_precedes"><%= l(:label_precedes) %></label> + <label for="import_mapping_relation_precedes"><%= l(:label_precedes) %></label> <%= mapping_select_tag @import, 'relation_precedes' %> </p> <p> - <label for="import_settings_mapping_relation_follows"><%= l(:label_follows) %></label> + <label for="import_mapping_relation_follows"><%= l(:label_follows) %></label> <%= mapping_select_tag @import, 'relation_follows' %> </p> <p> - <label for="import_settings_mapping_relation_copied_to"><%= l(:label_copied_to) %></label> + <label for="import_mapping_relation_copied_to"><%= l(:label_copied_to) %></label> <%= mapping_select_tag @import, 'relation_copied_to' %> </p> <p> - <label for="import_settings_mapping_relation_copied_from"><%= l(:label_copied_from) %></label> + <label for="import_mapping_relation_copied_from"><%= l(:label_copied_from) %></label> <%= mapping_select_tag @import, 'relation_copied_from' %> </p> </div> diff --git a/app/views/imports/show.html.erb b/app/views/imports/show.html.erb index cb698f018..b505d9912 100644 --- a/app/views/imports/show.html.erb +++ b/app/views/imports/show.html.erb @@ -12,8 +12,8 @@ <table id="unsaved-items" class="list"> <thead> <tr> - <th>Position</th> - <th>Message</th> + <th><%= l(:label_position) %></th> + <th><%= l(:label_message) %></th> </tr> </thead> <tbody> diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index df562c6f2..e8b151ef6 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -15,7 +15,7 @@ <% query.inline_columns.each do |column| %> <%= column_header(query, column, query_options) %> <% end %> - <th class="buttons"></th> + <th class="buttons hide-when-print"></th> </tr> </thead> <tbody> @@ -36,7 +36,7 @@ <% query.inline_columns.each do |column| %> <%= content_tag('td', column_content(column, issue), :class => column.css_classes) %> <% end %> - <td class="buttons"><%= link_to_context_menu %></td> + <td class="buttons hide-when-print"><%= link_to_context_menu %></td> </tr> <% query.block_columns.each do |column| if (text = column_content(column, issue)) && text.present? -%> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index af2510827..70f0b740a 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -35,9 +35,9 @@ <% end %> <% other_formats_links do |f| %> - <%= f.link_to_with_query_parameters 'Atom', :key => User.current.atom_key %> <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '350px'); return false;" %> <%= f.link_to_with_query_parameters 'PDF' %> + <%= f.link_to_with_query_parameters 'Atom', :key => User.current.atom_key %> <% end %> <div id="csv-export-options" style="display:none;"> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 8f732032a..6892269e4 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,7 +1,3 @@ -<% content_for :header_tags do %> - <%= javascripts_for_quote_reply_include_tag %> -<% end %> - <%= render :partial => 'action_menu' %> <h2 class="inline-block"><%= issue_heading(@issue) %></h2><%= issue_status_type_badge(@issue.status) %> @@ -32,13 +28,23 @@ </div> <% end %> - <div class="gravatar-with-child"> + <div class="avatar-with-child"> <%= author_avatar(@issue.author, :size => "50") %> - <%= assignee_avatar(@issue.assigned_to, :size => "22", :class => "gravatar-child") if @issue.assigned_to %> + <%= assignee_avatar(@issue.assigned_to, :size => "22", :class => "avatar-child") if @issue.assigned_to %> </div> -<div class="subject"> -<%= render_issue_subject_with_tree(@issue) %> +<div data-controller="sticky-issue-header"> + <div class="subject" data-sticky-issue-header-target="original"> + <%= render_issue_subject_with_tree(@issue) %> + </div> + <div id="sticky-issue-header" data-sticky-issue-header-target="stickyHeader" class="issue"> + <span class="issue-heading"><%= issue_heading(@issue) %>:</span> + <span class="subject"><%= @issue.subject %></span> + </div> +</div> + +<div class="reaction"> + <%= reaction_button @issue %> </div> <p class="author"> <%= authoring @issue.created_on, @issue.author %>. @@ -86,13 +92,13 @@ end %> <% if @issue.description? %> <hr /> -<div class="description"> +<div class="description" data-controller="quote-reply"> <div class="contextual"> - <%= quote_reply(quoted_issue_path(@issue), '#issue_description_wiki') if @issue.notes_addable? %> + <%= quote_reply_button(url: quoted_issue_path(@issue)) if @issue.notes_addable? %> </div> <p><strong><%=l(:field_description)%></strong></p> - <div id="issue_description_wiki" class="wiki"> + <div id="issue_description_wiki" class="wiki" data-quote-reply-target="content"> <%= textilizable @issue, :description, :attachments => @issue.attachments %> </div> </div> @@ -125,15 +131,15 @@ end %> <%= render partial: 'action_menu_edit' if User.current.wants_comments_in_reverse_order? %> -<div id="history"> +<div id="history" class="journals"> <%= render_tabs issue_history_tabs, issue_history_default_tab %> </div> <%= render partial: 'action_menu_edit' unless User.current.wants_comments_in_reverse_order? %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:key => User.current.atom_key} %> <%= f.link_to 'PDF' %> + <%= f.link_to 'Atom', :url => {:key => User.current.atom_key} %> <% end %> <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> diff --git a/app/views/issues/tabs/_changesets.html.erb b/app/views/issues/tabs/_changesets.html.erb index bf00dcb7b..2df4d40c2 100644 --- a/app/views/issues/tabs/_changesets.html.erb +++ b/app/views/issues/tabs/_changesets.html.erb @@ -1,27 +1,29 @@ <% @changesets.each do |changeset| %> <div id="changeset-<%= changeset.id %>" class="changeset journal"> - <div class="note"> - <h4 class='note-header'> - <%= avatar(changeset.user, :size => "24") %> - <%= authoring changeset.committed_on, changeset.author, :label => :label_added_time_by %> + <h4 class="journal-header"> + <span class="journal-info"> + <%= avatar(changeset.user, :size => "24") %> + <%= authoring changeset.committed_on, changeset.author, :label => :label_added_time_by %> + </span> </h4> - <p> - <%= "#{changeset.project.name} - " unless changeset.project == project %> - <%= link_to_revision(changeset, changeset.repository, - :text => "#{l(:label_revision)} #{changeset.format_identifier}") %> - <% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %> - (<%= link_to(l(:label_diff), - :controller => 'repositories', - :action => 'diff', - :id => changeset.project, - :repository_id => changeset.repository.identifier_param, - :path => "", - :rev => changeset.identifier) %>) - <% end %></p> - - <div class="wiki changeset-comments"> - <%= format_changeset_comments changeset %> - </div> + <div class="journal-content"> + <p> + <%= "#{changeset.project.name} - " unless changeset.project == project %> + <%= link_to_revision(changeset, changeset.repository, + :text => "#{l(:label_revision)} #{changeset.format_identifier}") %> + <% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %> + (<%= link_to(l(:label_diff), + :controller => 'repositories', + :action => 'diff', + :id => changeset.project, + :repository_id => changeset.repository.identifier_param, + :path => "", + :rev => changeset.identifier) %>) + <% end %> + </p> + <div class="wiki changeset-comments"> + <%= format_changeset_comments changeset %> + </div> </div> </div> <%= call_hook(:view_issues_history_changeset_bottom, { :changeset => changeset }) %> diff --git a/app/views/issues/tabs/_history.html.erb b/app/views/issues/tabs/_history.html.erb index aa5795400..b416a9d37 100644 --- a/app/views/issues/tabs/_history.html.erb +++ b/app/views/issues/tabs/_history.html.erb @@ -5,34 +5,39 @@ <% reply_links = issue.notes_addable? -%> <% for journal in journals %> - <div id="change-<%= journal.id %>" class="<%= journal.css_classes %>"> + <div id="change-<%= journal.id %>" class="<%= journal.css_classes %>" data-controller="quote-reply"> <div id="note-<%= journal.indice %>" class="note"> - <div class="contextual"> - <span class="journal-actions"><%= render_journal_actions(issue, journal, :reply_links => reply_links) %></span> - <a href="#note-<%= journal.indice %>" class="journal-link">#<%= journal.indice %></a> - </div> - <h4 class='note-header'> - <%= avatar(journal.user) %> - <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %> - <%= render_private_notes_indicator(journal) %> - <%= render_journal_update_info(journal) %> - </h4> - - <% if journal.details.any? %> - <ul class="details"> - <% details_to_strings(journal.visible_details).each do |string| %> - <li><%= string %></li> - <% end %> - </ul> - <% if Setting.thumbnails_enabled? && (thumbnail_attachments = journal_thumbnail_attachments(journal)).any? %> - <div class="thumbnails"> - <% thumbnail_attachments.each do |attachment| %> - <%= thumbnail_tag(attachment) %> + <h4 class="journal-header"> + <span class="journal-info"> + <%= avatar(journal.user) %> + <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %> + <%= render_private_notes_indicator(journal) %> + <%= render_journal_update_info(journal) %> + </span> + <span class="journal-meta"> + <span class="journal-actions"> + <%= render_journal_actions(issue, journal, :reply_links => reply_links) %> + </span> + <a href="#note-<%= journal.indice %>" class="journal-link">#<%= journal.indice %></a> + </span> + </h4> + <div class="journal-content"> + <% if journal.details.any? %> + <ul class="journal-details"> + <% details_to_strings(journal.visible_details).each do |string| %> + <li><%= string %></li> + <% end %> + </ul> + <% if Setting.thumbnails_enabled? && (thumbnail_attachments = journal_thumbnail_attachments(journal)).any? %> + <div class="thumbnails"> + <% thumbnail_attachments.each do |attachment| %> + <%= thumbnail_tag(attachment) %> + <% end %> + </div> + <% end %> <% end %> + <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %> </div> - <% end %> - <% end %> - <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %> </div> </div> <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %> diff --git a/app/views/issues/tabs/_time_entries.html.erb b/app/views/issues/tabs/_time_entries.html.erb index 4cbf5d01e..86a23d0c5 100644 --- a/app/views/issues/tabs/_time_entries.html.erb +++ b/app/views/issues/tabs/_time_entries.html.erb @@ -1,31 +1,33 @@ -<% for time_entry in time_entries%> +<% for time_entry in time_entries %> <div id="time-entry-<%= time_entry.id %>" class="time_entry journal"> - <div class="note"> - <% if time_entry.editable_by?(User.current) -%> - <div class="contextual"> - <span class="journal-actions"> - <%= link_to sprite_icon('edit', l(:button_edit)), edit_time_entry_path(time_entry), - :title => l(:button_edit), - :class => 'icon-only icon-edit ' %> - <%= link_to sprite_icon('del', l(:button_delete)), time_entry_path(time_entry), - :data => {:confirm => l(:text_are_you_sure)}, - :method => :delete, - :title => l(:button_delete), - :class => 'icon-only icon-del ' %> + <h4 class="journal-header"> + <span class="journal-info"> + <%= avatar(time_entry.user, :size => "24") %> + <%= authoring time_entry.created_on, time_entry.user, :label => :label_added_time_by %> </span> - </div> - <% end -%> - <h4 class='note-header'> - <%= avatar(time_entry.user, :size => "24") %> - <%= authoring time_entry.created_on, time_entry.user, :label => :label_added_time_by %> + <% if time_entry.editable_by?(User.current) -%> + <span class="journal-meta"> + <%= link_to sprite_icon('edit', l(:button_edit)), edit_time_entry_path(time_entry), + :title => l(:button_edit), + :class => 'icon-only icon-edit' %> + <%= link_to sprite_icon('del', l(:button_delete)), time_entry_path(time_entry), + :data => { :confirm => l(:text_are_you_sure) }, + :method => :delete, + :title => l(:button_delete), + :class => 'icon-only icon-del' %> + </span> + <% end -%> </h4> - <ul class="details"> - <li> - <strong><%= l(:label_time_entry_plural) %></strong>: - <%= l_hours_short time_entry.hours %> - </li> - </ul> - <p><%= time_entry.comments %></p> + <div class="journal-content"> + <ul class="journal-details"> + <li> + <strong><%= l(:label_time_entry_plural) %></strong>: + <%= l_hours_short time_entry.hours %> + </li> + </ul> + <div class="journal-note"> + <%= time_entry.comments %> + </div> </div> </div> <%= call_hook(:view_issues_history_time_entry_bottom, { :time_entry => time_entry }) %> diff --git a/app/views/journals/update.js.erb b/app/views/journals/update.js.erb index 227d169fc..cf6bcd28f 100644 --- a/app/views/journals/update.js.erb +++ b/app/views/journals/update.js.erb @@ -7,7 +7,7 @@ $("#journal-<%= @journal.id %>-notes").replaceWith('<%= escape_javascript(render_notes(@journal.issue, @journal, :reply_links => authorize_for('issues', 'edit'))) %>'); $("#journal-<%= @journal.id %>-notes").show(); $("#journal-<%= @journal.id %>-form").remove(); - var journal_header = $("#change-<%= @journal.id %>>div.note>h4.note-header"); + var journal_header = $("#change-<%= @journal.id %>>div.note>h4.journal-header>.journal-info"); var journal_updated_info = journal_header.find("span.update-info"); if (journal_updated_info.length > 0) { journal_updated_info.replaceWith('<%= escape_javascript(render_journal_update_info(@journal)) %>'); @@ -15,6 +15,8 @@ journal_header.append('<%= escape_javascript(render_journal_update_info(@journal)) %>'); } setupWikiTableSortableHeader(); + setupCopyButtonsToPreElements(); + setupHoverTooltips(); <% end %> <%= call_hook(:view_journals_update_js_bottom, { :journal => @journal }) %> diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 3432cb655..9e2ef51b5 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -10,8 +10,10 @@ <%= favicon %> <%= stylesheet_link_tag 'jquery/jquery-ui-1.13.2', 'tribute-5.1.3', 'application', 'responsive', :media => 'all' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> +<%= javascript_importmap_tags %> <%= javascript_heads %> <%= heads_for_theme %> +<%= heads_for_i18n %> <%= heads_for_auto_complete(@project) %> <%= call_hook :view_layouts_base_html_head %> <!-- page specific tags --> @@ -34,11 +36,9 @@ <% end %> <% if User.current.logged? %> - <div class="flyout-menu__avatar <% if !Setting.gravatar_enabled? %>flyout-menu__avatar--no-avatar<% end %>"> - <% if Setting.gravatar_enabled? %> - <%= link_to(avatar(User.current, :size => "80"), user_path(User.current)) %> - <% end %> - <%= link_to_user(User.current, :format => :username) %> + <div class="flyout-menu__avatar"> + <%= link_to(avatar(User.current, :size => "40"), user_path(User.current)) %> + <%= link_to_user(User.current, :format => :username) %> </div> <% end %> @@ -106,7 +106,7 @@ <% if sidebar_content? %> <div id="sidebar-switch-panel" style="visibility: hidden;"> <a id="sidebar-switch-button" class="" href="#"> - <%= sprite_icon("chevrons-right", size: 20) %></a> + <%= sprite_icon("chevrons-right", size: 20, rtl: true) %></a> </div> <%= javascript_tag "$('#sidebar-switch-panel').css('visibility', 'visible');" %> <% end %> @@ -129,6 +129,7 @@ <div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div> <div id="ajax-modal" style="display:none;"></div> +<div id="icon-copy-source" style="display: none;"><%= sprite_icon('') %></div> </div> <%= call_hook :view_layouts_base_body_bottom %> diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb index b265cc962..e60c803b7 100644 --- a/app/views/messages/show.html.erb +++ b/app/views/messages/show.html.erb @@ -1,99 +1,104 @@ -<% content_for :header_tags do %> - <%= javascripts_for_quote_reply_include_tag %> -<% end %> - <%= board_breadcrumb(@message) %> -<div class="contextual"> +<div data-controller="quote-reply"> + <div class="contextual"> <%= watcher_link(@topic, User.current) %> - <%= quote_reply( - url_for(:action => 'quote', :id => @topic, :format => 'js'), - '#message_topic_wiki' + <%= quote_reply_button( + url: url_for(action: 'quote', id: @topic, format: 'js') ) if !@topic.locked? && authorize_for('messages', 'reply') %> <%= link_to( sprite_icon('edit', l(:button_edit)), - {:action => 'edit', :id => @topic}, + { :action => 'edit', :id => @topic }, :class => 'icon icon-edit' ) if @message.editable_by?(User.current) %> <%= link_to( sprite_icon('del', l(:button_delete)), - {:action => 'destroy', :id => @topic}, + { :action => 'destroy', :id => @topic }, :method => :post, - :data => {:confirm => l(:text_are_you_sure)}, + :data => { :confirm => l(:text_are_you_sure) }, :class => 'icon icon-del' - ) if @message.destroyable_by?(User.current) %> -</div> + ) if @message.destroyable_by?(User.current) %> + </div> -<h2><%= avatar(@topic.author) %><%= @topic.subject %></h2> + <h2><%= avatar(@topic.author) %><%= @topic.subject %></h2> -<div class="message"> -<p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> -<div id="message_topic_wiki" class="wiki"> -<%= textilizable(@topic, :content) %> -</div> -<%= link_to_attachments @topic, :author => false, :thumbnails => true %> + <div class="message"> + <div class="reaction"> + <%= reaction_button @topic %> + </div> + <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> + <div id="message_topic_wiki" class="wiki" data-quote-reply-target="content"> + <%= textilizable(@topic, :content) %> + </div> + <%= link_to_attachments @topic, :author => false, :thumbnails => true %> + </div> </div> -<br /> +<br/> <% unless @replies.empty? %> -<div id="replies"> -<h3 class="comments icon icon-comments"><%= sprite_icon('comments', l(:label_reply_plural)) %> (<%= @reply_count %>)</h3> -<% if !@topic.locked? && authorize_for('messages', 'reply') && @replies.size >= 3 %> - <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content', :scroll => "message_content" %></p> -<% end %> -<% @replies.each do |message| %> - <div class="message reply" id="<%= "message-#{message.id}" %>"> - <div class="contextual"> - <%= quote_reply( - url_for(:action => 'quote', :id => message, :format => 'js'), - "#message-#{message.id} .wiki", - icon_only: true - ) if !@topic.locked? && authorize_for('messages', 'reply') %> - <%= link_to( - sprite_icon('edit', l(:button_edit), icon_only: true), - {:action => 'edit', :id => message}, - :title => l(:button_edit), - :class => 'icon icon-edit' - ) if message.editable_by?(User.current) %> - <%= link_to( - sprite_icon('del', l(:button_delete), icon_only: true), - {:action => 'destroy', :id => message}, - :method => :post, - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete), - :class => 'icon icon-del' - ) if message.destroyable_by?(User.current) %> - </div> - <h4 class='reply-header'> - <%= avatar(message.author) %> - <%= link_to message.subject, { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %> - - - <%= authoring message.created_on, message.author %> - </h4> - <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div> - <%= link_to_attachments message, :author => false, :thumbnails => true %> + <div id="replies" class="journals"> + <h3 class="comments icon icon-comments"><%= sprite_icon('comments', l(:label_reply_plural)) %> + (<%= @reply_count %>)</h3> + <% if !@topic.locked? && authorize_for('messages', 'reply') && @replies.size >= 3 %> + <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content', :scroll => "message_content" %></p> + <% end %> + <% @replies.each do |message| %> + <div class="message reply journal" id="<%= "message-#{message.id}" %>" data-controller="quote-reply"> + <h4 class='reply-header journal-header'> + <span class="journal-info"> + <%= avatar(message.author) %> + <%= link_to message.subject, { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %> + - + <%= authoring message.created_on, message.author %> + </span> + <span class="journal-meta"> + <%= reaction_button message %> + <%= quote_reply_button( + url: url_for(action: 'quote', id: message, format: 'js'), + icon_only: true + ) if !@topic.locked? && authorize_for('messages', 'reply') %> + <%= link_to( + sprite_icon('edit', l(:button_edit), icon_only: true), + { :action => 'edit', :id => message }, + :title => l(:button_edit), + :class => 'icon icon-edit' + ) if message.editable_by?(User.current) %> + <%= link_to( + sprite_icon('del', l(:button_delete), icon_only: true), + { :action => 'destroy', :id => message }, + :method => :post, + :data => { :confirm => l(:text_are_you_sure) }, + :title => l(:button_delete), + :class => 'icon icon-del' + ) if message.destroyable_by?(User.current) %> + </span> + </h4> + <div class="wiki journal-content" data-quote-reply-target="content"> + <%= textilizable message, :content, :attachments => message.attachments %> + </div> + <%= link_to_attachments message, :author => false, :thumbnails => true %> + </div> + <% end %> </div> -<% end %> -</div> -<span class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></span> + <span class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></span> <% end %> <% if !@topic.locked? && authorize_for('messages', 'reply') %> -<p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> -<div id="reply" style="display:none;"> -<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %> - <%= render :partial => 'form', :locals => {:f => f, :replying => true} %> - <%= submit_tag l(:button_submit) %> -<% end %> -</div> + <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> + <div id="reply" style="display:none;"> + <%= form_for @reply, :as => :reply, :url => { :action => 'reply', :id => @topic }, :html => { :multipart => true, :id => 'message-form' } do |f| %> + <%= render :partial => 'form', :locals => { :f => f, :replying => true } %> + <%= submit_tag l(:button_submit) %> + <% end %> + </div> <% end %> <% html_title @topic.subject %> <% content_for :sidebar do %> <% if User.current.allowed_to?(:add_message_watchers, @project) || - (@topic.watchers.present? && User.current.allowed_to?(:view_message_watchers, @project)) %> + (@topic.watchers.present? && User.current.allowed_to?(:view_message_watchers, @project)) %> <div id="watchers"> - <%= render :partial => 'watchers/watchers', :locals => {:watched => @topic} %> + <%= render :partial => 'watchers/watchers', :locals => { :watched => @topic } %> </div> <% end %> <% end %> diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index c8706a5f5..95afbabac 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -1,6 +1,7 @@ <div class="contextual"> <%= additional_emails_link(@user) %> <%= link_to(sprite_icon('key', l(:button_change_password)), { :action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %> +<%= link_to(sprite_icon('apps', l('label_oauth_authorized_application_plural')), oauth_authorized_applications_path, :class => 'icon icon-applications') if Setting.rest_api_enabled? %> <%= call_hook(:view_my_account_contextual, :user => @user)%> </div> diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb index d07a09eb7..704d3d04e 100644 --- a/app/views/news/show.html.erb +++ b/app/views/news/show.html.erb @@ -22,30 +22,43 @@ </div> <% end %> -<p><% unless @news.summary.blank? %><em><%= @news.summary %></em><br /><% end %> -<span class="author"><%= authoring @news.created_on, @news.author %></span></p> -<div class="wiki"> -<%= textilizable(@news, :description) %> +<div class="news"> + <div class="reaction"> + <%= reaction_button @news %> + </div> + <p><% unless @news.summary.blank? %><em><%= @news.summary %></em><br /><% end %> + <span class="author"><%= authoring @news.created_on, @news.author %></span></p> + <div class="wiki"> + <%= textilizable(@news, :description) %> + </div> + <%= link_to_attachments @news %> </div> -<%= link_to_attachments @news %> <br /> -<div id="comments" style="margin-bottom:16px;"> +<div id="comments" class="journals"> <h3 class="comments"><%= l(:label_comment_plural) %></h3> <% if @news.commentable? && @comments.size >= 3 %> <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments", :scroll => "comment_comments" %></p> <% end %> <% @comments.each do |comment| %> - <% next if comment.new_record? %> - <div class="contextual"> - <%= link_to_if_authorized sprite_icon('del', l(:button_delete)), { :controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, - :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, - :title => l(:button_delete), - :class => 'icon-only icon-del' %> - </div> - <h4><%= avatar(comment.author) %><%= authoring comment.created_on, comment.author %></h4> - <div class="wiki"> - <%= textilizable(comment.comments) %> + <div class="message reply journal" id="<%= "message-#{comment.id}" %>"> + <% next if comment.new_record? %> + <h4 class="reply-header journal-header"> + <span class="journal-info"> + <%= avatar(comment.author) %> + <%= authoring comment.created_on, comment.author %> + </span> + <span class="journal-meta"> + <%= reaction_button comment %> + <%= link_to_if_authorized sprite_icon('del', l(:button_delete)), { :controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, + :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, + :title => l(:button_delete), + :class => 'icon-only icon-del' %> + </span> + </h4> + <div class="wiki journal-content"> + <%= textilizable(comment.comments) %> + </div> </div> <% end if @comments.any? %> </div> diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 3a1c047c9..875e736b1 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -31,10 +31,10 @@ <% end %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:key => User.current.atom_key} %> <% if @query.display_type == 'list' %> <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '350px'); return false;" %> <% end %> + <%= f.link_to 'Atom', :url => {:key => User.current.atom_key} %> <% end %> <% html_title(l(:label_project_plural)) -%> diff --git a/app/views/queries/_filters.html.erb b/app/views/queries/_filters.html.erb index a1118f6ab..42756775a 100644 --- a/app/views/queries/_filters.html.erb +++ b/app/views/queries/_filters.html.erb @@ -22,6 +22,5 @@ $(document).ready(function(){ <%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %> </div> -<div id="icon-copy-source" style="display: none;"><%= sprite_icon('') %></div> <%= hidden_field_tag 'f[]', '' %> <% include_calendar_headers_tags %> diff --git a/app/views/queries/_query_form.html.erb b/app/views/queries/_query_form.html.erb index d04cd290e..77094e16e 100644 --- a/app/views/queries/_query_form.html.erb +++ b/app/views/queries/_query_form.html.erb @@ -6,7 +6,7 @@ <div id="query_form_content"> <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> <legend onclick="toggleFieldset(this);" class="icon icon-<%= @query.new_record? ? "expanded" : "collapsed" %>"> - <%= sprite_icon(@query.new_record? ? "angle-down" : "angle-right") %> + <%= sprite_icon(@query.new_record? ? "angle-down" : "angle-right", rtl: !@query.new_record?) %> <%= l(:label_filter_plural) %> </legend> <div style="<%= @query.new_record? ? "" : "display: none;" %>"> @@ -17,7 +17,7 @@ <% if @query.available_columns.any? %> <fieldset id="options" class="collapsible collapsed"> <legend onclick="toggleFieldset(this);" class="icon icon-collapsed"> - <%= sprite_icon("angle-right") %> + <%= sprite_icon("angle-right", rtl: true) %> <%= l(:label_options) %> </legend> <div class="hidden"> diff --git a/app/views/reactions/_replace_button.js.erb b/app/views/reactions/_replace_button.js.erb new file mode 100644 index 000000000..a5c923ea4 --- /dev/null +++ b/app/views/reactions/_replace_button.js.erb @@ -0,0 +1,7 @@ +(() => { + const button = $('[data-reaction-button-id=<%= reaction_id_for @object %>]'); + + removeHoverTooltips(button); + button.html($('<%=j reaction_button @object %>').children()); + setupHoverTooltips(button); +})(); diff --git a/app/views/reactions/create.js.erb b/app/views/reactions/create.js.erb new file mode 100644 index 000000000..20f3cc7ed --- /dev/null +++ b/app/views/reactions/create.js.erb @@ -0,0 +1 @@ +<%= render 'replace_button' %> diff --git a/app/views/reactions/destroy.js.erb b/app/views/reactions/destroy.js.erb new file mode 100644 index 000000000..20f3cc7ed --- /dev/null +++ b/app/views/reactions/destroy.js.erb @@ -0,0 +1 @@ +<%= render 'replace_button' %> diff --git a/app/views/repositories/_breadcrumbs.html.erb b/app/views/repositories/_breadcrumbs.html.erb index 4a5903e14..15b7b2c5f 100644 --- a/app/views/repositories/_breadcrumbs.html.erb +++ b/app/views/repositories/_breadcrumbs.html.erb @@ -9,7 +9,7 @@ breadcrumbs << link_to( @repository.identifier.presence || 'root', :action => 'show', :id => @project, :repository_id => @repository.identifier_param, :path => nil, :rev => @rev) -link_path = '' +link_path = +'' dirs.each do |dir| next if dir.blank? diff --git a/app/views/repositories/_dir_list_content.html.erb b/app/views/repositories/_dir_list_content.html.erb index 991400d7a..aed3dcc0c 100644 --- a/app/views/repositories/_dir_list_content.html.erb +++ b/app/views/repositories/_dir_list_content.html.erb @@ -14,7 +14,7 @@ :path => to_path_param(ent_path), :rev => @rev, :depth => (depth + 1), - :parent_id => tr_id)) %>');"><%= sprite_icon('angle-right') %></span> + :parent_id => tr_id)) %>');"><%= sprite_icon('angle-right', rtl: true) %></span> <% end %> <%= link_to file_icon(entry, ent_name), {:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev}, diff --git a/app/views/roles/permissions.html.erb b/app/views/roles/permissions.html.erb index 63a1267fc..573fbc9fa 100644 --- a/app/views/roles/permissions.html.erb +++ b/app/views/roles/permissions.html.erb @@ -3,7 +3,7 @@ <div class="hide-when-print"> <fieldset id="filters" class="collapsible collapsed"> <legend onclick="toggleFieldset(this);" class="icon icon-collapsed"> - <%= sprite_icon("angle-right") %> + <%= sprite_icon("angle-right", rtl: true) %> <%= l(:label_filter_plural) %> </legend> <div style="display: none;"> diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb index 7b5fc4f36..c17bbd8ea 100644 --- a/app/views/search/index.html.erb +++ b/app/views/search/index.html.erb @@ -25,7 +25,7 @@ <fieldset class="collapsible collapsed"> <legend onclick="toggleFieldset(this);" class="icon icon-collapsed"> - <%= sprite_icon("angle-right") %> + <%= sprite_icon("angle-right", rtl: true) %> <%= l(:label_options) %> </legend> <div id="options-content" style="display:none;"> diff --git a/app/views/settings/_display.html.erb b/app/views/settings/_display.html.erb index 62c53dfbb..3b2f95798 100644 --- a/app/views/settings/_display.html.erb +++ b/app/views/settings/_display.html.erb @@ -22,7 +22,12 @@ <p><%= setting_check_box :gravatar_enabled, :data => {:enables => '#settings_gravatar_default'} %> <em class="info"><%= t(:text_avatar_server_config_html, :url => Redmine::Configuration['avatar_server_url']) %></em></p> -<p><%= setting_select :gravatar_default, gravatar_default_setting_options, :blank => :label_none %></p> +<p> + <%= setting_select :gravatar_default, gravatar_default_setting_options, :blank => :label_none %> + <em class="<%= Setting.gravatar_default == "initials" ? "info" : "hidden" %>"> + <%= t(:text_setting_gravatar_default_initials_html) %> + </em> +</p> <p><%= setting_check_box :thumbnails_enabled, :data => {:enables => '#settings_thumbnails_size'} %></p> @@ -35,3 +40,18 @@ <%= submit_tag l(:button_save) %> <% end %> + +<%= javascript_tag do %> + $('#settings_gravatar_default').on('change', function(e){ + const gravatar_default = e.target.value; + const em = e.target.parentElement.getElementsByTagName('em')[0]; + + if (gravatar_default === 'initials') { + em.classList.remove('hidden'); + em.classList.add('info'); + } else { + em.classList.add('hidden'); + em.classList.remove('info'); + } + }); +<% end %>
\ No newline at end of file diff --git a/app/views/settings/_general.html.erb b/app/views/settings/_general.html.erb index 043067f18..44206b6c2 100644 --- a/app/views/settings/_general.html.erb +++ b/app/views/settings/_general.html.erb @@ -37,6 +37,8 @@ <p><%= setting_text_field :feeds_limit, :size => 6 %></p> +<p><%= setting_check_box :reactions_enabled %></p> + <%= call_hook(:view_settings_general_form) %> </div> diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb index 1a82b5f51..aa1c1c293 100644 --- a/app/views/timelog/_list.html.erb +++ b/app/views/timelog/_list.html.erb @@ -11,7 +11,7 @@ <% @query.inline_columns.each do |column| %> <%= column_header(@query, column) %> <% end %> - <th></th> + <th class="buttons hide-when-print"></th> </tr> </thead> <tbody> @@ -36,7 +36,7 @@ <% @query.inline_columns.each do |column| %> <%= content_tag('td', column_content(column, entry), :class => column.css_classes) %> <% end %> - <td class="buttons"> + <td class="buttons hide-when-print"> <% if entry.editable_by?(User.current) -%> <%= link_to sprite_icon('edit', l(:button_edit)), edit_time_entry_path(entry), :title => l(:button_edit), diff --git a/app/views/timelog/index.html.erb b/app/views/timelog/index.html.erb index 55e2312b3..d9985e922 100644 --- a/app/views/timelog/index.html.erb +++ b/app/views/timelog/index.html.erb @@ -29,8 +29,8 @@ <span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span> <% other_formats_links do |f| %> - <%= f.link_to_with_query_parameters 'Atom', :key => User.current.atom_key %> <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '330px'); return false;" %> + <%= f.link_to_with_query_parameters 'Atom', :key => User.current.atom_key %> <% end %> <div id="csv-export-options" style="display:none;"> diff --git a/app/views/users/show.api.rsb b/app/views/users/show.api.rsb index bf415795d..0681903b8 100644 --- a/app/views/users/show.api.rsb +++ b/app/views/users/show.api.rsb @@ -11,7 +11,7 @@ api.user do api.passwd_changed_on @user.passwd_changed_on api.avatar_url gravatar_url(@user.mail, {rating: nil, size: nil, default: Setting.gravatar_default}) if @user.mail && Setting.gravatar_enabled? api.twofa_scheme @user.twofa_scheme if User.current.admin? || (User.current == @user) - api.api_key @user.api_key if User.current.admin? || (User.current == @user) + api.api_key @user.api_key if (User.current.admin? || (User.current == @user && !User.current.authorized_by_oauth?)) api.status @user.status if User.current.admin? render_api_custom_values @user.visible_custom_field_values, api diff --git a/app/views/versions/_sidebar.html.erb b/app/views/versions/_sidebar.html.erb index 3b5269ed8..a1b9452d8 100644 --- a/app/views/versions/_sidebar.html.erb +++ b/app/views/versions/_sidebar.html.erb @@ -42,7 +42,7 @@ </ul> <% if @completed_versions.present? %> <p> - <%= link_to_function sprite_icon('angle-right', l(:label_completed_versions)), + <%= link_to_function sprite_icon('angle-right', l(:label_completed_versions), rtl: true), '$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expanded"); $("#completed-versions").toggle(); toggleExpendCollapseIcon(this);', :id => 'toggle-completed-versions', :class => 'icon icon-collapsed collapsible' %> <ul id = "completed-versions" style = "display:none;"> diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb index 6c3d518bc..45b254a7d 100644 --- a/app/views/versions/index.html.erb +++ b/app/views/versions/index.html.erb @@ -40,7 +40,7 @@ <td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td> <td class="assigned_to"><%= assignee_avatar(issue.assigned_to, :size => 16) %></td> <td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td> - <td class="buttons"><%= link_to_context_menu %></td> + <td class="buttons hide-when-print"><%= link_to_context_menu %></td> </tr> <% end -%> </table> diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erb index f83aff80d..cdd2b3029 100644 --- a/app/views/versions/show.html.erb +++ b/app/views/versions/show.html.erb @@ -54,7 +54,7 @@ <td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td> <td class="assigned_to"><%= assignee_avatar(issue.assigned_to, :size => 16) %></td> <td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td> - <td class="buttons"><%= link_to_context_menu %></td> + <td class="buttons hide-when-print"><%= link_to_context_menu %></td> </tr> <% end %> </table> diff --git a/app/views/wiki/date_index.html.erb b/app/views/wiki/date_index.html.erb index 7ee5b467d..c8acf933c 100644 --- a/app/views/wiki/date_index.html.erb +++ b/app/views/wiki/date_index.html.erb @@ -29,11 +29,11 @@ <% unless @pages.empty? %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :key => User.current.atom_key} %> <% if User.current.allowed_to?(:export_wiki_pages, @project) %> <%= f.link_to('PDF', :url => {:action => 'export', :format => 'pdf'}) %> <%= f.link_to('HTML', :url => {:action => 'export'}) %> <% end %> + <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :key => User.current.atom_key} %> <% end %> <% end %> diff --git a/app/views/wiki/index.html.erb b/app/views/wiki/index.html.erb index 3f6d05fc2..a4afcb28e 100644 --- a/app/views/wiki/index.html.erb +++ b/app/views/wiki/index.html.erb @@ -22,14 +22,14 @@ <% unless @pages.empty? %> <% other_formats_links do |f| %> - <%= f.link_to 'Atom', - :url => {:controller => 'activities', :action => 'index', - :id => @project, :show_wiki_edits => 1, - :key => User.current.atom_key} %> <% if User.current.allowed_to?(:export_wiki_pages, @project) %> <%= f.link_to('PDF', :url => {:action => 'export', :format => 'pdf'}) %> <%= f.link_to('HTML', :url => {:action => 'export'}) %> <% end %> + <%= f.link_to 'Atom', + :url => {:controller => 'activities', :action => 'index', + :id => @project, :show_wiki_edits => 1, + :key => User.current.atom_key} %> <% end %> <% end %> diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index 7c35463a0..4b222ef4b 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -63,7 +63,7 @@ <fieldset class="collapsible collapsed hide-when-print"> <legend onclick="toggleFieldset(this);" class="icon icon-collapsed"> - <%= sprite_icon("angle-right") %> + <%= sprite_icon("angle-right", rtl: true) %> <%= l(:label_attachment_plural) %> (<%= @page.attachments.length %>) </legend> <div style="display: none;"> diff --git a/app/views/workflows/edit.html.erb b/app/views/workflows/edit.html.erb index 2262fc1d1..3265f68de 100644 --- a/app/views/workflows/edit.html.erb +++ b/app/views/workflows/edit.html.erb @@ -41,7 +41,7 @@ <fieldset class="collapsible" style="padding: 0; margin-top: 0.5em;"> <legend onclick="toggleFieldset(this);" class="icon icon-<%= @workflows['author'].present? ? "expanded" : "collapsed" %>"> - <%= sprite_icon(@workflows['author'].present? ? "angle-down" : "angle-right") %> + <%= sprite_icon(@workflows['author'].present? ? "angle-down" : "angle-right", rtl: !@workflows['author'].present?) %> <%= l(:label_additional_workflow_transitions_for_author) %> </legend> <div id="author_workflows" style="margin: 0.5em 0 0.5em 0;"> @@ -52,7 +52,7 @@ <fieldset class="collapsible" style="padding: 0;"> <legend onclick="toggleFieldset(this);" class="icon icon-<%= @workflows['assignee'].present? ? "expanded" : "collapsed" %>"> - <%= sprite_icon(@workflows['assignee'].present? ? "angle-down" : "angle-right") %> + <%= sprite_icon(@workflows['assignee'].present? ? "angle-down" : "angle-right", rtl: !@workflows['assignee'].present?) %> <%= l(:label_additional_workflow_transitions_for_assignee) %> </legend> <div id="assignee_workflows" style="margin: 0.5em 0 0.5em 0;"> |