Commit 37eeeb9fca90aa34c502181b9967fb62f9f87752
1 parent
39f46046
Exists in
master
and in
4 other branches
Redesign issues, mr lists
Showing
21 changed files
with
180 additions
and
99 deletions
Show diff stats
app/assets/stylesheets/common.scss
@@ -0,0 +1,48 @@ | @@ -0,0 +1,48 @@ | ||
1 | +.dashboard { | ||
2 | + @extend .row; | ||
3 | + .activities { | ||
4 | + } | ||
5 | + | ||
6 | + .side { | ||
7 | + @extend .pull-right; | ||
8 | + | ||
9 | + .ui-box { | ||
10 | + margin: 3px; | ||
11 | + > .title { | ||
12 | + padding: 2px 15px; | ||
13 | + } | ||
14 | + .nav-projects-tabs li { padding: 0; } | ||
15 | + .well-list { | ||
16 | + li { padding: 15px; } | ||
17 | + .arrow { | ||
18 | + float: right; | ||
19 | + padding: 10px; | ||
20 | + margin: 0; | ||
21 | + } | ||
22 | + .last_activity { | ||
23 | + padding-top: 5px; | ||
24 | + display: block; | ||
25 | + span, strong { | ||
26 | + font-size: 12px; | ||
27 | + color: #666; | ||
28 | + } | ||
29 | + } | ||
30 | + } | ||
31 | + @extend .ui-box; | ||
32 | + } | ||
33 | + } | ||
34 | +} | ||
35 | + | ||
36 | +.dashboard-search-filter { | ||
37 | + padding:5px; | ||
38 | + | ||
39 | + .search-text-input { | ||
40 | + float:left; | ||
41 | + @extend .span2; | ||
42 | + } | ||
43 | + .btn { | ||
44 | + margin-left: 5px; | ||
45 | + float:left; | ||
46 | + } | ||
47 | +} | ||
48 | + |
app/assets/stylesheets/sections/issues.scss
1 | -.issues_table { | 1 | +.issues-list { |
2 | .issue { | 2 | .issue { |
3 | padding: 10px; | 3 | padding: 10px; |
4 | + position: relative; | ||
4 | 5 | ||
5 | - .issue_check { | 6 | + .issue-title { |
7 | + margin-bottom: 5px; | ||
8 | + font-size: 14px; | ||
9 | + } | ||
10 | + | ||
11 | + .issue-info { | ||
12 | + color: #999; | ||
13 | + } | ||
14 | + | ||
15 | + .issue-check { | ||
6 | float: left; | 16 | float: left; |
7 | padding: 8px 0; | 17 | padding: 8px 0; |
8 | padding-right: 8px; | 18 | padding-right: 8px; |
9 | min-width: 15px; | 19 | min-width: 15px; |
10 | } | 20 | } |
11 | 21 | ||
12 | - p { | ||
13 | - padding-top: 0; | ||
14 | - padding-bottom: 2px; | 22 | + .issue-labels { |
23 | + display: inline-block; | ||
24 | + } | ||
25 | + | ||
26 | + .issue-actions { | ||
27 | + display: none; | ||
28 | + position: absolute; | ||
29 | + top: 10px; | ||
30 | + right: 2px; | ||
15 | } | 31 | } |
16 | 32 | ||
17 | - img.avatar { | ||
18 | - width: 32px; | ||
19 | - margin-top: 1px; | 33 | + &:hover { |
34 | + .issue-actions { | ||
35 | + display: block; | ||
36 | + } | ||
20 | } | 37 | } |
21 | } | 38 | } |
22 | } | 39 | } |
app/assets/stylesheets/sections/merge_requests.scss
@@ -53,18 +53,6 @@ | @@ -53,18 +53,6 @@ | ||
53 | } | 53 | } |
54 | } | 54 | } |
55 | 55 | ||
56 | -li.merge_request { | ||
57 | - padding: 10px; | ||
58 | - img.avatar { | ||
59 | - width: 32px; | ||
60 | - margin-top: 1px; | ||
61 | - } | ||
62 | - p { | ||
63 | - padding: 0px; | ||
64 | - padding-bottom: 2px; | ||
65 | - } | ||
66 | -} | ||
67 | - | ||
68 | .merge-in-progress { | 56 | .merge-in-progress { |
69 | @extend .padded; | 57 | @extend .padded; |
70 | @extend .append-bottom-10; | 58 | @extend .append-bottom-10; |
@@ -97,3 +85,31 @@ li.merge_request { | @@ -97,3 +85,31 @@ li.merge_request { | ||
97 | .mr_direction_tip { | 85 | .mr_direction_tip { |
98 | margin-top:40px | 86 | margin-top:40px |
99 | } | 87 | } |
88 | + | ||
89 | +.label-branch { | ||
90 | + @include border-radius(4px); | ||
91 | + padding: 2px 4px; | ||
92 | + border: none; | ||
93 | + font-size: 14px; | ||
94 | + background: #474D57; | ||
95 | + color: #fff; | ||
96 | + font-family: $monospace_font; | ||
97 | + text-shadow: 0 1px 1px #111; | ||
98 | + font-weight: normal; | ||
99 | +} | ||
100 | + | ||
101 | +.mr-list { | ||
102 | + .merge-request { | ||
103 | + padding: 10px; | ||
104 | + position: relative; | ||
105 | + | ||
106 | + .merge-request-title { | ||
107 | + margin-bottom: 5px; | ||
108 | + font-size: 14px; | ||
109 | + } | ||
110 | + | ||
111 | + .merge-request-info { | ||
112 | + color: #999; | ||
113 | + } | ||
114 | + } | ||
115 | +} |
app/assets/stylesheets/sections/votes.scss
app/helpers/merge_requests_helper.rb
@@ -11,7 +11,7 @@ module MergeRequestsHelper | @@ -11,7 +11,7 @@ module MergeRequestsHelper | ||
11 | end | 11 | end |
12 | 12 | ||
13 | def mr_css_classes mr | 13 | def mr_css_classes mr |
14 | - classes = "merge_request" | 14 | + classes = "merge-request" |
15 | classes << " closed" if mr.closed? | 15 | classes << " closed" if mr.closed? |
16 | classes << " merged" if mr.merged? | 16 | classes << " merged" if mr.merged? |
17 | classes | 17 | classes |
app/helpers/projects_helper.rb
@@ -25,7 +25,7 @@ module ProjectsHelper | @@ -25,7 +25,7 @@ module ProjectsHelper | ||
25 | author_html = "" | 25 | author_html = "" |
26 | 26 | ||
27 | # Build avatar image tag | 27 | # Build avatar image tag |
28 | - author_html << image_tag(gravatar_icon(author.try(:email)), width: 16, class: "lil_av") if opts[:avatar] | 28 | + author_html << image_tag(gravatar_icon(author.try(:email)), width: 16, class: "avatar avatar-inline s16") if opts[:avatar] |
29 | 29 | ||
30 | # Build name span tag | 30 | # Build name span tag |
31 | author_html << content_tag(:span, sanitize(author.name), class: 'author') | 31 | author_html << content_tag(:span, sanitize(author.name), class: 'author') |
app/views/dashboard/issues.html.haml
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | - project = group[0] | 15 | - project = group[0] |
16 | %h5.title | 16 | %h5.title |
17 | = link_to_project project | 17 | = link_to_project project |
18 | - %ul.well-list.issues_table | 18 | + %ul.well-list.issues-list |
19 | - group[1].each do |issue| | 19 | - group[1].each do |issue| |
20 | = render issue | 20 | = render issue |
21 | %hr | 21 | %hr |
app/views/dashboard/projects.html.haml
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | = button_tag type: 'submit', class: 'btn' do | 28 | = button_tag type: 'submit', class: 'btn' do |
29 | %i.icon-search | 29 | %i.icon-search |
30 | 30 | ||
31 | - %ul.well-list | 31 | + %ul.bordered-list |
32 | - @projects.each do |project| | 32 | - @projects.each do |project| |
33 | %li.clearfix | 33 | %li.clearfix |
34 | .clearfix | 34 | .clearfix |
app/views/dashboard/show.html.haml
app/views/groups/issues.html.haml
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | - project = group[0] | 14 | - project = group[0] |
15 | %h5.title | 15 | %h5.title |
16 | = link_to_project project | 16 | = link_to_project project |
17 | - %ul.well-list.issues_table | 17 | + %ul.well-list.issues-list |
18 | - group[1].each do |issue| | 18 | - group[1].each do |issue| |
19 | = render issue | 19 | = render issue |
20 | %hr | 20 | %hr |
app/views/groups/show.html.haml
1 | -.projects | 1 | +.dashboard |
2 | .activities.span8 | 2 | .activities.span8 |
3 | = render "events/event_last_push", event: @last_push | 3 | = render "events/event_last_push", event: @last_push |
4 | = link_to dashboard_path, class: 'btn btn-tiny' do | 4 | = link_to dashboard_path, class: 'btn btn-tiny' do |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | .loading.hide | 13 | .loading.hide |
14 | .side.span4 | 14 | .side.span4 |
15 | - if @group.description.present? | 15 | - if @group.description.present? |
16 | - .description.well.light | 16 | + .description.well.well-small.light |
17 | = @group.description | 17 | = @group.description |
18 | = render "projects", projects: @projects | 18 | = render "projects", projects: @projects |
19 | .prepend-top-20 | 19 | .prepend-top-20 |
app/views/issues/_issue.html.haml
1 | %li{ id: dom_id(issue), class: issue_css_classes(issue), url: project_issue_path(issue.project, issue) } | 1 | %li{ id: dom_id(issue), class: issue_css_classes(issue), url: project_issue_path(issue.project, issue) } |
2 | - if controller.controller_name == 'issues' | 2 | - if controller.controller_name == 'issues' |
3 | - .issue_check | 3 | + .issue-check |
4 | = check_box_tag dom_id(issue,"selected"), nil, false, 'data-id' => issue.id, class: "selected_issue", disabled: !can?(current_user, :modify_issue, issue) | 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 | - .pull-right | 5 | + |
6 | + .issue-title | ||
7 | + %span.light= "##{issue.id}" | ||
8 | + = link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title" | ||
9 | + | ||
10 | + .issue-info | ||
11 | + - if issue.assignee | ||
12 | + assigned to #{link_to_member(@project, issue.assignee)} | ||
13 | + - else | ||
14 | + unassigned | ||
15 | + - if issue.votes_count > 0 | ||
16 | + = render 'votes/votes_inline', votable: issue | ||
6 | - if issue.notes.any? | 17 | - if issue.notes.any? |
7 | - %span.btn.btn-small.disabled.grouped | ||
8 | - %i.icon-comment | 18 | + %span |
19 | + %i.icon-comments | ||
9 | = issue.notes.count | 20 | = issue.notes.count |
21 | + - if issue.milestone_id? | ||
22 | + %span | ||
23 | + %i.icon-time | ||
24 | + = issue.milestone.title | ||
25 | + .pull-right | ||
26 | + %small updated #{time_ago_in_words(issue.updated_at)} ago | ||
27 | + | ||
28 | + .issue-labels | ||
29 | + - issue.labels.each do |label| | ||
30 | + %span.label.label-info | ||
31 | + %i.icon-tag | ||
32 | + = label.name | ||
33 | + | ||
34 | + .issue-actions | ||
10 | - if can? current_user, :modify_issue, issue | 35 | - if can? current_user, :modify_issue, issue |
11 | - if issue.closed? | 36 | - if issue.closed? |
12 | = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true | 37 | = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true |
@@ -16,24 +41,4 @@ | @@ -16,24 +41,4 @@ | ||
16 | %i.icon-edit | 41 | %i.icon-edit |
17 | Edit | 42 | Edit |
18 | 43 | ||
19 | - - if issue.assignee | ||
20 | - = image_tag gravatar_icon(issue.assignee_email), class: "avatar" | ||
21 | - - else | ||
22 | - = image_tag "no_avatar.png", class: "avatar" | ||
23 | - | ||
24 | - %p= link_to_gfm truncate(issue.title, length: 100), project_issue_path(issue.project, issue), class: "row_title" | ||
25 | - | ||
26 | - %span.update-author | ||
27 | - %span.cdark= "##{issue.id}" | ||
28 | - - if issue.assignee | ||
29 | - assigned to #{issue.assignee_name} | ||
30 | - - else | ||
31 | - | ||
32 | 44 | ||
33 | - - if issue.votes_count > 0 | ||
34 | - = render 'votes/votes_inline', votable: issue | ||
35 | - %span | ||
36 | - - issue.labels.each do |label| | ||
37 | - %span.label.label-info | ||
38 | - %i.icon-tag | ||
39 | - = label.name |
app/views/issues/index.html.haml
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | = form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: 'pull-right' do | 12 | = form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: 'pull-right' do |
13 | = hidden_field_tag :project_id, @project.id, { id: 'project_id' } | 13 | = hidden_field_tag :project_id, @project.id, { id: 'project_id' } |
14 | = hidden_field_tag :status, params[:status] | 14 | = hidden_field_tag :status, params[:status] |
15 | - = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search span3 pull-right neib search-text-input' } | 15 | + = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search input-xlarge append-right-10 search-text-input' } |
16 | 16 | ||
17 | .clearfix | 17 | .clearfix |
18 | 18 | ||
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | = select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone") | 41 | = select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone") |
42 | = hidden_field_tag :status, params[:status] | 42 | = hidden_field_tag :status, params[:status] |
43 | 43 | ||
44 | - %ul#issues-table.well-list.issues_table | 44 | + %ul#issues-table.well-list.issues-list |
45 | = render "issues" | 45 | = render "issues" |
46 | 46 | ||
47 | :javascript | 47 | :javascript |
app/views/merge_requests/_merge_request.html.haml
1 | %li{ class: mr_css_classes(merge_request) } | 1 | %li{ class: mr_css_classes(merge_request) } |
2 | - .pull-right | ||
3 | - .left | ||
4 | - - if merge_request.merged? | ||
5 | - %span.btn.btn-small.disabled.grouped | ||
6 | - %strong | ||
7 | - %i.icon-ok | ||
8 | - = "MERGED" | ||
9 | - - if merge_request.notes.any? | ||
10 | - %span.btn.btn-small.disabled.grouped | ||
11 | - %i.icon-comment | ||
12 | - = merge_request.mr_and_commit_notes.count | ||
13 | - - if merge_request.milestone_id? | ||
14 | - %span.btn.btn-small.disabled.grouped | ||
15 | - %i.icon-time | ||
16 | - = merge_request.milestone.title | ||
17 | - %span.btn.btn-small.disabled.grouped | ||
18 | - = merge_request.source_branch | ||
19 | - → | 2 | + .merge-request-title |
3 | + %span.light= "##{merge_request.id}" | ||
4 | + = link_to_gfm truncate(merge_request.title, length: 80), project_merge_request_path(merge_request.project, merge_request), class: "row_title" | ||
5 | + - if merge_request.merged? | ||
6 | + %small.pull-right | ||
7 | + %i.icon-ok | ||
8 | + = "MERGED" | ||
9 | + - else | ||
10 | + %span.pull-right | ||
11 | + %i.icon-angle-right | ||
20 | = merge_request.target_branch | 12 | = merge_request.target_branch |
21 | - = image_tag gravatar_icon(merge_request.author_email), class: "avatar" | ||
22 | - | ||
23 | - %p= link_to_gfm truncate(merge_request.title, length: 80), project_merge_request_path(merge_request.project, merge_request), class: "row_title" | ||
24 | - | ||
25 | - %span.update-author | ||
26 | - %small.cdark= "##{merge_request.id}" | ||
27 | - authored by #{merge_request.author_name} | ||
28 | - = time_ago_in_words(merge_request.created_at) | ||
29 | - ago | ||
30 | - | 13 | + .merge-request-info |
14 | + - if merge_request.author | ||
15 | + authored by #{link_to_member(@project, merge_request.author)} | ||
31 | - if merge_request.votes_count > 0 | 16 | - if merge_request.votes_count > 0 |
32 | = render 'votes/votes_inline', votable: merge_request | 17 | = render 'votes/votes_inline', votable: merge_request |
18 | + - if merge_request.notes.any? | ||
19 | + %span | ||
20 | + %i.icon-comments | ||
21 | + = merge_request.mr_and_commit_notes.count | ||
22 | + - if merge_request.milestone_id? | ||
23 | + %span | ||
24 | + %i.icon-time | ||
25 | + = merge_request.milestone.title | ||
26 | + | ||
27 | + | ||
28 | + .pull-right | ||
29 | + %small updated #{time_ago_in_words(merge_request.updated_at)} ago |
app/views/merge_requests/index.html.haml
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | = hidden_field_tag :f, params[:f] | 20 | = hidden_field_tag :f, params[:f] |
21 | .clearfix | 21 | .clearfix |
22 | 22 | ||
23 | - %ul.well-list | 23 | + %ul.well-list.mr-list |
24 | = render @merge_requests | 24 | = render @merge_requests |
25 | - if @merge_requests.blank? | 25 | - if @merge_requests.blank? |
26 | %li | 26 | %li |
app/views/milestones/show.html.haml
@@ -87,7 +87,7 @@ | @@ -87,7 +87,7 @@ | ||
87 | %h6 Participants: | 87 | %h6 Participants: |
88 | %div | 88 | %div |
89 | - @users.each do |user| | 89 | - @users.each do |user| |
90 | - = link_to user, class: 'float-link' do | 90 | + = link_to user do |
91 | = link_to_member(@project, user) | 91 | = link_to_member(@project, user) |
92 | 92 | ||
93 | .clearfix | 93 | .clearfix |
app/views/repositories/tags.html.haml
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | %span.light | 14 | %span.light |
15 | = time_ago_in_words(commit.committed_date) | 15 | = time_ago_in_words(commit.committed_date) |
16 | ago | 16 | ago |
17 | - %div.prepend-left | 17 | + %div.prepend-left-20 |
18 | = link_to commit.short_id(8), project_commit_path(@project, commit), class: "monospace" | 18 | = link_to commit.short_id(8), project_commit_path(@project, commit), class: "monospace" |
19 | – | 19 | – |
20 | = link_to_gfm truncate(commit.title, length: 70), project_commit_path(@project, commit.id), class: "cdark" | 20 | = link_to_gfm truncate(commit.title, length: 70), project_commit_path(@project, commit.id), class: "cdark" |
app/views/teams/issues.html.haml
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | - @project = group[0] | 14 | - @project = group[0] |
15 | %h5.title | 15 | %h5.title |
16 | = link_to_project @project | 16 | = link_to_project @project |
17 | - %ul.well-list.issues_table | 17 | + %ul.well-list.issues-list |
18 | - group[1].each do |issue| | 18 | - group[1].each do |issue| |
19 | = render issue | 19 | = render issue |
20 | %hr | 20 | %hr |
app/views/teams/show.html.haml
1 | -.projects | 1 | +.dashboard |
2 | .activities.span8 | 2 | .activities.span8 |
3 | = link_to dashboard_path, class: 'btn btn-tiny' do | 3 | = link_to dashboard_path, class: 'btn btn-tiny' do |
4 | ← To dashboard | 4 | ← To dashboard |
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | .loading.hide | 12 | .loading.hide |
13 | .side.span4 | 13 | .side.span4 |
14 | - if @team.description.present? | 14 | - if @team.description.present? |
15 | - .description.well.light | 15 | + .description.well.well-small.light |
16 | = @team.description | 16 | = @team.description |
17 | = render "projects", projects: @projects | 17 | = render "projects", projects: @projects |
18 | .prepend-top-20 | 18 | .prepend-top-20 |
app/views/votes/_votes_inline.html.haml
1 | .votes.votes-inline | 1 | .votes.votes-inline |
2 | - .upvotes= votable.upvotes | ||
3 | - .progress | ||
4 | - .bar.bar-success{style: "width: #{votable.upvotes_in_percent}%;"} | ||
5 | - .bar.bar-danger{style: "width: #{votable.downvotes_in_percent}%;"} | ||
6 | - .downvotes= votable.downvotes | 2 | + - unless votable.upvotes.zero? |
3 | + .upvotes | ||
4 | + + #{votable.upvotes} | ||
5 | + - unless votable.downvotes.zero? | ||
6 | + \/ | ||
7 | + - unless votable.downvotes.zero? | ||
8 | + .downvotes | ||
9 | + \- #{votable.downvotes} |