Commit 75c92de2 authored by Bryce Johnson's avatar Bryce Johnson

Support conditional rendering of top nav buttons.

parent 0e75de4b
= link_to params.merge(rss_url_options), class: 'btn btn-default append-right-10 has-tooltip', title: 'Subscribe' do
= icon('rss')
= render 'projects/issues/export_issues/button'
- show_rss_button = local_assigns.fetch(:show_rss_button, true)
- show_export_button = local_assigns.fetch(:show_export_button, true)
- if show_rss_button
= link_to params.merge(rss_url_options), class: 'btn btn-default append-right-10 has-tooltip', title: 'Subscribe' do
= icon('rss')
- if show_export_button
= render 'projects/issues/export_issues/button'
- if @can_bulk_update
= button_tag "Edit issues", class: "btn btn-default append-right-10 js-bulk-update-toggle"
= link_to "New issue", new_project_issue_path(@project,
issue: { assignee_id: issues_finder.assignee.try(:id),
milestone_id: issues_finder.milestones.first.try(:id) }),
......
- @no_container = true
- @can_bulk_update = can?(current_user, :admin_issue, @project)
- @can_bulk_update = false
- page_title "Service Desk"
......@@ -9,14 +9,10 @@
= webpack_bundle_tag 'service_desk_issues'
= webpack_bundle_tag 'issues'
= content_for :meta_tags do
= auto_discovery_link_tag(:atom, params.merge(rss_url_options), title: "#{@project.name} issues")
- if show_new_nav?
- content_for :breadcrumbs_extra do
= render "projects/issues/nav_btns"
- if project_issues(@project).exists?
= render 'projects/issues/export_issues/csv_download'
= render "projects/issues/nav_btns", show_export_button: false, show_rss_button: false
- support_bot_attrs = User.support_bot.to_json(only: [:id, :name, :username, :avatar_url])
......@@ -31,7 +27,7 @@
= render 'shared/issuable/bulk_update_sidebar', type: :issues
- if @issues.present?
= render 'service_desk_empty_state_content'
= render 'service_desk_info_content'
.issues-holder
= render 'projects/issues/issues', empty_state_path: 'service_desk_empty_state'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment