diff options
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/_flash_messages.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/_home_panel.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/alert_management/index.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/buttons/_download.html.haml | 15 | ||||
-rw-r--r-- | app/views/projects/cycle_analytics/show.html.haml | 40 | ||||
-rw-r--r-- | app/views/projects/import/jira/show.html.haml | 7 | ||||
-rw-r--r-- | app/views/projects/issues/_nav_btns.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/issues/export_csv/_button.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/issues/export_csv/_modal.html.haml | 22 | ||||
-rw-r--r-- | app/views/projects/issues/show.html.haml | 4 |
10 files changed, 68 insertions, 34 deletions
diff --git a/app/views/projects/_flash_messages.html.haml b/app/views/projects/_flash_messages.html.haml index f9222387e97..8217608db4e 100644 --- a/app/views/projects/_flash_messages.html.haml +++ b/app/views/projects/_flash_messages.html.haml @@ -8,4 +8,6 @@ - unless project.empty_repo? = render 'shared/auto_devops_implicitly_enabled_banner', project: project = render_if_exists 'projects/above_size_limit_warning', project: project + - if Feature.enabled?(:subscribable_banner_subscription) + = render_if_exists "layouts/header/ee_subscribable_banner", subscription: true = render_if_exists 'shared/shared_runners_minutes_limit', project: project, classes: [container_class, ("limit-container-width" unless fluid_layout)] diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index d9887cb470a..be58ecb3572 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -14,6 +14,7 @@ = @project.name %span.visibility-icon.text-secondary.prepend-left-4.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@project) } = visibility_level_icon(@project.visibility_level, fw: false, options: {class: 'icon'}) + = render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: @project .home-panel-metadata.d-flex.flex-wrap.text-secondary - if can?(current_user, :read_project, @project) %span.text-secondary diff --git a/app/views/projects/alert_management/index.html.haml b/app/views/projects/alert_management/index.html.haml new file mode 100644 index 00000000000..dab6aec0446 --- /dev/null +++ b/app/views/projects/alert_management/index.html.haml @@ -0,0 +1,3 @@ +- page_title _('Alerts') + +#js-alert_management{ data: alert_management_data(@project) } diff --git a/app/views/projects/buttons/_download.html.haml b/app/views/projects/buttons/_download.html.haml index cae8bbf8c01..445752d0a15 100644 --- a/app/views/projects/buttons/_download.html.haml +++ b/app/views/projects/buttons/_download.html.haml @@ -12,14 +12,13 @@ %h5.m-0.dropdown-bold-header= _('Download source code') .dropdown-menu-content = render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: nil - - if Feature.enabled?(:git_archive_path, default_enabled: true) - - if vue_file_list_enabled? - #js-directory-downloads{ data: { links: directory_download_links(project, ref, archive_prefix).to_json } } - - elsif directory? - %section.border-top.pt-1.mt-1 - %h5.m-0.dropdown-bold-header= _('Download this directory') - .dropdown-menu-content - = render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: @path + - if vue_file_list_enabled? + #js-directory-downloads{ data: { links: directory_download_links(project, ref, archive_prefix).to_json } } + - elsif directory? + %section.border-top.pt-1.mt-1 + %h5.m-0.dropdown-bold-header= _('Download this directory') + .dropdown-menu-content + = render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: @path - if pipeline && pipeline.latest_builds_with_artifacts.any? %section.border-top.pt-1.mt-1 %h5.m-0.dropdown-bold-header= _('Download artifacts') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index b0d9dfb0d37..da20fee227a 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -10,27 +10,25 @@ .card .card-header {{ __('Recent Project Activity') }} - .content-block - .container-fluid - .row - .col-12.column{ "v-for" => "item in state.summary", ":class" => "summaryTableColumnClass" } - %h3.header {{ item.value }} - %p.text {{ item.title }} - .col-12.column{ ":class" => "summaryTableColumnClass" } - .dropdown.inline.js-ca-dropdown - %button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" } - %span.dropdown-label {{ n__('Last %d day', 'Last %d days', 30) }} - %i.fa.fa-chevron-down - %ul.dropdown-menu.dropdown-menu-right - %li - %a{ "href" => "#", "data-value" => "7" } - {{ n__('Last %d day', 'Last %d days', 7) }} - %li - %a{ "href" => "#", "data-value" => "30" } - {{ n__('Last %d day', 'Last %d days', 30) }} - %li - %a{ "href" => "#", "data-value" => "90" } - {{ n__('Last %d day', 'Last %d days', 90) }} + .d-flex.justify-content-between + .flex-grow.text-center{ "v-for" => "item in state.summary" } + %h3.header {{ item.value }} + %p.text {{ item.title }} + .flex-grow.align-self-center.text-center + .dropdown.inline.js-ca-dropdown + %button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" } + %span.dropdown-label {{ n__('Last %d day', 'Last %d days', 30) }} + %i.fa.fa-chevron-down + %ul.dropdown-menu.dropdown-menu-right + %li + %a{ "href" => "#", "data-value" => "7" } + {{ n__('Last %d day', 'Last %d days', 7) }} + %li + %a{ "href" => "#", "data-value" => "30" } + {{ n__('Last %d day', 'Last %d days', 30) }} + %li + %a{ "href" => "#", "data-value" => "90" } + {{ n__('Last %d day', 'Last %d days', 90) }} .stage-panel-container .card.stage-panel .card-header.border-bottom-0 diff --git a/app/views/projects/import/jira/show.html.haml b/app/views/projects/import/jira/show.html.haml index 6003f33f0ba..4106bcc2e5a 100644 --- a/app/views/projects/import/jira/show.html.haml +++ b/app/views/projects/import/jira/show.html.haml @@ -1,6 +1,9 @@ -- if Feature.enabled?(:jira_issue_import_vue, @project) +- if Feature.enabled?(:jira_issue_import_vue, @project, default_enabled: true) .js-jira-import-root{ data: { project_path: @project.full_path, - is_jira_configured: @is_jira_configured.to_s, + issues_path: project_issues_path(@project), + is_jira_configured: @project.jira_service.present?.to_s, + jira_projects: @jira_projects.to_json, + in_progress_illustration: image_path('illustrations/export-import.svg'), setup_illustration: image_path('illustrations/manual_action.svg') } } - else - title = _('Jira Issue Import') diff --git a/app/views/projects/issues/_nav_btns.html.haml b/app/views/projects/issues/_nav_btns.html.haml index c347b8d2c9c..71c9bb36936 100644 --- a/app/views/projects/issues/_nav_btns.html.haml +++ b/app/views/projects/issues/_nav_btns.html.haml @@ -8,7 +8,7 @@ .btn-group - if show_export_button - = render_if_exists 'projects/issues/export_csv/button' + = render 'projects/issues/export_csv/button' - if show_import_button = render 'projects/issues/import_csv/button' @@ -23,7 +23,7 @@ id: "new_issue_link" - if show_export_button - = render_if_exists 'projects/issues/export_csv/modal' + = render 'projects/issues/export_csv/modal' - if show_import_button = render 'projects/issues/import_csv/modal' diff --git a/app/views/projects/issues/export_csv/_button.html.haml b/app/views/projects/issues/export_csv/_button.html.haml new file mode 100644 index 00000000000..ef3fb438641 --- /dev/null +++ b/app/views/projects/issues/export_csv/_button.html.haml @@ -0,0 +1,4 @@ +- if current_user + %button.csv_download_link.btn.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 new file mode 100644 index 00000000000..af3a087ca59 --- /dev/null +++ b/app/views/projects/issues/export_csv/_modal.html.haml @@ -0,0 +1,22 @@ +-# haml-lint:disable NoPlainNodes +- if current_user + .issues-export-modal.modal + .modal-dialog + .modal-content{ data: { qa_selector: 'export_issues_modal' } } + .modal-header + %h3 + = _('Export issues') + .svg-content.import-export-svg-container + = image_tag 'illustrations/export-import.svg', alt: _('Import/Export illustration'), class: 'illustration' + %a.close{ href: '#', 'data-dismiss' => 'modal' } + = sprite_icon('close', size: 16, css_class: 'gl-icon') + .modal-body + .modal-subheader + = icon('check', { class: 'checkmark' }) + %strong.prepend-left-10 + - issues_count = issuables_count_for_state(:issues, params[:state]) + = n_('%d issue selected', '%d issues selected', issues_count) % issues_count + .modal-text + = _('The CSV export will be created in the background. Once finished, it will be sent to <strong>%{email}</strong> in an attachment.').html_safe % { email: @current_user.notification_email } + .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" } diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 4fc67884584..e8987265a93 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -10,6 +10,8 @@ - can_report_spam = @issue.submittable_as_spam_by?(current_user) - can_create_issue = show_new_issue_link?(@project) += render_if_exists "projects/issues/alert_blocked", issue: @issue, current_user: current_user + .detail-page-header .detail-page-header-body .issuable-status-box.status-box.status-box-issue-closed{ class: issue_status_visibility(@issue, status_box: :closed) } @@ -50,7 +52,7 @@ %li.divider %li= link_to 'New issue', new_project_issue_path(@project), id: 'new_issue_link' - = render 'shared/issuable/close_reopen_button', issuable: @issue, can_update: can_update_issue, can_reopen: can_reopen_issue + = render 'shared/issuable/close_reopen_button', issuable: @issue, can_update: can_update_issue, can_reopen: can_reopen_issue, warn_before_close: defined?(@issue.blocked?) && @issue.blocked? - if can_report_spam = link_to 'Submit as spam', mark_as_spam_project_issue_path(@project, @issue), method: :post, class: 'd-none d-sm-none d-md-block btn btn-grouped btn-spam', title: 'Submit as spam' |