diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 2a22404db0190ed523adbca292880cdf5ca22101..ccd9fdfb8994dbfb2e08be293cb489f50d0d2c2a 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1010,15 +1010,16 @@ p.time { } } -.project_box, -.issue_box, -.commit_box, -.merge_request_box{ - @extend .padded; +/** + * UI box element + * contains top, middle, bottom blocks + * + */ +.main_box { @extend .borders; @extend .prepend-top-20; @extend .append-bottom-20; - border-width:2px; + border-width:1px; img { max-width: 100%; } @@ -1027,21 +1028,32 @@ p.time { background: none !important; } } -} -.project_box .project_descr, -.merge_request_box .middle_area, -.issue_box .middle_area, -.commit_box .commit_message { - margin: -20px; - padding: 20px; - margin-top:10px; - border-radius:0; - border:none; - font-size:12px; - background-color:#f5f5f5; - border:none; - border-top:1px solid #eee; + .top_box_content, + .middle_box_content, + .bottom_box_content { + padding:20px; + + pre { + background: none !important; + margin:0; + border:none; + padding:0; + } + } + + .middle_box_content { + border-radius:0; + border:none; + font-size:12px; + background-color:#f5f5f5; + border:none; + border-top:1px solid #eee; + } + + .bottom_box_content { + border-top:1px solid #eee; + } } .highlight_word { @@ -1058,10 +1070,6 @@ p.time { margin-right:20px; } -.merge_request_status_holder { - margin-bottom:20px; -} - .arrow{ float: right; background: #E3E5EA; diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml index 6cc6ba5fdeb45d3dda06985085acaea72dc66bdc..e92b33b980121e9fa469b3c9cc90cda12df49e22 100644 --- a/app/views/commits/index.html.haml +++ b/app/views/commits/index.html.haml @@ -14,7 +14,6 @@ #commits_list= render "commits" .clear .loading{ :style => "display:none;"} - %center= image_tag "ajax-loader.gif" - if @commits.count == @limit :javascript diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml index 4d7be2a9e6106402eecc4a67966e766aaaafb523..fabdb700a9e295f1cc342683cabe579d80a1e267 100644 --- a/app/views/commits/show.html.haml +++ b/app/views/commits/show.html.haml @@ -1,5 +1,5 @@ -.commit_box - .commit +.main_box + .top_box_content .right - unless @notes_count.zero? %span.btn.small.disabled.padded= pluralize @notes_count, 'note' @@ -17,8 +17,9 @@ = @commit.committer_name %small= @commit.committed_date.stamp("Aug 21, 2011 9:23pm") - %pre.commit_message - = commit_msg_with_link_to_issues(@project, @commit.safe_message) + .middle_box_content + %pre.commit_message + = commit_msg_with_link_to_issues(@project, @commit.safe_message) %br %p.cgray Showing #{pluralize(@commit.diffs.count, "changed file")} diff --git a/app/views/deploy_keys/index.html.haml b/app/views/deploy_keys/index.html.haml index 09db49fed4a28d3bdbf0af6c4553510db15298f2..7dc769b534171c4d6727a9698f8b8b1ade8dfd4c 100644 --- a/app/views/deploy_keys/index.html.haml +++ b/app/views/deploy_keys/index.html.haml @@ -6,6 +6,6 @@ Add Deploy Key - if @keys.any? - %table.zebra-striped.borders + %table - @keys.each do |key| = render(:partial => 'show', :locals => {:key => key}) diff --git a/app/views/help/web_hooks.html.haml b/app/views/help/web_hooks.html.haml new file mode 100644 index 0000000000000000000000000000000000000000..84c6a0c051a767944d3bdb3650fefe27ccf12b8a --- /dev/null +++ b/app/views/help/web_hooks.html.haml @@ -0,0 +1,7 @@ +%h3 Web hooks +%br + +%p Application will send POST request with some data like example below: +%h5 Hooks request example: +.borders= render "hooks/data_ex" + diff --git a/app/views/hooks/index.html.haml b/app/views/hooks/index.html.haml index 64497a1c5e3bee05740ae197268736e106768413..672d2bb0565c7cdbc638458f954f4c029d2e9e24 100644 --- a/app/views/hooks/index.html.haml +++ b/app/views/hooks/index.html.haml @@ -6,16 +6,14 @@ = link_to new_project_hook_path(@project), :class => "btn small", :title => "New Web Hook" do Add Post Receive Hook + %p Read more about web hooks #{link_to "here", help_web_hooks_path, :class => "vlink"} + -if @hooks.any? - %table.zebra-striped.borders + %table - @hooks.each do |hook| %tr %td = link_to project_hook_path(@project, hook) do = hook.url %td - = link_to 'Remove', project_hook_path(@project, hook), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small" - -.ui-box - %h5 Hooks request example - .data= render "data_ex" + = link_to 'Remove', project_hook_path(@project, hook), :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small right" diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index 6528e8cc7c6b8d1f9ff22de782e0d8d75a462642..14d49305a541ddc3226f22238cee8db87fe641a7 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -22,8 +22,8 @@ = link_to project_issues_path(@project) do ← To issues list -.issue_box - .merge_request_status_holder +.main_box + .top_box_content %h5 - if @issue.closed .alert-message.error.status_info Closed @@ -31,7 +31,7 @@ .alert-message.success.status_info Open = @issue.title - %div.middle_area + .middle_box_content %cite.cgray Created by = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av" %strong.author= link_to_issue_author(@issue) @@ -40,9 +40,8 @@ = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av" %strong.author= link_to_issue_assignee(@issue) - %div - - if @issue.description.present? - %hr + - if @issue.description.present? + .bottom_box_content = markdown @issue.description diff --git a/app/views/keys/index.html.haml b/app/views/keys/index.html.haml index 9431a0a53de29043cc46ee69f1c6e1ae825fc7f7..5df24af7124f139a5cc467cd9878c542866e4fd5 100644 --- a/app/views/keys/index.html.haml +++ b/app/views/keys/index.html.haml @@ -4,6 +4,6 @@ %br -%table#keys-table.zebra-striped.borders +%table#keys-table - @keys.each do |key| = render(:partial => 'show', :locals => {:key => key}) diff --git a/app/views/merge_requests/show.html.haml b/app/views/merge_requests/show.html.haml index 5cea213b368b811413d18d4df2edc5a706619786..ef83b1e49e7cde174698a4f4379da89e335c4760 100644 --- a/app/views/merge_requests/show.html.haml +++ b/app/views/merge_requests/show.html.haml @@ -22,8 +22,8 @@ = link_to project_merge_requests_path(@project) do ← To merge requests -.merge_request_box - .merge_request_status_holder +.main_box + .top_box_content %h5 - if @merge_request.closed .alert-message.error.status_info Closed @@ -31,8 +31,7 @@ .alert-message.success.status_info Open = @merge_request.title - - %div.middle_area + .middle_box_content %div %cite.cgray Created at #{@merge_request.created_at.stamp("Aug 21, 2011")} by = image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av" @@ -44,17 +43,15 @@ - if @merge_request.closed - %hr - - if @merge_request.merged? - %span - Merged by #{@merge_request.merge_event.author_name} - %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago. - - elsif @merge_request.closed_event - %span - Closed by #{@merge_request.closed_event.author_name} - %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago. - %br - + .bottom_box_content + - if @merge_request.merged? + %span + Merged by #{@merge_request.merge_event.author_name} + %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago. + - elsif @merge_request.closed_event + %span + Closed by #{@merge_request.closed_event.author_name} + %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago. = render "merge_requests/commits" diff --git a/app/views/projects/_team.html.haml b/app/views/projects/_team.html.haml index 9d715542fe3b75fd1e7fcecf8637d371aba08738..60f84085555eb91b880b56444fd0e7c660221ed3 100644 --- a/app/views/projects/_team.html.haml +++ b/app/views/projects/_team.html.haml @@ -1,6 +1,10 @@ -%ul.unstyled.ui-box - - @project.users_projects.each do |up| - = render(:partial => 'team_members/show', :locals => {:member => up}) +.ui-box + %h5 + .cgray Team Members (#{@project.users_projects.count}) + %ul.unstyled + - @project.users_projects.each do |up| + = render(:partial => 'team_members/show', :locals => {:member => up}) + :javascript $(function(){ diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 4062b271319ae7b00f75c101a3b3b04b830fb09b..dd2f768e94e912d410a54c3fd309b7c93f0612da 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,28 +1,29 @@ = render "project_head" -.project_box - %h3 - = @project.name - %span.right - - if can? current_user, :download_code, @project - = link_to "Download", archive_project_repository_path(@project), :class => "btn small padded" - - 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 padded" do - Merge Request - - if @project.issues_enabled && can?(current_user, :write_issue, @project) - = link_to new_project_issue_path(@project), :title => "New Issue", :class => "btn small" do - Issue - .back_link - = link_to projects_path do - ← To projects list - %br - .alert-message.block-message.warning +.main_box + .top_box_content + %h3 + = @project.name + %span.right + - if can? current_user, :download_code, @project + = link_to "Download", archive_project_repository_path(@project), :class => "btn small padded" + - 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 padded" do + Merge Request + - if @project.issues_enabled && can?(current_user, :write_issue, @project) + = link_to new_project_issue_path(@project), :title => "New Issue", :class => "btn small" do + Issue + .back_link + = link_to projects_path do + ← To projects list + .middle_box_content .input .input-prepend %span.add-on git clone = text_field_tag :project_clone, @project.url_to_repo, :class => "xlarge one_click_select git_clone_url" - if @project.description.present? - .markdown.project_descr= markdown @project.description + .bottom_box_content + .markdown= markdown @project.description - unless @events.blank? %br %h5.cgray diff --git a/config/routes.rb b/config/routes.rb index 8241b5427944328766cb6b1b491fec934e1b018d..eb999f26ba2e1ae165a23f8cbf3c199d4e0ed47e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,6 +8,7 @@ Gitlab::Application.routes.draw do get 'help' => 'help#index' get 'help/permissions' => 'help#permissions' get 'help/workflow' => 'help#workflow' + get 'help/web_hooks' => 'help#web_hooks' namespace :admin do resources :users do