Commit f9528bfb86817efa4af6eaab464936abb3f44ecb

Authored by Dmitriy Zaporozhets
1 parent b6568db1

a bit of restyling for issues and merge request lists

app/assets/images/download.png

674 Bytes

app/assets/stylesheets/common.scss
... ... @@ -117,34 +117,10 @@ span.update-author {
117 117 }
118 118  
119 119 .label {
120   - background-color: #474D57;
121   -
122   - &.label-tag {
123   - background: none;
124   - border: none;
125   - padding: 4px 6px;
126   - color: #444;
127   - text-shadow: 0 0 1px #fff;
128   -
129   - &.grouped {
130   - float: left;
131   - margin-right: 6px;
132   - padding: 6px;
133   - }
134   - }
135   - &.label-issue {
136   - background-color: #eee;
137   - border: 1px solid #ccc;
138   - padding: 4px 6px;
139   - color: #444;
140   - text-shadow: 0 0 1px #fff;
141   -
142   - &.grouped {
143   - float: left;
144   - margin-right: 6px;
145   - padding: 6px;
146   - }
147   - }
  120 + padding: 0px 4px;
  121 + font-size: 10px;
  122 + font-style: normal;
  123 + background-color: $link_color;
148 124  
149 125 &.label-success {
150 126 background-color: #8D8;
... ...
app/assets/stylesheets/gitlab_bootstrap/buttons.scss
... ... @@ -7,6 +7,10 @@
7 7 color: #333;
8 8 }
9 9  
  10 + &.btn-white {
  11 + background: #FFF;
  12 + }
  13 +
10 14 &.primary {
11 15 background: #2a79A3;
12 16 @include linear-gradient(#47A7b7, #2585b5);
... ...
app/assets/stylesheets/sections/issues.scss
1 1 .issues_table {
2 2 .issue {
3   - padding: 7px 10px;
  3 + padding: 10px;
4 4  
5 5 .issue_check {
6 6 float: left;
... ...
app/assets/stylesheets/sections/merge_requests.scss
... ... @@ -54,7 +54,7 @@
54 54 }
55 55  
56 56 li.merge_request {
57   - padding: 7px 10px;
  57 + padding: 10px;
58 58 img.avatar {
59 59 width: 32px;
60 60 margin-top: 1px;
... ...
app/assets/stylesheets/sections/notes.scss
... ... @@ -21,7 +21,7 @@
21 21 /* Note textare */
22 22 #note_note {
23 23 height: 80px;
24   - width: 99%;
  24 + width: 98%;
25 25 font-size: 14px;
26 26 }
27 27  
... ...
app/views/issues/_filter.html.haml
1 1 = form_tag project_issues_path(@project), method: 'get' do
2 2 %fieldset
3   - %legend Status:
4 3 %ul.nav.nav-pills.nav-stacked
5 4 %li{class: ("active" if !params[:status])}
6 5 = link_to project_issues_path(@project, status: nil) do
... ...
app/views/issues/_issues.html.haml
... ... @@ -3,12 +3,10 @@
3 3  
4 4 - if @issues.present?
5 5 %li.bottom
6   - .row
7   - .span7= paginate @issues, remote: true, theme: "gitlab"
8   - .span3.right
9   - %span.cgray.right
10   - %span.issue_counter #{@issues.total_count}
11   - issues for this filter
  6 + .left= paginate @issues, remote: true, theme: "gitlab"
  7 + .right
  8 + %span.issue_counter #{@issues.total_count}
  9 + issues for this filter
12 10 - else
13 11 %li
14 12 %h4.nothing_here_message Nothing to show here
... ...
app/views/issues/_show.html.haml
... ... @@ -3,10 +3,6 @@
3 3 .issue_check
4 4 = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue)
5 5 .right
6   - - issue.labels.each do |label|
7   - %span.label.label-tag.grouped
8   - %i.icon-tag
9   - = label.name
10 6 - if issue.notes.any?
11 7 %span.btn.small.disabled.grouped
12 8 %i.icon-comment
... ... @@ -36,3 +32,8 @@
36 32  
37 33 - if issue.votes_count > 0
38 34 = render 'votes/votes_inline', votable: issue
  35 + %span
  36 + - issue.labels.each do |label|
  37 + %span.label
  38 + %i.icon-tag
  39 + = label.name
... ...
app/views/issues/show.html.haml
... ... @@ -44,7 +44,7 @@
44 44  
45 45 .right
46 46 - @issue.labels.each do |label|
47   - %span
  47 + %span.label
48 48 %i.icon-tag
49 49 = label.name
50 50  
... ...
app/views/merge_requests/_filter.html.haml 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 += form_tag project_issues_path(@project), method: 'get' do
  2 + %fieldset
  3 + %ul.nav.nav-pills.nav-stacked
  4 + %li{class: ("active" if (params[:f] == 'open' || !params[:f]))}
  5 + = link_to project_merge_requests_path(@project, f: 'open', milestone_id: params[:milestone_id]) do
  6 + Open
  7 + %li{class: ("active" if params[:f] == "closed")}
  8 + = link_to project_merge_requests_path(@project, f: "closed", milestone_id: params[:milestone_id]) do
  9 + Closed
  10 + %li{class: ("active" if params[:f] == 'assigned-to-me')}
  11 + = link_to project_merge_requests_path(@project, f: 'assigned-to-me', milestone_id: params[:milestone_id]) do
  12 + Assigned To Me
  13 + %li{class: ("active" if params[:f] == 'all')}
  14 + = link_to project_merge_requests_path(@project, f: 'all', milestone_id: params[:milestone_id]) do
  15 + All
  16 +
  17 + %fieldset
  18 + %hr
  19 + = link_to "Reset", project_merge_requests_path(@project), class: 'btn right'
  20 +
... ...
app/views/merge_requests/index.html.haml
... ... @@ -8,40 +8,28 @@
8 8 %br
9 9  
10 10  
11   -.ui-box
12   - .title
13   - .left
14   - %ul.nav.nav-pills
15   - %li{class: ("active" if (params[:f] == 'open' || !params[:f]))}
16   - = link_to project_merge_requests_path(@project, f: 'open', milestone_id: params[:milestone_id]) do
17   - Open
18   - %li{class: ("active" if params[:f] == "closed")}
19   - = link_to project_merge_requests_path(@project, f: "closed", milestone_id: params[:milestone_id]) do
20   - Closed
21   - %li{class: ("active" if params[:f] == 'assigned-to-me')}
22   - = link_to project_merge_requests_path(@project, f: 'assigned-to-me', milestone_id: params[:milestone_id]) do
23   - To Me
24   - %li{class: ("active" if params[:f] == 'all')}
25   - = link_to project_merge_requests_path(@project, f: 'all', milestone_id: params[:milestone_id]) do
26   - All
27   - .right
28   - = form_tag project_merge_requests_path(@project), id: "merge_requests_search_form", method: :get, class: :right do
29   - = select_tag(:assignee_id, options_from_collection_for_select([unassigned_filter] + @project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
30   - = select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + @project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), prompt: "Milestone")
31   - = hidden_field_tag :f, params[:f]
32   - .clearfix
  11 +.row
  12 + .span3
  13 + = render 'filter', entity: 'issue'
  14 + .span9
  15 + .ui-box
  16 + .title
  17 + = form_tag project_merge_requests_path(@project), id: "merge_requests_search_form", method: :get, class: :left do
  18 + = select_tag(:assignee_id, options_from_collection_for_select([unassigned_filter] + @project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
  19 + = select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + @project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), prompt: "Milestone")
  20 + = hidden_field_tag :f, params[:f]
  21 + .clearfix
33 22  
34   - %ul.well-list
35   - = render @merge_requests
36   - - if @merge_requests.blank?
37   - %li
38   - %h4.nothing_here_message Nothing to show here
39   - - if @merge_requests.present?
40   - %li.bottom
41   - .row
42   - .span7= paginate @merge_requests, theme: "gitlab"
43   - .span4.right
44   - %span.cgray.right #{@merge_requests.total_count} merge requests for this filter
  23 + %ul.well-list
  24 + = render @merge_requests
  25 + - if @merge_requests.blank?
  26 + %li
  27 + %h4.nothing_here_message Nothing to show here
  28 + - if @merge_requests.present?
  29 + %li.bottom
  30 + .left= paginate @merge_requests, theme: "gitlab"
  31 + .right
  32 + %span.cgray.right #{@merge_requests.total_count} merge requests for this filter
45 33  
46 34 :javascript
47 35 $(merge_requestsPage);
... ...
app/views/protected_branches/index.html.haml
1   -= render "repositories/branches_head"
  1 += render "commits/head"
  2 +.row
  3 + .span3
  4 + = render "repositories/filter"
  5 + .span9
  6 + .alert
  7 + %p Protected branches designed to prevent push for all except #{link_to "masters", help_permissions_path, class: "vlink"}.
  8 + %p This ability allows:
  9 + %ul
  10 + %li keep stable branches secured
  11 + %li forced code review before merge to protected branches
  12 + %p Read more about project permissions #{link_to "here", help_permissions_path, class: "vlink"}
2 13  
3   -.alert
4   - %p Protected branches designed to prevent push for all except #{link_to "masters", help_permissions_path, class: "vlink"}.
5   - %p This ability allows:
6   - %ul
7   - %li keep stable branches secured
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"}
  14 + - if can? current_user, :admin_project, @project
  15 + = form_for [@project, @protected_branch] do |f|
  16 + -if @protected_branch.errors.any?
  17 + .alert-message.block-message.error
  18 + %ul
  19 + - @protected_branch.errors.full_messages.each do |msg|
  20 + %li= msg
10 21  
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
  22 + .entry.clearfix
  23 + = f.label :name, "Branch"
  24 + .span3
  25 + = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "chosen span3"})
  26 +  
  27 + = f.submit 'Protect', class: "primary btn"
18 28  
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: "chosen span3"})
23   -  
24   - = f.submit 'Protect', class: "primary btn"
25   -
26   -- unless @branches.empty?
27   - %table
28   - %thead
29   - %tr
30   - %th Name
31   - %th Last commit
32   - %th
33   - %tbody
34   - - @branches.each do |branch|
35   - %tr
36   - %td
37   - = link_to project_commits_path(@project, branch.name) do
38   - %strong= branch.name
39   - - if @project.root_ref?(branch.name)
40   - %span.label default
41   - %td
42   - - if branch.commit
43   - = link_to project_commit_path(@project, branch.commit.id) do
44   - = truncate branch.commit.id.to_s, length: 10
45   - = time_ago_in_words(branch.commit.committed_date)
46   - ago
47   - - else
48   - (branch was removed from repository)
49   - %td
50   - - if can? current_user, :admin_project, @project
51   - = link_to 'Unprotect', [@project, branch], confirm: 'Are you sure?', method: :delete, class: "danger btn small"
  29 + - unless @branches.empty?
  30 + %table
  31 + %thead
  32 + %tr
  33 + %th Name
  34 + %th Last commit
  35 + %th
  36 + %tbody
  37 + - @branches.each do |branch|
  38 + %tr
  39 + %td
  40 + = link_to project_commits_path(@project, branch.name) do
  41 + %strong= branch.name
  42 + - if @project.root_ref?(branch.name)
  43 + %span.label default
  44 + %td
  45 + - if branch.commit
  46 + = link_to project_commit_path(@project, branch.commit.id) do
  47 + = truncate branch.commit.id.to_s, length: 10
  48 + = time_ago_in_words(branch.commit.committed_date)
  49 + ago
  50 + - else
  51 + (branch was removed from repository)
  52 + %td
  53 + - if can? current_user, :admin_project, @project
  54 + = link_to 'Unprotect', [@project, branch], confirm: 'Are you sure?', method: :delete, class: "danger btn small"
... ...
app/views/repositories/_branch.html.haml
... ... @@ -22,6 +22,6 @@
22 22 %td
23 23 - if can? current_user, :download_code, @project
24 24 = link_to archive_project_repository_path(@project, ref: branch.name) do
25   - %i.icon-download
  25 + %i.icon-download-alt
26 26 Download
27 27  
... ...
app/views/repositories/_branches_head.html.haml
... ... @@ -1,10 +0,0 @@
1   -= render "commits/head"
2   -%ul.nav.nav-pills
3   - = nav_link(path: 'repositories#show') do
4   - = link_to 'Recent', project_repository_path(@project)
5   - = nav_link(path: 'protected_branches#index') do
6   - = link_to project_protected_branches_path(@project) do
7   - %i.icon-lock
8   - Protected
9   - = nav_link(path: 'repositories#branches') do
10   - = link_to 'All', branches_project_repository_path(@project)
app/views/repositories/_filter.html.haml 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +%ul.nav.nav-pills.nav-stacked
  2 + = nav_link(path: 'repositories#show') do
  3 + = link_to 'Recent', project_repository_path(@project)
  4 + = nav_link(path: 'protected_branches#index') do
  5 + = link_to project_protected_branches_path(@project) do
  6 + Protected
  7 + %i.icon-lock
  8 + = nav_link(path: 'repositories#branches') do
  9 + = link_to 'All branches', branches_project_repository_path(@project)
... ...
app/views/repositories/branches.html.haml
1   -= render "repositories/branches_head"
2   -- unless @branches.empty?
3   - %table
4   - %thead
5   - %tr
6   - %th Name
7   - %th Last commit
8   - %th
9   -
10   - %tbody
11   - - @branches.each do |branch|
12   - = render "repositories/branch", branch: branch
  1 += render "commits/head"
  2 +.row
  3 + .span3
  4 + = render "filter"
  5 + .span9
  6 + - unless @branches.empty?
  7 + %table
  8 + %thead
  9 + %tr
  10 + %th Name
  11 + %th Last commit
  12 + %th
  13 + %tbody
  14 + - @branches.each do |branch|
  15 + = render "repositories/branch", branch: branch
... ...
app/views/repositories/show.html.haml
1   -= render "branches_head"
2   -
3   -%table
4   - %thead
5   - %tr
6   - %th Name
7   - %th Last commit
8   - %th
9   - - @activities.each do |update|
10   - = render "repositories/branch", branch: update.head
  1 += render "commits/head"
  2 +.row
  3 + .span3
  4 + = render "filter"
  5 + .span9
  6 + %table
  7 + %thead
  8 + %tr
  9 + %th Name
  10 + %th Last commit
  11 + %th
  12 + - @activities.each do |update|
  13 + = render "repositories/branch", branch: update.head
11 14  
... ...
app/views/repositories/tags.html.haml
... ... @@ -26,7 +26,7 @@
26 26 %td
27 27 - if can? current_user, :download_code, @project
28 28 = link_to archive_project_repository_path(@project, ref: tag.name) do
29   - %i.icon-download
  29 + %i.icon-download-alt
30 30 Download
31 31  
32 32 - else
... ...
app/views/tree/blob/_download.html.haml
... ... @@ -2,7 +2,7 @@
2 2 %center
3 3 = link_to project_blob_path(@project, @id) do
4 4 %div.padded
5   - %br
6   - = image_tag "download.png", width: 64
7   - %h3
  5 + %h4
  6 + %i.icon-download-alt
  7 + %br
8 8 Download (#{number_to_human_size blob.size})
... ...