diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-04-14 18:13:11 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-04-14 18:13:11 +0300 |
commit | 3cfcb635ea5403ca396e47be52804652110788d1 (patch) | |
tree | 154c17ecaedfc728293e8177d96c6e60bdb0dc6e | |
parent | bf7932bd06e45f82c7aa80373aa3aa1bf52d4d88 (diff) | |
parent | 5262ba3c9a87d1f1773be7e158c962544fc8e988 (diff) |
Merge branch 'ui-improvements' into 'master'
Ui improvements
See merge request !1772
-rw-r--r-- | app/assets/stylesheets/pages/projects.scss | 20 | ||||
-rw-r--r-- | app/views/projects/branches/_branch.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/repositories/_download_archive.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/show.html.haml | 10 | ||||
-rw-r--r-- | app/views/projects/tags/_tag.html.haml | 4 |
5 files changed, 26 insertions, 20 deletions
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 5bd725d1222..86b102690c0 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -15,7 +15,7 @@ } .project-home-panel { - margin-bottom: 15px; + margin-bottom: 20px; position: relative; padding-left: 85px; @@ -38,6 +38,11 @@ font-size: 45px; line-height: 1.6; } + + .avatar, .identicon { + @include border-radius(4px); + box-shadow: 0 1px 2px #ddd; + } } .project-home-dropdown { @@ -61,13 +66,12 @@ .project-home-desc { float: left; - color: #666; + color: $gray; } } .visibility-level-label { - color: #555; - font-weight: bold; + color: $gray; i { color: inherit; } @@ -133,7 +137,7 @@ .option-descr { margin-left: 24px; - color: #666; + color: $gray; } } } @@ -212,8 +216,10 @@ ul.nav.nav-projects-tabs { white-space: normal; text-align: left; padding: 10px 15px; - background-color: #F9F9F9; - border-color: #DDD; + + &.dropdown-toggle { + text-align: center; + } &:hover { background-color: #eee; diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 0de8c509f2b..4e7415be4aa 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -11,14 +11,14 @@ protected .pull-right - if can?(current_user, :download_code, @project) - = render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'btn-grouped btn-group-sm' + = render 'projects/repositories/download_archive', ref: branch.name, btn_class: 'btn-grouped btn-group-xs' - if branch.name != @repository.root_ref - = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: branch.name), class: 'btn btn-grouped btn-sm', method: :post, title: "Compare" do + = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: branch.name), class: 'btn btn-grouped btn-xs', method: :post, title: "Compare" do %i.fa.fa-files-o Compare - if can_remove_branch?(@project, branch.name) - = link_to namespace_project_branch_path(@project.namespace, @project, branch.name), class: 'btn btn-grouped btn-sm btn-remove remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do + = link_to namespace_project_branch_path(@project.namespace, @project, branch.name), class: 'btn btn-grouped btn-xs btn-remove remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do %i.fa.fa-trash-o - if commit 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| diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index f22308e54b0..28ad272322f 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -9,9 +9,9 @@ = strip_gpg_signature(tag.message) .pull-right - if can? current_user, :download_code, @project - = render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'btn-grouped btn-group-sm' + = render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'btn-grouped btn-group-xs' - if can?(current_user, :admin_project, @project) - = link_to namespace_project_tag_path(@project.namespace, @project, tag.name), class: 'btn btn-sm btn-remove remove-row grouped', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do + = link_to namespace_project_tag_path(@project.namespace, @project, tag.name), class: 'btn btn-xs btn-remove remove-row grouped', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do %i.fa.fa-trash-o - if commit |