2019-12-21 20:55:43 +05:30
- button_path = local_assigns.fetch(:new_project_issue_button_path, false)
2019-02-15 15:39:39 +05:30
- show_import_button = local_assigns.fetch(:show_import_button, false) && can?(current_user, :import_issues, @project)
2019-03-02 22:35:43 +05:30
- 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-04-17 20:07:23 +05:30
- can_edit = can?(current_user, :admin_project, @project)
2017-08-17 22:00:37 +05:30
.row.empty-state
2018-11-08 19:23:39 +05:30
.col-12
2017-08-17 22:00:37 +05:30
.svg-content
2018-03-17 18:26:18 +05:30
= image_tag 'illustrations/issues.svg'
2018-11-08 19:23:39 +05:30
.col-12
2017-08-17 22:00:37 +05:30
.text-content
2019-02-15 15:39:39 +05:30
- if has_filter_bar_param?
%h4.text-center
= _("Sorry, your filter produced no results")
%p.text-center
= _("To widen your search, change or remove filters above")
2019-03-02 22:35:43 +05:30
- if show_new_issue_link?(@project)
.text-center
2021-04-17 20:07:23 +05:30
= link_to _("New issue"), new_project_issue_path(@project), class: "gl-button btn btn-confirm"
2019-03-02 22:35:43 +05:30
- 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-04-17 20:07:23 +05:30
= link_to _("New issue"), new_project_issue_path(@project), class: "gl-button btn btn-confirm"
2019-03-02 22:35:43 +05:30
- elsif is_closed_state && opened_issues_count > 0 && closed_issues_count == 0
%h4.text-center
= _("There are no closed issues")
2019-02-15 15:39:39 +05:30
- elsif current_user
2017-08-17 22:00:37 +05:30
%h4
2018-03-17 18:26:18 +05:30
= _("The Issue Tracker is the place to add things that need to be improved or solved in a project")
2017-08-17 22:00:37 +05:30
%p
2018-03-17 18:26:18 +05:30
= _("Issues can be bugs, tasks or ideas to be discussed. Also, issues are searchable and filterable.")
2023-04-23 21:23:45 +05:30
- if button_path
2018-03-17 18:26:18 +05:30
.text-center
2023-04-23 21:23:45 +05:30
- if show_new_issue_link?(@project)
2021-04-17 20:07:23 +05:30
= link_to _('New issue'), button_path, class: 'gl-button btn btn-confirm', id: 'new_issue_link'
2019-02-15 15:39:39 +05:30
- if show_import_button
2023-05-27 22:25:52 +05:30
.js-csv-import-export-buttons{ data: { show_import_button: 'true', issuable_type: 'issue', 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-w-full gl-sm-w-auto gl-sm-mr-3 gl-display-inline-flex gl-vertical-align-middle', show_label: 'true' } }
2020-10-24 23:57:45 +05:30
%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-29 21:17:54 +05:30
- jira_docs_link_url = help_page_url('integration/jira/issues', anchor: 'view-jira-issues')
2020-10-24 23:57:45 +05:30
- 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.')
2019-02-15 15:39:39 +05:30
2017-08-17 22:00:37 +05:30
- else
2018-03-17 18:26:18 +05:30
%h4.text-center= _("There are no issues to show")
%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.")
2017-08-17 22:00:37 +05:30
.text-center
2021-04-17 20:07:23 +05:30
= link_to _('Register / Sign In'), new_user_session_path, class: 'gl-button btn btn-confirm'