diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss index 6f6a6a4a5d49fce968fd7fc8ad9d8fbea36f967c..91c49912cd6d4636c41b4dd4dbfe6fa1128f124d 100644 --- a/app/assets/stylesheets/sections/projects.scss +++ b/app/assets/stylesheets/sections/projects.scss @@ -14,25 +14,67 @@ } } -.project_clone_panel { - @include border-radius(4px); - @include bg-gray-gradient; - padding: 4px 7px; - border: 1px solid #CCC; - margin-bottom: 20px; +.project-home-panel { + .project-home-title { + font-size: 18px; + color: #777; + margin: 0; + line-height: 2; + } + .project-home-dropdown { + margin-left: 10px; + float: right; + } + .project-home-extra { + margin-top: 10px; - .btn { - padding: 4px 12px; + .project-home-desc { + float: left; + color: #999; + } + + .project-home-links { + float: right; + a { + margin-left: 10px; + } + } + } + + .public-label { + font-size: 14px; + background: #f1f1f1; + padding: 6px 10px; + border-radius: 4px; + margin-left: 10px; + color: #888; + text-shadow: 0 1px 1px #FFF; } } -.project_clone_holder { +.git-clone-holder { + float: right; + + .btn { + border: none; + background: none; + box-shadow: none; + color: #29b; + padding: 6px; + + &.active { + color: #333; + font-weight: bold; + } + } + input[type="text"] { + margin-left: 5px; @extend .monospace; - border: 1px solid #BBB; + border: 1px solid #E1E1E1; box-shadow: none; - margin-left: -1px; - background: #FFF; + background: #FAFAFA; + padding: 6px 10px; } } diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index aefcd8339521a3c47c71a59845be52e98d5d3d66..1ba3a9a9d1b70384d271fde7c15853c612b0c7ea 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,5 +1,31 @@ -= render 'clone_panel' +.project-home-panel + .row + .span4 + %h4.project-home-title + = @project.name_with_namespace + - if @project.public + %span.public-label Public + .span8 + .project-home-dropdown + = render "dropdown" + .form-horizontal + = render "shared/clone_panel" + .project-home-extra.clearfix + .project-home-desc + - if @project.description.present? + = @project.description + - if can?(current_user, :admin_project, @project) + – + %strong= link_to 'Edit', edit_project_path + + .project-home-links + = link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref) + = link_to pluralize(@repository.branch_names.count, 'branch'), project_branches_path(@project) + = link_to pluralize(@repository.tag_names.count, 'tag'), project_tags_path(@project) + %span.light.prepend-left-20= repository_size + +%hr .row .span9 = render "events/event_last_push", event: @last_push @@ -7,17 +33,29 @@ .content_list .loading.hide .span3 - .light-well - %h3.page-title - = @project.name - - if @project.description.present? - %p.light= @project.description + .clearfix + - if @project.forked_from_project + .alert.alert-success + %i.icon-code-fork + Forked from: + = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project) + - unless @project.empty_repo? + - if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace + - if current_user.already_forked?(@project) + = link_to project_path(current_user.fork_of(@project)), class: 'btn btn-block' do + %i.icon-ok + Already forked + - else + = link_to fork_project_path(@project), title: "Fork", class: "btn btn-block", method: "POST" do + %i.icon-code-fork + Fork repository - %hr - %p - %p - %span.light Repo size is - = repository_size + - if can? current_user, :download_code, @project + = link_to archive_project_repository_path(@project), class: "btn btn-block" do + %i.icon-download-alt + %span Download + %br + .light-well %p %span.light Created at #{@project.created_at.stamp('Aug 22, 2013')} @@ -27,19 +65,7 @@ #{link_to @project.group.name, @project.group} Group - else #{link_to @project.owner_name, @project.owner} - - if @project.forked_from_project - %p - %i.icon-code-fork - Forked from: - = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project) - %hr - %p - = link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref) - %p - = link_to pluralize(@repository.branch_names.count, 'branch'), project_branches_path(@project) - %p - = link_to pluralize(@repository.tag_names.count, 'tag'), project_tags_path(@project) - if @project.gitlab_ci? %hr