Use styleguide conform block elements and select helpers

Use notifacation boxes and form fields instead of Ps. Also improve wording within the wizzard.
pull/7504/head
Wieland Lindenthal 5 years ago committed by Henriette Dinger
parent 82fee0d40a
commit d10b3611a4
  1. 4
      modules/bcf/app/views/bcf/issues/configure_invalid_people.html.erb
  2. 32
      modules/bcf/app/views/bcf/issues/configure_non_members.html.erb
  3. 28
      modules/bcf/app/views/bcf/issues/configure_unknown_mails.html.erb
  4. 10
      modules/bcf/app/views/bcf/issues/configure_unknown_priorities.html.erb
  5. 10
      modules/bcf/app/views/bcf/issues/configure_unknown_statuses.html.erb
  6. 10
      modules/bcf/app/views/bcf/issues/configure_unknown_types.html.erb
  7. 6
      modules/bcf/config/locales/en.yml

@ -9,10 +9,10 @@
<li> <%= name %></li>
<% end %>
</ul>
<p>
<div class="form--field">
<input type="hidden" name="import_options[invalid_people_action]" value="anonymize">
<%= t('bcf.bcf_xml.import.import_as_system_user') %>
</p>
</div>
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),

@ -11,36 +11,40 @@
</ul>
<% if @roles.any? %>
<% if User.current.allowed_to?(:manage_members, @project) %>
<p>
<div class="form--field">
<input type="hidden" name="import_options[non_members_action]" value="add" checked>
<%= t('bcf.bcf_xml.import.add_as_members_with_role', project: @project.name) %>
<%= t('bcf.bcf_xml.import.add_as_members_with_role', project: @project.name) %>&nbsp;
<% options = @roles.collect { |obj| [obj.name, obj.id] } %>
<%= select_tag 'import_options[non_members_add_role_ids][]', options_for_select(options),
<%= styled_select_tag 'import_options[non_members_add_role_ids][]',
options_for_select(options),
multiple: false,
no_label: true,
title: l(:label_role_search),
tabIndex: 0,
class: 'form--select form--inline-select',
container_class: '-slim',
id: 'non_members_add_role_ids' %>
</p>
</div>
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<% else %>
<p>
<div class="notification-box -warning">
<div class="notification-box--content">
<input type="hidden" name="import_options[non_members_action]" value="cancel">
<%= t('bcf.bcf_xml.import.contact_project_admin') %>
</p>
</div>
</div>
<br/>
<% end %>
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% else %>
<p>
<div class="notification-box -error">
<div class="notification-box--content">
<%= I18n.t('text_no_roles_defined') %>
</p>
</div>
</div>
<br/>
<% end %>
<%= link_to t(:button_cancel),
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% end %>
<% end %>

@ -16,14 +16,16 @@
<div class="form--field-container">
<label class="option-label">
<input type="radio" name="import_options[unknown_mails_action]" value="invite" checked>
<%= t('bcf.bcf_xml.import.invite_as_members_with_role', project: @project.name) %>
<%= t('bcf.bcf_xml.import.invite_as_members_with_role', project: @project.name) %>&nbsp;
<% options = @roles.collect { |obj| [obj.name, obj.id] } %>
<%= select_tag 'import_options[unknown_mails_invite_role_ids][]', options_for_select(options),
<%= styled_select_tag 'import_options[unknown_mails_invite_role_ids][]',
options_for_select(options),
multiple: false,
no_label: true,
title: l(:label_role_search),
tabIndex: 0,
class: 'form--select form--inline-select',
container_class: '-slim',
id: 'unknown_mails_invite_role_ids' %>
(<%= t('bcf.recommended') %>)
</label>
@ -38,27 +40,29 @@
</div>
</div>
<% else %>
<p>
<div class="notification-box -warning">
<div class="notification-box--content">
<%= t('bcf.bcf_xml.import.no_permission_to_add_members') %>
<%= t('bcf.bcf_xml.import.contact_project_admin') %>
</p>
<p>
</div>
</div>
<div class="form--field">
<%= t('bcf.bcf_xml.import.continue_anyways') %>
<input type="hidden" name="import_options[unknown_mails_action]" value="anonymize">
<%= t('bcf.bcf_xml.import.replace_with_system_user') %>.
</p>
</div>
<% end %>
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% else %>
<p>
<div class="notification-box -error">
<div class="notification-box--content">
<%= I18n.t('text_no_roles_defined') %>
</p>
</div>
</div>
<br/>
<% end %>
<%= link_to t(:button_cancel),
project_work_packages_bcf_issues_path(@project),
class: 'button' %>
<% end %>
<% end %>

