Commit 02dc25651411d5a60d760265903ebf629959ba59

Authored by Dmitriy Zaporozhets
1 parent 2b319d04

Branches pages polished. few css improvements

app/assets/stylesheets/gitlab_bootstrap.scss
  1 +body {
  2 + margin-bottom:20px;
  3 +}
1 4 a {
2 5 outline: none;
3 6 color: $link_color;
... ... @@ -67,6 +70,10 @@ h3, h4, h5, h6 {
67 70 line-height: 36px;
68 71 }
69 72  
  73 +h5 {
  74 + font-size:14px;
  75 +}
  76 +
70 77 code {
71 78 background:#FCEEC1;
72 79 color:$style_color;
... ...
app/assets/stylesheets/main.scss
... ... @@ -31,6 +31,11 @@ $hover: #FDF5D9;
31 31 box-shadow: 0 0 3px #ddd;
32 32 }
33 33  
  34 +@mixin border-radius($radius) {
  35 + -moz-border-radius: $radius;
  36 + -webkit-border-radius: $radius;
  37 + border-radius: $radius;
  38 +}
34 39  
35 40 @mixin round-borders-bottom($radius) {
36 41 border-top: 1px solid #eaeaea;
... ...
app/assets/stylesheets/ui_basic.scss
... ... @@ -87,6 +87,12 @@
87 87 padding: 5px;
88 88 margin-right:10px;
89 89 float:right;
  90 + background: #EEE;
  91 + @include border-radius(5px);
  92 + border: 1px solid #DDD;
  93 + img {
  94 + vertical-align:top;
  95 + }
90 96 }
91 97  
92 98 .project_name {
... ...
app/views/protected_branches/index.html.haml
... ... @@ -8,10 +8,24 @@
8 8 %li forced code review before merge to protected branches
9 9 %p Read more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"}
10 10  
  11 +- if can? current_user, :admin_project, @project
  12 + = form_for [@project, @protected_branch] do |f|
  13 + -if @protected_branch.errors.any?
  14 + .alert-message.block-message.error
  15 + %ul
  16 + - @protected_branch.errors.full_messages.each do |msg|
  17 + %li= msg
  18 +
  19 + .entry.clearfix
  20 + = f.label :name, "Branch"
  21 + .span3
  22 + = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , { :include_blank => "-- Select branch" }, { :class => "span3" })
  23 +  
  24 + = f.submit 'Protect', :class => "primary btn"
11 25  
12 26  
13 27 - unless @branches.empty?
14   - %table.table-striped
  28 + %table.admin-table
15 29 %thead
16 30 %tr
17 31 %th Name
... ... @@ -36,19 +50,6 @@
36 50  
37 51  
38 52  
39   -- if can? current_user, :admin_project, @project
40   - = form_for [@project, @protected_branch] do |f|
41   - -if @protected_branch.errors.any?
42   - .alert-message.block-message.error
43   - %ul
44   - - @protected_branch.errors.full_messages.each do |msg|
45   - %li= msg
46   -
47   - .clearfix
48   - = f.label :name
49   - .input= f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , { :include_blank => "Select branch" }, { :style => "width:300px" })
50   - .actions
51   - = f.submit 'Add', :class => "primary btn"
52 53  
53 54  
54 55 :javascript
... ...
app/views/refs/_head.html.haml
... ... @@ -6,5 +6,5 @@
6 6 = hidden_field_tag :path, params[:path]
7 7 %li{:class => "#{'active' if (controller.controller_name == "refs") }"}
8 8 = link_to tree_project_ref_path(@project, @ref) do
9   - Code
  9 + Source
10 10  
... ...
app/views/repositories/_branches_head.html.haml
... ... @@ -9,4 +9,3 @@
9 9 %li{:class => ("active" if current_page?(branches_project_repository_path(@project)))}
10 10 = link_to branches_project_repository_path(@project) do
11 11 All
12   -%hr
... ...
app/views/repositories/branches.html.haml
1 1 = render "repositories/branches_head"
2 2 - unless @branches.empty?
3   - %table.table-striped.borders
  3 + %table.admin-table
  4 + %thead
  5 + %tr
  6 + %th Name
  7 + %th Last commit
  8 + %th Updated at
  9 + %th
  10 +
4 11 %tbody
5 12 - @branches.each do |branch|
6 13 = render "repositories/branch", :branch => branch
... ...
app/views/repositories/show.html.haml
1 1 = render "branches_head"
2 2  
3   -%table.zebra-striped.borders
  3 +%table.admin-table
  4 + %thead
  5 + %tr
  6 + %th Name
  7 + %th Last commit
  8 + %th Updated at
  9 + %th
4 10 - @activities.each do |update|
5 11 = render "repositories/branch", :branch => update.head
6 12  
... ...
app/views/snippets/_form.html.haml
... ... @@ -19,7 +19,7 @@
19 19 .input= f.select :expires_at, lifetime_select_options, {}, :style => "width:200px;"
20 20 .clearfix
21 21 = f.label :content, "Code"
22   - = f.text_area :content, :class => "xxlarge"
  22 + .input= f.text_area :content, :class => "span8"
23 23  
24 24 .actions
25 25 = f.submit 'Save', :class => "primary btn"
... ...
app/views/team_members/_show.html.haml
... ... @@ -6,7 +6,7 @@
6 6 = link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do
7 7 = image_tag gravatar_icon(user.email, 40), :class => "avatar"
8 8 %strong= truncate(user.name, :lenght => 40)
9   - .prepend-top-10= user.email
  9 + %div.cgray= user.email
10 10  
11 11 .span3
12 12 = form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
... ...