diff options
author | Kushal Pandya <kushal@gitlab.com> | 2018-03-08 18:10:04 +0530 |
---|---|---|
committer | Kushal Pandya <kushal@gitlab.com> | 2018-03-12 10:49:55 +0530 |
commit | 02302c827a9572bc104f5c294bb431f5e6a04011 (patch) | |
tree | 1c0d44311cf8530dbc711b67d55ea430b2a61a54 | |
parent | 557344539d083976c8b1730edec92cc55fe1b135 (diff) | |
download | gitlab-ce-02302c827a9572bc104f5c294bb431f5e6a04011.tar.gz |
Use label dropdown helper for rendering contextual string
-rw-r--r-- | app/views/shared/issuable/_label_page_create.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/issuable/_label_page_default.html.haml | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/app/views/shared/issuable/_label_page_create.html.haml b/app/views/shared/issuable/_label_page_create.html.haml index d5e7d3b87b7..91aa329eb93 100644 --- a/app/views/shared/issuable/_label_page_create.html.haml +++ b/app/views/shared/issuable/_label_page_create.html.haml @@ -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') } diff --git a/app/views/shared/issuable/_label_page_default.html.haml b/app/views/shared/issuable/_label_page_default.html.haml index 6a83321abcb..2bd922bca2b 100644 --- a/app/views/shared/issuable/_label_page_default.html.haml +++ b/app/views/shared/issuable/_label_page_default.html.haml @@ -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 |