diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /app/views/projects/issues | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) | |
download | gitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/views/projects/issues')
-rw-r--r-- | app/views/projects/issues/_discussion.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/issues/_issue.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/issues/_issues.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/issues/_new_branch.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/issues/export_csv/_button.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/issues/export_csv/_modal.html.haml | 13 | ||||
-rw-r--r-- | app/views/projects/issues/index.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/issues/service_desk.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/issues/show.html.haml | 14 |
9 files changed, 27 insertions, 20 deletions
diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 4273130bbc2..e1f1d8bb8f7 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -1,4 +1,5 @@ - add_page_startup_api_call discussions_path(@issue) +- add_page_startup_api_call notes_url - @gfm_form = true diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index ba9ab50cb3a..4f188ae273c 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -35,7 +35,7 @@ - if issue.due_date %span.issuable-due-date.d-none.d-sm-inline-block.has-tooltip{ class: "#{'cred' if issue.overdue?}", title: _('Due date') } - = icon('calendar') + = sprite_icon('calendar') = issue.due_date.to_s(:medium) - if issue.labels.any? @@ -54,7 +54,7 @@ %li.issuable-status = _('CLOSED') - if issue.assignees.any? - %li + %li.gl-display-flex = render 'shared/issuable/assignees', project: @project, issuable: issue = render 'shared/issuable_meta_data', issuable: issue diff --git a/app/views/projects/issues/_issues.html.haml b/app/views/projects/issues/_issues.html.haml index 1a557cce33c..fa08c39e407 100644 --- a/app/views/projects/issues/_issues.html.haml +++ b/app/views/projects/issues/_issues.html.haml @@ -4,12 +4,14 @@ - data_endpoint = local_assigns.fetch(:data_endpoint, expose_path(api_v4_projects_issues_path(id: @project.id))) - default_empty_state_meta = { create_issue_path: new_project_issue_path(@project), svg_path: image_path('illustrations/issues.svg') } - data_empty_state_meta = local_assigns.fetch(:data_empty_state_meta, default_empty_state_meta) - - type = local_assigns.fetch(:type, '') + - type = local_assigns.fetch(:type, 'issues') + - if type == 'issues' && use_startup_call? + - add_page_startup_api_call(api_v4_projects_issues_path(id: @project.id, params: startup_call_params)) .js-issuables-list{ data: { endpoint: data_endpoint, 'empty-state-meta': data_empty_state_meta.to_json, 'can-bulk-edit': @can_bulk_update.to_json, 'sort-key': @sort, - 'type': type } } + type: type } } - else - empty_state_path = local_assigns.fetch(:empty_state_path, 'shared/empty_states/issues') %ul.content-list.issues-list.issuable-list{ class: ("manual-ordering" if @sort == 'relative_position') } @@ -18,4 +20,4 @@ = render empty_state_path - if @issues.present? - = paginate @issues, theme: "gitlab", total_pages: @total_pages + = paginate_collection @issues, total_pages: @total_pages diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml index 9bbab925f6a..aa95cecb5fe 100644 --- a/app/views/projects/issues/_new_branch.html.haml +++ b/app/views/projects/issues/_new_branch.html.haml @@ -43,7 +43,7 @@ %li.droplab-item-ignore.gl-ml-3.gl-mr-3.gl-mt-5 - if can_create_confidential_merge_request? - #js-forked-project{ data: { namespace_path: @project.namespace.full_path, project_path: @project.full_path, new_fork_path: new_project_fork_path(@project), help_page_path: help_page_path('user/project/merge_requests') } } + #js-forked-project{ data: { namespace_path: @project.namespace.full_path, project_path: @project.full_path, new_fork_path: new_project_fork_path(@project), help_page_path: help_page_path('user/project/merge_requests/index.md') } } .form-group %label{ for: 'new-branch-name' } = _('Branch name') diff --git a/app/views/projects/issues/export_csv/_button.html.haml b/app/views/projects/issues/export_csv/_button.html.haml index ef3fb438641..e5710fcdb60 100644 --- a/app/views/projects/issues/export_csv/_button.html.haml +++ b/app/views/projects/issues/export_csv/_button.html.haml @@ -1,4 +1,4 @@ - if current_user - %button.csv_download_link.btn.has-tooltip{ title: _('Export as CSV'), + %button.csv_download_link.btn.gl-button.has-tooltip{ title: _('Export as CSV'), data: { toggle: 'modal', target: '.issues-export-modal', qa_selector: 'export_as_csv_button' } } = sprite_icon('export') diff --git a/app/views/projects/issues/export_csv/_modal.html.haml b/app/views/projects/issues/export_csv/_modal.html.haml index 793e43da935..6610af63445 100644 --- a/app/views/projects/issues/export_csv/_modal.html.haml +++ b/app/views/projects/issues/export_csv/_modal.html.haml @@ -10,12 +10,13 @@ %a.close{ href: '#', 'data-dismiss' => 'modal' } = sprite_icon('close', css_class: 'gl-icon') .modal-body - .modal-subheader - = icon('check', { class: 'checkmark' }) - %strong.gl-ml-3 - - issues_count = issuables_count_for_state(:issues, params[:state]) - = n_('%d issue selected', '%d issues selected', issues_count) % issues_count + - issues_count = issuables_count_for_state(:issues, params[:state]) + - unless issues_count == -1 # The count timed out + .modal-subheader + = icon('check', { class: 'checkmark' }) + %strong.gl-ml-3 + = n_('%d issue selected', '%d issues selected', issues_count) % issues_count .modal-text = html_escape(_('The CSV export will be created in the background. Once finished, it will be sent to %{strong_open}%{email}%{strong_close} in an attachment.')) % { email: @current_user.notification_email, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } .modal-footer - = link_to _('Export issues'), export_csv_project_issues_path(@project, request.query_parameters), method: :post, class: 'btn btn-success float-left', title: _('Export issues'), data: { track_label: "export_issues_csv", track_event: "click_button", track_value: "", qa_selector: "export_issues_button" } + = link_to _('Export issues'), export_csv_project_issues_path(@project, request.query_parameters), method: :post, class: 'btn gl-button btn-success float-left', title: _('Export issues'), data: { track_label: "export_issues_csv", track_event: "click_button", track_value: "", qa_selector: "export_issues_button" } diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index cfc423da57a..842b3432991 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -2,6 +2,7 @@ - page_title _("Issues") - new_issue_email = @project.new_issuable_address(current_user, 'issue') +- add_page_specific_style 'page_bundles/issues_list' = content_for :meta_tags do = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@project.name} issues") diff --git a/app/views/projects/issues/service_desk.html.haml b/app/views/projects/issues/service_desk.html.haml index 65580a94cd0..b0d8791c566 100644 --- a/app/views/projects/issues/service_desk.html.haml +++ b/app/views/projects/issues/service_desk.html.haml @@ -1,7 +1,7 @@ - @can_bulk_update = false - page_title _("Service Desk") - +- add_page_specific_style 'page_bundles/issues_list' - content_for :breadcrumbs_extra do = render "projects/issues/nav_btns", show_export_button: false, show_rss_button: false diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index c762b044c3e..7785093466b 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -2,8 +2,12 @@ - add_to_breadcrumbs _("Issues"), project_issues_path(@project) - breadcrumb_title @issue.to_reference - page_title "#{@issue.title} (#{@issue.to_reference})", _("Issues") -- page_description @issue.description +- page_description @issue.description_html - page_card_attributes @issue.card_attributes +- if @issue.relocation_target + - page_canonical_link @issue.relocation_target.present(current_user: current_user).web_url +- if @issue.sentry_issue.present? + - add_page_specific_style 'page_bundles/error_tracking_details' - can_update_issue = can?(current_user, :update_issue, @issue) - can_reopen_issue = can?(current_user, :reopen_issue, @issue) @@ -61,15 +65,12 @@ .issue-details.issuable-details .detail-page-description.content-block - -# haml-lint:disable InlineJavaScript - %script#js-issuable-app-initial-data{ type: "application/json" }= issuable_initial_data(@issue).to_json - #js-issuable-app + #js-issuable-app{ data: { initial: issuable_initial_data(@issue).to_json} } .title-container %h2.title= markdown_field(@issue, :title) - if @issue.description.present? - .description{ class: can?(current_user, :update_issue, @issue) ? 'js-task-list-container' : '' } + .description .md= markdown_field(@issue, :description) - %textarea.hidden.js-task-list-field= @issue.description = edited_time_ago_with_tooltip(@issue, placement: 'bottom', html_class: 'issue-edited-ago js-issue-edited-ago') @@ -92,6 +93,7 @@ .js-noteable-awards = render 'award_emoji/awards_block', awardable: @issue, inline: true .new-branch-col + = render_if_exists "projects/issues/timeline_toggle", issue: @issue #js-vue-sort-issue-discussions #js-vue-discussion-filter{ data: { default_filter: current_user&.notes_filter_for(@issue), notes_filters: UserPreference.notes_filters.to_json } } = render 'new_branch' if show_new_branch_button? |