@ -9,18 +9,20 @@
<li> <%= name.present? ? name : "(#{t('bcf.bcf_xml.import.no_priority_provided')})" %></li>
<% end %>
</ul>
<p>
<div class="form--field">
<input type="hidden" name="import_options[unknown_priorities_action]" value="chose">
<%= t('bcf.bcf_xml.import.import_priorities_as') %>
<%= t('bcf.bcf_xml.import.import_priorities_as') %>&nbsp;
<% options = IssuePriority.all.collect { |priority| [priority.name, priority.id] } %>
<%= select_tag 'import_options[unknown_priorities_chose_ids][]', options_for_select(options, IssuePriority.default.id),
<%= styled_select_tag 'import_options[unknown_priorities_chose_ids][]',
options_for_select(options, IssuePriority.default.id),
multiple: false,
no_label: true,
title: l(:label_priority),
tabIndex: 0,
class: 'form--select form--inline-select',
container_class: '-slim',
id: 'unknown_priorities_chose_ids' %>
</p>
</div>
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),

@ -9,18 +9,20 @@
<li> <%= name.present? ? name : "(#{t('bcf.bcf_xml.import.no_status_provided')})" %></li>
<% end %>
</ul>
<p>
<div class="form--field">
<input type="hidden" name="import_options[unknown_statuses_action]" value="chose">
<%= t('bcf.bcf_xml.import.import_statuses_as') %>
<%= t('bcf.bcf_xml.import.import_statuses_as') %>&nbsp;
<% options = Status.all.collect { |status| [status.name, status.id] } %>
<%= select_tag 'import_options[unknown_statuses_chose_ids][]', options_for_select(options),
<%= styled_select_tag 'import_options[unknown_statuses_chose_ids][]',
options_for_select(options),
multiple: false,
no_label: true,
title: l(:label_status),
tabIndex: 0,
class: 'form--select form--inline-select',
container_class: '-slim',
id: 'unknown_statuses_chose_ids' %>
</p>
</div>
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),

@ -9,18 +9,20 @@
<li> <%= name.present? ? name : "(#{t('bcf.bcf_xml.import.no_type_provided')})" %></li>
<% end %>
</ul>
<p>
<div class="form--field">
<input type="hidden" name="import_options[unknown_types_action]" value="chose">
<%= t('bcf.bcf_xml.import.import_types_as') %>
<%= t('bcf.bcf_xml.import.import_types_as') %>&nbsp;
<% options = Type.all.collect { |type| [type.name, type.id] } %>
<%= select_tag 'import_options[unknown_types_chose_ids][]', options_for_select(options),
<%= styled_select_tag 'import_options[unknown_types_chose_ids][]',
options_for_select(options),
multiple: false,
no_label: true,
title: l(:label_type),
tabIndex: 0,
class: 'form--select form--inline-select',
container_class: '-slim',
id: 'unknown_types_chose_ids' %>
</p>
</div>
<%= submit_tag t('bcf.bcf_xml.import.button_proceed'), class: 'button -highlight' %>
<%= link_to t(:button_cancel),

@ -43,9 +43,9 @@ en:
invalid_emails_found: 'Invalid email addresses found'
unknown_emails_found: 'Unknown email addresses found'
non_members_found: 'Non project members found'
import_types_as: 'Import them all setting type to'
import_statuses_as: 'Import them all setting status to'
import_priorities_as: 'Import them all setting priority to'
import_types_as: 'Set all these types to'
import_statuses_as: 'Set all these statuses to'
import_priorities_as: 'Set all these priorities to'
invite_as_members_with_role: 'Invite them as members to the project "%{project}" with role'
add_as_members_with_role: 'Add them as members to the project "%{project}" with role'
no_type_provided: 'No type provided'

Loading…
Cancel
Save