Use label dropdown helper for rendering contextual string

This commit is contained in:
Kushal Pandya 2018-03-08 18:10:04 +05:30
parent 557344539d
commit 02302c827a
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,6 @@
- subject = @project || @group
.dropdown-page-two.dropdown-new-label
= dropdown_title("Create new label", options: { back: true })
= dropdown_title(create_label_title(subject), options: { back: true })
= dropdown_content do
.dropdown-labels-error.js-label-error
%input#new_label_name.default-dropdown-input{ type: "text", placeholder: _('Name new label') }

View File

@ -3,6 +3,7 @@
- show_footer = local_assigns.fetch(:show_footer, true)
- filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search')
- show_boards_content = local_assigns.fetch(:show_boards_content, false)
- subject = @project || @group
.dropdown-page-one
= dropdown_title(title)
- if show_boards_content
@ -17,11 +18,11 @@
- if can?(current_user, :admin_label, current_board_parent)
%li
%a.dropdown-toggle-page{ href: "#" }
= _('Create new label')
= create_label_title(subject)
%li
= link_to labels_path, :"data-is-link" => true do
- if show_create && can?(current_user, :admin_label, current_board_parent)
= _('Manage labels')
= manage_labels_title(subject)
- else
= _('View labels')
= view_labels_title(subject)
= dropdown_loading