diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-14 17:08:01 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-14 17:08:01 +0300 |
commit | dab1824679406e116ea6a32dd8e544d88daf9f98 (patch) | |
tree | 901d67cecd6b9ac6c5a325929ecdbfd95d3f0279 /app | |
parent | 0c6217e2dc248b632520ebf31b75983e4081a1e8 (diff) |
Align project download button with others in sidebar on project home page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/pages/projects.scss | 4 | ||||
-rw-r--r-- | app/views/projects/repositories/_download_archive.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/show.html.haml | 10 |
3 files changed, 12 insertions, 8 deletions
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 04a0e4fa0e6..cfce42a03c6 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -220,6 +220,10 @@ ul.nav.nav-projects-tabs { background-color: #F9F9F9; border-color: #DDD; + &.dropdown-toggle { + text-align: center; + } + &:hover { background-color: #eee; border-color: #DDD; diff --git a/app/views/projects/repositories/_download_archive.html.haml b/app/views/projects/repositories/_download_archive.html.haml index 1ba7a1f2060..b9486a9b492 100644 --- a/app/views/projects/repositories/_download_archive.html.haml +++ b/app/views/projects/repositories/_download_archive.html.haml @@ -3,14 +3,14 @@ - split_button = split_button || false - if split_button == true %span.btn-group{class: btn_class} - = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn btn-sm', rel: 'nofollow' do + = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn col-xs-10', rel: 'nofollow' do %i.fa.fa-download %span Download zip - %a.btn-sm.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' } + %a.col-xs-2.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' } %span.caret %span.sr-only Select Archive Format - %ul.dropdown-menu{ role: 'menu' } + %ul.col-xs-10.dropdown-menu{ role: 'menu' } %li = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), rel: 'nofollow' do %i.fa.fa-download diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 160a17cebe7..4464c51744a 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -60,11 +60,16 @@ - unless @project.empty_repo? = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do + %i.fa.fa-exchange Compare code + - if can?(current_user, :download_code, @project) + = render 'projects/repositories/download_archive', split_button: true, btn_class: 'btn-block' + - if version = @repository.version - detail_url = changelog_url(@project) || version_url(@project) = link_to detail_url, class: 'btn btn-block' do + %i.fa.fa-file-text-o Version: %span.count = @repository.blob_by_oid(version.id).data @@ -80,11 +85,6 @@ - else #{link_to @project.owner_name, @project.owner} - - unless @project.empty_repo? - - if can? current_user, :download_code, @project - %hr - .prepend-top-10.append-bottom-10 - = render 'projects/repositories/download_archive', split_button: true .prepend-top-10 - @project.ci_services.each do |ci_service| |