diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-03-31 19:58:32 +0000 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-03-31 19:58:32 +0000 |
commit | 5191285ccb548b50c2c01325832b99c8340807f8 (patch) | |
tree | bbe94a02fc61bdcc1b7e9d1611dc0e546e5af444 | |
parent | 321610424df3e143f8a55a512cfd297f1ab8ca81 (diff) | |
parent | 20deca7c68bd28c7ef9644e18f5e96546f9f1b95 (diff) | |
download | gitlab-ce-5191285ccb548b50c2c01325832b99c8340807f8.tar.gz |
Merge branch 'add-download-attr' into 'master'
Add download attribute to download links
See merge request !10318
6 files changed, 6 insertions, 5 deletions
diff --git a/app/assets/javascripts/vue_pipelines_index/components/pipelines_artifacts.js b/app/assets/javascripts/vue_pipelines_index/components/pipelines_artifacts.js index 3555040d60f..f18e2dfadaf 100644 --- a/app/assets/javascripts/vue_pipelines_index/components/pipelines_artifacts.js +++ b/app/assets/javascripts/vue_pipelines_index/components/pipelines_artifacts.js @@ -21,6 +21,7 @@ export default { <li v-for="artifact in artifacts"> <a rel="nofollow" + download :href="artifact.path"> <i class="fa fa-download" aria-hidden="true"></i> <span>Download {{artifact.name}} artifacts</span> diff --git a/app/views/notify/project_was_exported_email.html.haml b/app/views/notify/project_was_exported_email.html.haml index b28fea35ad5..76440926a2b 100644 --- a/app/views/notify/project_was_exported_email.html.haml +++ b/app/views/notify/project_was_exported_email.html.haml @@ -2,7 +2,7 @@ Project #{@project.name} was exported successfully. %p The project export can be downloaded from: - = link_to download_export_namespace_project_url(@project.namespace, @project) do + = link_to download_export_namespace_project_url(@project.namespace, @project), rel: 'nofollow', download: '', do = @project.name_with_namespace + " export" %p The download link will expire in 24 hours. diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml index edf55d59f28..de8c173f26f 100644 --- a/app/views/projects/artifacts/browse.html.haml +++ b/app/views/projects/artifacts/browse.html.haml @@ -3,7 +3,7 @@ .top-block.row-content-block.clearfix .pull-right = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, @build), - class: 'btn btn-default download' do + rel: 'nofollow', download: '', class: 'btn btn-default download' do = icon('download') Download artifacts archive diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index b597c7f7a12..6f45d5b0689 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -33,7 +33,7 @@ = link_to keep_namespace_project_build_artifacts_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-default', method: :post do Keep - = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-default' do + = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, @build), rel: 'nofollow', download: '', class: 'btn btn-sm btn-default' do Download - if @build.artifacts_metadata? diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 09286a1b3c6..aeed293a724 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -94,7 +94,7 @@ %td .pull-right - if can?(current_user, :read_build, build) && build.artifacts? - = link_to download_namespace_project_build_artifacts_path(build.project.namespace, build.project, build), title: 'Download artifacts', class: 'btn btn-build' do + = link_to download_namespace_project_build_artifacts_path(build.project.namespace, build.project, build), rel: 'nofollow', download: '', title: 'Download artifacts', class: 'btn btn-build' do = icon('download') - if can?(current_user, :update_build, build) - if build.active? diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 82e0d0025ec..b78de092a60 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -163,7 +163,7 @@ - if @project.export_project_path = link_to 'Download export', download_export_namespace_project_path(@project.namespace, @project), - method: :get, class: "btn btn-default" + rel: 'nofollow', download: '', method: :get, class: "btn btn-default" = link_to 'Generate new export', generate_new_export_namespace_project_path(@project.namespace, @project), method: :post, class: "btn btn-default" - else |