Commit 8652cd89897e324b9cb0974a61ff045e68d5c97e
1 parent
b1d89f73
Exists in
master
and in
4 other branches
Preparing 591 for merge. Restyled issues & merge requests. Fixed issue edit.
Showing
9 changed files
with
80 additions
and
90 deletions
Show diff stats
app/assets/stylesheets/common.scss
... | ... | @@ -294,13 +294,7 @@ nav.main_menu { |
294 | 294 | @include shade; |
295 | 295 | .count { |
296 | 296 | margin-left:3px; |
297 | - color: #332; | |
298 | - background: white; | |
299 | - padding: 1px 6px 2px; | |
300 | - font-weight: bold; | |
301 | - -webkit-border-radius: 9px; | |
302 | - -moz-border-radius: 9px; | |
303 | - border-radius: 9px; | |
297 | + color: #aaa; | |
304 | 298 | } |
305 | 299 | .label { |
306 | 300 | background:$hover; |
... | ... | @@ -351,8 +345,8 @@ nav.main_menu { |
351 | 345 | |
352 | 346 | img.avatar { |
353 | 347 | float:left; |
354 | - margin-right:10px; | |
355 | - width:35px; | |
348 | + margin-right:15px; | |
349 | + width:40px; | |
356 | 350 | -webkit-border-radius: 4px; |
357 | 351 | -moz-border-radius: 4px; |
358 | 352 | border-radius: 4px; |
... | ... | @@ -378,7 +372,7 @@ img.lil_av { |
378 | 372 | |
379 | 373 | .wll { |
380 | 374 | background-color: #FFF; |
381 | - padding: 6px 10px; | |
375 | + padding: 10px 5px; | |
382 | 376 | min-height: 20px; |
383 | 377 | border-bottom: 1px solid #eee; |
384 | 378 | border-bottom: 1px solid rgba(0, 0, 0, 0.05); |
... | ... | @@ -1004,21 +998,8 @@ p.time { |
1004 | 998 | margin: 2px; |
1005 | 999 | } |
1006 | 1000 | |
1007 | -/* Issues Changed */ | |
1008 | -/* Could probably rewrite this, a bit sloppy */ | |
1009 | -.well { | |
1010 | - .issue_status.span2 { | |
1011 | - width:116px; | |
1012 | - | |
1013 | - .alert-message { | |
1014 | - width:34px; | |
1015 | - margin: 0 0 0 auto; | |
1016 | - | |
1017 | - .error { | |
1018 | - width: 40px; | |
1019 | - } | |
1020 | - } | |
1021 | - } | |
1001 | +/* Fix for readme code (stopped it from being yellow) */ | |
1002 | +.readme { | |
1022 | 1003 | pre { |
1023 | 1004 | background: white !important; |
1024 | 1005 | |
... | ... | @@ -1028,8 +1009,13 @@ p.time { |
1028 | 1009 | } |
1029 | 1010 | } |
1030 | 1011 | |
1031 | -/* Fix for readme code (stopped it from being yellow) */ | |
1032 | -.readme { | |
1012 | +.issue_box, | |
1013 | +.merge_request_box{ | |
1014 | + @extend .padded; | |
1015 | + @extend .borders; | |
1016 | + @extend .prepend-top-20; | |
1017 | + @extend .append-bottom-20; | |
1018 | + | |
1033 | 1019 | pre { |
1034 | 1020 | background: white !important; |
1035 | 1021 | |
... | ... | @@ -1089,7 +1075,7 @@ p.time { |
1089 | 1075 | } |
1090 | 1076 | } |
1091 | 1077 | |
1092 | -.issue_notes { | |
1078 | +.new_note { | |
1093 | 1079 | .input-file { |
1094 | 1080 | font: 500px monospace; |
1095 | 1081 | opacity:0; |
... | ... | @@ -1135,4 +1121,4 @@ li.note { |
1135 | 1121 | background:url("icon-attachment.png") no-repeat left center; |
1136 | 1122 | } |
1137 | 1123 | } |
1138 | -} | |
1139 | 1124 | \ No newline at end of file |
1125 | +} | ... | ... |
app/assets/stylesheets/tree.scss
app/controllers/issues_controller.rb
... | ... | @@ -80,7 +80,13 @@ class IssuesController < ApplicationController |
80 | 80 | |
81 | 81 | respond_to do |format| |
82 | 82 | format.js |
83 | - format.html { redirect_to [@project, @issue]} | |
83 | + format.html do | |
84 | + if @issue.valid? | |
85 | + redirect_to [@project, @issue] | |
86 | + else | |
87 | + render :edit | |
88 | + end | |
89 | + end | |
84 | 90 | end |
85 | 91 | end |
86 | 92 | ... | ... |
app/models/issue.rb
app/views/issues/_form.html.haml
app/views/issues/show.html.haml
1 | -.back_link | |
2 | -= link_to project_issues_path(@project) do | |
3 | - ← To issues list | |
4 | - | |
5 | 1 | %h3 |
6 | - #{@issue.title} | |
2 | + Issue ##{@issue.id} | |
7 | 3 | %small |
8 | 4 | created at |
9 | 5 | = @issue.created_at.stamp("Aug 21, 2011") |
... | ... | @@ -22,32 +18,35 @@ |
22 | 18 | - if @issue.upvotes > 0 |
23 | 19 | .upvotes#upvotes= "+#{pluralize @issue.upvotes, 'upvote'}" |
24 | 20 | |
21 | +.back_link | |
22 | + = link_to project_issues_path(@project) do | |
23 | + ← To issues list | |
25 | 24 | |
26 | -%hr | |
27 | - | |
28 | - | |
29 | -%div.well | |
30 | - %div.row | |
31 | - %div.issue_meta.span13 | |
32 | - %cite.cgray Created by | |
33 | - = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av" | |
34 | - %strong.author= link_to_issue_author(@issue) | |
35 | - | |
36 | - %cite.cgray and currently assigned to | |
37 | - = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av" | |
38 | - %strong.author= link_to_issue_assignee(@issue) | |
39 | - | |
40 | - %div.issue_status.span2 | |
25 | +.issue_box | |
26 | + .merge_request_status_holder | |
27 | + %h5 | |
41 | 28 | - if @issue.closed |
42 | - .alert-message.error Closed | |
29 | + .alert-message.error.status_info Closed | |
43 | 30 | - else |
44 | - .alert-message.success Open | |
31 | + .alert-message.success.status_info Open | |
32 | + = @issue.title | |
45 | 33 | |
46 | 34 | %hr |
47 | - | |
48 | 35 | %div |
49 | - - if @project.description.present? | |
50 | - = markdown @issue.description | |
36 | + %div.row | |
37 | + %div.issue_meta.span13 | |
38 | + %cite.cgray Created by | |
39 | + = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av" | |
40 | + %strong.author= link_to_issue_author(@issue) | |
41 | + | |
42 | + %cite.cgray and currently assigned to | |
43 | + = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av" | |
44 | + %strong.author= link_to_issue_assignee(@issue) | |
45 | + | |
46 | + %div | |
47 | + - if @issue.description | |
48 | + %hr | |
49 | + = markdown @issue.description | |
51 | 50 | |
52 | 51 | |
53 | 52 | .issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue" | ... | ... |
app/views/merge_requests/show.html.haml
... | ... | @@ -16,50 +16,49 @@ |
16 | 16 | = link_to edit_project_merge_request_path(@project, @merge_request), :class => "btn" do |
17 | 17 | Edit |
18 | 18 | |
19 | + %br | |
20 | + %small= link_to "Show how to merge", "#", :class => "vlink how_to_merge_link", :title => "How To Merge" | |
19 | 21 | %br |
20 | 22 | - if @merge_request.upvotes > 0 |
21 | 23 | .upvotes#upvotes= "+#{pluralize @merge_request.upvotes, 'upvote'}" |
22 | 24 | |
25 | += render "merge_requests/how_to_merge" | |
23 | 26 | .back_link |
24 | 27 | = link_to project_merge_requests_path(@project) do |
25 | 28 | ← To merge requests |
26 | 29 | |
27 | 30 | |
28 | -%hr | |
29 | -.merge_request_status_holder | |
30 | - - if @merge_request.closed | |
31 | - %h5 | |
32 | - .alert-message.error.status_info Closed | |
33 | - - if @merge_request.merged? | |
34 | - %span | |
35 | - Merged by #{@merge_request.merge_event.author_name} | |
36 | - %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago. | |
37 | - - elsif @merge_request.closed_event | |
38 | - %span | |
39 | - Closed by #{@merge_request.closed_event.author_name} | |
40 | - %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago. | |
41 | - %br | |
42 | - - else | |
43 | - %h5 | |
44 | - .alert-message.success.status_info Open | |
45 | - = link_to "How to merge", "#", :class => "vlink how_to_merge_link", :title => "How To Merge" | |
31 | +.merge_request_box | |
32 | + .merge_request_status_holder | |
33 | + - if @merge_request.closed | |
34 | + %h5 | |
35 | + .alert-message.error.status_info Closed | |
36 | + - if @merge_request.merged? | |
37 | + %span | |
38 | + Merged by #{@merge_request.merge_event.author_name} | |
39 | + %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago. | |
40 | + - elsif @merge_request.closed_event | |
41 | + %span | |
42 | + Closed by #{@merge_request.closed_event.author_name} | |
43 | + %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago. | |
44 | + %br | |
45 | + - else | |
46 | + %h5 | |
47 | + .alert-message.success.status_info Open | |
48 | + = @merge_request.title | |
46 | 49 | |
47 | -= render "merge_requests/how_to_merge" | |
48 | 50 | |
49 | -%div.well.prettyprint | |
50 | 51 | %div |
51 | - %cite.cgray Created by | |
52 | - = image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av" | |
53 | - %strong.author= link_to_merge_request_author(@merge_request) | |
54 | - | |
55 | - %cite.cgray and currently assigned to | |
56 | - = image_tag gravatar_icon(@merge_request.assignee_email), :width => 16, :class => "lil_av" | |
57 | - %strong.author= link_to_merge_request_assignee(@merge_request) | |
52 | + %div | |
53 | + %cite.cgray Created by | |
54 | + = image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av" | |
55 | + %strong.author= link_to_merge_request_author(@merge_request) | |
56 | + | |
57 | + %cite.cgray and currently assigned to | |
58 | + = image_tag gravatar_icon(@merge_request.assignee_email), :width => 16, :class => "lil_av" | |
59 | + %strong.author= link_to_merge_request_assignee(@merge_request) | |
58 | 60 | |
59 | - %hr | |
60 | - | |
61 | 61 | |
62 | - %div= simple_format @merge_request.title | |
63 | 62 | |
64 | 63 | = render "merge_requests/commits" |
65 | 64 | ... | ... |
app/views/notes/_form.html.haml
... | ... | @@ -25,9 +25,9 @@ |
25 | 25 | .span8 |
26 | 26 | %h5 Attachment: |
27 | 27 | .clearfix |
28 | - .attachments.breadcrumb | |
28 | + .attachments.entry | |
29 | 29 | %div.file_name File name... |
30 | - %button.file_upload.btn.primary Upload File | |
30 | + %button.file_upload.btn.primary.small Upload File | |
31 | 31 | .input= f.file_field :attachment, :class => "input-file" |
32 | 32 | %span Any file less then 10 MB |
33 | 33 | ... | ... |
db/schema.rb
... | ... | @@ -27,7 +27,6 @@ ActiveRecord::Schema.define(:version => 20120323221339) do |
27 | 27 | |
28 | 28 | create_table "issues", :force => true do |t| |
29 | 29 | t.string "title" |
30 | - t.text "description" | |
31 | 30 | t.integer "assignee_id" |
32 | 31 | t.integer "author_id" |
33 | 32 | t.integer "project_id" |
... | ... | @@ -37,6 +36,7 @@ ActiveRecord::Schema.define(:version => 20120323221339) do |
37 | 36 | t.integer "position", :default => 0 |
38 | 37 | t.boolean "critical", :default => false, :null => false |
39 | 38 | t.string "branch_name" |
39 | + t.text "description" | |
40 | 40 | end |
41 | 41 | |
42 | 42 | add_index "issues", ["project_id"], :name => "index_issues_on_project_id" | ... | ... |