Merge pull request #5302 from opf/feature/styling-project-custom-field-tab

[24912] Add links to custom fields in project settings
pull/5303/head
Oliver Günther 8 years ago committed by GitHub
commit d46608fc66
  1. 20
      app/views/projects/form/_custom_fields.html.erb
  2. 1
      config/locales/en.yml

@ -27,8 +27,22 @@ See doc/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 %>
<i class="button--icon icon-add"></i>
<span class="button--text"><%= CustomField.model_name.human %></span>
<% end %>
</fieldset>
<% end %>
<fieldset class="form--fieldset -with-control" id="project_issue_custom_fields">
<legend class="form--fieldset-legend"><%=l(:label_enabled_project_custom_fields)%></legend>
<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' %>)
@ -86,7 +100,11 @@ See doc/COPYRIGHT.rdoc for more details.
%>
<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? %>

@ -72,6 +72,7 @@ en:
no_results_title_text: There are currently no posts for the board.
custom_fields:
text_add_new_custom_field: 'New custom fields can be created on the global administration before they can be added to this project. Please use the following button to create a new custom field.'
is_enabled_globally: 'Is enabled globally'
enabled_in_project: 'Enabled in project'
contained_in_type: 'Contained in type'

Loading…
Cancel
Save