2019-10-18 07:11:44 -04:00
- button_path = local_assigns.fetch(:new_project_issue_button_path, false)
2016-11-05 13:28:29 -04:00
- project_select_button = local_assigns.fetch(:project_select_button, false)
2019-01-11 09:11:18 -05:00
- show_import_button = local_assigns.fetch(:show_import_button, false) && can?(current_user, :import_issues, @project)
2016-11-05 13:28:29 -04:00
- has_button = button_path || project_select_button
2019-01-09 04:02:44 -05:00
- closed_issues_count = issuables_count_for_state(:issues, :closed)
- opened_issues_count = issuables_count_for_state(:issues, :opened)
- is_opened_state = params[:state] == 'opened'
- is_closed_state = params[:state] == 'closed'
2021-03-15 11:09:07 -04:00
- issuable_type = 'issues'
- can_edit = can?(current_user, :admin_project, @project)
2016-11-05 13:28:29 -04:00
.row.empty-state
2018-04-09 12:45:38 -04:00
.col-12
2016-11-05 13:28:29 -04:00
.svg-content
2017-09-22 04:39:47 -04:00
= image_tag 'illustrations/issues.svg'
2018-04-09 12:45:38 -04:00
.col-12
2016-11-05 13:28:29 -04:00
.text-content
2018-11-02 10:51:18 -04:00
- if has_filter_bar_param?
%h4.text-center
= _("Sorry, your filter produced no results")
2018-11-19 08:24:15 -05:00
%p.text-center
= _("To widen your search, change or remove filters above")
2019-01-09 04:02:44 -05:00
- if show_new_issue_link?(@project)
.text-center
2021-03-04 13:09:08 -05:00
= link_to _("New issue"), new_project_issue_path(@project), class: "gl-button btn btn-confirm"
2019-01-09 04:02:44 -05:00
- elsif is_opened_state && opened_issues_count == 0 && closed_issues_count > 0
%h4.text-center
= _("There are no open issues")
%p.text-center
= _("To keep this project going, create a new issue")
- if show_new_issue_link?(@project)
.text-center
2021-03-04 13:09:08 -05:00
= link_to _("New issue"), new_project_issue_path(@project), class: "gl-button btn btn-confirm"
2019-01-09 04:02:44 -05:00
- elsif is_closed_state && opened_issues_count > 0 && closed_issues_count == 0
%h4.text-center
= _("There are no closed issues")
2018-11-02 10:51:18 -04:00
- elsif current_user
2016-11-05 13:28:29 -04:00
%h4
2017-12-12 11:55:16 -05:00
= _("The Issue Tracker is the place to add things that need to be improved or solved in a project")
2016-11-05 13:28:29 -04:00
%p
2017-12-12 11:55:16 -05:00
= _("Issues can be bugs, tasks or ideas to be discussed. Also, issues are searchable and filterable.")
2017-12-18 10:54:44 -05:00
- if has_button
.text-center
- if project_select_button
2022-01-04 13:14:20 -05:00
= render 'shared/new_project_item_select', path: 'issues/new', label: _('issue'), type: :issues, with_feature_enabled: 'issues'
2021-03-25 17:09:13 -04:00
- elsif show_new_issue_link?(@project)
2021-03-04 13:09:08 -05:00
= link_to _('New issue'), button_path, class: 'gl-button btn btn-confirm', id: 'new_issue_link'
2018-12-04 03:42:27 -05:00
- if show_import_button
2021-06-29 08:08:48 -04:00
.js-csv-import-export-buttons{ data: { show_import_button: 'true', 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' } }
2020-08-06 14:09:41 -04:00
%hr
%p.gl-text-center.gl-mb-0
%strong
= s_('JiraService|Using Jira for issue tracking?')
%p.gl-text-center.gl-mb-0
2021-04-14 11:09:04 -04:00
- jira_docs_link_url = help_page_url('integration/jira/issues', anchor: 'view-jira-issues')
2020-08-06 14:09:41 -04:00
- jira_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: jira_docs_link_url }
= html_escape(s_('JiraService|%{jira_docs_link_start}Enable the Jira integration%{jira_docs_link_end} to view your Jira issues in GitLab.')) % { jira_docs_link_start: jira_docs_link_start.html_safe, jira_docs_link_end: '</a>'.html_safe }
%p.gl-text-center.gl-mb-0.gl-text-gray-500
= s_('JiraService|This feature requires a Premium plan.')
2018-12-04 03:42:27 -05:00
2016-11-05 13:28:29 -04:00
- else
2017-12-12 11:55:16 -05:00
%h4.text-center= _("There are no issues to show")
2017-12-11 07:08:55 -05:00
%p
2017-12-12 11:55:16 -05:00
= _("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.")
2017-04-13 12:33:32 -04:00
.text-center
2021-03-04 13:09:08 -05:00
= link_to _('Register / Sign In'), new_user_session_path, class: 'gl-button btn btn-confirm'