From 15c270b1f6a5d305bc0782446791b49db8e3d60c Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Thu, 15 Jan 2015 19:31:36 +0100 Subject: [PATCH] Normalise indentation in Rails ERB views Signed-off-by: Alex Coles --- app/views/account/_auth_providers.html.erb | 4 +- .../account/_password_login_form.html.erb | 4 +- app/views/account/lost_password.html.erb | 15 +- app/views/account/password_recovery.html.erb | 21 +- app/views/admin/_no_data.html.erb | 7 +- app/views/admin/plugins.html.erb | 17 +- app/views/admin/projects.html.erb | 83 ++-- app/views/attachments/diff.html.erb | 11 +- app/views/auth_sources/index.html.erb | 45 +-- app/views/boards/_form.html.erb | 6 +- app/views/boards/index.html.erb | 53 ++- app/views/boards/show.html.erb | 44 +-- app/views/categories/_form.html.erb | 10 +- app/views/categories/destroy.html.erb | 25 +- app/views/categories/edit.html.erb | 6 +- app/views/categories/new.html.erb | 6 +- app/views/common/_calendar.html.erb | 80 ++-- app/views/common/_diff.html.erb | 113 +++--- app/views/common/_file.html.erb | 27 +- app/views/common/_tabs.html.erb | 8 +- app/views/custom_fields/_form.html.erb | 250 ++++++------ app/views/custom_fields/_index.html.erb | 52 +-- app/views/custom_fields/edit.html.erb | 4 +- app/views/enumerations/destroy.html.erb | 17 +- app/views/enumerations/index.html.erb | 59 ++- app/views/groups/_memberships.html.erb | 101 +++-- app/views/groups/_users.html.erb | 73 ++-- app/views/groups/index.html.erb | 42 +- app/views/groups/show.html.erb | 6 +- app/views/help/wiki_syntax.html.erb | 32 +- app/views/help/wiki_syntax_detailed.html.erb | 368 ++++++++---------- app/views/layouts/angular.html.erb | 214 +++++----- app/views/layouts/base.html.erb | 215 +++++----- app/views/layouts/help.html.erb | 19 +- app/views/layouts/my.html.erb | 4 +- app/views/layouts/user_mailer.html.erb | 79 ++-- app/views/members/_common_error.html.erb | 4 +- .../_member_form_non_impaired.html.erb | 24 +- .../members/autocomplete_for_member.json.erb | 8 +- app/views/messages/_form.html.erb | 52 ++- app/views/messages/show.html.erb | 72 ++-- app/views/my/_sidebar.html.erb | 36 +- app/views/my/account.html.erb | 8 +- .../my/blocks/_issuesassignedtome.html.erb | 3 +- .../my/blocks/_issuesreportedbyme.html.erb | 3 +- .../_workpackagesresponsiblefor.html.erb | 3 +- app/views/my/page.html.erb | 27 +- app/views/my/page_layout.html.erb | 83 ++-- app/views/news/_form.html.erb | 12 +- app/views/news/_news.html.erb | 3 +- app/views/news/edit.html.erb | 2 +- app/views/news/index.html.erb | 14 +- app/views/news/show.html.erb | 72 ++-- app/views/project_associations/index.html.erb | 144 ++++--- app/views/project_types/index.html.erb | 2 +- app/views/projects/_edit.html.erb | 5 +- app/views/projects/_form.html.erb | 8 +- app/views/projects/destroy_info.html.erb | 23 +- app/views/projects/form/_modules.html.erb | 20 +- .../form/attributes/_responsible_id.html.erb | 20 +- app/views/projects/index.html.erb | 4 +- app/views/projects/list_members.html.erb | 19 +- app/views/projects/new.html.erb | 9 +- .../projects/settings/_activities.html.erb | 73 ++-- app/views/projects/settings/_boards.html.erb | 56 +-- .../projects/settings/_categories.html.erb | 46 +-- app/views/projects/settings/_members.html.erb | 88 ++--- app/views/projects/settings/_modules.html.erb | 26 +- .../projects/settings/_repository.html.erb | 28 +- .../projects/settings/_versions.html.erb | 73 ++-- app/views/projects/show.html.erb | 35 +- app/views/queries/_filters.html.erb | 237 ++++++----- app/views/reportings/edit.html.erb | 2 +- app/views/reportings/index.html.erb | 4 +- app/views/repositories/_dir_list.html.erb | 27 +- .../repositories/_dir_list_content.html.erb | 35 +- .../repositories/_link_to_functions.html.erb | 25 +- app/views/repositories/_navigation.html.erb | 23 +- app/views/repositories/_revisions.html.erb | 42 +- app/views/repositories/annotate.html.erb | 42 +- app/views/repositories/committers.html.erb | 55 ++- app/views/repositories/diff.html.erb | 6 +- app/views/repositories/revision.html.erb | 52 ++- app/views/repositories/revisions.html.erb | 13 +- app/views/roles/_form.html.erb | 38 +- .../roles/autocomplete_for_role.json.erb | 8 +- app/views/roles/index.html.erb | 45 +-- app/views/roles/report.html.erb | 90 +++-- app/views/search/index.html.erb | 71 ++-- app/views/settings/_authentication.html.erb | 4 +- app/views/settings/_general.html.erb | 99 ++--- app/views/settings/_mail_handler.html.erb | 33 +- app/views/settings/_notifications.html.erb | 85 ++-- app/views/settings/_projects.html.erb | 20 +- app/views/settings/_repositories.html.erb | 72 ++-- app/views/settings/_users.html.erb | 3 +- app/views/settings/_work_packages.html.erb | 33 +- app/views/settings/plugin.html.erb | 14 +- app/views/statuses/index.html.erb | 55 ++- .../reports/_report_criteria.html.erb | 28 +- app/views/time_entries/reports/show.html.erb | 8 +- app/views/timelines/_custom_fields.html.erb | 4 +- app/views/timelines/_timeline.html.erb | 16 +- app/views/timelines/filter/_projects.html.erb | 3 +- app/views/timelog/_date_range.html.erb | 30 +- app/views/timelog/_time_entry_tab.html.erb | 9 +- app/views/timelog/edit.html.erb | 33 +- app/views/timelog/index.html.erb | 9 +- app/views/types/_form.html.erb | 73 ++-- app/views/types/index.html.erb | 44 +-- .../user_mailer/account_information.html.erb | 14 +- .../user_mailer/account_information.text.erb | 7 +- .../user_mailer/attachments_added.html.erb | 6 +- .../user_mailer/attachments_added.text.erb | 4 +- .../copy_project_succeeded.text.erb | 7 +- app/views/user_mailer/password_lost.html.erb | 4 +- app/views/user_mailer/reminder_mail.html.erb | 9 +- app/views/user_mailer/reminder_mail.text.erb | 5 +- app/views/user_mailer/test_mail.html.erb | 3 +- app/views/user_mailer/user_signed_up.html.erb | 3 +- .../user_mailer/work_package_updated.html.erb | 9 +- app/views/users/_groups.html.erb | 15 +- app/views/users/_mail_notifications.html.erb | 13 +- app/views/users/_memberships.html.erb | 107 +++-- app/views/users/index.html.erb | 116 +++--- app/views/users/show.html.erb | 6 +- app/views/versions/_form.html.erb | 25 +- .../versions/_work_package_counts.html.erb | 8 +- app/views/versions/edit.html.erb | 7 +- app/views/versions/index.html.erb | 90 ++--- app/views/versions/new.html.erb | 7 +- app/views/welcome/index.html.erb | 19 +- app/views/welcome/robots.text.erb | 3 +- app/views/wiki/annotate.html.erb | 35 +- app/views/wiki/date_index.html.erb | 31 +- app/views/wiki/destroy.html.erb | 31 +- app/views/wiki/diff.html.erb | 14 +- app/views/wiki/edit.html.erb | 29 +- app/views/wiki/export.html.erb | 39 +- app/views/wiki/export_multiple.html.erb | 62 ++- app/views/wiki/history.html.erb | 83 ++-- app/views/wiki/index.html.erb | 20 +- app/views/wiki/show.html.erb | 33 +- app/views/wikis/destroy.html.erb | 16 +- app/views/work_packages/_changesets.html.erb | 9 +- app/views/work_packages/_list_simple.html.erb | 51 +-- .../_two_column_attributes.html.erb | 9 +- .../auto_completes/index.html.erb | 13 +- app/views/work_packages/bulk/edit.html.erb | 172 ++++---- .../work_packages/calendars/index.html.erb | 64 ++- app/views/work_packages/moves/new.html.erb | 129 +++--- .../work_packages/reports/_report.html.erb | 68 ++-- .../work_packages/reports/report.html.erb | 25 +- app/views/workflows/_form.html.erb | 68 ++-- app/views/workflows/copy.html.erb | 4 +- app/views/workflows/edit.html.erb | 28 +- app/views/workflows/index.html.erb | 60 ++- 157 files changed, 2893 insertions(+), 3402 deletions(-) diff --git a/app/views/account/_auth_providers.html.erb b/app/views/account/_auth_providers.html.erb index e1d4e342fa..0532684480 100644 --- a/app/views/account/_auth_providers.html.erb +++ b/app/views/account/_auth_providers.html.erb @@ -15,8 +15,8 @@ pclass = no_pwd ? 'no-pwd' : '' diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 3bf9637447..9a65182158 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -33,24 +33,20 @@ See doc/COPYRIGHT.rdoc for more details. <% end %> <%= call_hook(:user_admin_action_menu) %> <% end %> -

