diff options
author | Fatih Acet <acetfatih@gmail.com> | 2019-09-03 09:03:35 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-09-03 09:03:35 +0000 |
commit | 3741402a241df2ad6ab28e4b76edafe5083ce733 (patch) | |
tree | 90c67bb90414724df6559cf1d2e6f22d4b3aa035 /app/views/projects/labels | |
parent | af5f2424cace62f8712dbabfd60bb0f1c36f1590 (diff) | |
download | gitlab-ce-3741402a241df2ad6ab28e4b76edafe5083ce733.tar.gz |
Make flash notifications sticky
This commit also unifies layout structure
and remove no_container flag
Diffstat (limited to 'app/views/projects/labels')
-rw-r--r-- | app/views/projects/labels/edit.html.haml | 10 | ||||
-rw-r--r-- | app/views/projects/labels/index.html.haml | 78 | ||||
-rw-r--r-- | app/views/projects/labels/new.html.haml | 10 |
3 files changed, 46 insertions, 52 deletions
diff --git a/app/views/projects/labels/edit.html.haml b/app/views/projects/labels/edit.html.haml index b9d45e83032..b7996f0dad1 100644 --- a/app/views/projects/labels/edit.html.haml +++ b/app/views/projects/labels/edit.html.haml @@ -1,10 +1,8 @@ -- @no_container = true - add_to_breadcrumbs "Labels", project_labels_path(@project) - breadcrumb_title "Edit" - page_title "Edit", @label.name, "Labels" -%div{ class: container_class } - %h3.page-title - Edit Label - %hr - = render 'shared/labels/form', url: project_label_path(@project, @label), back_path: project_labels_path(@project) +%h3.page-title + Edit Label +%hr += render 'shared/labels/form', url: project_label_path(@project, @label), back_path: project_labels_path(@project) diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index 511d7a82d1b..0328751c68c 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -1,4 +1,3 @@ -- @no_container = true - page_title "Labels" - can_admin_label = can?(current_user, :admin_label, @project) - search = params[:search] @@ -7,48 +6,47 @@ - if labels_or_filters #promote-label-modal - %div{ class: container_class } - = render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label + = render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label - .labels-container.prepend-top-10 - - if can_admin_label && search.blank? - %p.text-muted - = _('Labels can be applied to issues and merge requests.') - %br - = _('Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.') + .labels-container.prepend-top-10 + - if can_admin_label && search.blank? + %p.text-muted + = _('Labels can be applied to issues and merge requests.') + %br + = _('Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.') - -# Only show it in the first page - - hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1') - .prioritized-labels{ class: [('hide' if hide), ('is-not-draggable' unless can_admin_label)] } - %h5.prepend-top-10= _('Prioritized Labels') - .content-list.manage-labels-list.js-prioritized-labels{ data: { url: set_priorities_project_labels_path(@project), sortable: can_admin_label } } - #js-priority-labels-empty-state.priority-labels-empty-state{ class: "#{'hidden' unless @prioritized_labels.empty? && search.blank?}" } - = render 'shared/empty_states/priority_labels' - - if @prioritized_labels.present? - = render partial: 'shared/label', collection: @prioritized_labels, as: :label, locals: { force_priority: true, subject: @project } - - elsif search.present? - .nothing-here-block - = _('No prioritised labels with such name or description') + -# Only show it in the first page + - hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1') + .prioritized-labels{ class: [('hide' if hide), ('is-not-draggable' unless can_admin_label)] } + %h5.prepend-top-10= _('Prioritized Labels') + .content-list.manage-labels-list.js-prioritized-labels{ data: { url: set_priorities_project_labels_path(@project), sortable: can_admin_label } } + #js-priority-labels-empty-state.priority-labels-empty-state{ class: "#{'hidden' unless @prioritized_labels.empty? && search.blank?}" } + = render 'shared/empty_states/priority_labels' + - if @prioritized_labels.present? + = render partial: 'shared/label', collection: @prioritized_labels, as: :label, locals: { force_priority: true, subject: @project } + - elsif search.present? + .nothing-here-block + = _('No prioritised labels with such name or description') - - if @labels.present? - .other-labels - %h5{ class: ('hide' if hide) }= _('Other Labels') - .content-list.manage-labels-list.js-other-labels - = render partial: 'shared/label', collection: @labels, as: :label, locals: { subject: @project } - = paginate @labels, theme: 'gitlab' - - elsif search.present? - .other-labels - - if @available_labels.any? - %h5 - = _('Other Labels') - .nothing-here-block - = _('No other labels with such name or description') - - else - .nothing-here-block - = _('No labels with such name or description') - - elsif subscribed.present? - .nothing-here-block - = _('You do not have any subscriptions yet') + - if @labels.present? + .other-labels + %h5{ class: ('hide' if hide) }= _('Other Labels') + .content-list.manage-labels-list.js-other-labels + = render partial: 'shared/label', collection: @labels, as: :label, locals: { subject: @project } + = paginate @labels, theme: 'gitlab' + - elsif search.present? + .other-labels + - if @available_labels.any? + %h5 + = _('Other Labels') + .nothing-here-block + = _('No other labels with such name or description') + - else + .nothing-here-block + = _('No labels with such name or description') + - elsif subscribed.present? + .nothing-here-block + = _('You do not have any subscriptions yet') - else = render 'shared/empty_states/labels' diff --git a/app/views/projects/labels/new.html.haml b/app/views/projects/labels/new.html.haml index c6739231e36..96ce0eba2c6 100644 --- a/app/views/projects/labels/new.html.haml +++ b/app/views/projects/labels/new.html.haml @@ -1,10 +1,8 @@ -- @no_container = true - add_to_breadcrumbs "Labels", project_labels_path(@project) - breadcrumb_title "New" - page_title "New Label" -%div{ class: container_class } - %h3.page-title - New Label - %hr - = render 'shared/labels/form', url: project_labels_path(@project), back_path: project_labels_path(@project) +%h3.page-title + New Label +%hr += render 'shared/labels/form', url: project_labels_path(@project), back_path: project_labels_path(@project) |