Add show_footer parameter for ability to hide footer

This commit is contained in:
Alfredo Sumaran 2016-05-05 16:57:35 -05:00
parent 0be26a47f2
commit d09114e4ed
2 changed files with 3 additions and 1 deletions

View file

@ -20,5 +20,6 @@
.dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable
= render partial: "shared/issuable/label_page_default", locals: { title: "Filter by label" }
- if can? current_user, :admin_label, @project and @project
= render partial: "shared/issuable/label_page_default", locals: { title: "Filter by label", show_footer: show_footer }
= render partial: "shared/issuable/label_page_create"
= dropdown_loading

View file

@ -1,10 +1,11 @@
- title = local_assigns.fetch(:title, 'Assign labels')
- show_footer = local_assigns.fetch(:show_footer, true)
- filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search labels')
.dropdown-page-one
= dropdown_title(title)
= dropdown_filter(filter_placeholder)
= dropdown_content
- if @project
- if @project and show_footer
= dropdown_footer do
%ul.dropdown-footer-list
- if can? current_user, :admin_label, @project