Commit 4a5a130a18313ae34a3a765176ae8037eb8662bc
Exists in
master
and in
4 other branches
Merge branch 'improve/ui' of /home/git/repositories/gitlab/gitlabhq
Showing
14 changed files
with
216 additions
and
161 deletions
Show diff stats
app/assets/javascripts/project.js.coffee
@@ -6,10 +6,10 @@ class Project | @@ -6,10 +6,10 @@ class Project | ||
6 | 6 | ||
7 | @initEvents() | 7 | @initEvents() |
8 | 8 | ||
9 | - | 9 | + |
10 | initEvents: -> | 10 | initEvents: -> |
11 | disableButtonIfEmptyField '#project_name', '.project-submit' | 11 | disableButtonIfEmptyField '#project_name', '.project-submit' |
12 | - | 12 | + |
13 | $('#project_issues_enabled').change -> | 13 | $('#project_issues_enabled').change -> |
14 | if ($(this).is(':checked') == true) | 14 | if ($(this).is(':checked') == true) |
15 | $('#project_issues_tracker').removeAttr('disabled') | 15 | $('#project_issues_tracker').removeAttr('disabled') |
@@ -29,7 +29,7 @@ class Project | @@ -29,7 +29,7 @@ class Project | ||
29 | 29 | ||
30 | $ -> | 30 | $ -> |
31 | # Git clone panel switcher | 31 | # Git clone panel switcher |
32 | - scope = $ '.project_clone_holder' | 32 | + scope = $ '.git-clone-holder' |
33 | if scope.length > 0 | 33 | if scope.length > 0 |
34 | $('a, button', scope).click -> | 34 | $('a, button', scope).click -> |
35 | $('a, button', scope).removeClass 'active' | 35 | $('a, button', scope).removeClass 'active' |
app/assets/stylesheets/common.scss
@@ -86,13 +86,6 @@ span.update-author { | @@ -86,13 +86,6 @@ span.update-author { | ||
86 | font-weight: bold; | 86 | font-weight: bold; |
87 | } | 87 | } |
88 | 88 | ||
89 | -.label { | ||
90 | - padding: 1px 4px; | ||
91 | - font-size: 12px; | ||
92 | - font-style: normal; | ||
93 | - font-weight: normal; | ||
94 | -} | ||
95 | - | ||
96 | .field_with_errors { | 89 | .field_with_errors { |
97 | display: inline; | 90 | display: inline; |
98 | } | 91 | } |
app/assets/stylesheets/gitlab_bootstrap/buttons.scss
app/assets/stylesheets/gitlab_bootstrap/common.scss
@@ -88,6 +88,13 @@ pre.well-pre { | @@ -88,6 +88,13 @@ pre.well-pre { | ||
88 | @include box-shadow(inset 0 2px 4px rgba(0,0,0,.15)); | 88 | @include box-shadow(inset 0 2px 4px rgba(0,0,0,.15)); |
89 | } | 89 | } |
90 | 90 | ||
91 | +.label { | ||
92 | + padding: 2px 4px; | ||
93 | + font-size: 12px; | ||
94 | + font-style: normal; | ||
95 | + font-weight: normal; | ||
96 | +} | ||
97 | + | ||
91 | /** Big Labels **/ | 98 | /** Big Labels **/ |
92 | .state-label { | 99 | .state-label { |
93 | font-size: 14px; | 100 | font-size: 14px; |
app/assets/stylesheets/sections/projects.scss
@@ -14,25 +14,76 @@ | @@ -14,25 +14,76 @@ | ||
14 | } | 14 | } |
15 | } | 15 | } |
16 | 16 | ||
17 | -.project_clone_panel { | 17 | +.project-home-panel { |
18 | + border-bottom: 1px solid #DDD; | ||
19 | + padding-bottom: 30px; | ||
20 | + margin-bottom: 30px; | ||
21 | + | ||
22 | + .project-home-title { | ||
23 | + font-size: 18px; | ||
24 | + color: #777; | ||
25 | + margin: 0; | ||
26 | + line-height: 2; | ||
27 | + } | ||
28 | + .project-home-dropdown { | ||
29 | + margin-left: 10px; | ||
30 | + float: right; | ||
31 | + } | ||
32 | + .project-home-extra { | ||
33 | + margin-top: 15px; | ||
34 | + | ||
35 | + .project-home-desc { | ||
36 | + float: left; | ||
37 | + color: #999; | ||
38 | + } | ||
39 | + | ||
40 | + .project-home-links { | ||
41 | + float: right; | ||
42 | + a { | ||
43 | + margin-left: 10px; | ||
44 | + } | ||
45 | + } | ||
46 | + } | ||
47 | + | ||
48 | + .public-label { | ||
49 | + font-size: 14px; | ||
50 | + background: #f1f1f1; | ||
51 | + padding: 6px 10px; | ||
52 | + border-radius: 4px; | ||
53 | + margin-left: 10px; | ||
54 | + color: #888; | ||
55 | + text-shadow: 0 1px 1px #FFF; | ||
56 | + } | ||
57 | +} | ||
58 | + | ||
59 | +.git-clone-holder { | ||
60 | + float: right; | ||
61 | + border: 1px solid #E1E1E1; | ||
18 | @include border-radius(4px); | 62 | @include border-radius(4px); |
19 | - @include bg-gray-gradient; | ||
20 | - padding: 4px 7px; | ||
21 | - border: 1px solid #CCC; | ||
22 | - margin-bottom: 20px; | ||
23 | 63 | ||
24 | .btn { | 64 | .btn { |
25 | - padding: 4px 12px; | 65 | + margin-left: 3px; |
66 | + border: none; | ||
67 | + background: none; | ||
68 | + box-shadow: none; | ||
69 | + color: #29b; | ||
70 | + padding: 6px; | ||
71 | + | ||
72 | + &.active { | ||
73 | + color: #333; | ||
74 | + font-weight: bold; | ||
75 | + } | ||
26 | } | 76 | } |
27 | -} | ||
28 | 77 | ||
29 | -.project_clone_holder { | ||
30 | input[type="text"] { | 78 | input[type="text"] { |
79 | + margin-left: 2px; | ||
80 | + border: none; | ||
81 | + border-radius: 0; | ||
82 | + border-left: 1px solid #E1E1E1; | ||
31 | @extend .monospace; | 83 | @extend .monospace; |
32 | - border: 1px solid #BBB; | ||
33 | box-shadow: none; | 84 | box-shadow: none; |
34 | - margin-left: -1px; | ||
35 | - background: #FFF; | 85 | + background: #FAFAFA; |
86 | + padding: 6px 10px; | ||
36 | } | 87 | } |
37 | } | 88 | } |
38 | 89 | ||
@@ -81,16 +132,16 @@ ul.nav.nav-projects-tabs { | @@ -81,16 +132,16 @@ ul.nav.nav-projects-tabs { | ||
81 | 132 | ||
82 | .my-projects { | 133 | .my-projects { |
83 | li { | 134 | li { |
84 | - .project-title { | ||
85 | - font-size: 14px; | ||
86 | - } | ||
87 | - | ||
88 | .project-info { | 135 | .project-info { |
89 | margin-bottom: 10px; | 136 | margin-bottom: 10px; |
90 | } | 137 | } |
91 | 138 | ||
92 | - .access-icon i { | 139 | + .access-icon { |
93 | color: #AAA; | 140 | color: #AAA; |
141 | + margin-left: 10px; | ||
142 | + i { | ||
143 | + color: #AAA; | ||
144 | + } | ||
94 | } | 145 | } |
95 | } | 146 | } |
96 | } | 147 | } |
app/views/dashboard/projects.html.haml
@@ -56,13 +56,12 @@ | @@ -56,13 +56,12 @@ | ||
56 | - @projects.each do |project| | 56 | - @projects.each do |project| |
57 | %li | 57 | %li |
58 | %h4.project-title | 58 | %h4.project-title |
59 | - %span.access-icon | ||
60 | - - if project.public | ||
61 | - = public_icon | ||
62 | - - else | ||
63 | - = private_icon | ||
64 | = link_to project_path(project), class: dom_class(project) do | 59 | = link_to project_path(project), class: dom_class(project) do |
65 | - %strong= project.name_with_namespace | 60 | + = project.name_with_namespace |
61 | + - if project.public | ||
62 | + %small.access-icon | ||
63 | + = public_icon | ||
64 | + Public | ||
66 | 65 | ||
67 | - if project.forked_from_project | 66 | - if project.forked_from_project |
68 | %small.pull-right | 67 | %small.pull-right |
app/views/projects/_clone_panel.html.haml
@@ -1,56 +0,0 @@ | @@ -1,56 +0,0 @@ | ||
1 | -.project_clone_panel | ||
2 | - .row | ||
3 | - .span8 | ||
4 | - .form-horizontal= render "shared/clone_panel" | ||
5 | - .span3.pull-right | ||
6 | - .pull-right | ||
7 | - - unless @project.empty_repo? | ||
8 | - - if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace | ||
9 | - - if current_user.already_forked?(@project) | ||
10 | - = link_to project_path(current_user.fork_of(@project)), class: 'btn grouped disabled' do | ||
11 | - %i.icon-code-fork | ||
12 | - Forked | ||
13 | - - else | ||
14 | - = link_to fork_project_path(@project), title: "Fork", class: "btn grouped", method: "POST" do | ||
15 | - %i.icon-code-fork | ||
16 | - Fork | ||
17 | - - if can? current_user, :download_code, @project | ||
18 | - = link_to archive_project_repository_path(@project), class: "btn grouped" do | ||
19 | - %i.icon-download-alt | ||
20 | - %span.only-wide Download | ||
21 | - | ||
22 | - - if current_user | ||
23 | - .dropdown.pull-right | ||
24 | - %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} | ||
25 | - %i.icon-plus-sign-alt | ||
26 | - %span.only-wide New | ||
27 | - %b.caret | ||
28 | - %ul.dropdown-menu | ||
29 | - - if @project.issues_enabled && can?(current_user, :write_issue, @project) | ||
30 | - %li | ||
31 | - = link_to url_for_new_issue, title: "New Issue" do | ||
32 | - Issue | ||
33 | - - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) | ||
34 | - %li | ||
35 | - = link_to new_project_merge_request_path(@project), title: "New Merge Request" do | ||
36 | - Merge Request | ||
37 | - - if @project.snippets_enabled && can?(current_user, :write_snippet, @project) | ||
38 | - %li | ||
39 | - = link_to new_project_snippet_path(@project), title: "New Snippet" do | ||
40 | - Snippet | ||
41 | - - if can? current_user, :push_code, @project | ||
42 | - %li.divider | ||
43 | - %li | ||
44 | - = link_to new_project_branch_path(@project) do | ||
45 | - %i.icon-code-fork | ||
46 | - Git branch | ||
47 | - %li | ||
48 | - = link_to new_project_tag_path(@project) do | ||
49 | - %i.icon-tag | ||
50 | - Git tag | ||
51 | - | ||
52 | - - if can?(current_user, :admin_team_member, @project) | ||
53 | - %li.divider | ||
54 | - %li | ||
55 | - = link_to new_project_team_member_path(@project), title: "New project member" do | ||
56 | - Project member |
@@ -0,0 +1,34 @@ | @@ -0,0 +1,34 @@ | ||
1 | +- if current_user | ||
2 | + .dropdown.pull-right | ||
3 | + %a.dropdown-toggle.btn.btn-new{href: '#', "data-toggle" => "dropdown"} | ||
4 | + %i.icon-reorder | ||
5 | + %ul.dropdown-menu | ||
6 | + - if @project.issues_enabled && can?(current_user, :write_issue, @project) | ||
7 | + %li | ||
8 | + = link_to url_for_new_issue, title: "New Issue" do | ||
9 | + Issue | ||
10 | + - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) | ||
11 | + %li | ||
12 | + = link_to new_project_merge_request_path(@project), title: "New Merge Request" do | ||
13 | + Merge Request | ||
14 | + - if @project.snippets_enabled && can?(current_user, :write_snippet, @project) | ||
15 | + %li | ||
16 | + = link_to new_project_snippet_path(@project), title: "New Snippet" do | ||
17 | + Snippet | ||
18 | + - if can? current_user, :push_code, @project | ||
19 | + %li.divider | ||
20 | + %li | ||
21 | + = link_to new_project_branch_path(@project) do | ||
22 | + %i.icon-code-fork | ||
23 | + Git branch | ||
24 | + %li | ||
25 | + = link_to new_project_tag_path(@project) do | ||
26 | + %i.icon-tag | ||
27 | + Git tag | ||
28 | + | ||
29 | + - if can?(current_user, :admin_team_member, @project) | ||
30 | + %li.divider | ||
31 | + %li | ||
32 | + = link_to new_project_team_member_path(@project), title: "New project member" do | ||
33 | + Project member | ||
34 | + |
app/views/projects/empty.html.haml
app/views/projects/labels/_label.html.haml
1 | - frequency = @project.issues.tagged_with(label.name).count | 1 | - frequency = @project.issues.tagged_with(label.name).count |
2 | %li | 2 | %li |
3 | - %strong | ||
4 | - %span{class: "label #{label_css_class(label.name)}"} | ||
5 | - %i.icon-tag | ||
6 | - - if frequency.zero? | ||
7 | - %span.light= label.name | ||
8 | - - else | ||
9 | - = label.name | 3 | + %span{class: "label #{label_css_class(label.name)}"} |
4 | + %i.icon-tag | ||
5 | + - if frequency.zero? | ||
6 | + %span.light= label.name | ||
7 | + - else | ||
8 | + = label.name | ||
10 | .pull-right | 9 | .pull-right |
11 | - unless frequency.zero? | 10 | - unless frequency.zero? |
12 | = link_to project_issues_path(label_name: label.name) do | 11 | = link_to project_issues_path(label_name: label.name) do |
13 | - %strong | ||
14 | - = pluralize(frequency, 'issue') | ||
15 | - = "»" | 12 | + = pluralize(frequency, 'issue') |
13 | + = "»" |
app/views/projects/show.html.haml
1 | -= render 'clone_panel' | 1 | +.project-home-panel |
2 | + .row | ||
3 | + .span4 | ||
4 | + %h4.project-home-title | ||
5 | + = @project.name_with_namespace | ||
6 | + - if @project.public | ||
7 | + %span.public-label Public | ||
8 | + - else | ||
9 | + %span.public-label Private | ||
10 | + | ||
11 | + .span8 | ||
12 | + .project-home-dropdown | ||
13 | + = render "dropdown" | ||
14 | + .form-horizontal | ||
15 | + = render "shared/clone_panel" | ||
16 | + | ||
17 | + .project-home-extra.clearfix | ||
18 | + .project-home-desc | ||
19 | + - if @project.description.present? | ||
20 | + = @project.description | ||
21 | + - if can?(current_user, :admin_project, @project) | ||
22 | + – | ||
23 | + %strong= link_to 'Edit', edit_project_path | ||
24 | + | ||
25 | + .project-home-links | ||
26 | + = link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref) | ||
27 | + = link_to pluralize(@repository.branch_names.count, 'branch'), project_branches_path(@project) | ||
28 | + = link_to pluralize(@repository.tag_names.count, 'tag'), project_tags_path(@project) | ||
29 | + %span.light.prepend-left-20= repository_size | ||
2 | 30 | ||
3 | .row | 31 | .row |
4 | .span9 | 32 | .span9 |
@@ -7,17 +35,29 @@ | @@ -7,17 +35,29 @@ | ||
7 | .content_list | 35 | .content_list |
8 | .loading.hide | 36 | .loading.hide |
9 | .span3 | 37 | .span3 |
10 | - .light-well | ||
11 | - %h3.page-title | ||
12 | - = @project.name | ||
13 | - - if @project.description.present? | ||
14 | - %p.light= @project.description | 38 | + .clearfix |
39 | + - if @project.forked_from_project | ||
40 | + .alert.alert-success | ||
41 | + %i.icon-code-fork | ||
42 | + Forked from: | ||
43 | + = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project) | ||
44 | + - unless @project.empty_repo? | ||
45 | + - if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace | ||
46 | + - if current_user.already_forked?(@project) | ||
47 | + = link_to project_path(current_user.fork_of(@project)), class: 'btn btn-block' do | ||
48 | + %i.icon-ok | ||
49 | + Already forked | ||
50 | + - else | ||
51 | + = link_to fork_project_path(@project), title: "Fork", class: "btn btn-block", method: "POST" do | ||
52 | + %i.icon-code-fork | ||
53 | + Fork repository | ||
15 | 54 | ||
16 | - %hr | ||
17 | - %p | ||
18 | - %p | ||
19 | - %span.light Repo size is | ||
20 | - = repository_size | 55 | + - if can? current_user, :download_code, @project |
56 | + = link_to archive_project_repository_path(@project), class: "btn btn-block" do | ||
57 | + %i.icon-download-alt | ||
58 | + %span Download | ||
59 | + %br | ||
60 | + .light-well | ||
21 | %p | 61 | %p |
22 | %span.light Created at | 62 | %span.light Created at |
23 | #{@project.created_at.stamp('Aug 22, 2013')} | 63 | #{@project.created_at.stamp('Aug 22, 2013')} |
@@ -27,19 +67,7 @@ | @@ -27,19 +67,7 @@ | ||
27 | #{link_to @project.group.name, @project.group} Group | 67 | #{link_to @project.group.name, @project.group} Group |
28 | - else | 68 | - else |
29 | #{link_to @project.owner_name, @project.owner} | 69 | #{link_to @project.owner_name, @project.owner} |
30 | - - if @project.forked_from_project | ||
31 | - %p | ||
32 | - %i.icon-code-fork | ||
33 | - Forked from: | ||
34 | - = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project) | ||
35 | 70 | ||
36 | - %hr | ||
37 | - %p | ||
38 | - = link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref) | ||
39 | - %p | ||
40 | - = link_to pluralize(@repository.branch_names.count, 'branch'), project_branches_path(@project) | ||
41 | - %p | ||
42 | - = link_to pluralize(@repository.tag_names.count, 'tag'), project_tags_path(@project) | ||
43 | 71 | ||
44 | - if @project.gitlab_ci? | 72 | - if @project.gitlab_ci? |
45 | %hr | 73 | %hr |
app/views/projects/wikis/git_access.html.haml
@@ -2,35 +2,31 @@ | @@ -2,35 +2,31 @@ | ||
2 | %h3.page-title | 2 | %h3.page-title |
3 | Git access for | 3 | Git access for |
4 | %strong= @gollum_wiki.path_with_namespace | 4 | %strong= @gollum_wiki.path_with_namespace |
5 | - = render 'main_links' | ||
6 | 5 | ||
7 | -.content | ||
8 | - .project_clone_panel | ||
9 | - .row | ||
10 | - .span7 | ||
11 | - .form-horizontal | ||
12 | - .input-prepend.project_clone_holder | ||
13 | - %button{class: "btn active", :"data-clone" => @gollum_wiki.ssh_url_to_repo} SSH | ||
14 | - %button{class: "btn", :"data-clone" => @gollum_wiki.http_url_to_repo}= gitlab_config.protocol.upcase | ||
15 | - = text_field_tag :project_clone, @gollum_wiki.url_to_repo, class: "one_click_select input-xxlarge", readonly: true | ||
16 | - .git-empty | ||
17 | - %fieldset | ||
18 | - %legend Install Gollum: | ||
19 | - %pre.dark | ||
20 | - :preserve | ||
21 | - gem install gollum | 6 | + .form-horizontal.pull-right |
7 | + .git-clone-holder | ||
8 | + %button{class: "btn active", :"data-clone" => @gollum_wiki.ssh_url_to_repo} SSH | ||
9 | + %button{class: "btn", :"data-clone" => @gollum_wiki.http_url_to_repo}= gitlab_config.protocol.upcase | ||
10 | + = text_field_tag :project_clone, @gollum_wiki.url_to_repo, class: "one_click_select input-xxlarge", readonly: true | ||
22 | 11 | ||
23 | - %legend Clone Your Wiki: | ||
24 | - %pre.dark | ||
25 | - :preserve | ||
26 | - git clone #{@gollum_wiki.ssh_url_to_repo} | ||
27 | - cd #{@gollum_wiki.path} | 12 | +.git-empty |
13 | + %fieldset | ||
14 | + %legend Install Gollum: | ||
15 | + %pre.dark | ||
16 | + :preserve | ||
17 | + gem install gollum | ||
28 | 18 | ||
29 | - %legend Start Gollum And Edit Locally: | ||
30 | - %pre.dark | ||
31 | - :preserve | ||
32 | - gollum | ||
33 | - == Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin | ||
34 | - >> Thin web server (v1.5.0 codename Knife) | ||
35 | - >> Maximum connections set to 1024 | ||
36 | - >> Listening on 0.0.0.0:4567, CTRL+C to stop | 19 | + %legend Clone Your Wiki: |
20 | + %pre.dark | ||
21 | + :preserve | ||
22 | + git clone #{@gollum_wiki.ssh_url_to_repo} | ||
23 | + cd #{@gollum_wiki.path} | ||
24 | + | ||
25 | + %legend Start Gollum And Edit Locally: | ||
26 | + %pre.dark | ||
27 | + :preserve | ||
28 | + gollum | ||
29 | + == Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin | ||
30 | + >> Thin web server (v1.5.0 codename Knife) | ||
31 | + >> Maximum connections set to 1024 | ||
32 | + >> Listening on 0.0.0.0:4567, CTRL+C to stop |
app/views/shared/_clone_panel.html.haml
1 | -.input-prepend.input-append.project_clone_holder | 1 | +.git-clone-holder |
2 | %button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH | 2 | %button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH |
3 | %button{class: "btn", :"data-clone" => @project.http_url_to_repo}= gitlab_config.protocol.upcase | 3 | %button{class: "btn", :"data-clone" => @project.http_url_to_repo}= gitlab_config.protocol.upcase |
4 | - = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span7", readonly: true | ||
5 | - %span.add-on | ||
6 | - - if @project.public | ||
7 | - = public_icon | ||
8 | - %span.cblue public | ||
9 | - - else | ||
10 | - = private_icon | ||
11 | - %span.cgreen private | 4 | + = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5", readonly: true |
features/steps/public/projects_feature.rb
@@ -49,7 +49,9 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps | @@ -49,7 +49,9 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps | ||
49 | end | 49 | end |
50 | 50 | ||
51 | step 'I should see project "Community" home page' do | 51 | step 'I should see project "Community" home page' do |
52 | - page.should have_content 'Repo size is' | 52 | + within '.project-home-title' do |
53 | + page.should have_content 'Community' | ||
54 | + end | ||
53 | end | 55 | end |
54 | 56 | ||
55 | private | 57 | private |