Commit 02dc25651411d5a60d760265903ebf629959ba59
1 parent
2b319d04
Exists in
master
and in
4 other branches
Branches pages polished. few css improvements
Showing
10 changed files
with
51 additions
and
20 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap.scss
| 1 | +body { | ||
| 2 | + margin-bottom:20px; | ||
| 3 | +} | ||
| 1 | a { | 4 | a { |
| 2 | outline: none; | 5 | outline: none; |
| 3 | color: $link_color; | 6 | color: $link_color; |
| @@ -67,6 +70,10 @@ h3, h4, h5, h6 { | @@ -67,6 +70,10 @@ h3, h4, h5, h6 { | ||
| 67 | line-height: 36px; | 70 | line-height: 36px; |
| 68 | } | 71 | } |
| 69 | 72 | ||
| 73 | +h5 { | ||
| 74 | + font-size:14px; | ||
| 75 | +} | ||
| 76 | + | ||
| 70 | code { | 77 | code { |
| 71 | background:#FCEEC1; | 78 | background:#FCEEC1; |
| 72 | color:$style_color; | 79 | color:$style_color; |
app/assets/stylesheets/main.scss
| @@ -31,6 +31,11 @@ $hover: #FDF5D9; | @@ -31,6 +31,11 @@ $hover: #FDF5D9; | ||
| 31 | box-shadow: 0 0 3px #ddd; | 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 | @mixin round-borders-bottom($radius) { | 40 | @mixin round-borders-bottom($radius) { |
| 36 | border-top: 1px solid #eaeaea; | 41 | border-top: 1px solid #eaeaea; |
app/assets/stylesheets/ui_basic.scss
| @@ -87,6 +87,12 @@ | @@ -87,6 +87,12 @@ | ||
| 87 | padding: 5px; | 87 | padding: 5px; |
| 88 | margin-right:10px; | 88 | margin-right:10px; |
| 89 | float:right; | 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 | .project_name { | 98 | .project_name { |
app/views/protected_branches/index.html.haml
| @@ -8,10 +8,24 @@ | @@ -8,10 +8,24 @@ | ||
| 8 | %li forced code review before merge to protected branches | 8 | %li forced code review before merge to protected branches |
| 9 | %p Read more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"} | 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 | - unless @branches.empty? | 27 | - unless @branches.empty? |
| 14 | - %table.table-striped | 28 | + %table.admin-table |
| 15 | %thead | 29 | %thead |
| 16 | %tr | 30 | %tr |
| 17 | %th Name | 31 | %th Name |
| @@ -36,19 +50,6 @@ | @@ -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 | :javascript | 55 | :javascript |
app/views/refs/_head.html.haml
| @@ -6,5 +6,5 @@ | @@ -6,5 +6,5 @@ | ||
| 6 | = hidden_field_tag :path, params[:path] | 6 | = hidden_field_tag :path, params[:path] |
| 7 | %li{:class => "#{'active' if (controller.controller_name == "refs") }"} | 7 | %li{:class => "#{'active' if (controller.controller_name == "refs") }"} |
| 8 | = link_to tree_project_ref_path(@project, @ref) do | 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,4 +9,3 @@ | ||
| 9 | %li{:class => ("active" if current_page?(branches_project_repository_path(@project)))} | 9 | %li{:class => ("active" if current_page?(branches_project_repository_path(@project)))} |
| 10 | = link_to branches_project_repository_path(@project) do | 10 | = link_to branches_project_repository_path(@project) do |
| 11 | All | 11 | All |
| 12 | -%hr |
app/views/repositories/branches.html.haml
| 1 | = render "repositories/branches_head" | 1 | = render "repositories/branches_head" |
| 2 | - unless @branches.empty? | 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 | %tbody | 11 | %tbody |
| 5 | - @branches.each do |branch| | 12 | - @branches.each do |branch| |
| 6 | = render "repositories/branch", :branch => branch | 13 | = render "repositories/branch", :branch => branch |
app/views/repositories/show.html.haml
| 1 | = render "branches_head" | 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 | - @activities.each do |update| | 10 | - @activities.each do |update| |
| 5 | = render "repositories/branch", :branch => update.head | 11 | = render "repositories/branch", :branch => update.head |
| 6 | 12 |
app/views/snippets/_form.html.haml
| @@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
| 19 | .input= f.select :expires_at, lifetime_select_options, {}, :style => "width:200px;" | 19 | .input= f.select :expires_at, lifetime_select_options, {}, :style => "width:200px;" |
| 20 | .clearfix | 20 | .clearfix |
| 21 | = f.label :content, "Code" | 21 | = f.label :content, "Code" |
| 22 | - = f.text_area :content, :class => "xxlarge" | 22 | + .input= f.text_area :content, :class => "span8" |
| 23 | 23 | ||
| 24 | .actions | 24 | .actions |
| 25 | = f.submit 'Save', :class => "primary btn" | 25 | = f.submit 'Save', :class => "primary btn" |
app/views/team_members/_show.html.haml
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | = link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do | 6 | = link_to project_team_member_path(@project, member), :title => user.name, :class => "dark" do |
| 7 | = image_tag gravatar_icon(user.email, 40), :class => "avatar" | 7 | = image_tag gravatar_icon(user.email, 40), :class => "avatar" |
| 8 | %strong= truncate(user.name, :lenght => 40) | 8 | %strong= truncate(user.name, :lenght => 40) |
| 9 | - .prepend-top-10= user.email | 9 | + %div.cgray= user.email |
| 10 | 10 | ||
| 11 | .span3 | 11 | .span3 |
| 12 | = form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f| | 12 | = form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f| |