summaryrefslogtreecommitdiff
path: root/app/views/shared/empty_states/_issues.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/shared/empty_states/_issues.html.haml')
-rw-r--r--app/views/shared/empty_states/_issues.html.haml15
1 files changed, 7 insertions, 8 deletions
diff --git a/app/views/shared/empty_states/_issues.html.haml b/app/views/shared/empty_states/_issues.html.haml
index 997bc7b8a98..8ccf14463c7 100644
--- a/app/views/shared/empty_states/_issues.html.haml
+++ b/app/views/shared/empty_states/_issues.html.haml
@@ -6,6 +6,8 @@
- opened_issues_count = issuables_count_for_state(:issues, :opened)
- is_opened_state = params[:state] == 'opened'
- is_closed_state = params[:state] == 'closed'
+- issuable_type = 'issues'
+- can_edit = can?(current_user, :admin_project, @project)
.row.empty-state
.col-12
@@ -20,7 +22,7 @@
= _("To widen your search, change or remove filters above")
- if show_new_issue_link?(@project)
.text-center
- = link_to _("New issue"), new_project_issue_path(@project), class: "btn btn-success"
+ = link_to _("New issue"), new_project_issue_path(@project), class: "gl-button btn btn-confirm"
- elsif is_opened_state && opened_issues_count == 0 && closed_issues_count > 0
%h4.text-center
= _("There are no open issues")
@@ -28,7 +30,7 @@
= _("To keep this project going, create a new issue")
- if show_new_issue_link?(@project)
.text-center
- = link_to _("New issue"), new_project_issue_path(@project), class: "btn btn-success"
+ = link_to _("New issue"), new_project_issue_path(@project), class: "gl-button btn btn-confirm"
- elsif is_closed_state && opened_issues_count > 0 && closed_issues_count == 0
%h4.text-center
= _("There are no closed issues")
@@ -42,10 +44,10 @@
- if project_select_button
= render 'shared/new_project_item_select', path: 'issues/new', label: _('New issue'), type: :issues, with_feature_enabled: 'issues'
- else
- = link_to _('New issue'), button_path, class: 'btn gl-button btn-success', id: 'new_issue_link'
+ = link_to _('New issue'), button_path, class: 'gl-button btn btn-confirm', id: 'new_issue_link'
- if show_import_button
- = render 'projects/issues/import_csv/button', type: :text
+ .js-csv-import-export-buttons{ data: { show_import_button: show_import_button.to_s, issuable_type: issuable_type, import_csv_issues_path: import_csv_namespace_project_issues_path, 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), container_class: 'gl-display-inline-flex gl-vertical-align-middle', show_label: 'true' } }
%hr
%p.gl-text-center.gl-mb-0
%strong
@@ -62,7 +64,4 @@
%p
= _("The Issue Tracker is the place to add things that need to be improved or solved in a project. You can register or sign in to create issues for this project.")
.text-center
- = link_to _('Register / Sign In'), new_user_session_path, class: 'btn btn-success'
-
-- if show_import_button
- = render 'projects/issues/import_csv/modal'
+ = link_to _('Register / Sign In'), new_user_session_path, class: 'gl-button btn btn-confirm'