From 9ef5573c82acb0dc0d9068df08f469926a0a19c3 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 26 Apr 2013 20:59:29 +0300 Subject: [PATCH] Show project access level right to clone panel --- app/assets/stylesheets/sections/projects.scss | 8 -------- app/views/projects/_clone_panel.html.haml | 6 +++--- app/views/projects/show.html.haml | 10 ---------- app/views/shared/_clone_panel.html.haml | 11 ++++++++++- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/app/assets/stylesheets/sections/projects.scss b/app/assets/stylesheets/sections/projects.scss index 6c890d3420d..22618765eaa 100644 --- a/app/assets/stylesheets/sections/projects.scss +++ b/app/assets/stylesheets/sections/projects.scss @@ -33,14 +33,6 @@ } .project_clone_holder { - input[type="text"], - .btn { - font-size: 12px; - line-height: 18px; - margin: 0; - padding: 3px 10px; - } - input[type="text"] { @extend .monospace; border: 1px solid #BBB; diff --git a/app/views/projects/_clone_panel.html.haml b/app/views/projects/_clone_panel.html.haml index 9a2be429206..bc794f4fe29 100644 --- a/app/views/projects/_clone_panel.html.haml +++ b/app/views/projects/_clone_panel.html.haml @@ -6,12 +6,12 @@ .pull-right - unless @project.empty_repo? - if can? current_user, :download_code, @project - = link_to archive_project_repository_path(@project), class: "btn-small btn grouped" do + = link_to archive_project_repository_path(@project), class: "btn grouped" do %i.icon-download-alt Download - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) - = link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn-small btn grouped" do + = link_to new_project_merge_request_path(@project), title: "New Merge Request", class: "btn grouped" do Merge Request - if @project.issues_enabled && can?(current_user, :write_issue, @project) - = link_to url_for_new_issue, title: "New Issue", class: "btn-small btn grouped" do + = link_to url_for_new_issue, title: "New Issue", class: "btn grouped" do Issue diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 1e11ebbb335..e28a210cbb6 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -15,16 +15,6 @@ %hr %p - Access level: - - if @project.public - %span.cblue - %i.icon-share - Public - - else - %span.cgreen - %i.icon-lock - Private - %p Repo Size: #{@project.repository.size} MB %p Created at: #{@project.created_at.stamp('Aug 22, 2013')} %p Owner: #{link_to @project.owner_name, @project.owner} diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml index bd9ca729352..191532db865 100644 --- a/app/views/shared/_clone_panel.html.haml +++ b/app/views/shared/_clone_panel.html.haml @@ -1,4 +1,13 @@ -.input-prepend.project_clone_holder +.input-prepend.input-append.project_clone_holder %button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH %button{class: "btn", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.gitlab.protocol.upcase = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select input-xxlarge", readonly: true + %span.add-on + - if @project.public + .cblue + %i.icon-share + public + - else + .cgreen + %i.icon-lock + private