diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 18:10:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 18:10:58 +0300 |
commit | 049d16d168fdee408b78f5f38619c092fd3b2265 (patch) | |
tree | 22d1db5ab4fae0967a4da4b1a6b097ef9e5d7aa2 /app/views/projects/artifacts | |
parent | bf18f3295b550c564086efd0a32d9a25435ce216 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/artifacts')
-rw-r--r-- | app/views/projects/artifacts/_artifact.html.haml | 61 | ||||
-rw-r--r-- | app/views/projects/artifacts/_table.html.haml | 16 | ||||
-rw-r--r-- | app/views/projects/artifacts/index.html.haml | 13 |
3 files changed, 6 insertions, 84 deletions
diff --git a/app/views/projects/artifacts/_artifact.html.haml b/app/views/projects/artifacts/_artifact.html.haml deleted file mode 100644 index 9e548582396..00000000000 --- a/app/views/projects/artifacts/_artifact.html.haml +++ /dev/null @@ -1,61 +0,0 @@ -.gl-responsive-table-row.px-md-3 - .table-section.section-25.section-wrap.commit - .table-mobile-header{ role: 'rowheader' }= _('Job') - .table-mobile-content - .branch-commit.cgray - - if can?(current_user, :read_build, @project) - = link_to project_job_path(@project, artifact.job) do - %span.build-link ##{artifact.job_id} - - else - %span.build-link ##{artifact.job_id} - - - if artifact.job.ref - .icon-container.gl-display-inline-block{ "aria-label" => artifact.job.tag? ? _('Tag') : _('Branch') } - = artifact.job.tag? ? sprite_icon('tag', css_class: 'sprite') : sprite_icon('branch', css_class: 'sprite') - = link_to artifact.job.ref, project_ref_path(@project, artifact.job.ref), class: 'ref-name' - - else - .light= _('none') - .icon-container.commit-icon{ "aria-label" => _('Commit') } - = sprite_icon('commit') - - - if artifact.job.sha - = link_to artifact.job.short_sha, project_commit_path(@project, artifact.job.sha), class: 'commit-sha mr-0' - - .table-section.section-15.section-wrap - .table-mobile-header{ role: 'rowheader' }= _('Name') - .table-mobile-content - = artifact.job.name - - .table-section.section-20 - .table-mobile-header{ role: 'rowheader' }= _('Creation date') - .table-mobile-content - %p.finished-at - = sprite_icon("calendar") - %span= time_ago_with_tooltip(artifact.created_at) - - .table-section.section-20 - .table-mobile-header{ role: 'rowheader' }= _('Expiration date') - .table-mobile-content - - if artifact.expire_at - %p.finished-at - = sprite_icon("calendar") - %span= time_ago_with_tooltip(artifact.expire_at) - - .table-section.section-10 - .table-mobile-header{ role: 'rowheader' }= _('Size') - .table-mobile-content - = number_to_human_size(artifact.size, precision: 2) - - .table-section.table-button-footer.section-10 - .table-action-buttons - .btn-group - - if can?(current_user, :read_build, @project) - = link_to download_project_job_artifacts_path(@project, artifact.job), rel: 'nofollow', download: '', title: _('Download artifacts'), data: { placement: 'top', container: 'body' }, ref: 'tooltip', aria: { label: _('Download artifacts') }, class: 'gl-button btn btn-default btn-icon has-tooltip' do - = sprite_icon('download', css_class: 'gl-icon') - - = link_to browse_project_job_artifacts_path(@project, artifact.job), rel: 'nofollow', title: _('Browse artifacts'), data: { placement: 'top', container: 'body' }, ref: 'tooltip', aria: { label: _('Browse artifacts') }, class: 'gl-button btn btn-default btn-icon has-tooltip' do - = sprite_icon('folder-open', css_class: 'gl-icon') - - - if can?(current_user, :destroy_artifacts, @project) - = link_to project_artifact_path(@project, artifact), data: { placement: 'top', container: 'body', confirm: _('Are you sure you want to delete these artifacts?'), confirm_btn_variant: "danger" }, method: :delete, title: _('Delete artifacts'), ref: 'tooltip', aria: { label: _('Delete artifacts') }, class: 'gl-button btn btn-danger btn-icon has-tooltip' do - = sprite_icon('remove', css_class: 'gl-icon') diff --git a/app/views/projects/artifacts/_table.html.haml b/app/views/projects/artifacts/_table.html.haml deleted file mode 100644 index 1963449d704..00000000000 --- a/app/views/projects/artifacts/_table.html.haml +++ /dev/null @@ -1,16 +0,0 @@ -- if artifacts.blank? - .nothing-here-block= _('No jobs to show') -- else - .table-holder - .ci-table - .gl-responsive-table-row.table-row-header.px-md-3{ role: 'row' } - .table-section.section-25{ role: 'rowheader' }= _('Job') - .table-section.section-15{ role: 'rowheader' }= _('Name') - .table-section.section-20{ role: 'rowheader' }= _('Creation date') - .table-section.section-20{ role: 'rowheader' }= _('Expiration date') - .table-section.section-10{ role: 'rowheader' }= _('Size') - .table-section.section-10{ role: 'rowheader' } - - = render partial: 'artifact', collection: artifacts, as: :artifact - - = paginate artifacts, theme: "gitlab", total_pages: @total_pages diff --git a/app/views/projects/artifacts/index.html.haml b/app/views/projects/artifacts/index.html.haml index 1ab3e8e67d8..9cbc149177c 100644 --- a/app/views/projects/artifacts/index.html.haml +++ b/app/views/projects/artifacts/index.html.haml @@ -1,10 +1,9 @@ -- @no_container = true - page_title _('Artifacts') %div{ class: container_class } - .top-area.py-3 - .align-self-center - = _('Total artifacts size: %{total_size}') % { total_size: number_to_human_size(@total_size, precicion: 2) } - - .content-list.builds-content-list - = render "table", artifacts: @artifacts, project: @project + %h1.page-title.gl-font-size-h-display.gl-mb-0 + = s_('Artifacts|Artifacts') + .gl-mb-6 + %strong= s_('Artifacts|Total artifacts size') + = number_to_human_size(@total_size, precicion: 2) + #js-artifact-management{ data: { "project-path" => @project.full_path } } |