debian-mirror-gitlab/app/views/projects/issues/_nav_btns.html.haml

21 lines
1.6 KiB
Text
Raw Normal View History

2019-02-15 15:39:39 +05:30
- show_feed_buttons = local_assigns.fetch(:show_feed_buttons, true)
- show_import_button = local_assigns.fetch(:show_import_button, true) && can?(current_user, :import_issues, @project)
- show_export_button = local_assigns.fetch(:show_export_button, true)
2021-04-17 20:07:23 +05:30
- issuable_type = 'issues'
- can_edit = can?(current_user, :admin_project, @project)
2021-11-11 11:23:49 +05:30
- notification_email = @current_user.present? ? @current_user.notification_email_or_default : nil
2019-02-15 15:39:39 +05:30
2021-11-18 22:05:49 +05:30
.nav-controls.issues-nav-controls.gl-font-size-0
2019-02-15 15:39:39 +05:30
- if show_feed_buttons
= render 'shared/issuable/feed_buttons'
2021-11-18 22:05:49 +05:30
.js-csv-import-export-buttons{ data: { show_export_button: show_export_button.to_s, show_import_button: show_import_button.to_s, issuable_type: issuable_type, issuable_count: issuables_count_for_state(issuable_type.to_sym, params[:state]), email: notification_email, export_csv_path: export_csv_project_issues_path(@project, request.query_parameters), import_csv_issues_path: import_csv_namespace_project_issues_path, container_class: 'gl-mr-3', can_edit: can_edit.to_s, project_import_jira_path: project_import_jira_path(@project), max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) } }
2019-02-15 15:39:39 +05:30
- if @can_bulk_update
2021-01-29 00:20:46 +05:30
= button_tag _("Edit issues"), class: "gl-button btn btn-default gl-mr-3 js-bulk-update-toggle"
2019-02-15 15:39:39 +05:30
- if show_new_issue_link?(@project)
= link_to _("New issue"), new_project_issue_path(@project,
2021-09-04 01:27:46 +05:30
issue: { milestone_id: finder.milestones.first.try(:id) }),
2021-04-17 20:07:23 +05:30
class: "gl-button btn btn-confirm",
2019-02-15 15:39:39 +05:30
id: "new_issue_link"