OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Replace fieldsets by real toolbars
Henriette Dingerb99b03bea530
diff --git a/app/views/project_settings/_activities.html.erb b/app/views/project_settings/_activities.html.erbindex aba31f31ac4..f36ff4b7ad6 100644--- a/app/views/project_settings/_activities.html.erb+++ b/app/views/project_settings/_activities.html.erb@@ -26,6 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.See docs/COPYRIGHT.rdoc for more details.++#%>+<%= toolbar title: l(:label_enabled_project_activities) %>+<% if @project.activities(true).any? %><%= form_tag project_enumerations_path(@project),method: :put,diff --git a/app/views/project_settings/_categories.html.erb b/app/views/project_settings/_categories.html.erbindex bba8a4afc47..a035c1e489a 100644--- a/app/views/project_settings/_categories.html.erb+++ b/app/views/project_settings/_categories.html.erb@@ -26,93 +26,93 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.See docs/COPYRIGHT.rdoc for more details.++#%>++<%= toolbar title: l(:label_available_project_work_package_categories) do %>+ <% if current_user.allowed_to?(:manage_categories, @project) %>+ <li class="toolbar-item">+ <%= link_to_if_authorized({ controller: '/categories', action: 'new', project_id: @project },+ { aria: { label: t(:label_work_package_category_new) },+ title: t(:label_work_package_category_new),+ class: 'button -highlight'}) do %>+ <%= op_icon('icon-add button--icon') %>+ <span class="button--text"><%= t('activerecord.models.category') %></span>+ <% end %>+ </li>+ <% end %>+<% end %>+<% if @project.categories.any? %>- <fieldset class="form--fieldset">- <legend class="form--fieldset-legend">- <%= l(:label_available_project_work_package_categories) %>- </legend>- <div class="form--fieldset-control">- <span class="form--fieldset-control-container">- <%= link_to_if_authorized({ controller: '/categories', action: 'new', project_id: @project },- { aria: { label: t(:label_work_package_category_new) },- title: t(:label_work_package_category_new) }) do %>- <%= op_icon('icon-add icon-small') %>- <span><%= t('activerecord.models.category') %></span>- <% end %>- </span>- </div>- <div class="generic-table--container">- <div class="generic-table--results-container">- <table class="generic-table">- <colgroup>- <col highlight-col>- <col highlight-col>- <col>- </colgroup>- <thead>- <tr>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Category.model_name.human %>- </span>- </div>+ <div class="generic-table--container">+ <div class="generic-table--results-container">+ <table class="generic-table">+ <colgroup>+ <col highlight-col>+ <col highlight-col>+ <col>+ </colgroup>+ <thead>+ <tr>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Category.model_name.human %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Category.human_attribute_name(:assigned_to) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Category.human_attribute_name(:assigned_to) %>+ </span></div>- </th>- <th><div class="generic-table--empty-header"></div></th>- </tr>- </thead>- <tbody>- <% for category in @project.categories %>- <% unless category.new_record? %>- <tr>- <td><%=h(category.name) %></td>- <td><%=h(category.assigned_to.name) if category.assigned_to %></td>- <td class="buttons">- <%= link_to_if_authorized '',- { controller: '/categories', action: 'edit', id: category },- class: 'icon icon-edit',- title: t(:button_edit) %>- <%= link_to_if_authorized '',- { controller: '/categories', action: 'destroy', id: category },- data: { confirm: l(:text_are_you_sure) },- method: :delete,- class: 'icon icon-delete',- title: t(:button_delete) %>- </td>- </tr>- <% end %>+ </div>+ </th>+ <th><div class="generic-table--empty-header"></div></th>+ </tr>+ </thead>+ <tbody>+ <% for category in @project.categories %>+ <% unless category.new_record? %>+ <tr>+ <td><%=h(category.name) %></td>+ <td><%=h(category.assigned_to.name) if category.assigned_to %></td>+ <td class="buttons">+ <%= link_to_if_authorized '',+ { controller: '/categories', action: 'edit', id: category },+ class: 'icon icon-edit',+ title: t(:button_edit) %>+ <%= link_to_if_authorized '',+ { controller: '/categories', action: 'destroy', id: category },+ data: { confirm: l(:text_are_you_sure) },+ method: :delete,+ class: 'icon icon-delete',+ title: t(:button_delete) %>+ </td>+ </tr><% end %>- </tbody>- </table>+ <% end %>+ </tbody>+ </table>- </div></div>- <% if @project.categories.any? %>- <div class="generic-table--action-buttons">- <%= link_to_if_authorized({ controller: '/categories', action: 'new', project_id: @project },- { class: 'button -alt-highlight',- aria: {label: t(:label_work_package_category_new)},- title: t(:label_work_package_category_new)}) do %>- <%= op_icon('button--icon icon-add') %>- <span class="button--text"><%= t('activerecord.models.category') %></span>- <% end %>- </div>- <% end %>- <% else %>- <%= no_results_box action_url: new_project_category_path(@project),- display_action: authorize_for('categories', 'new'),- custom_title: t('projects.settings.categories.no_results_title_text'),- custom_action_text: t('projects.settings.categories.no_results_content_text') %>+ </div>+ <% if @project.categories.any? %>+ <div class="generic-table--action-buttons">+ <%= link_to_if_authorized({ controller: '/categories', action: 'new', project_id: @project },+ { class: 'button -alt-highlight',+ aria: {label: t(:label_work_package_category_new)},+ title: t(:label_work_package_category_new)}) do %>+ <%= op_icon('button--icon icon-add') %>+ <span class="button--text"><%= t('activerecord.models.category') %></span>+ <% end %>+ </div><% end %>-</fieldset>+<% else %>+ <%= no_results_box action_url: new_project_category_path(@project),+ display_action: authorize_for('categories', 'new'),+ custom_title: t('projects.settings.categories.no_results_title_text'),+ custom_action_text: t('projects.settings.categories.no_results_content_text') %>+<% end %>diff --git a/app/views/project_settings/_custom_fields.html.erb b/app/views/project_settings/_custom_fields.html.erbindex 3c3b6701790..b8857a0ae1c 100644--- a/app/views/project_settings/_custom_fields.html.erb+++ b/app/views/project_settings/_custom_fields.html.erb@@ -26,18 +26,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.See docs/COPYRIGHT.rdoc for more details.++#%>-<% if current_user.admin? %>-<fieldset class="form--fieldset">- <legend class="form--fieldset-legend"><%= t(:label_custom_field_new) %></legend>- <p><%= t('custom_fields.text_add_new_custom_field') %></p>- <%= link_to new_custom_field_path(type: 'WorkPackageCustomField'),- { class: 'button -alt-highlight',- aria: {label: t(:label_custom_field_new)},- title: t(:label_custom_field_new)} do %>- <%= op_icon('button--icon icon-add') %>- <span class="button--text"><%= CustomField.model_name.human %></span>++<%= toolbar title: l(:label_enabled_project_custom_fields) do %>+ <% if current_user.admin? %>+ <li class="toolbar-item">+ <%= link_to new_custom_field_path(type: 'WorkPackageCustomField'),+ { class: 'button -alt-highlight',+ aria: {label: t(:label_custom_field_new)},+ title: t(:label_custom_field_new)} do %>+ <%= op_icon('button--icon icon-add') %>+ <span class="button--text"><%= CustomField.model_name.human %></span>+ <% end %>+ </li><% end %>-</fieldset><% end %><% if @wp_custom_fields.any? %>diff --git a/app/views/project_settings/_modules.html.erb b/app/views/project_settings/_modules.html.erbindex d21177d9cc3..44980cf7e13 100644--- a/app/views/project_settings/_modules.html.erb+++ b/app/views/project_settings/_modules.html.erb@@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.See docs/COPYRIGHT.rdoc for more details.++#%>+<%= toolbar title: l(:label_enabled_project_modules) %><%= labelled_tabular_form_for @project,url: { controller: '/projects', action: 'modules', id: @project },diff --git a/app/views/project_settings/_types.html.erb b/app/views/project_settings/_types.html.erbindex 66e58e94857..8cf5cd97309 100644--- a/app/views/project_settings/_types.html.erb+++ b/app/views/project_settings/_types.html.erb@@ -27,6 +27,8 @@ See docs/COPYRIGHT.rdoc for more details.++#%>+<%= toolbar title: l(:label_available_project_work_package_types) %>+<% if Type.all.any? %><%= form_for @project,url: { controller: '/projects', action: 'types', id: @project },diff --git a/app/views/project_settings/_versions.html.erb b/app/views/project_settings/_versions.html.erbindex b99997211df..d32286dedf7 100644--- a/app/views/project_settings/_versions.html.erb+++ b/app/views/project_settings/_versions.html.erb@@ -26,159 +26,159 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.See docs/COPYRIGHT.rdoc for more details.++#%>++<%= toolbar title: l(:label_available_project_versions) do %>+ <% if current_user.allowed_to?(:manage_versions, @project) %>+ <li class="toolbar-item">+ <%= link_to_if_authorized({ controller: '/versions', action: 'new', project_id: @project },+ { class: 'button -alt-highlight',+ aria: {label: t(:label_version_new)},+ title: t(:label_version_new)}) do %>+ <%= op_icon('button--icon icon-add') %>+ <span class="button--text"><%= t('activerecord.models.version') %></span>+ <% end %>+ </li>+ <% end %>+<% end %>+<% if @project.shared_versions.any? %>- <fieldset class="form--fieldset">- <legend class="form--fieldset-legend">- <%= l(:label_available_project_versions) %>- </legend>- <div class="form--fieldset-control">- <span class="form--fieldset-control-container">- <%= link_to_if_authorized({ controller: '/versions', action: 'new', project_id: @project },- { aria: { label: t(:label_version_new) },- title: t(:label_version_new) }) do %>- <%= op_icon('icon-add icon-small') %>- <span><%= l(:label_version) %></span>- <% end %>- </span>- </div>- <div class="generic-table--container">- <div class="generic-table--results-container">- <table class="generic-table">- <colgroup>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col>- </colgroup>- <thead>- <tr>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.model_name.human %>- </span>- </div>+ <div class="generic-table--container">+ <div class="generic-table--results-container">+ <table class="generic-table">+ <colgroup>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col>+ </colgroup>+ <thead>+ <tr>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.model_name.human %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.human_attribute_name(:start_date) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.human_attribute_name(:start_date) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.human_attribute_name(:effective_date) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.human_attribute_name(:effective_date) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.human_attribute_name(:description) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.human_attribute_name(:description) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.human_attribute_name(:status) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.human_attribute_name(:status) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.human_attribute_name(:sharing) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.human_attribute_name(:sharing) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= WikiPage.model_name.human %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= WikiPage.model_name.human %>+ </span></div>- </th>- <th><div class="generic-table--empty-header"></div></th>+ </div>+ </th>+ <th><div class="generic-table--empty-header"></div></th>+ </tr>+ </thead>+ <tbody>+ <% for version in @project.shared_versions.sort %>+ <tr class="version <%= 'shared' if version.project != @project %>">+ <td class="name <%=h version.status %><%= ' icon-context icon-link' if version.project != @project %>">+ <%= link_to_version version %>+ </td>+ <td class="date"><%= format_date(version.start_date) %></td>+ <td class="date"><%= format_date(version.effective_date) %></td>+ <td class="description"><%=h version.description %></td>+ <td class="status"><%= l("version_status_#{version.status}") %></td>+ <td class="sharing"><%=h format_version_sharing(version.sharing) %></td>+ <td>+ <%= link_to_if_authorized( h(version.wiki_page_title),+ { controller: '/wiki',+ action: 'show',+ project_id: version.project,+ id: version.wiki_page_title }) ||+ h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>+ </td>+ <td class="buttons">+ <% if version.project == @project %>+ <%= link_to_if_authorized '',+ { controller: '/versions', action: 'edit', id: version },+ class: 'icon icon-edit',+ title: t(:button_edit) %>+ <%= link_to_if_authorized '',+ { controller: '/versions', action: 'destroy', id: version },+ data: { confirm: l(:text_are_you_sure) },+ method: :delete,+ class: 'icon icon-delete',+ title: t(:button_delete) %>+ <% end %>+ </td></tr>- </thead>- <tbody>- <% for version in @project.shared_versions.sort %>- <tr class="version <%= 'shared' if version.project != @project %>">- <td class="name <%=h version.status %><%= ' icon-context icon-link' if version.project != @project %>">- <%= link_to_version version %>- </td>- <td class="date"><%= format_date(version.start_date) %></td>- <td class="date"><%= format_date(version.effective_date) %></td>- <td class="description"><%=h version.description %></td>- <td class="status"><%= l("version_status_#{version.status}") %></td>- <td class="sharing"><%=h format_version_sharing(version.sharing) %></td>- <td>- <%= link_to_if_authorized( h(version.wiki_page_title),- { controller: '/wiki',- action: 'show',- project_id: version.project,- id: version.wiki_page_title }) ||- h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>- </td>- <td class="buttons">- <% if version.project == @project %>- <%= link_to_if_authorized '',- { controller: '/versions', action: 'edit', id: version },- class: 'icon icon-edit',- title: t(:button_edit) %>- <%= link_to_if_authorized '',- { controller: '/versions', action: 'destroy', id: version },- data: { confirm: l(:text_are_you_sure) },- method: :delete,- class: 'icon icon-delete',- title: t(:button_delete) %>- <% end %>- </td>- </tr>- <% end %>- </tbody>- </table>+ <% end %>+ </tbody>+ </table>- </div></div>- <div class="generic-table--action-buttons">- <%= link_to_if_authorized({ controller: '/versions', action: 'new', project_id: @project },- { class: 'button -alt-highlight',- aria: {label: t(:label_version_new)},- title: t(:label_version_new)}) do %>- <%= op_icon('button--icon icon-add') %>- <span class="button--text"><%= t('activerecord.models.version') %></span>- <% end %>- </div>- <% else %>- <%= no_results_box action_url: new_project_version_path(@project),- display_action: authorize_for('versions', 'new'),- custom_title: t('projects.settings.versions.no_results_title_text'),- custom_action_text: t('projects.settings.versions.no_results_content_text')- %>- <% end %>-</fieldset>+ </div>+ <div class="generic-table--action-buttons">+ <%= link_to_if_authorized({ controller: '/versions', action: 'new', project_id: @project },+ { class: 'button -alt-highlight',+ aria: {label: t(:label_version_new)},+ title: t(:label_version_new)}) do %>+ <%= op_icon('button--icon icon-add') %>+ <span class="button--text"><%= t('activerecord.models.version') %></span>+ <% end %>+ </div>+<% else %>+ <%= no_results_box action_url: new_project_version_path(@project),+ display_action: authorize_for('versions', 'new'),+ custom_title: t('projects.settings.versions.no_results_title_text'),+ custom_action_text: t('projects.settings.versions.no_results_content_text')+ %>+<% end %><% if @project.versions.any? %><div class="contextual">diff --git a/app/views/project_settings/show.html.erb b/app/views/project_settings/show.html.erbindex e925f4de69b..cf74184ed02 100644--- a/app/views/project_settings/show.html.erb+++ b/app/views/project_settings/show.html.erb@@ -27,47 +27,5 @@ See docs/COPYRIGHT.rdoc for more details.++#%><% html_title(l(:label_project_settings)) -%>-<% breadcrumb_paths(l(:label_project_settings)) %>-<%= toolbar title: l(:label_project_settings) do %>- <% if User.current.allowed_to?(:add_subprojects, @project) %>- <li class="toolbar-item">- <%= link_to new_project_path(parent_id: @project.id),- { class: 'button -alt-highlight',- aria: {label: t(:label_subproject_new)},- title: t(:label_subproject_new)} do %>- <%= op_icon('button--icon icon-add') %>- <span class="button--text"><%= t(:label_subproject) %></span>- <% end %>- </li>- <% end %>- <% if @project.copy_allowed? %>- <li class="toolbar-item hidden-for-mobile">- <%= link_to copy_from_project_path(@project, coming_from: :settings), class: 'button copy', accesskey: accesskey(:copy) do %>- <%= op_icon('button--icon icon-copy') %>- <span class="button--text"><%= t(:label_copy_project) %></span>- <% end %>- </li>- <% end %>- <% if User.current.admin? %>- <li class="toolbar-item hidden-for-mobile">- <%= link_to(archive_project_path(@project, status: '', name: @project.name),- data: { confirm: t('project.archive.are_you_sure', name: @project.name) },- method: :put,- title: t(:label_archive_project),- class: 'button') do %>- <%= op_icon('button--icon icon-locked') %>- <span class="button--text"><%= t(:label_archive_project) %></span>- <% end %>- </li>- <li class="toolbar-item">- <%= link_to confirm_destroy_project_path(@project),- class: 'button delete',- title: t(:label_delete_project) do %>- <%= op_icon('button--icon icon-delete') %>- <span class="button--text"><%= t(:label_delete_project) %></span>- <% end %>- </li>- <% end %>-<% end %><%= render_tabs project_settings_tabs %>diff --git a/app/views/projects/_edit.html.erb b/app/views/projects/_edit.html.erbindex b4ad2ab272d..8b38450fb0d 100644--- a/app/views/projects/_edit.html.erb+++ b/app/views/projects/_edit.html.erb@@ -26,6 +26,49 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.See docs/COPYRIGHT.rdoc for more details.++#%>++<%= toolbar title: l(:label_project_settings) do %>+ <% if User.current.allowed_to?(:add_subprojects, @project) %>+ <li class="toolbar-item">+ <%= link_to new_project_path(parent_id: @project.id),+ { class: 'button -alt-highlight',+ aria: {label: t(:label_subproject_new)},+ title: t(:label_subproject_new)} do %>+ <%= op_icon('button--icon icon-add') %>+ <span class="button--text"><%= t(:label_subproject) %></span>+ <% end %>+ </li>+ <% end %>+ <% if @project.copy_allowed? %>+ <li class="toolbar-item hidden-for-mobile">+ <%= link_to copy_from_project_path(@project, coming_from: :settings), class: 'button copy', accesskey: accesskey(:copy) do %>+ <%= op_icon('button--icon icon-copy') %>+ <span class="button--text"><%= t(:label_copy_project) %></span>+ <% end %>+ </li>+ <% end %>+ <% if User.current.admin? %>+ <li class="toolbar-item hidden-for-mobile">+ <%= link_to(archive_project_path(@project, status: '', name: @project.name),+ data: { confirm: t('project.archive.are_you_sure', name: @project.name) },+ method: :put,+ title: t(:label_archive_project),+ class: 'button') do %>+ <%= op_icon('button--icon icon-locked') %>+ <span class="button--text"><%= t(:label_archive_project) %></span>+ <% end %>+ </li>+ <li class="toolbar-item">+ <%= link_to confirm_destroy_project_path(@project),+ class: 'button delete',+ title: t(:label_delete_project) do %>+ <%= op_icon('button--icon icon-delete') %>+ <span class="button--text"><%= t(:label_delete_project) %></span>+ <% end %>+ </li>+ <% end %>+<% end %>+<%= labelled_tabular_form_for @altered_project, url: project_path(@project) do |f| %><%= render partial: '/projects/form',locals: {diff --git a/app/views/projects/form/_activities.html.erb b/app/views/projects/form/_activities.html.erbindex 9754282adf4..7bf077115d4 100644--- a/app/views/projects/form/_activities.html.erb+++ b/app/views/projects/form/_activities.html.erb@@ -27,73 +27,69 @@ See docs/COPYRIGHT.rdoc for more details.++#%>-<fieldset class="form--fieldset" id="project_types">- <legend class="form--fieldset-legend"><%=l(:label_enabled_project_activities)%></legend>-- <div class="generic-table--container">- <div class="generic-table--results-container">- <table class="generic-table">- <colgroup>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <% TimeEntryActivity.new.available_custom_fields.each do |value| %>- <col highlight-col>- <% end %>- </colgroup>- <thead>- <tr>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Enumeration.human_attribute_name(:active) %>- </span>- </div>+<div class="generic-table--container">+ <div class="generic-table--results-container">+ <table class="generic-table">+ <colgroup>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <% TimeEntryActivity.new.available_custom_fields.each do |value| %>+ <col highlight-col>+ <% end %>+ </colgroup>+ <thead>+ <tr>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Enumeration.human_attribute_name(:active) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Enumeration.human_attribute_name(:name) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Enumeration.human_attribute_name(:name) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= l(:enumeration_system_activity) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= l(:enumeration_system_activity) %>+ </span></div>- </th>+ </div>+ </th>+ </tr>+ </thead>+ <% @project.activities(true).each do |enumeration| %>+ <%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>+ <tr>+ <td>+ <%= label_tag "enumerations_#{enumeration.id}_active", "#{h(enumeration.name)} #{l(:description_active)}", class: "hidden-for-sighted" %>+ <%= ff.check_box :active %>+ </td>+ <td>+ <%= ff.hidden_field :parent_id, value: enumeration.id unless enumeration.project %>+ <%= h(enumeration) %>+ </td>+ <td><%= checked_image !enumeration.project %></td></tr>- </thead>- <% @project.activities(true).each do |enumeration| %>- <%= fields_for "enumerations[#{enumeration.id}]", enumeration do |ff| %>- <tr>- <td>- <%= label_tag "enumerations_#{enumeration.id}_active", "#{h(enumeration.name)} #{l(:description_active)}", class: "hidden-for-sighted" %>- <%= ff.check_box :active %>- </td>- <td>- <%= ff.hidden_field :parent_id, value: enumeration.id unless enumeration.project %>- <%= h(enumeration) %>- </td>- <td><%= checked_image !enumeration.project %></td>- </tr>- <% end %><% end %>- </table>-- </div>+ <% end %>+ </table>++ </div>+</div>+<% if withControlls == true %>+ <div class="generic-table--action-buttons">+ <%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-checkmark' %></div>- <% if withControlls == true %>- <div class="generic-table--action-buttons">- <%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-checkmark' %>- </div>- <% end %>-</fieldset>+<% end %>diff --git a/app/views/projects/form/_custom_fields.html.erb b/app/views/projects/form/_custom_fields.html.erbindex 17dc4affc20..91b8fb931cc 100644--- a/app/views/projects/form/_custom_fields.html.erb+++ b/app/views/projects/form/_custom_fields.html.erb@@ -27,94 +27,84 @@ See docs/COPYRIGHT.rdoc for more details.++#%>-<fieldset class="form--fieldset -with-control" id="project_issue_custom_fields">- <legend class="form--fieldset-legend"><%=t(:label_enabled_project_custom_fields)%></legend>- <div class="form--fieldset-control">- <span class="form--fieldset-control-container">- (<%= check_all_links 'project_issue_custom_fields' %>)- </span>- </div>--- <div class="generic-table--container">- <div class="generic-table--results-container">- <table class="generic-table">- <colgroup>- <col highlight-col>- <col highlight-col>- <col highlight-col>- </colgroup>- <thead>- <tr>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= CustomField.model_name.human %>- </span>- </div>+<div class="generic-table--container">+ <div class="generic-table--results-container">+ <table class="generic-table">+ <colgroup>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ </colgroup>+ <thead>+ <tr>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= CustomField.model_name.human %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= t('custom_fields.enabled_in_project') %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= t('custom_fields.enabled_in_project') %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= t('custom_fields.contained_in_type') %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= t('custom_fields.contained_in_type') %>+ </span></div>- </th>+ </div>+ </th>+ </tr>+ </thead>+ <tbody>+ <% all_custom_fields = @project.all_work_package_custom_fields.pluck(:id) %>+ <% work_package_custom_fields.includes(:types).each do |custom_field| %>+ <%+ options = {+ lang: custom_field.name_locale,+ label_options: { class: 'hidden-for-sighted' }+ }+ %>+ <tr class="custom-field-<%= custom_field.id %>">+ <td>+ <% if current_user.admin? %>+ <%= link_to custom_field.name, edit_custom_field_path(custom_field.id) %>+ <% else %>+ <%= custom_field.name %>+ <% end %>+ </td>+ <td>+ <% if custom_field.is_for_all? %>+ <%= t('custom_fields.is_enabled_globally') %>+ <% else %>+ <%= form.collection_check_box :work_package_custom_field_ids,+ custom_field.id,+ all_custom_fields.include?(custom_field.id),+ custom_field.name,+ options %>+ <% end %>+ </td>+ <td>+ <% if current_user.admin? %>+ <% type_links = custom_field.types.map { |t| link_to(t.name, edit_type_tab_path(id: t.id, tab: 'form_configuration')) } %>+ <%= safe_join type_links, ', '.html_safe %>+ <% else %>+ <%= custom_field.types.map(&:name).join(', ') %>+ <% end %>+ </td></tr>- </thead>- <tbody>- <% all_custom_fields = @project.all_work_package_custom_fields.pluck(:id) %>- <% work_package_custom_fields.includes(:types).each do |custom_field| %>- <%- options = {- lang: custom_field.name_locale,- label_options: { class: 'hidden-for-sighted' }- }- %>- <tr class="custom-field-<%= custom_field.id %>">- <td>- <% if current_user.admin? %>- <%= link_to custom_field.name, edit_custom_field_path(custom_field.id) %>- <% else %>- <%= custom_field.name %>- <% end %>- </td>- <td>- <% if custom_field.is_for_all? %>- <%= t('custom_fields.is_enabled_globally') %>- <% else %>- <%= form.collection_check_box :work_package_custom_field_ids,- custom_field.id,- all_custom_fields.include?(custom_field.id),- custom_field.name,- options %>- <% end %>- </td>- <td>- <% if current_user.admin? %>- <% type_links = custom_field.types.map { |t| link_to(t.name, edit_type_tab_path(id: t.id, tab: 'form_configuration')) } %>- <%= safe_join type_links, ', '.html_safe %>- <% else %>- <%= custom_field.types.map(&:name).join(', ') %>- <% end %>- </td>- </tr>- <% end %>- </tbody>- </table>- </div>+ <% end %>+ </tbody>+ </table></div>-</fieldset>+</div>diff --git a/app/views/projects/form/_modules.html.erb b/app/views/projects/form/_modules.html.erbindex 56857ed39b0..c69a37d6737 100644--- a/app/views/projects/form/_modules.html.erb+++ b/app/views/projects/form/_modules.html.erb@@ -27,28 +27,13 @@ See docs/COPYRIGHT.rdoc for more details.++#%>-<%- project = form.object-%>+<% sorted_modules = OpenProject::AccessControl.available_project_modules.sort_by { |name| l_or_humanize(name, prefix: "project_module_") } %>+<% sorted_modules.each do |name| %>+ <div class="form--field">+ <%= form.collection_check_box :enabled_module_names,+ name,+ @project.module_enabled?(name),+ l_or_humanize(name, prefix: "project_module_") %>-<fieldset class="form--fieldset -with-control" id="modules-form">- <legend class="form--fieldset-legend"><%= l(:label_enabled_project_modules) %></legend>-- <div class="form--fieldset-control">- <span class="form--fieldset-control-container">- (<%= check_all_links 'modules-form' %>)- </span></div>-- <% sorted_modules = OpenProject::AccessControl.available_project_modules.sort_by { |name| l_or_humanize(name, prefix: "project_module_") } %>- <% sorted_modules.each do |name| %>- <div class="form--field">- <%= form.collection_check_box :enabled_module_names,- name,- @project.module_enabled?(name),- l_or_humanize(name, prefix: "project_module_") %>-- </div>- <% end %>--</fieldset>+<% end %>diff --git a/app/views/projects/form/_types.html.erb b/app/views/projects/form/_types.html.erbindex 2fca17735ad..691b3b912ee 100644--- a/app/views/projects/form/_types.html.erb+++ b/app/views/projects/form/_types.html.erb@@ -35,99 +35,89 @@ See docs/COPYRIGHT.rdoc for more details.id: "types_flash_notice",class: "ignored-by-flash-activation" %>-<fieldset class="form--fieldset" id="project_types">- <legend class="form--fieldset-legend">- <%= t(:label_available_project_work_package_types) %>- </legend>- <div class="form--fieldset-control">- <span class="form--fieldset-control-container">- (<%= check_all_links 'types-form' %>)- </span>- </div>- <div class="generic-table--container">- <div class="generic-table--results-container">- <table class="generic-table types" id="types-form">- <colgroup>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col highlight-col>- </colgroup>- <thead>- <tr>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Type.human_attribute_name(:active) %>- </span>- </div>+<div class="generic-table--container">+ <div class="generic-table--results-container">+ <table class="generic-table types" id="types-form">+ <colgroup>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ </colgroup>+ <thead>+ <tr>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Type.human_attribute_name(:active) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Type.human_attribute_name(:name) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Type.human_attribute_name(:name) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Type.human_attribute_name(:is_in_roadmap) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Type.human_attribute_name(:is_in_roadmap) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Type.human_attribute_name(:is_milestone) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Type.human_attribute_name(:is_milestone) %>+ </span></div>- </th>+ </div>+ </th>+ </tr>+ </thead>+ <tbody>+ <% projects_types_id = project.types.pluck(:id) %>+ <% Type.includes(:color).each do |type| %>+ <tr>+ <td class='center'>+ <% type_id = "project_planning_element_type_ids_#{type.id}" %>+ <%= label_tag type_id, l('timelines.enable_type_in_project', type: type.name), class: 'hidden-for-sighted' %>+ <%= check_box_tag "project[type_ids][]",+ type.id,+ projects_types_id.include?(type.id),+ id: type_id,+ :'data-standard' => type.is_standard %>+ <%= hidden_field_tag 'project[type_ids][]', '', :'data-for' => type_id %>+ </td>+ <td>+ <%= icon_for_type(type) %>+ <%=h type.name %>+ </td>+ <td class='center'>+ <%= checked_image(type.is_in_roadmap) %>+ </td>+ <td class='center'>+ <%= checked_image(type.is_milestone) %>+ </td></tr>- </thead>- <tbody>- <% projects_types_id = project.types.pluck(:id) %>- <% Type.includes(:color).each do |type| %>- <tr>- <td class='center'>- <% type_id = "project_planning_element_type_ids_#{type.id}" %>- <%= label_tag type_id, l('timelines.enable_type_in_project', type: type.name), class: 'hidden-for-sighted' %>- <%= check_box_tag "project[type_ids][]",- type.id,- projects_types_id.include?(type.id),- id: type_id,- :'data-standard' => type.is_standard %>- <%= hidden_field_tag 'project[type_ids][]', '', :'data-for' => type_id %>- </td>- <td>- <%= icon_for_type(type) %>- <%=h type.name %>- </td>- <td class='center'>- <%= checked_image(type.is_in_roadmap) %>- </td>- <td class='center'>- <%= checked_image(type.is_milestone) %>- </td>- </tr>- <% end %>- </tbody>- </table>-- </div>+ <% end %>+ </tbody>+ </table>++ </div>+</div>+<% if withControlls == true %>+ <div class="generic-table--action-buttons">+ <%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-checkmark' %></div>- <% if withControlls == true %>- <div class="generic-table--action-buttons">- <%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-checkmark' %>- </div>- <% end %>-</fieldset>+<% end %>diff --git a/app/views/repositories/_settings.html.erb b/app/views/repositories/_settings.html.erbindex 9aaf621c173..e40a629b6b9 100644--- a/app/views/repositories/_settings.html.erb+++ b/app/views/repositories/_settings.html.erb@@ -31,6 +31,8 @@ See docs/COPYRIGHT.rdoc for more details.<%= javascript_include_tag('repository_settings') %><% end %>+<%= toolbar title: t(:label_repository) %>+<% is_creation_form = @repository.nil? || @repository.new_record? %><%= form_for :repository,url: { controller: '/repositories',diff --git a/modules/backlogs/app/views/project_settings/_backlogs_settings.html.erb b/modules/backlogs/app/views/project_settings/_backlogs_settings.html.erbindex b33c9d22412..2f1f3004a79 100644--- a/modules/backlogs/app/views/project_settings/_backlogs_settings.html.erb+++ b/modules/backlogs/app/views/project_settings/_backlogs_settings.html.erb@@ -29,65 +29,59 @@ See doc/COPYRIGHT.rdoc for more details.<% statuses_done_for_project = @project.done_statuses.select(:id).map(&:id) %>+<%= toolbar title: l('backlogs.definition_of_done') %>+<%= styled_form_tag(controller: '/projects', action: "project_done_statuses", id: @project) do %>-<fieldset class="form--fieldset" id="form--backlogs">- <legend class="form--fieldset-legend"><%=l('backlogs.definition_of_done')%></legend>- <div class="form--fieldset-control">- <span class="form--fieldset-control-container">- (<%= check_all_links 'form--backlogs' %>)- </span>- </div>- <div class="generic-table--container">- <div class="generic-table--results-container">- <table class="generic-table" id="material_budget_items">- <colgroup>- <col highlight-col>- <col highlight-col>- </colgroup>- <thead>- <tr>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Status.model_name.human %>- </span>- </div>+<div class="generic-table--container">+ <div class="generic-table--results-container">+ <table class="generic-table" id="material_budget_items">+ <colgroup>+ <col highlight-col>+ <col highlight-col>+ </colgroup>+ <thead>+ <tr>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Status.model_name.human %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%=l('backlogs.work_package_is_closed')%>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%=l('backlogs.work_package_is_closed')%>+ </span></div>- </th>+ </div>+ </th>+ </tr>+ </thead>+ <tbody>+ <% for status in (Status.all || []) %>+ <tr>+ <td>+ <%= status.name %>+ </td>+ <td style="text-align:left">+ <% checkbox_id = status.name.parameterize.underscore %>+ <%= styled_label_tag checkbox_id, l('backlogs.label_is_done_status', status_name: status.name), class: 'hidden-for-sighted' %>+ <%= (styled_check_box_tag 'statuses[][status_id]', status.id.to_s, statuses_done_for_project.include?(status.id), id: checkbox_id) %>+ </td></tr>- </thead>- <tbody>- <% for status in (Status.all || []) %>- <tr>- <td>- <%= status.name %>- </td>- <td style="text-align:left">- <% checkbox_id = status.name.parameterize.underscore %>- <%= styled_label_tag checkbox_id, l('backlogs.label_is_done_status', status_name: status.name), class: 'hidden-for-sighted' %>- <%= (styled_check_box_tag 'statuses[][status_id]', status.id.to_s, statuses_done_for_project.include?(status.id), id: checkbox_id) %>- </td>- </tr>- <% end %>- </tbody>- </table>- </div>- </div>- <div class="generic-table--action-buttons">- <%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-checkmark' %>+ <% end %>+ </tbody>+ </table></div>-</fieldset>+</div>+<div class="generic-table--action-buttons">+ <%= styled_button_tag l(:button_save), class: '-highlight -with-icon icon-checkmark' %>+</div><% end %>diff --git a/modules/backlogs/app/views/project_settings/_versions.html.erb b/modules/backlogs/app/views/project_settings/_versions.html.erbindex 99681b4adbb..e46a2c00110 100644--- a/modules/backlogs/app/views/project_settings/_versions.html.erb+++ b/modules/backlogs/app/views/project_settings/_versions.html.erb@@ -26,163 +26,162 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.See doc/COPYRIGHT.rdoc for more details.++#%>+<%= toolbar title: l(:label_available_project_versions) do %>+ <% if current_user.allowed_to?(:manage_versions, @project) %>+ <li class="toolbar-item">+ <%= link_to_if_authorized({ controller: '/versions', action: 'new', project_id: @project },+ { class: 'button -alt-highlight',+ aria: {label: t(:label_version_new)},+ title: t(:label_version_new)}) do %>+ <%= op_icon('button--icon icon-add') %>+ <span class="button--text"><%= t('activerecord.models.version') %></span>+ <% end %>+ </li>+ <% end %>+<% end %>+<% if @project.shared_versions.any? %>- <fieldset class="form--fieldset">- <legend class="form--fieldset-legend">- <%= l(:label_available_project_versions) %>- </legend>- <div class="form--fieldset-control">- <span class="form--fieldset-control-container">- <%= link_to_if_authorized({ controller: '/versions', action: 'new', project_id: @project },- { aria: { label: t(:label_version_new) },- title: t(:label_version_new) }) do %>- <%= op_icon('icon-add icon-small') %>- <span><%= l(:label_version) %></span>- <% end %>- </span>- </div>- <div class="generic-table--container">- <div class="generic-table--results-container">- <table class="generic-table">- <colgroup>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col highlight-col>- <col>- </colgroup>- <thead>- <tr>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.model_name.human %>- </span>- </div>+ <div class="generic-table--container">+ <div class="generic-table--results-container">+ <table class="generic-table">+ <colgroup>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col highlight-col>+ <col>+ </colgroup>+ <thead>+ <tr>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.model_name.human %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.human_attribute_name(:start_date) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.human_attribute_name(:start_date) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.human_attribute_name(:effective_date) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.human_attribute_name(:effective_date) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.human_attribute_name(:description) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.human_attribute_name(:description) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.human_attribute_name(:status) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.human_attribute_name(:status) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= Version.human_attribute_name(:sharing) %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= Version.human_attribute_name(:sharing) %>+ </span></div>- </th>- <th>- <div class="generic-table--sort-header-outer">- <div class="generic-table--sort-header">- <span>- <%= WikiPage.model_name.human %>- </span>- </div>+ </div>+ </th>+ <th>+ <div class="generic-table--sort-header-outer">+ <div class="generic-table--sort-header">+ <span>+ <%= WikiPage.model_name.human %>+ </span></div>- </th>- <th><div class="generic-table--empty-header"></div></th>+ </div>+ </th>+ <th><div class="generic-table--empty-header"></div></th>+ </tr>+ </thead>+ <tbody>+ <% for version in @project.shared_versions.sort %>+ <tr class="version <%= 'shared' if version.project != @project %>">+ <td class="name <%=h version.status %><%= ' icon-context icon-link' if version.project != @project %>">+ <%= link_to_version version %>+ </td>+ <td class="date"><%= format_date(version.start_date) %></td>+ <td class="date"><%= format_date(version.effective_date) %></td>+ <td class="description"><%=h version.description %></td>+ <td class="status"><%= l("version_status_#{version.status}") %></td>+ <td class="sharing"><%=h format_version_sharing(version.sharing) %></td>+ <td>+ <%= link_to_if_authorized( h(version.wiki_page_title),+ { controller: '/wiki',+ action: 'show',+ project_id: version.project,+ id: version.wiki_page_title }) ||+ h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>+ </td>+ <td class="buttons">+ <% if version.project == @project %>+ <%= link_to_if_authorized '',+ { controller: '/versions', action: 'edit', id: version },+ class: 'icon icon-edit',+ title: t(:button_edit) %>+ <%= link_to_if_authorized '',+ { controller: '/versions', action: 'destroy', id: version },+ data: { confirm: l(:text_are_you_sure) },+ method: :delete,+ class: 'icon icon-delete',+ title: t(:button_delete) %>+ <% elsif @project.enabled_modules.collect(&:name).include?("backlogs") %>+ <%= link_to_if_authorized '',+ { :controller => '/versions', :action => 'edit', :id => version, :project_id => @project.id },+ :class => 'icon icon-edit',+ title: t(:button_edit) %>+ <% end %>+ </td></tr>- </thead>- <tbody>- <% for version in @project.shared_versions.sort %>- <tr class="version <%= 'shared' if version.project != @project %>">- <td class="name <%=h version.status %><%= ' icon-context icon-link' if version.project != @project %>">- <%= link_to_version version %>- </td>- <td class="date"><%= format_date(version.start_date) %></td>- <td class="date"><%= format_date(version.effective_date) %></td>- <td class="description"><%=h version.description %></td>- <td class="status"><%= l("version_status_#{version.status}") %></td>- <td class="sharing"><%=h format_version_sharing(version.sharing) %></td>- <td>- <%= link_to_if_authorized( h(version.wiki_page_title),- { controller: '/wiki',- action: 'show',- project_id: version.project,- id: version.wiki_page_title }) ||- h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>- </td>- <td class="buttons">- <% if version.project == @project %>- <%= link_to_if_authorized '',- { controller: '/versions', action: 'edit', id: version },- class: 'icon icon-edit',- title: t(:button_edit) %>- <%= link_to_if_authorized '',- { controller: '/versions', action: 'destroy', id: version },- data: { confirm: l(:text_are_you_sure) },- method: :delete,- class: 'icon icon-delete',- title: t(:button_delete) %>- <% elsif @project.enabled_modules.collect(&:name).include?("backlogs") %>- <%= link_to_if_authorized '',- { :controller => '/versions', :action => 'edit', :id => version, :project_id => @project.id },- :class => 'icon icon-edit',- title: t(:button_edit) %>- <% end %>- </td>- </tr>- <% end %>- </tbody>- </table>- </div>+ <% end %>+ </tbody>+ </table></div>- <div class="generic-table--action-buttons">- <%= link_to_if_authorized({ controller: '/versions', action: 'new', project_id: @project },- { class: 'button -alt-highlight',- aria: {label: t(:label_version_new)},- title: t(:label_version_new)}) do %>- <%= op_icon('button--icon icon-add') %>- <span class="button--text"><%= l(:label_version) %></span>- <% end %>- </div>- <% else %>- <%= no_results_box action_url: new_project_version_path(@project),- display_action: authorize_for('versions', 'new'),- custom_title: t('projects.settings.versions.no_results_title_text'),- custom_action_text: t('projects.settings.versions.no_results_content_text')- %>- <% end %>-</fieldset>+ </div>+ <div class="generic-table--action-buttons">+ <%= link_to_if_authorized({ controller: '/versions', action: 'new', project_id: @project },+ { class: 'button -alt-highlight',+ aria: {label: t(:label_version_new)},+ title: t(:label_version_new)}) do %>+ <%= op_icon('button--icon icon-add') %>+ <span class="button--text"><%= l(:label_version) %></span>+ <% end %>+ </div>+<% else %>+ <%= no_results_box action_url: new_project_version_path(@project),+ display_action: authorize_for('versions', 'new'),+ custom_title: t('projects.settings.versions.no_results_title_text'),+ custom_action_text: t('projects.settings.versions.no_results_content_text')+ %>+<% end %><% if @project.versions.any? %><div class="contextual">