Commit 69ef81404c7a8fba315b28d850fc9cf2da801a84
1 parent
88d9569a
Exists in
master
and in
4 other branches
UI improved, .main_box css class for show pages
Showing
12 changed files
with
94 additions
and
79 deletions
Show diff stats
app/assets/stylesheets/common.scss
| @@ -1010,15 +1010,16 @@ p.time { | @@ -1010,15 +1010,16 @@ p.time { | ||
| 1010 | } | 1010 | } |
| 1011 | } | 1011 | } |
| 1012 | 1012 | ||
| 1013 | -.project_box, | ||
| 1014 | -.issue_box, | ||
| 1015 | -.commit_box, | ||
| 1016 | -.merge_request_box{ | ||
| 1017 | - @extend .padded; | 1013 | +/** |
| 1014 | + * UI box element | ||
| 1015 | + * contains top, middle, bottom blocks | ||
| 1016 | + * | ||
| 1017 | + */ | ||
| 1018 | +.main_box { | ||
| 1018 | @extend .borders; | 1019 | @extend .borders; |
| 1019 | @extend .prepend-top-20; | 1020 | @extend .prepend-top-20; |
| 1020 | @extend .append-bottom-20; | 1021 | @extend .append-bottom-20; |
| 1021 | - border-width:2px; | 1022 | + border-width:1px; |
| 1022 | 1023 | ||
| 1023 | img { max-width: 100%; } | 1024 | img { max-width: 100%; } |
| 1024 | 1025 | ||
| @@ -1027,21 +1028,32 @@ p.time { | @@ -1027,21 +1028,32 @@ p.time { | ||
| 1027 | background: none !important; | 1028 | background: none !important; |
| 1028 | } | 1029 | } |
| 1029 | } | 1030 | } |
| 1030 | -} | ||
| 1031 | 1031 | ||
| 1032 | -.project_box .project_descr, | ||
| 1033 | -.merge_request_box .middle_area, | ||
| 1034 | -.issue_box .middle_area, | ||
| 1035 | -.commit_box .commit_message { | ||
| 1036 | - margin: -20px; | ||
| 1037 | - padding: 20px; | ||
| 1038 | - margin-top:10px; | ||
| 1039 | - border-radius:0; | ||
| 1040 | - border:none; | ||
| 1041 | - font-size:12px; | ||
| 1042 | - background-color:#f5f5f5; | ||
| 1043 | - border:none; | ||
| 1044 | - border-top:1px solid #eee; | 1032 | + .top_box_content, |
| 1033 | + .middle_box_content, | ||
| 1034 | + .bottom_box_content { | ||
| 1035 | + padding:20px; | ||
| 1036 | + | ||
| 1037 | + pre { | ||
| 1038 | + background: none !important; | ||
| 1039 | + margin:0; | ||
| 1040 | + border:none; | ||
| 1041 | + padding:0; | ||
| 1042 | + } | ||
| 1043 | + } | ||
| 1044 | + | ||
| 1045 | + .middle_box_content { | ||
| 1046 | + border-radius:0; | ||
| 1047 | + border:none; | ||
| 1048 | + font-size:12px; | ||
| 1049 | + background-color:#f5f5f5; | ||
| 1050 | + border:none; | ||
| 1051 | + border-top:1px solid #eee; | ||
| 1052 | + } | ||
| 1053 | + | ||
| 1054 | + .bottom_box_content { | ||
| 1055 | + border-top:1px solid #eee; | ||
| 1056 | + } | ||
| 1045 | } | 1057 | } |
| 1046 | 1058 | ||
| 1047 | .highlight_word { | 1059 | .highlight_word { |
| @@ -1058,10 +1070,6 @@ p.time { | @@ -1058,10 +1070,6 @@ p.time { | ||
| 1058 | margin-right:20px; | 1070 | margin-right:20px; |
| 1059 | } | 1071 | } |
| 1060 | 1072 | ||
| 1061 | -.merge_request_status_holder { | ||
| 1062 | - margin-bottom:20px; | ||
| 1063 | -} | ||
| 1064 | - | ||
| 1065 | .arrow{ | 1073 | .arrow{ |
| 1066 | float: right; | 1074 | float: right; |
| 1067 | background: #E3E5EA; | 1075 | background: #E3E5EA; |
app/views/commits/index.html.haml
| @@ -14,7 +14,6 @@ | @@ -14,7 +14,6 @@ | ||
| 14 | #commits_list= render "commits" | 14 | #commits_list= render "commits" |
| 15 | .clear | 15 | .clear |
| 16 | .loading{ :style => "display:none;"} | 16 | .loading{ :style => "display:none;"} |
| 17 | - %center= image_tag "ajax-loader.gif" | ||
| 18 | 17 | ||
| 19 | - if @commits.count == @limit | 18 | - if @commits.count == @limit |
| 20 | :javascript | 19 | :javascript |
app/views/commits/show.html.haml
| 1 | -.commit_box | ||
| 2 | - .commit | 1 | +.main_box |
| 2 | + .top_box_content | ||
| 3 | .right | 3 | .right |
| 4 | - unless @notes_count.zero? | 4 | - unless @notes_count.zero? |
| 5 | %span.btn.small.disabled.padded= pluralize @notes_count, 'note' | 5 | %span.btn.small.disabled.padded= pluralize @notes_count, 'note' |
| @@ -17,8 +17,9 @@ | @@ -17,8 +17,9 @@ | ||
| 17 | = @commit.committer_name | 17 | = @commit.committer_name |
| 18 | %small= @commit.committed_date.stamp("Aug 21, 2011 9:23pm") | 18 | %small= @commit.committed_date.stamp("Aug 21, 2011 9:23pm") |
| 19 | 19 | ||
| 20 | - %pre.commit_message | ||
| 21 | - = commit_msg_with_link_to_issues(@project, @commit.safe_message) | 20 | + .middle_box_content |
| 21 | + %pre.commit_message | ||
| 22 | + = commit_msg_with_link_to_issues(@project, @commit.safe_message) | ||
| 22 | %br | 23 | %br |
| 23 | %p.cgray | 24 | %p.cgray |
| 24 | Showing #{pluralize(@commit.diffs.count, "changed file")} | 25 | Showing #{pluralize(@commit.diffs.count, "changed file")} |
app/views/deploy_keys/index.html.haml
| @@ -6,6 +6,6 @@ | @@ -6,6 +6,6 @@ | ||
| 6 | Add Deploy Key | 6 | Add Deploy Key |
| 7 | 7 | ||
| 8 | - if @keys.any? | 8 | - if @keys.any? |
| 9 | - %table.zebra-striped.borders | 9 | + %table |
| 10 | - @keys.each do |key| | 10 | - @keys.each do |key| |
| 11 | = render(:partial => 'show', :locals => {:key => key}) | 11 | = render(:partial => 'show', :locals => {:key => key}) |
app/views/hooks/index.html.haml
| @@ -6,16 +6,14 @@ | @@ -6,16 +6,14 @@ | ||
| 6 | = link_to new_project_hook_path(@project), :class => "btn small", :title => "New Web Hook" do | 6 | = link_to new_project_hook_path(@project), :class => "btn small", :title => "New Web Hook" do |
| 7 | Add Post Receive Hook | 7 | Add Post Receive Hook |
| 8 | 8 | ||
| 9 | + %p Read more about web hooks #{link_to "here", help_web_hooks_path, :class => "vlink"} | ||
| 10 | + | ||
| 9 | -if @hooks.any? | 11 | -if @hooks.any? |
| 10 | - %table.zebra-striped.borders | 12 | + %table |
| 11 | - @hooks.each do |hook| | 13 | - @hooks.each do |hook| |
| 12 | %tr | 14 | %tr |
| 13 | %td | 15 | %td |
| 14 | = link_to project_hook_path(@project, hook) do | 16 | = link_to project_hook_path(@project, hook) do |
| 15 | = hook.url | 17 | = hook.url |
| 16 | %td | 18 | %td |
| 17 | - = link_to 'Remove', project_hook_path(@project, hook), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small" | ||
| 18 | - | ||
| 19 | -.ui-box | ||
| 20 | - %h5 Hooks request example | ||
| 21 | - .data= render "data_ex" | 19 | + = link_to 'Remove', project_hook_path(@project, hook), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small right" |
app/views/issues/show.html.haml
| @@ -22,8 +22,8 @@ | @@ -22,8 +22,8 @@ | ||
| 22 | = link_to project_issues_path(@project) do | 22 | = link_to project_issues_path(@project) do |
| 23 | ← To issues list | 23 | ← To issues list |
| 24 | 24 | ||
| 25 | -.issue_box | ||
| 26 | - .merge_request_status_holder | 25 | +.main_box |
| 26 | + .top_box_content | ||
| 27 | %h5 | 27 | %h5 |
| 28 | - if @issue.closed | 28 | - if @issue.closed |
| 29 | .alert-message.error.status_info Closed | 29 | .alert-message.error.status_info Closed |
| @@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
| 31 | .alert-message.success.status_info Open | 31 | .alert-message.success.status_info Open |
| 32 | = @issue.title | 32 | = @issue.title |
| 33 | 33 | ||
| 34 | - %div.middle_area | 34 | + .middle_box_content |
| 35 | %cite.cgray Created by | 35 | %cite.cgray Created by |
| 36 | = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av" | 36 | = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av" |
| 37 | %strong.author= link_to_issue_author(@issue) | 37 | %strong.author= link_to_issue_author(@issue) |
| @@ -40,9 +40,8 @@ | @@ -40,9 +40,8 @@ | ||
| 40 | = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av" | 40 | = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av" |
| 41 | %strong.author= link_to_issue_assignee(@issue) | 41 | %strong.author= link_to_issue_assignee(@issue) |
| 42 | 42 | ||
| 43 | - %div | ||
| 44 | - - if @issue.description.present? | ||
| 45 | - %hr | 43 | + - if @issue.description.present? |
| 44 | + .bottom_box_content | ||
| 46 | = markdown @issue.description | 45 | = markdown @issue.description |
| 47 | 46 | ||
| 48 | 47 |
app/views/keys/index.html.haml
app/views/merge_requests/show.html.haml
| @@ -22,8 +22,8 @@ | @@ -22,8 +22,8 @@ | ||
| 22 | = link_to project_merge_requests_path(@project) do | 22 | = link_to project_merge_requests_path(@project) do |
| 23 | ← To merge requests | 23 | ← To merge requests |
| 24 | 24 | ||
| 25 | -.merge_request_box | ||
| 26 | - .merge_request_status_holder | 25 | +.main_box |
| 26 | + .top_box_content | ||
| 27 | %h5 | 27 | %h5 |
| 28 | - if @merge_request.closed | 28 | - if @merge_request.closed |
| 29 | .alert-message.error.status_info Closed | 29 | .alert-message.error.status_info Closed |
| @@ -31,8 +31,7 @@ | @@ -31,8 +31,7 @@ | ||
| 31 | .alert-message.success.status_info Open | 31 | .alert-message.success.status_info Open |
| 32 | = @merge_request.title | 32 | = @merge_request.title |
| 33 | 33 | ||
| 34 | - | ||
| 35 | - %div.middle_area | 34 | + .middle_box_content |
| 36 | %div | 35 | %div |
| 37 | %cite.cgray Created at #{@merge_request.created_at.stamp("Aug 21, 2011")} by | 36 | %cite.cgray Created at #{@merge_request.created_at.stamp("Aug 21, 2011")} by |
| 38 | = image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av" | 37 | = image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av" |
| @@ -44,17 +43,15 @@ | @@ -44,17 +43,15 @@ | ||
| 44 | 43 | ||
| 45 | 44 | ||
| 46 | - if @merge_request.closed | 45 | - if @merge_request.closed |
| 47 | - %hr | ||
| 48 | - - if @merge_request.merged? | ||
| 49 | - %span | ||
| 50 | - Merged by #{@merge_request.merge_event.author_name} | ||
| 51 | - %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago. | ||
| 52 | - - elsif @merge_request.closed_event | ||
| 53 | - %span | ||
| 54 | - Closed by #{@merge_request.closed_event.author_name} | ||
| 55 | - %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago. | ||
| 56 | - %br | ||
| 57 | - | 46 | + .bottom_box_content |
| 47 | + - if @merge_request.merged? | ||
| 48 | + %span | ||
| 49 | + Merged by #{@merge_request.merge_event.author_name} | ||
| 50 | + %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago. | ||
| 51 | + - elsif @merge_request.closed_event | ||
| 52 | + %span | ||
| 53 | + Closed by #{@merge_request.closed_event.author_name} | ||
| 54 | + %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago. | ||
| 58 | 55 | ||
| 59 | = render "merge_requests/commits" | 56 | = render "merge_requests/commits" |
| 60 | 57 |
app/views/projects/_team.html.haml
| 1 | -%ul.unstyled.ui-box | ||
| 2 | - - @project.users_projects.each do |up| | ||
| 3 | - = render(:partial => 'team_members/show', :locals => {:member => up}) | 1 | +.ui-box |
| 2 | + %h5 | ||
| 3 | + .cgray Team Members (#{@project.users_projects.count}) | ||
| 4 | + %ul.unstyled | ||
| 5 | + - @project.users_projects.each do |up| | ||
| 6 | + = render(:partial => 'team_members/show', :locals => {:member => up}) | ||
| 7 | + | ||
| 4 | 8 | ||
| 5 | :javascript | 9 | :javascript |
| 6 | $(function(){ | 10 | $(function(){ |
app/views/projects/show.html.haml
| 1 | = render "project_head" | 1 | = render "project_head" |
| 2 | -.project_box | ||
| 3 | - %h3 | ||
| 4 | - = @project.name | ||
| 5 | - %span.right | ||
| 6 | - - if can? current_user, :download_code, @project | ||
| 7 | - = link_to "Download", archive_project_repository_path(@project), :class => "btn small padded" | ||
| 8 | - - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) | ||
| 9 | - = link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "btn small padded" do | ||
| 10 | - Merge Request | ||
| 11 | - - if @project.issues_enabled && can?(current_user, :write_issue, @project) | ||
| 12 | - = link_to new_project_issue_path(@project), :title => "New Issue", :class => "btn small" do | ||
| 13 | - Issue | ||
| 14 | - .back_link | ||
| 15 | - = link_to projects_path do | ||
| 16 | - ← To projects list | ||
| 17 | - %br | ||
| 18 | - .alert-message.block-message.warning | 2 | +.main_box |
| 3 | + .top_box_content | ||
| 4 | + %h3 | ||
| 5 | + = @project.name | ||
| 6 | + %span.right | ||
| 7 | + - if can? current_user, :download_code, @project | ||
| 8 | + = link_to "Download", archive_project_repository_path(@project), :class => "btn small padded" | ||
| 9 | + - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project) | ||
| 10 | + = link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "btn small padded" do | ||
| 11 | + Merge Request | ||
| 12 | + - if @project.issues_enabled && can?(current_user, :write_issue, @project) | ||
| 13 | + = link_to new_project_issue_path(@project), :title => "New Issue", :class => "btn small" do | ||
| 14 | + Issue | ||
| 15 | + .back_link | ||
| 16 | + = link_to projects_path do | ||
| 17 | + ← To projects list | ||
| 18 | + .middle_box_content | ||
| 19 | .input | 19 | .input |
| 20 | .input-prepend | 20 | .input-prepend |
| 21 | %span.add-on git clone | 21 | %span.add-on git clone |
| 22 | = text_field_tag :project_clone, @project.url_to_repo, :class => "xlarge one_click_select git_clone_url" | 22 | = text_field_tag :project_clone, @project.url_to_repo, :class => "xlarge one_click_select git_clone_url" |
| 23 | 23 | ||
| 24 | - if @project.description.present? | 24 | - if @project.description.present? |
| 25 | - .markdown.project_descr= markdown @project.description | 25 | + .bottom_box_content |
| 26 | + .markdown= markdown @project.description | ||
| 26 | - unless @events.blank? | 27 | - unless @events.blank? |
| 27 | %br | 28 | %br |
| 28 | %h5.cgray | 29 | %h5.cgray |
config/routes.rb
| @@ -8,6 +8,7 @@ Gitlab::Application.routes.draw do | @@ -8,6 +8,7 @@ Gitlab::Application.routes.draw do | ||
| 8 | get 'help' => 'help#index' | 8 | get 'help' => 'help#index' |
| 9 | get 'help/permissions' => 'help#permissions' | 9 | get 'help/permissions' => 'help#permissions' |
| 10 | get 'help/workflow' => 'help#workflow' | 10 | get 'help/workflow' => 'help#workflow' |
| 11 | + get 'help/web_hooks' => 'help#web_hooks' | ||
| 11 | 12 | ||
| 12 | namespace :admin do | 13 | namespace :admin do |
| 13 | resources :users do | 14 | resources :users do |