diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-06 15:04:13 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-06 15:04:13 +0200 |
commit | ee9e922e965f0430d6c3ddaa7db05e81c4dfb7de (patch) | |
tree | 9c22f0e0bd9689f666b957a2c11dec41d961be96 | |
parent | 45ca39e81bf857cdb58b1a184b8fab0e56c200f7 (diff) | |
download | gitlab-ce-project-file-tabs.tar.gz |
Move project file links to tab bar.project-file-tabs
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | app/views/projects/show.html.haml | 29 |
2 files changed, 16 insertions, 15 deletions
diff --git a/CHANGELOG b/CHANGELOG index db3e5744b0e..53edc2ce111 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -20,7 +20,7 @@ v 7.10.0 (unreleased) - Omit the "email patches" link and fix plain diff view for merge commits - List new commits for newly pushed branch in activity view. - Add sidetiq gem dependency to match EE - - Add changelog, license and contribution guide links to project sidebar. + - Add changelog, license and contribution guide links to project tab bar. - Improve diff UI - Fix alignment of navbar toggle button (Cody Mize) - Fix checkbox rendering for nested task lists diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 85113ffa7e2..160a17cebe7 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -4,15 +4,27 @@ = render "home_panel" -- readme = @repository.readme %ul.nav.nav-tabs %li.active = link_to '#tab-activity', 'data-toggle' => 'tab' do Activity - - if readme + - if @repository.readme %li = link_to '#tab-readme', 'data-toggle' => 'tab' do Readme + - if @repository.changelog + %li + = link_to changelog_url(@project) do + Changelog + - if @repository.contribution_guide + %li + = link_to contribution_guide_url(@project) do + Contribution guide + - if @repository.license + %li + = link_to license_url(@project) do + License + .project-home-links - unless @project.empty_repo? = link_to pluralize(number_with_delimiter(@repository.commit_count), 'commit'), namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref) @@ -56,17 +68,6 @@ Version: %span.count = @repository.blob_by_oid(version.id).data - - elsif @repository.changelog - = link_to changelog_url(@project), class: 'btn btn-block' do - View changelog - - - if @repository.contribution_guide - = link_to contribution_guide_url(@project), class: 'btn btn-block' do - View contribution guide - - - if @repository.license - = link_to license_url(@project), class: 'btn btn-block' do - View license .prepend-top-10.append-bottom-10 %p @@ -96,7 +97,7 @@ %span.light CI provided by = link_to ci_service.title, ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink' - - if readme + - if readme = @repository.readme .tab-pane#tab-readme %article.readme-holder#README = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)) do |