<%=l(:label_user_plural)%>

- <%= render :partial => 'layouts/action_menu_specific' %> - <%= form_tag({}, :method => :get) do %> -
<%= l(:label_filter_plural) %> -
-
-
- - <%= select_tag 'status', users_status_options_for_select(@status), :class => "form--select -small", :onchange => "this.form.submit(); return false;" %> -
- - <% if @groups.present? %> +
<%= l(:label_filter_plural) %> +
+
- - <%= collection_select :group, + + <%= select_tag 'status', users_status_options_for_select(@status), :class => "form--select -small", :onchange => "this.form.submit(); return false;" %> +
+ <% if @groups.present? %> +
+ + <%= collection_select :group, :id, @groups, :id, @@ -60,63 +56,59 @@ See doc/COPYRIGHT.rdoc for more details. { :name => "group_id", :onchange => "this.form.submit(); return false;", class: 'form--select -small' } %> +
+ <% end %> +
+ + <%= text_field_tag 'name', params[:name], :size => 30, class: 'form--text-field -small' %>
- <% end %> - +
- - <%= text_field_tag 'name', params[:name], :size => 30, class: 'form--text-field -small' %> + <%= submit_tag l(:button_apply), :class => 'button -highlight -small', :name => nil %> + <%= link_to l(:button_clear), users_path, :class => 'button -small icon icon-undo' %>
- -
- <%= submit_tag l(:button_apply), :class => 'button -highlight -small', :name => nil %> - <%= link_to l(:button_clear), users_path, :class => 'button -small icon icon-undo' %> -
-
-
+ <% end %>  
- - - - <%= sort_header_tag('login', :caption => User.human_attribute_name(:login)) %> - <%= sort_header_tag('firstname', :caption => User.human_attribute_name(:firstname)) %> - <%= sort_header_tag('lastname', :caption => User.human_attribute_name(:lastname)) %> - <%= sort_header_tag('mail', :caption => User.human_attribute_name(:mail)) %> - <%= sort_header_tag('admin', :caption => User.human_attribute_name(:admin), :default_order => 'desc') %> - <%= sort_header_tag('created_on', :caption => User.human_attribute_name(:created_on), :default_order => 'desc') %> - <%= sort_header_tag('last_login_on', :caption => User.human_attribute_name(:last_login_on), :default_order => 'desc') %> - - - - - - <% for user in @users -%> - <%= %w(anon active registered locked)[user.status] %> <%= 'blocked' if user.failed_too_many_recent_login_attempts? %>"> - - - - - - - - - +
<%= User.human_attribute_name(:status) %>
<%= avatar(user, class: 'avatar-mini') %><%= link_to h(user.login), edit_user_path(user) %><%= h(user.firstname) %><%= h(user.lastname) %><%= checked_image user.admin? %><%= format_time(user.created_on) %><%= full_user_status(user) %> - - <%= change_user_status_links(user) unless user.id == current_user.id %> - -
+ + + <%= sort_header_tag('login', :caption => User.human_attribute_name(:login)) %> + <%= sort_header_tag('firstname', :caption => User.human_attribute_name(:firstname)) %> + <%= sort_header_tag('lastname', :caption => User.human_attribute_name(:lastname)) %> + <%= sort_header_tag('mail', :caption => User.human_attribute_name(:mail)) %> + <%= sort_header_tag('admin', :caption => User.human_attribute_name(:admin), :default_order => 'desc') %> + <%= sort_header_tag('created_on', :caption => User.human_attribute_name(:created_on), :default_order => 'desc') %> + <%= sort_header_tag('last_login_on', :caption => User.human_attribute_name(:last_login_on), :default_order => 'desc') %> + + - <% end -%> - -
<%= User.human_attribute_name(:status) %>
+ + + <% for user in @users -%> + <%= %w(anon active registered locked)[user.status] %> <%= 'blocked' if user.failed_too_many_recent_login_attempts? %>"> + <%= avatar(user, class: 'avatar-mini') %><%= link_to h(user.login), edit_user_path(user) %> + <%= h(user.firstname) %> + <%= h(user.lastname) %> + <%= mail_to(h(user.mail)) %> + <%= checked_image user.admin? %> + <%= format_time(user.created_on) %> + + <%= format_time(user.last_login_on) unless user.last_login_on.nil? %> + + <%= full_user_status(user) %> + + + <%= change_user_status_links(user) unless user.id == current_user.id %> + + + + <% end -%> + +
- <%= pagination_links_full @users %> - <% html_title(l(:label_user_plural)) -%> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 37bc53f7a0..cf660a3327 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -49,9 +49,9 @@ See doc/COPYRIGHT.rdoc for more details.
  • <%= User.human_attribute_name(:mail) %>: <%= mail_to(h(escape_javascript(@user.mail)), nil, :encode => 'javascript') %>
  • <% end %> <% @user.visible_custom_field_values.each do |custom_value| %> - <% if !custom_value.value.blank? %> -
  • <%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %>
  • - <% end %> + <% if !custom_value.value.blank? %> +
  • <%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %>
  • + <% end %> <% end %> <% unless @user.last_login_on.nil? %>
  • <%= User.human_attribute_name(:last_login_on) %>: <%= format_date(@user.last_login_on) %>
  • diff --git a/app/views/versions/_form.html.erb b/app/views/versions/_form.html.erb index 1bc02a3bd6..a8411e8c88 100644 --- a/app/views/versions/_form.html.erb +++ b/app/views/versions/_form.html.erb @@ -26,22 +26,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - <%= error_messages_for 'version' %> - <%= back_url_hidden_field_tag %> -
    -

    <%= f.text_field :name, :size => 60, :required => true %>

    -

    <%= f.text_field :description, :size => 60 %>

    -

    <%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>

    -

    <%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %>

    -

    <%= f.text_field :start_date, :size => 10 %><%= calendar_for('version_start_date') %>

    -

    <%= f.text_field :effective_date, :size => 10 %><%= calendar_for('version_effective_date') %>

    -

    <%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>

    - -<% @version.custom_field_values.each do |value| %> -

    <%= custom_field_tag_with_label :version, value %>

    -<% end %> - +

    <%= f.text_field :name, :size => 60, :required => true %>

    +

    <%= f.text_field :description, :size => 60 %>

    +

    <%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>

    +

    <%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %>

    +

    <%= f.text_field :start_date, :size => 10 %><%= calendar_for('version_start_date') %>

    +

    <%= f.text_field :effective_date, :size => 10 %><%= calendar_for('version_effective_date') %>

    +

    <%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>

    + <% @version.custom_field_values.each do |value| %> +

    <%= custom_field_tag_with_label :version, value %>

    + <% end %>
    diff --git a/app/views/versions/_work_package_counts.html.erb b/app/views/versions/_work_package_counts.html.erb index 9299cc6814..d1c539ccf5 100644 --- a/app/views/versions/_work_package_counts.html.erb +++ b/app/views/versions/_work_package_counts.html.erb @@ -44,20 +44,16 @@ See doc/COPYRIGHT.rdoc for more details.

    <%= l(:label_no_data) %>

    - <% else %> - - <% counts.each do |count| %> - diff --git a/app/views/versions/edit.html.erb b/app/views/versions/edit.html.erb index 7af2a3357d..b8f6c48c2a 100644 --- a/app/views/versions/edit.html.erb +++ b/app/views/versions/edit.html.erb @@ -26,12 +26,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - <% html_title l("label_roadmap_edit", name: @version.name) %> -

    <%= Version.model_name.human %>

    - <%= labelled_tabular_form_for @version do |f| %> -<%= render :partial => 'form', :locals => { :f => f } %> -<%= submit_tag l(:button_save), class: 'button -highlight' %> + <%= render :partial => 'form', :locals => { :f => f } %> + <%= submit_tag l(:button_save), class: 'button -highlight' %> <% end %> diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb index 648c058f7f..6421ead6db 100644 --- a/app/views/versions/index.html.erb +++ b/app/views/versions/index.html.erb @@ -26,59 +26,53 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -

    <%=l(:label_roadmap)%>

    - <% if @versions.empty? %> -

    <%= l(:label_no_data) %>

    +

    <%= l(:label_no_data) %>

    <% else %> -
    -<% @versions.each do |version| %> -

    - <%= link_to_version version, :name => h(version.name) %> -

    - <%= render :partial => 'versions/overview', :locals => {:version => version} %> - <%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %> - - <% if (issues = @issues_by_version[version]) && issues.size > 0 %> - <%= l(:label_related_work_packages) %> - <%= form_tag({}) do -%> -
    - <%= link_to h(count[:group]), + <%= link_to h(count[:group]), project_version_property_path(version, "#{criteria}_id", count[:group].id) %> - <%= progress_bar((count[:closed].to_f / count[:total])*100, + <%= progress_bar((count[:closed].to_f / count[:total])*100, :legend => "#{count[:closed]}/#{count[:total]}", :width => "#{(count[:total].to_f / max * 200).floor}px;") %>
    - <%- issues.each do |issue| -%> - - - - - <%- end -%> - - <% end %> +
    + <% @versions.each do |version| %> +

    + <%= link_to_version version, :name => h(version.name) %> +

    + <%= render :partial => 'versions/overview', :locals => {:version => version} %> + <%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %> + <% if (issues = @issues_by_version[version]) && issues.size > 0 %> + <%= l(:label_related_work_packages) %> + <%= form_tag({}) do -%> + + <%- issues.each do |issue| -%> + + + + + <%- end -%> + + <% end %> + <% end %> + <%= call_hook :view_projects_roadmap_version_bottom, :version => version %> <% end %> - <%= call_hook :view_projects_roadmap_version_bottom, :version => version %> +
    <% end %> - -<% end %> - <% content_for :sidebar do %> -<%= form_tag({}, :method => :get) do %> -

    <%= l(:description_filter) %>

    -<% @types.each do |type| %> -
    -<% end %> -
    - -<% if @project.descendants.active.any? %> - <%= hidden_field_tag 'with_subprojects', 0 %> -
    -<% end %> -

    <%= submit_tag l(:button_apply), :class => 'button -tiny -round -highlight', :name => nil %>

    -<% end %> - -

    <%= l(:label_version_plural) %>

    -<% @versions.each do |version| %> -<%= link_to format_version_name(version), "##{version.name}" %>
    -<% end %> - + <%= form_tag({}, :method => :get) do %> +

    <%= l(:description_filter) %>

    + <% @types.each do |type| %> +
    + <% end %> +
    + + <% if @project.descendants.active.any? %> + <%= hidden_field_tag 'with_subprojects', 0 %> +
    + + <% end %> +

    <%= submit_tag l(:button_apply), :class => 'button -tiny -round -highlight', :name => nil %>

    + <% end %> +

    <%= l(:label_version_plural) %>

    + <% @versions.each do |version| %> + <%= link_to format_version_name(version), "##{version.name}" %>
    + <% end %> <% end %> - <% html_title(l(:label_roadmap)) %> diff --git a/app/views/versions/new.html.erb b/app/views/versions/new.html.erb index 7a6bed6491..9eb8b038ee 100644 --- a/app/views/versions/new.html.erb +++ b/app/views/versions/new.html.erb @@ -26,12 +26,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - <% html_title l("label_version_new") %> -

    <%=l(:label_version_new)%>

    - <%= labelled_tabular_form_for [@project, @version] do |f| %> -<%= render :partial => 'versions/form', :locals => { :f => f } %> -<%= submit_tag l(:button_create), class: 'button -highlight' %> + <%= render :partial => 'versions/form', :locals => { :f => f } %> + <%= submit_tag l(:button_create), class: 'button -highlight' %> <% end %> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 55c6e979d4..3c22740890 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -49,23 +49,22 @@ See doc/COPYRIGHT.rdoc for more details.

    <%=l(:label_project_latest)%>

      - <% for project in @projects %> - <% @project = project %> -
    • - <%= link_to_project project %> (<%= format_time(project.created_on) %>) + <% for project in @projects %> + <% @project = project %> +
    • + <%= link_to_project project %> (<%= format_time(project.created_on) %>) <%= format_text project.short_description, :project => project %> -
    • - <% end %> - <% @project = nil %> + + <% end %> + <% @project = nil %>
    <% end %> <%= call_hook(:view_welcome_index_right, :projects => @projects) %> - <% content_for :header_tags do %> -<%= auto_discovery_link_tag(:atom, {:controller => '/news', :action => 'index', :key => User.current.rss_key, :format => 'atom'}, + <%= auto_discovery_link_tag(:atom, {:controller => '/news', :action => 'index', :key => User.current.rss_key, :format => 'atom'}, :title => "#{Setting.app_title}: #{l(:label_news_latest)}") %> -<%= auto_discovery_link_tag(:atom, {:controller => '/activities', :action => 'index', :key => User.current.rss_key, :format => 'atom'}, + <%= auto_discovery_link_tag(:atom, {:controller => '/activities', :action => 'index', :key => User.current.rss_key, :format => 'atom'}, :title => "#{Setting.app_title}: #{l(:label_activity)}") %> <% end %> diff --git a/app/views/welcome/robots.text.erb b/app/views/welcome/robots.text.erb index aed9469070..162bd767a9 100644 --- a/app/views/welcome/robots.text.erb +++ b/app/views/welcome/robots.text.erb @@ -26,10 +26,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - User-agent: * <% @projects.each do |p| -%> -Disallow: /projects/<%= p.to_param %>/repository + Disallow: /projects/<%= p.to_param %>/repository Disallow: /projects/<%= p.to_param %>/issues Disallow: /projects/<%= p.to_param %>/activity <% end -%> diff --git a/app/views/wiki/annotate.html.erb b/app/views/wiki/annotate.html.erb index 0dffd7f14d..f7b48fff2c 100644 --- a/app/views/wiki/annotate.html.erb +++ b/app/views/wiki/annotate.html.erb @@ -34,29 +34,26 @@ See doc/COPYRIGHT.rdoc for more details. :accesskey => accesskey(:edit)) %> <%= link_to(l(:label_history), {:action => 'history', :id => @page}, :class => 'icon icon-wiki') %> <% end %> -

    <%= h(@page.pretty_title) %>

    - <%= render :partial => 'layouts/action_menu_specific' %> -

    -<%= Version.model_name.human %> <%= link_to h(@annotate.content.version), :action => 'show', :id => @page, :version => @annotate.content.version %> -(<%= h(@annotate.content.journable.author ? @annotate.content.journable.author.name : l(:label_user_anonymous)) %>, <%= format_time(@annotate.content.journable.updated_on) %>) + <%= Version.model_name.human %> <%= link_to h(@annotate.content.version), :action => 'show', :id => @page, :version => @annotate.content.version %> + (<%= h(@annotate.content.journable.author ? @annotate.content.journable.author.name : l(:label_user_anonymous)) %>, <%= format_time(@annotate.content.journable.updated_on) %>)

    - <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %> - - -<% line_num = 1 %> -<% @annotate.lines.each do |line| -%> - - - - - - -<% line_num += 1 %> -<% end -%> - + + <% line_num = 1 %> + <% @annotate.lines.each do |line| -%> + + + + + + + <% line_num += 1 %> + <% end -%> +
    <%= line_num %><%= link_to line[0], :controller => '/wiki', :action => 'show', :project_id => @project, :id => @page, :version => line[0] %><%= h(line[1]) %>
    <%=h line[2] %>
    <%= line_num %><%= link_to line[0], :controller => '/wiki', :action => 'show', :project_id => @project, :id => @page, :version => line[0] %><%= h(line[1]) %> +
    <%=h line[2] %>
    +
    diff --git a/app/views/wiki/date_index.html.erb b/app/views/wiki/date_index.html.erb index b894181502..a5f249ad18 100644 --- a/app/views/wiki/date_index.html.erb +++ b/app/views/wiki/date_index.html.erb @@ -30,35 +30,28 @@ See doc/COPYRIGHT.rdoc for more details. <% content_for :action_menu_specific do %> <%= watcher_link(@wiki, User.current) %> <% end %> -

    <%= l(:label_index_by_date) %>

    - <%= render :partial => 'layouts/action_menu_specific' %> - <% if @pages.empty? %> -

    <%= l(:label_no_data) %>

    +

    <%= l(:label_no_data) %>

    <% end %> - <% @pages_by_date.keys.sort.reverse.each do |date| %> -

    <%= format_date(date) %>

    -
      -<% @pages_by_date[date].each do |page| %> -
    • <%= link_to page.pretty_title, project_wiki_path(page.project, page) %>
    • -<% end %> -
    +

    <%= format_date(date) %>

    +
      + <% @pages_by_date[date].each do |page| %> +
    • <%= link_to page.pretty_title, project_wiki_path(page.project, page) %>
    • + <% end %> +
    <% end %> - <% content_for :sidebar do %> <%= render :partial => 'sidebar' %> <% end %> - <% unless @pages.empty? %> -<%= other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:controller => '/activities', :action => 'index', :show_wiki_edits => 1, :key => User.current.rss_key} %> - <%= f.link_to('HTML', :url => {:action => 'export'}) if User.current.allowed_to?(:export_wiki_pages, @project) %> + <%= other_formats_links do |f| %> + <%= f.link_to 'Atom', :url => {:controller => '/activities', :action => 'index', :show_wiki_edits => 1, :key => User.current.rss_key} %> + <%= f.link_to('HTML', :url => {:action => 'export'}) if User.current.allowed_to?(:export_wiki_pages, @project) %> + <% end %> <% end %> -<% end %> - <% content_for :header_tags do %> -<%= auto_discovery_link_tag(:atom, :controller => '/activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %> + <%= auto_discovery_link_tag(:atom, :controller => '/activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %> <% end %> diff --git a/app/views/wiki/destroy.html.erb b/app/views/wiki/destroy.html.erb index 7df186d922..401f09baab 100644 --- a/app/views/wiki/destroy.html.erb +++ b/app/views/wiki/destroy.html.erb @@ -26,26 +26,23 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -

    <%=h @page.pretty_title %>

    - <%= form_tag({}, :method => :delete) do %> -
    -

    <%= l(:text_wiki_page_destroy_question, :descendants => @descendants_count) %>

    -


    - -<% if @reassignable_to.any? %> -
    -: -<%= label_tag "reassign_to_id", l(:description_wiki_subpages_reassign), :class => "hidden-for-sighted" %> -<%= select_tag 'reassign_to_id', wiki_page_options_for_select(@reassignable_to), +

    +

    <%= l(:text_wiki_page_destroy_question, :descendants => @descendants_count) %>

    +


    + + <% if @reassignable_to.any? %> +
    + : + <%= label_tag "reassign_to_id", l(:description_wiki_subpages_reassign), :class => "hidden-for-sighted" %> + <%= select_tag 'reassign_to_id', wiki_page_options_for_select(@reassignable_to), :onclick => "$('todo_reassign').checked = true;" %> -<% end %> -

    -
    - -<%= submit_tag l(:button_apply), class: 'button -highlight' %> -<%= link_to l(:button_cancel), + <% end %> +

    +
    + <%= submit_tag l(:button_apply), class: 'button -highlight' %> + <%= link_to l(:button_cancel), { controller: '/wiki', action: 'show', project_id: @project, id: @page }, class: 'button' %> <% end %> diff --git a/app/views/wiki/diff.html.erb b/app/views/wiki/diff.html.erb index 78d6c446f6..bd4fbe5904 100644 --- a/app/views/wiki/diff.html.erb +++ b/app/views/wiki/diff.html.erb @@ -30,19 +30,15 @@ See doc/COPYRIGHT.rdoc for more details. <% content_for :action_menu_specific do %> <%= link_to(l(:label_history), {:action => 'history', :id => @page}, :class => 'icon icon-wiki') %> <% end %> -

    <%= h(@page.pretty_title) %>

    - <%= render :partial => 'layouts/action_menu_specific' %> -

    -<%= Version.model_name.human %> <%= link_to @diff.content_from.version, :action => 'show', :id => @page, :project_id => @page.project, :version => @diff.content_from.version %>/<%= @page.content.version %> -(<%= @diff.content_from.user ? link_to_user(@diff.content_from.user) : l(:label_user_anonymous) %>, <%= format_time(@diff.content_from.created_at) %>) -→ -<%= Version.model_name.human %> <%= link_to @diff.content_to.version, :action => 'show', :id => @page, :project_id => @page.project, :version => @diff.content_to.version %>/<%= @page.content.version %> -(<%= @diff.content_to.user ? link_to_user(@diff.content_to.user) : l(:label_user_anonymous) %>, <%= format_time(@diff.content_to.created_at) %>) + <%= Version.model_name.human %> <%= link_to @diff.content_from.version, :action => 'show', :id => @page, :project_id => @page.project, :version => @diff.content_from.version %>/<%= @page.content.version %> + (<%= @diff.content_from.user ? link_to_user(@diff.content_from.user) : l(:label_user_anonymous) %>, <%= format_time(@diff.content_from.created_at) %>) + → + <%= Version.model_name.human %> <%= link_to @diff.content_to.version, :action => 'show', :id => @page, :project_id => @page.project, :version => @diff.content_to.version %>/<%= @page.content.version %> + (<%= @diff.content_to.user ? link_to_user(@diff.content_to.user) : l(:label_user_anonymous) %>, <%= format_time(@diff.content_to.created_at) %>)

    -
    <%= nl2br @html_diff %>
    diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb index 38513131a1..8b0cf6e340 100644 --- a/app/views/wiki/edit.html.erb +++ b/app/views/wiki/edit.html.erb @@ -26,29 +26,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -

    <%=h @page.pretty_title %>

    - <%= form_for @content, :as => :content, :url => {:action => 'update', :id => @page}, :html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %> -<%= f.hidden_field :lock_version %> -<%= error_messages_for 'content' %> - -

    - <%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit), + <%= f.hidden_field :lock_version %> + <%= error_messages_for 'content' %> +

    + <%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit), :value => format_text(@content, :text, :attachments => @content.page.attachments, :edit => true), :'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @project, :format => :json), :'ng-non-bindable' => '' %> -

    -


    <%= f.text_field :comments, :size => 120 %>

    -


    <%= render :partial => 'attachments/form' %>

    -

    <%= submit_tag l(:button_save), class: 'button -highlight' %> - <%= preview_link preview_project_wiki_path(@project, @page), 'wiki_form', class: 'button' %> -

    -<%= wikitoolbar_for 'content_text' %> +

    +


    + <%= f.text_field :comments, :size => 120 %>

    +


    + <%= render :partial => 'attachments/form' %>

    +

    <%= submit_tag l(:button_save), class: 'button -highlight' %> + <%= preview_link preview_project_wiki_path(@project, @page), 'wiki_form', class: 'button' %> +

    + <%= wikitoolbar_for 'content_text' %> <% end %> -
    - <% content_for :header_tags do %> <%= robot_exclusion_tag %> <% end %> diff --git a/app/views/wiki/export.html.erb b/app/views/wiki/export.html.erb index e896097419..4de9d9d63a 100644 --- a/app/views/wiki/export.html.erb +++ b/app/views/wiki/export.html.erb @@ -26,26 +26,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - - -<%=h @page.pretty_title %> - -" /> - - - -<%= format_text @content, :text, :wiki_links => :local, :only_path => false %> - + + <%=h @page.pretty_title %> + + " /> + + + + <%= format_text @content, :text, :wiki_links => :local, :only_path => false %> + diff --git a/app/views/wiki/export_multiple.html.erb b/app/views/wiki/export_multiple.html.erb index c762c702d1..5e4e0dc0ed 100644 --- a/app/views/wiki/export_multiple.html.erb +++ b/app/views/wiki/export_multiple.html.erb @@ -26,38 +26,34 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - - -<%=h @wiki.project.name %> - - - - - -<%= l(:label_index_by_title) %> - - -<% @pages.each do |page| %> -
    - -<%= format_text page.content ,:text, :wiki_links => :anchor %> -<% end %> - - - + + <%=h @wiki.project.name %> + + + + + <%= l(:label_index_by_title) %> + + <% @pages.each do |page| %> +
    + + <%= format_text page.content ,:text, :wiki_links => :anchor %> + <% end %> + + diff --git a/app/views/wiki/history.html.erb b/app/views/wiki/history.html.erb index d9c86548f3..05814b3b79 100644 --- a/app/views/wiki/history.html.erb +++ b/app/views/wiki/history.html.erb @@ -26,51 +26,48 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -

    <%= h(@page.pretty_title) %>

    -

    <%= l(:label_history) %>

    - <%= form_tag({:action => "diff"}, :method => :get) do %> - - - - - - - - - - - -<% show_diff = @versions.size > 1 %> -<% line_num = 1 %> -<% @versions.each do |ver| %> -"> - - - +
    #<%= Journal.human_attribute_name(:updated_on) %><%= Journal.human_attribute_name(:author) %><%= Journal.human_attribute_name(:comments) %>
    <%= link_to h(ver.version), :action => 'show', :id => @page, :project_id => @page.project, :version => ver.version %> - <% if show_diff && (line_num < @versions.size) %> - - <%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") %> - <% end %> - - <% if show_diff && (line_num > 1) %> - - <%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") %> + + + + + + + + + + + + + + <% show_diff = @versions.size > 1 %> + <% line_num = 1 %> + <% @versions.each do |ver| %> + "> + + + + + + + + + <% line_num += 1 %> <% end %> - - - - - - -<% line_num += 1 %> -<% end %> - -
    #<%= Journal.human_attribute_name(:updated_on) %><%= Journal.human_attribute_name(:author) %><%= Journal.human_attribute_name(:comments) %>
    <%= link_to h(ver.version), :action => 'show', :id => @page, :project_id => @page.project, :version => ver.version %> + <% if show_diff && (line_num < @versions.size) %> + + <%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") %> + <% end %> + + <% if show_diff && (line_num > 1) %> + + <%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") %> + <% end %> + <%= format_time(ver.created_at) %><%= link_to_user ver.user %><%=h ver.notes %><%= link_to l(:button_annotate), :action => 'annotate', :id => @page, :version => ver.version %>
    <%= format_time(ver.created_at) %><%= link_to_user ver.user %><%=h ver.notes %><%= link_to l(:button_annotate), :action => 'annotate', :id => @page, :version => ver.version %>
    -<%= submit_tag l(:label_view_diff), :class => 'button -highlight -small' if show_diff %> - -<%= pagination_links_full @versions %> - +
    + <%= submit_tag l(:label_view_diff), :class => 'button -highlight -small' if show_diff %> + <%= pagination_links_full @versions %> <% end %> diff --git a/app/views/wiki/index.html.erb b/app/views/wiki/index.html.erb index 4d2bfcc2b3..cde25822c3 100644 --- a/app/views/wiki/index.html.erb +++ b/app/views/wiki/index.html.erb @@ -36,30 +36,22 @@ See doc/COPYRIGHT.rdoc for more details. <% content_for :action_menu_specific do %> <%= watcher_link(@wiki, User.current) %> <% end %> - <% html_title l(:label_wiki_toc) %> -

    <%= l(:label_index_by_title) %>

    - <%= render :partial => 'layouts/action_menu_specific' %> - <% if @pages.empty? %> -

    <%= l(:label_no_data) %>

    +

    <%= l(:label_no_data) %>

    <% end %> - <%= render_page_hierarchy(@pages_by_parent_id, nil, :timestamp => true) %> - <% content_for :sidebar do %> <%= render :partial => 'sidebar' %> <% end %> - <% unless @pages.empty? %> -<%= other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => {:controller => '/activities', :action => 'index', :show_wiki_edits => 1, :key => User.current.rss_key} %> - <%= f.link_to('HTML', :url => {:action => 'export'}) if User.current.allowed_to?(:export_wiki_pages, @project) %> + <%= other_formats_links do |f| %> + <%= f.link_to 'Atom', :url => {:controller => '/activities', :action => 'index', :show_wiki_edits => 1, :key => User.current.rss_key} %> + <%= f.link_to('HTML', :url => {:action => 'export'}) if User.current.allowed_to?(:export_wiki_pages, @project) %> + <% end %> <% end %> -<% end %> - <% content_for :header_tags do %> -<%= auto_discovery_link_tag(:atom, :controller => '/activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %> + <%= auto_discovery_link_tag(:atom, :controller => '/activities', :action => 'index', :id => @project, :show_wiki_edits => 1, :format => 'atom', :key => User.current.rss_key) %> <% end %> diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index 69c353f69d..ae5f64ced2 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -56,13 +56,10 @@ See doc/COPYRIGHT.rdoc for more details. <% end %> <%= li_unless_nil(link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page}, :class => 'icon-context icon-wiki')) %> <%= li_unless_nil(link_to_if_authorized(l(:button_manage_menu_entry), {:controller => '/wiki_menu_items', :action => 'edit', :project_id => @project.identifier, :id => @page}, :class => 'icon-context icon-settings')) %> - <% end %> - <% breadcrumb_paths(*(@page.ancestors.reverse.collect {|parent| link_to h(parent.breadcrumb_title), {:id => parent, :project_id => parent.project}} + [h(@page.breadcrumb_title)])) %> - <% if @content.version != @page.content.version %> -

    +

    <%= link_to(l(:label_previous), { :action => 'show', :id => @page, :project_id => @page.project, :version => (@content.version - 1) }, :class => 'navigate-left') + " - " if @content.version > 1 %> <%= "#{Version.model_name.human} #{@content.version}/#{@page.content.version}" %> <%= '(' + link_to(l(:label_diff), :controller => '/wiki', :action => 'diff', :id => @page, :project_id => @page.project, :version => @content.version) + ')' if @content.version > 1 %> - @@ -71,30 +68,26 @@ See doc/COPYRIGHT.rdoc for more details.
    <%= @content.author ? link_to_user(@content.author) : l(:label_user_anonymous) %>, <%= format_time(@content.updated_on) %>
    <%=h @content.comments %> -

    -
    +

    +
    <% end %> - <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> - <%= link_to_attachments @page %> - <% if @editable && authorize_for('wiki', 'add_attachment') %> -
    -

    <%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;", +

    +

    <%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;", :id => 'attach_files_link' %>

    -<%= form_tag({ :controller => '/wiki', :action => 'add_attachment', :project_id => @project, :id => @page }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> -
    -

    <%= render :partial => 'attachments/form' %>

    -
    -<%= submit_tag l(:button_add), class: 'button -highlight' %> -<%= link_to l(:button_cancel), {}, + <%= form_tag({ :controller => '/wiki', :action => 'add_attachment', :project_id => @project, :id => @page }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> +
    +

    <%= render :partial => 'attachments/form' %>

    +
    + <%= submit_tag l(:button_add), class: 'button -highlight' %> + <%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;", class: 'button' %> + <% end %> +
    <% end %> -
    -<% end %> - <%= other_formats_links do |f| %> <%= f.link_to 'Atom', :url => { :controller => '/activities', :action => 'index', diff --git a/app/views/wikis/destroy.html.erb b/app/views/wikis/destroy.html.erb index 49e090d128..99b9434975 100644 --- a/app/views/wikis/destroy.html.erb +++ b/app/views/wikis/destroy.html.erb @@ -26,14 +26,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -

    <%=l(:label_confirmation)%>

    -
    -

    <%= h(@project.name) %>
    <%=l(:text_wiki_destroy_confirmation)%>

    - -<%= form_tag({:controller => '/wikis', :action => 'destroy', :id => @project}) do %> -<%= hidden_field_tag "confirm", 1 %> -<%= submit_tag l(:button_delete), class: 'button -highlight' %> -<% end %> -
    +

    <%= h(@project.name) %>
    + <%=l(:text_wiki_destroy_confirmation)%>

    + <%= form_tag({:controller => '/wikis', :action => 'destroy', :id => @project}) do %> + <%= hidden_field_tag "confirm", 1 %> + <%= submit_tag l(:button_delete), class: 'button -highlight' %> + <% end %> + diff --git a/app/views/work_packages/_changesets.html.erb b/app/views/work_packages/_changesets.html.erb index aa4c4bb787..720f4eb095 100644 --- a/app/views/work_packages/_changesets.html.erb +++ b/app/views/work_packages/_changesets.html.erb @@ -26,14 +26,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - <% changesets.each do |changeset| %> -
    +

    <%= link_to_revision(changeset, changeset.project, :text => "#{l(:label_revision)} #{changeset.format_identifier}") %>
    - <%= authoring(changeset.committed_on, changeset.author) %>

    + <%= authoring(changeset.committed_on, changeset.author) %>

    - <%= format_text(changeset, :comments) %> -
    + <%= format_text(changeset, :comments) %>
    +
    <% end %> diff --git a/app/views/work_packages/_list_simple.html.erb b/app/views/work_packages/_list_simple.html.erb index 3518edd712..618f438c51 100644 --- a/app/views/work_packages/_list_simple.html.erb +++ b/app/views/work_packages/_list_simple.html.erb @@ -26,33 +26,34 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - <% if work_packages && work_packages.any? %> -<%= form_tag({}) do %> - - - - - - - - - <% for work_package in work_packages %> - - - - - + <% end %> + +
    #<%= WorkPackage.human_attribute_name(:project)%><%= WorkPackage.human_attribute_name(:type)%><%= WorkPackage.human_attribute_name(:subject)%>
    - <%= check_box_tag("ids[]", work_package.id, false, :style => 'display:none;') %> - <%= link_to_work_package(work_package, :id_only => true) %> - <%= link_to_project(work_package.project) %><%=h work_package.type %> - <%= link_to_work_package(work_package, :subject_only => true) %> (<%=h work_package.status %>) + <%= form_tag({}) do %> + + + + + + + + + + + <% for work_package in work_packages %> + + + + + - - <% end %> - -
    #<%= WorkPackage.human_attribute_name(:project)%><%= WorkPackage.human_attribute_name(:type)%><%= WorkPackage.human_attribute_name(:subject)%>
    + <%= check_box_tag("ids[]", work_package.id, false, :style => 'display:none;') %> + <%= link_to_work_package(work_package, :id_only => true) %> + <%= link_to_project(work_package.project) %><%=h work_package.type %> + <%= link_to_work_package(work_package, :subject_only => true) %> (<%=h work_package.status %>)
    -<% end %> +
    + <% end %> <% else %>

    <%= l(:label_no_data) %>

    <% end %> diff --git a/app/views/work_packages/_two_column_attributes.html.erb b/app/views/work_packages/_two_column_attributes.html.erb index c96e8374c0..161c8a0df5 100644 --- a/app/views/work_packages/_two_column_attributes.html.erb +++ b/app/views/work_packages/_two_column_attributes.html.erb @@ -27,20 +27,15 @@ See doc/COPYRIGHT.rdoc for more details. ++#%> <% left_attributes, right_attributes = attributes.in_groups(2, false) %> -
    - <% left_attributes.each do |attribute| %> - + <% left_attributes.each do |attribute| %>
    <%= attribute.field %>
    - <% end %>
    -
    - <% right_attributes.each do |attribute| %> - + <% right_attributes.each do |attribute| %>
    <%= attribute.field %>
    diff --git a/app/views/work_packages/auto_completes/index.html.erb b/app/views/work_packages/auto_completes/index.html.erb index 626feb65d7..cba812e34b 100644 --- a/app/views/work_packages/auto_completes/index.html.erb +++ b/app/views/work_packages/auto_completes/index.html.erb @@ -26,13 +26,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -
      -<% if @work_packages.any? -%> - <% @work_packages.each do |work_package| -%> - <%= content_tag 'li', h(work_package.to_s), id: work_package.id %> + <% if @work_packages.any? -%> + <% @work_packages.each do |work_package| -%> + <%= content_tag 'li', h(work_package.to_s), id: work_package.id %> + <% end -%> + <% else -%> + <%= content_tag("li", l(:label_none), style: 'display:none') %> <% end -%> -<% else -%> - <%= content_tag("li", l(:label_none), style: 'display:none') %> -<% end -%>
    diff --git a/app/views/work_packages/bulk/edit.html.erb b/app/views/work_packages/bulk/edit.html.erb index c08ad9d283..f13c6ceab6 100644 --- a/app/views/work_packages/bulk/edit.html.erb +++ b/app/views/work_packages/bulk/edit.html.erb @@ -26,108 +26,98 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -

    <%= l(:label_bulk_edit_selected_work_packages) %>

    -
      <%= @work_packages.collect {|i| content_tag('li', link_to(h("#{i.type} ##{i.id}"), work_package_path(i)) + h(": #{i.subject}")) }.join("\n").html_safe %>
    - <%= form_tag(url_for(controller: '/work_packages/bulk', action: :update, ids: @work_packages), method: :put) do %> -<%= @work_packages.collect {|i| hidden_field_tag('ids[]', i.id)}.join.html_safe %> -
    -
    -<%= l(:label_change_properties) %> - -
    -

    - - <%= select_tag('work_package[type_id]', "".html_safe + options_from_collection_for_select(@types, :id, :name)) %> -

    -<% if @available_statuses.any? %> -

    - - <%= select_tag('work_package[status_id]', "".html_safe + options_from_collection_for_select(@available_statuses, :id, :name)) %> -

    -<% end %> -

    - - <%= select_tag('work_package[priority_id]', "".html_safe + options_from_collection_for_select(IssuePriority.all, :id, :name)) %> -

    -

    - - <%= select_tag('work_package[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') + + <%= @work_packages.collect {|i| hidden_field_tag('ids[]', i.id)}.join.html_safe %> +

    +
    + <%= l(:label_change_properties) %> +
    +

    + + <%= select_tag('work_package[type_id]', "".html_safe + options_from_collection_for_select(@types, :id, :name)) %> +

    + <% if @available_statuses.any? %> +

    + + <%= select_tag('work_package[status_id]', "".html_safe + options_from_collection_for_select(@available_statuses, :id, :name)) %> +

    + <% end %> +

    + + <%= select_tag('work_package[priority_id]', "".html_safe + options_from_collection_for_select(IssuePriority.all, :id, :name)) %> +

    +

    + + <%= select_tag('work_package[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') + content_tag('option', l(:label_nobody), :value => 'none') + options_from_collection_for_select(@assignables, :id, :name)) %> -

    -

    - - <%= select_tag('work_package[responsible_id]', content_tag('option', l(:label_no_change_option), :value => '') + +

    +

    + + <%= select_tag('work_package[responsible_id]', content_tag('option', l(:label_no_change_option), :value => '') + content_tag('option', l(:label_nobody), :value => 'none') + options_from_collection_for_select(@responsibles, :id, :name)) %> -

    -<% if @project %> -

    - - <%= select_tag('work_package[category_id]', content_tag('option', l(:label_no_change_option), :value => '') + +

    + <% if @project %> +

    + + <%= select_tag('work_package[category_id]', content_tag('option', l(:label_no_change_option), :value => '') + content_tag('option', l(:label_none), :value => 'none') + options_from_collection_for_select(@project.categories, :id, :name)) %> -

    -<% end %> -<% #TODO: allow editing versions when multiple projects %> -<% if @project %> -

    - - <%= select_tag('work_package[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') + +

    + <% end %> + <% #TODO: allow editing versions when multiple projects %> + <% if @project %> +

    + + <%= select_tag('work_package[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') + content_tag('option', l(:label_none), :value => 'none') + version_options_for_select(@project.shared_versions.open.sort)) %> -

    -<% end %> - -<% @custom_fields.each do |custom_field| %> -

    - <%= blank_custom_field_label_tag('work_package', custom_field) %> - <%= custom_field_tag_for_bulk_edit('work_package', custom_field) %> -

    -<% end %> - -<%= call_hook(:view_work_packages_bulk_edit_details_bottom, { work_packages: @work_packages }) %> -
    - -
    -<% if @project && User.current.allowed_to?(:manage_subtasks, @project) %> -

    - - <%= text_field_tag 'work_package[parent_id]', '', :size => 10 %> -

    -
    -<%= javascript_tag "observeParentIssueField('#{work_packages_auto_complete_path(project_id: @project.id)}')" %> -<% end %> -

    - - <%= text_field_tag 'work_package[start_date]', '', :size => 10 %><%= calendar_for('work_package_start_date') %> -

    -

    - - <%= text_field_tag 'work_package[due_date]', '', :size => 10 %><%= calendar_for('work_package_due_date') %> -

    -<% if WorkPackage.use_field_for_done_ratio? %> -

    - - <%= select_tag 'work_package[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %> -

    -<% end %> -
    - -
    - -
    <%= Journal.human_attribute_name(:notes) %> -<%= label_tag 'notes', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %> -<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit', +

    + <% end %> + <% @custom_fields.each do |custom_field| %> +

    + <%= blank_custom_field_label_tag('work_package', custom_field) %> + <%= custom_field_tag_for_bulk_edit('work_package', custom_field) %> +

    + <% end %> + <%= call_hook(:view_work_packages_bulk_edit_details_bottom, { work_packages: @work_packages }) %> +
    +
    + <% if @project && User.current.allowed_to?(:manage_subtasks, @project) %> +

    + + <%= text_field_tag 'work_package[parent_id]', '', :size => 10 %> +

    +
    + <%= javascript_tag "observeParentIssueField('#{work_packages_auto_complete_path(project_id: @project.id)}')" %> + <% end %> +

    + + <%= text_field_tag 'work_package[start_date]', '', :size => 10 %><%= calendar_for('work_package_start_date') %> +

    +

    + + <%= text_field_tag 'work_package[due_date]', '', :size => 10 %><%= calendar_for('work_package_due_date') %> +

    + <% if WorkPackage.use_field_for_done_ratio? %> +

    + + <%= select_tag 'work_package[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %> +

    + <% end %> +
    +
    +
    <%= Journal.human_attribute_name(:notes) %> + <%= label_tag 'notes', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %> + <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit', :'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @project, :format => :json) %> -<%= wikitoolbar_for 'notes' %> -

    <%= send_notification_option %>

    -
    -
    - -

    <%= submit_tag l(:button_submit), class: 'button -highlight' %>

    + <%= wikitoolbar_for 'notes' %> +

    <%= send_notification_option %>

    + +
    +

    <%= submit_tag l(:button_submit), class: 'button -highlight' %>

    <% end %> diff --git a/app/views/work_packages/calendars/index.html.erb b/app/views/work_packages/calendars/index.html.erb index 2a426544bb..57b51037db 100644 --- a/app/views/work_packages/calendars/index.html.erb +++ b/app/views/work_packages/calendars/index.html.erb @@ -26,59 +26,51 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> -

    <%= @query.new_record? ? l(:label_calendar) : h(@query.name) %>

    - <%= form_tag(work_packages_calendar_index_path, :method => :get, :id => 'query_form') do %> <%= hidden_field_tag('project_id', @project.to_param) if @project%> -
    "> - <%= l(:label_filter_plural) %> -
    > - <%= render :partial => 'queries/filters', :locals => {:query => @query} %> -
    -
    - -

    - <%= link_to_previous_month(@year, @month, :project => @project) %> | <%= link_to_next_month(@year, @month, :project => @project) %> -

    - -
    -
    - <%= label_tag('month', l(:label_month)) %> - <%= select_month(@month, { :prefix => "month", :discard_type => true }, class: 'form--select -small') %> -
    -
    - <%= label_tag('year', l(:label_year)) %> - <%= select_year(@year, { :prefix => "year", :discard_type => true }, class: 'form--select -small') %> -
    -
    - <%= link_to_remote l(:button_apply), +
    "> + <%= l(:label_filter_plural) %> +
    > + <%= render :partial => 'queries/filters', :locals => {:query => @query} %> +
    +
    +

    + <%= link_to_previous_month(@year, @month, :project => @project) %> | <%= link_to_next_month(@year, @month, :project => @project) %> +

    +
    +
    + <%= label_tag('month', l(:label_month)) %> + <%= select_month(@month, { :prefix => "month", :discard_type => true }, class: 'form--select -small') %> +
    +
    + <%= label_tag('year', l(:label_year)) %> + <%= select_year(@year, { :prefix => "year", :discard_type => true }, class: 'form--select -small') %> +
    +
    + <%= link_to_remote l(:button_apply), { :url => { :set_filter => 1 }, :method => :get, :update => "content", :with => "jQuery('#query_form').serialize()" }, :class => 'button -small icon icon-yes' %> - - <%= link_to_remote l(:button_clear), + <%= link_to_remote l(:button_clear), { :url => { :project_id => @project, :set_filter => 1 }, :method => :get, :update => "content", }, :class => 'button -small icon icon-undo' %> +
    -
    <% end %> - <%= error_messages_for 'query' %> <% if @query.valid? %> -<%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %> - -

    - <%= l(:text_tip_work_package_begin_day) %> - <%= l(:text_tip_work_package_end_day) %> - <%= l(:text_tip_work_package_begin_end_day) %> -

    + <%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %> +

    + <%= l(:text_tip_work_package_begin_day) %> + <%= l(:text_tip_work_package_end_day) %> + <%= l(:text_tip_work_package_begin_end_day) %> +

    <% end %> - <% content_for :sidebar do %> <%= render :partial => 'work_packages/sidebar' %> <% end %> diff --git a/app/views/work_packages/moves/new.html.erb b/app/views/work_packages/moves/new.html.erb index 111c5d6a53..b76d9e0b18 100644 --- a/app/views/work_packages/moves/new.html.erb +++ b/app/views/work_packages/moves/new.html.erb @@ -26,102 +26,85 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - <%= header_tags %> -

    <%= @copy ? l(:button_copy) : l(:button_move) %>

    -
      -<% @work_packages.each do |work_package| -%> -
    • <%= link_to_work_package work_package %>
    • -<% end -%> + <% @work_packages.each do |work_package| -%> +
    • <%= link_to_work_package work_package %>
    • + <% end -%>
    - <%= form_tag({:action => 'create'}, :id => 'move_form') do %> -<%= @work_packages.collect {|i| hidden_field_tag('ids[]', i.id)}.join.html_safe %> - -
    -
    -<%= l(:label_change_properties) %> - -
    -

    -<%= select_tag "new_project_id", + <%= @work_packages.collect {|i| hidden_field_tag('ids[]', i.id)}.join.html_safe %> +

    +
    + <%= l(:label_change_properties) %> +
    +

    + <%= select_tag "new_project_id", project_tree_options_for_select(@allowed_projects, :selected => @target_project), :onchange => remote_function(:url => { :action => 'new' }, :method => :get, :update => 'content', :with => "Form.serialize('move_form')") %>

    - -

    - <%= select_tag("new_type_id", +

    + <%= select_tag("new_type_id", content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@types, "id", "name")) %> -

    - -

    - - <%= select_tag('status_id', +

    +

    + + <%= select_tag('status_id', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@available_statuses, :id, :name)) %> -

    - -

    - - <%= select_tag('priority_id', +

    +

    + + <%= select_tag('priority_id', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(IssuePriority.all, :id, :name)) %> -

    - -

    - - <%= select_tag('assigned_to_id', +

    +

    + + <%= select_tag('assigned_to_id', content_tag('option', l(:label_no_change_option), :value => '') + content_tag('option', l(:label_nobody), :value => 'none') + options_from_collection_for_select(@target_project.possible_assignees, :id, :name)) %> -

    -

    - - <%= select_tag('responsible_id', +

    +

    + + <%= select_tag('responsible_id', content_tag('option', l(:label_no_change_option), :value => '') + content_tag('option', l(:label_nobody), :value => 'none') + options_from_collection_for_select(@target_project.possible_responsibles, :id, :name)) %> -

    -
    - -
    -

    - - <%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %> -

    - -

    - - <%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %> -

    -
    - -
    - -
    <%= Journal.human_attribute_name(:notes) %> - -<%= label_tag 'notes', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %> -<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit', +

    +
    +
    +

    + + <%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %> +

    +

    + + <%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %> +

    +
    +
    +
    <%= Journal.human_attribute_name(:notes) %> + <%= label_tag 'notes', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %> + <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit', :'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @target_project, :format => :json) %> -<%= wikitoolbar_for 'notes' %> -
    - -<%= call_hook(:view_work_packages_move_bottom, :work_packages => @work_packages, :target_project => @target_project, :copy => !!@copy) %> -
    - -<% if @copy %> - <%= hidden_field_tag("copy") %> - <%= submit_tag l(:button_copy), class: 'button -highlight' %> - <%= submit_tag l(:button_copy_and_follow), :name => 'follow', class: 'button -highlight' %> -<% else %> - <%= submit_tag l(:button_move), class: 'button -highlight' %> - <%= submit_tag l(:button_move_and_follow), :name => 'follow', class: 'button -highlight' %> -<% end %> + <%= wikitoolbar_for 'notes' %> + + <%= call_hook(:view_work_packages_move_bottom, :work_packages => @work_packages, :target_project => @target_project, :copy => !!@copy) %> +
    + <% if @copy %> + <%= hidden_field_tag("copy") %> + <%= submit_tag l(:button_copy), class: 'button -highlight' %> + <%= submit_tag l(:button_copy_and_follow), :name => 'follow', class: 'button -highlight' %> + <% else %> + <%= submit_tag l(:button_move), class: 'button -highlight' %> + <%= submit_tag l(:button_move_and_follow), :name => 'follow', class: 'button -highlight' %> + <% end %> <% end %> <% content_for :header_tags do %> <%= robot_exclusion_tag %> diff --git a/app/views/work_packages/reports/_report.html.erb b/app/views/work_packages/reports/_report.html.erb index 9fe59c800f..f3085836f1 100644 --- a/app/views/work_packages/reports/_report.html.erb +++ b/app/views/work_packages/reports/_report.html.erb @@ -31,59 +31,59 @@ See doc/COPYRIGHT.rdoc for more details.

    <%=l(:label_no_data)%>

    <% else %> <% column_names = report.statuses.map(&:name) + [l(:label_open_work_packages), l(:label_closed_work_packages), l(:label_total)] %> -<% col_width = 70 / (column_names.length+3) %> - - - - -<% column_names.each do |name| %> - -<% end %> - - - -<% for row in report.rows %> -"> - + + <% end %> + +
    <%= name %>
    - <%= link_to h(row.name), + <% col_width = 70 / (column_names.length+3) %> + + + + + <% column_names.each do |name| %> + + <% end %> + + + + <% for row in report.rows %> + "> + -<% for status in report.statuses %> - + <% for status in report.statuses %> + -<% end %> - + <% end %> + - + - + - -<% end %> - -
    <%= name %>
    + <%= link_to h(row.name), project_report_property_path((row.is_a?(Project) ? row : @project), "#{report.field}", row.id) %> - - <%= aggregate_link report.data, + + <%= aggregate_link report.data, { report.field => row.id, "status_id" => status.id }, project_report_property_status_path((row.is_a?(Project) ? row : @project), status.id, "#{report.field}", row.id) %> - - <%= aggregate_link report.data, + + <%= aggregate_link report.data, { report.field => row.id, "closed" => 0 }, project_report_property_open_path((row.is_a?(Project) ? row : @project), "#{report.field}", row.id) %> - - <%= aggregate_link report.data, + + <%= aggregate_link report.data, { report.field => row.id, "closed" => 1 }, project_report_property_closed_path((row.is_a?(Project) ? row : @project), "#{report.field}", row.id) %> - - <%= aggregate_link report.data, + + <%= aggregate_link report.data, { report.field => row.id }, project_report_property_path((row.is_a?(Project) ? row : @project), "#{report.field}", row.id) %> -
    +
    <% end reset_cycle %> diff --git a/app/views/work_packages/reports/report.html.erb b/app/views/work_packages/reports/report.html.erb index 64a8aad216..12afafe206 100644 --- a/app/views/work_packages/reports/report.html.erb +++ b/app/views/work_packages/reports/report.html.erb @@ -26,29 +26,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - <% html_title l(:label_summary) %> -

    <%=l(:label_summary)%>

    -
    -<% + <% [@type_report, @priority_report, @assignee_report, @responsible_report, @author_report].each do |report| %> - <%= render :partial => 'report_category', :locals => { report: report} %> -<% end %> -<%= call_hook(:view_reports_issue_report_split_content_left, :project => @project) %> + <%= render :partial => 'report_category', :locals => { report: report} %> + <% end %> + <%= call_hook(:view_reports_issue_report_split_content_left, :project => @project) %>
    -
    -<% + <% additional_reports = [@version_report] additional_reports << @subproject_report if @project.children.any? additional_reports << @category_report %> - -<% additional_reports.each do |report| %> - <%= render :partial => 'report_category', :locals => { report: report } %> -
    -<% end %> -<%= call_hook(:view_reports_issue_report_split_content_right, :project => @project) %> + <% additional_reports.each do |report| %> + <%= render :partial => 'report_category', :locals => { report: report } %> +
    + <% end %> + <%= call_hook(:view_reports_issue_report_split_content_right, :project => @project) %>
    diff --git a/app/views/workflows/_form.html.erb b/app/views/workflows/_form.html.erb index ba9e70f5c0..d56d4313d5 100644 --- a/app/views/workflows/_form.html.erb +++ b/app/views/workflows/_form.html.erb @@ -26,50 +26,48 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - - - - + + - - - - - <% for new_status in @statuses %> - + + + + <% for new_status in @statuses %> + - <% end %> - - - - <% for old_status in @statuses %> - "> - + <% end %> + + + + <% for old_status in @statuses %> + "> + - <% for new_status in @statuses -%> - + <% for new_status in @statuses -%> + - <% end -%> - - <% end %> - + + <% end -%> + + <% end %> +
    - <%= link_to_function(icon_wrapper('icon-context icon-yes',"#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), "toggleCheckboxesBySelector('table.transitions-#{name} input')", +
    + <%= link_to_function(icon_wrapper('icon-context icon-yes',"#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), "toggleCheckboxesBySelector('table.transitions-#{name} input')", :class => 'no-decoration-on-hover', :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}", :alt => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> - <%=l(:label_current_status)%> - <%=l(:label_new_statuses_allowed)%>
    - <%= link_to_function(icon_wrapper('icon-context icon-yes',"#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), "toggleCheckboxesBySelector('table.transitions-#{name} input.new-status-#{new_status.id}')", + <%=l(:label_current_status)%> + + <%=l(:label_new_statuses_allowed)%>
    + <%= link_to_function(icon_wrapper('icon-context icon-yes',"#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), "toggleCheckboxesBySelector('table.transitions-#{name} input.new-status-#{new_status.id}')", :class => 'no-decoration-on-hover', :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}", :alt => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> - <%=h new_status.name %> -
    - <%= link_to_function(icon_wrapper('icon-context icon-yes',"#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.id}')", + <%=h new_status.name %> +
    + <%= link_to_function(icon_wrapper('icon-context icon-yes',"#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), "toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.id}')", :class => 'no-decoration-on-hover', :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}", :alt => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}") %> - - <%=h old_status.name %> - - <%= check_box_tag "status[#{ old_status.id }][#{new_status.id}][]", name, workflows.detect {|w| w.old_status_id == old_status.id && w.new_status_id == new_status.id}, + <%=h old_status.name %> + + <%= check_box_tag "status[#{ old_status.id }][#{new_status.id}][]", name, workflows.detect {|w| w.old_status_id == old_status.id && w.new_status_id == new_status.id}, :class => "old-status-#{old_status.id} new-status-#{new_status.id}" %> -
    diff --git a/app/views/workflows/copy.html.erb b/app/views/workflows/copy.html.erb index c88e728142..429dc03880 100644 --- a/app/views/workflows/copy.html.erb +++ b/app/views/workflows/copy.html.erb @@ -51,7 +51,7 @@ See doc/COPYRIGHT.rdoc for more details. "".html_safe + "".html_safe + options_from_collection_for_select(@roles, 'id', 'name', @source_role && @source_role.id)) %> - +

    @@ -66,7 +66,7 @@ See doc/COPYRIGHT.rdoc for more details.
    - <%= select_tag 'target_role_ids', + <%= select_tag 'target_role_ids', "".html_safe + options_from_collection_for_select(@roles, 'id', 'name', @target_roles && @target_roles.map(&:id)), :multiple => true %>
    diff --git a/app/views/workflows/edit.html.erb b/app/views/workflows/edit.html.erb index 20b8dbc701..81cd0628b7 100644 --- a/app/views/workflows/edit.html.erb +++ b/app/views/workflows/edit.html.erb @@ -26,31 +26,23 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - <%= render :partial => 'action_menu' %> -

    <%= Workflow.model_name.human %>

    - <%= render :partial => 'layouts/action_menu_specific' %> -

    <%=l(:text_workflow_edit)%>:

    - <%= form_tag({}, :method => 'get') do %> -

    -

    + - -

    -

    -<%= submit_tag l(:button_edit), :name => nil, :accesskey => accesskey(:edit), class: 'button' %> -

    + <%= hidden_field_tag 'used_statuses_only', '0' %> + +

    +

    + <%= submit_tag l(:button_edit), :name => nil, :accesskey => accesskey(:edit), class: 'button' %> +

    <% end %> - <% if @type && @role && @statuses.any? %> <%= form_tag({}, :id => 'workflow_form' ) do %> <%= hidden_field_tag 'type_id', @type.id %> @@ -69,7 +61,7 @@ See doc/COPYRIGHT.rdoc for more details.
    <%= l(:label_additional_workflow_transitions_for_assignee) %>
    - <%= render :partial => 'form', :locals => {:name => 'assignee', :workflows => @workflows['assignee']} %> + <%= render :partial => 'form', :locals => {:name => 'assignee', :workflows => @workflows['assignee']} %>
    <%= javascript_tag "hideFieldset($('assignee_workflows'))" unless @workflows['assignee'].present? %> diff --git a/app/views/workflows/index.html.erb b/app/views/workflows/index.html.erb index fc2d0059f9..e80fa8dfd7 100644 --- a/app/views/workflows/index.html.erb +++ b/app/views/workflows/index.html.erb @@ -26,43 +26,37 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> - <%= render :partial => 'action_menu' %> - <% html_title l(:label_administration), l(:label_workflow_plural) -%> -

    <%= l(:label_workflow_plural) %>

    - <%= render :partial => 'layouts/action_menu_specific' %> - <% if @workflow_counts.empty? %> -

    <%= l(:label_no_data) %>

    +

    <%= l(:label_no_data) %>

    <% else %> -
    - - - - - <% @workflow_counts.first.last.each do |role, count| %> - - - <% end %> - - - -<% @workflow_counts.each do |type, roles| -%> - - - <% roles.each do |role, count| -%> - - <% end -%> - -<% end -%> - -
    - <%= content_tag(role.builtin? ? 'em' : 'span', h(role.name)) %> -
    <%= h type %> - <%= link_to((count > 0 ? count : image_tag('webalys/red_x.png')), {:action => 'edit', :role_id => role, :type_id => type}, :title => l(:button_edit)) %> -
    -
    +
    + + + + + <% @workflow_counts.first.last.each do |role, count| %> + + <% end %> + + + + <% @workflow_counts.each do |type, roles| -%> + + + <% roles.each do |role, count| -%> + + <% end -%> + + <% end -%> + +
    + <%= content_tag(role.builtin? ? 'em' : 'span', h(role.name)) %> +
    <%= h type %> + <%= link_to((count > 0 ? count : image_tag('webalys/red_x.png')), {:action => 'edit', :role_id => role, :type_id => type}, :title => l(:button_edit)) %> +
    +
    <% end %>