Commit b1d89f732c356e1b9792558556f65d1993db7f3a
Exists in
master
and in
4 other branches
Merge branch 'master' of https://github.com/dubcanada/gitlabhq into dubcanada-master
Showing
12 changed files
with
185 additions
and
45 deletions
Show diff stats
450 Bytes
app/assets/javascripts/note.js
app/assets/stylesheets/common.scss
... | ... | @@ -293,8 +293,14 @@ nav.main_menu { |
293 | 293 | background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf); |
294 | 294 | @include shade; |
295 | 295 | .count { |
296 | - color:#aaa; | |
297 | - margin-left:3px; | |
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; | |
298 | 304 | } |
299 | 305 | .label { |
300 | 306 | background:$hover; |
... | ... | @@ -345,8 +351,8 @@ nav.main_menu { |
345 | 351 | |
346 | 352 | img.avatar { |
347 | 353 | float:left; |
348 | - margin-right:15px; | |
349 | - width:40px; | |
354 | + margin-right:10px; | |
355 | + width:35px; | |
350 | 356 | -webkit-border-radius: 4px; |
351 | 357 | -moz-border-radius: 4px; |
352 | 358 | border-radius: 4px; |
... | ... | @@ -372,7 +378,7 @@ img.lil_av { |
372 | 378 | |
373 | 379 | .wll { |
374 | 380 | background-color: #FFF; |
375 | - padding: 10px 5px; | |
381 | + padding: 6px 10px; | |
376 | 382 | min-height: 20px; |
377 | 383 | border-bottom: 1px solid #eee; |
378 | 384 | border-bottom: 1px solid rgba(0, 0, 0, 0.05); |
... | ... | @@ -998,6 +1004,41 @@ p.time { |
998 | 1004 | margin: 2px; |
999 | 1005 | } |
1000 | 1006 | |
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 | + } | |
1022 | + pre { | |
1023 | + background: white !important; | |
1024 | + | |
1025 | + code { | |
1026 | + background: none !important; | |
1027 | + } | |
1028 | + } | |
1029 | +} | |
1030 | + | |
1031 | +/* Fix for readme code (stopped it from being yellow) */ | |
1032 | +.readme { | |
1033 | + pre { | |
1034 | + background: white !important; | |
1035 | + | |
1036 | + code { | |
1037 | + background: none !important; | |
1038 | + } | |
1039 | + } | |
1040 | +} | |
1041 | + | |
1001 | 1042 | .highlight_word { |
1002 | 1043 | background:#EEDC94; |
1003 | 1044 | } |
... | ... | @@ -1040,3 +1081,58 @@ p.time { |
1040 | 1081 | border-bottom:2px solid $style_color; |
1041 | 1082 | } |
1042 | 1083 | } |
1084 | + | |
1085 | +// Fixes alignment on notes. | |
1086 | +.new_note { | |
1087 | + label { | |
1088 | + text-align:left; | |
1089 | + } | |
1090 | +} | |
1091 | + | |
1092 | +.issue_notes { | |
1093 | + .input-file { | |
1094 | + font: 500px monospace; | |
1095 | + opacity:0; | |
1096 | + filter: alpha(opacity=0); | |
1097 | + position: absolute; | |
1098 | + z-index: 1; | |
1099 | + top:0; | |
1100 | + right:0; | |
1101 | + padding:0; | |
1102 | + margin: 0; | |
1103 | + } | |
1104 | + | |
1105 | + .file_upload { | |
1106 | + position: absolute; | |
1107 | + right:14px; | |
1108 | + top:7px; | |
1109 | + height: 30px; | |
1110 | + } | |
1111 | + | |
1112 | + div.attachments { | |
1113 | + position:relative; | |
1114 | + width: 350px; | |
1115 | + height: 30px; | |
1116 | + overflow:hidden; | |
1117 | + margin:0 0 5px !important; | |
1118 | + } | |
1119 | + .file_name { | |
1120 | + line-height:30px; | |
1121 | + width:240px; | |
1122 | + height:28px; | |
1123 | + overflow:hidden; | |
1124 | + } | |
1125 | +} | |
1126 | + | |
1127 | +// Fix issue with notes & lists creating a bunch of bottom borders. | |
1128 | +li.note { | |
1129 | + .note-title { | |
1130 | + li { | |
1131 | + border-bottom:none !important; | |
1132 | + } | |
1133 | + .file { | |
1134 | + padding-left:20px; | |
1135 | + background:url("icon-attachment.png") no-repeat left center; | |
1136 | + } | |
1137 | + } | |
1138 | +} | |
1043 | 1139 | \ No newline at end of file | ... | ... |
app/assets/stylesheets/ref_select.scss
app/models/issue.rb
... | ... | @@ -24,6 +24,10 @@ class Issue < ActiveRecord::Base |
24 | 24 | validates :title, |
25 | 25 | :presence => true, |
26 | 26 | :length => { :within => 0..255 } |
27 | + | |
28 | + validates :description, | |
29 | + :presence => true, | |
30 | + :length => { :within => 0..2000 } | |
27 | 31 | |
28 | 32 | scope :critical, where(:critical => true) |
29 | 33 | scope :non_critical, where(:critical => false) |
... | ... | @@ -57,6 +61,7 @@ end |
57 | 61 | # |
58 | 62 | # id :integer not null, primary key |
59 | 63 | # title :string(255) |
64 | +# description :text | |
60 | 65 | # assignee_id :integer |
61 | 66 | # author_id :integer |
62 | 67 | # project_id :integer | ... | ... |
app/views/issues/_form.html.haml
... | ... | @@ -9,12 +9,18 @@ |
9 | 9 | %li= msg |
10 | 10 | |
11 | 11 | .clearfix |
12 | - = f.label :title | |
13 | - .input= f.text_area :title, :maxlength => 255, :class => "xxlarge" | |
12 | + = f.label :title, "Issue Subject" | |
13 | + .input= f.text_field :title, :maxlength => 255 | |
14 | + | |
15 | + .clearfix | |
16 | + = f.label :description, "Issue Details" | |
17 | + .input | |
18 | + = f.text_area :description, :maxlength => 2000, :class => "xxlarge" | |
19 | + %p.hint Markdown is enabled. | |
14 | 20 | |
15 | 21 | .clearfix |
16 | 22 | = f.label :assignee_id |
17 | - .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }) | |
23 | + .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Assign to user" }) | |
18 | 24 | |
19 | 25 | .clearfix |
20 | 26 | = f.label :critical, "Critical" |
... | ... | @@ -26,7 +32,10 @@ |
26 | 32 | .input= f.check_box :closed |
27 | 33 | |
28 | 34 | .actions |
29 | - = f.submit 'Save', :class => "primary btn" | |
35 | + - if @issue.new_record? | |
36 | + = f.submit 'Submit new issue', :class => "primary btn" | |
37 | + -else | |
38 | + = f.submit 'Save changes', :class => "primary btn" | |
30 | 39 | |
31 | 40 | - if request.xhr? |
32 | 41 | = link_to "Cancel", "#back", :onclick => "backToIssues();", :class => "btn" | ... | ... |
app/views/issues/show.html.haml
1 | -%h3 | |
2 | - Issue ##{@issue.id} | |
1 | +.back_link | |
2 | += link_to project_issues_path(@project) do | |
3 | + ← To issues list | |
4 | + | |
5 | +%h3 | |
6 | + #{@issue.title} | |
3 | 7 | %small |
4 | 8 | created at |
5 | 9 | = @issue.created_at.stamp("Aug 21, 2011") |
... | ... | @@ -17,33 +21,33 @@ |
17 | 21 | %br |
18 | 22 | - if @issue.upvotes > 0 |
19 | 23 | .upvotes#upvotes= "+#{pluralize @issue.upvotes, 'upvote'}" |
20 | - | |
21 | - | |
22 | -.back_link | |
23 | - = link_to project_issues_path(@project) do | |
24 | - ← To issues list | |
25 | 24 | |
26 | 25 | |
27 | 26 | %hr |
28 | -- if @issue.closed | |
29 | - .alert-message.error Closed | |
30 | -- else | |
31 | - .alert-message.success Open | |
32 | 27 | |
33 | 28 | |
34 | -%div.well.prettyprint | |
35 | - %div | |
36 | - %cite.cgray Created by | |
37 | - = image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av" | |
38 | - %strong.author= link_to_issue_author(@issue) | |
39 | - | |
40 | - %cite.cgray and currently assigned to | |
41 | - = image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av" | |
42 | - %strong.author= link_to_issue_assignee(@issue) | |
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 | |
41 | + - if @issue.closed | |
42 | + .alert-message.error Closed | |
43 | + - else | |
44 | + .alert-message.success Open | |
43 | 45 | |
44 | - %hr | |
46 | + %hr | |
45 | 47 | |
46 | - %div= simple_format @issue.title | |
48 | + %div | |
49 | + - if @project.description.present? | |
50 | + = markdown @issue.description | |
47 | 51 | |
48 | 52 | |
49 | 53 | .issue_notes#notes= render "notes/notes", :tid => @issue.id, :tt => "issue" | ... | ... |
app/views/notes/_form.html.haml
1 | 1 | = form_for [@project, @note], :remote => "true", :multipart => true do |f| |
2 | - %h3 Leave a note | |
2 | + %h3 Leave a comment | |
3 | 3 | -if @note.errors.any? |
4 | 4 | .alert-message.block-message.error |
5 | 5 | - @note.errors.full_messages.each do |msg| |
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | = f.hidden_field :noteable_id |
9 | 9 | = f.hidden_field :noteable_type |
10 | 10 | = f.text_area :note, :size => 255 |
11 | + %p.hint Markdown is enabled. | |
11 | 12 | |
12 | 13 | .row |
13 | 14 | .span4 |
... | ... | @@ -21,11 +22,14 @@ |
21 | 22 | = label_tag :notify_author do |
22 | 23 | = check_box_tag :notify_author, 1 , @note.noteable_type == "Commit" |
23 | 24 | %span Commit author |
24 | - .span4 | |
25 | + .span8 | |
25 | 26 | %h5 Attachment: |
26 | 27 | .clearfix |
27 | - = f.label :attachment, "Any file, < 10 MB" | |
28 | - .input= f.file_field :attachment, :class => "input-file" | |
28 | + .attachments.breadcrumb | |
29 | + %div.file_name File name... | |
30 | + %button.file_upload.btn.primary Upload File | |
31 | + .input= f.file_field :attachment, :class => "input-file" | |
32 | + %span Any file less then 10 MB | |
29 | 33 | |
30 | 34 | |
31 | - = f.submit 'Add note', :class => "btn primary", :id => "submit_note" | |
35 | + = f.submit 'Add Comment', :class => "btn primary", :id => "submit_note" | ... | ... |
app/views/notes/_show.html.haml
... | ... | @@ -12,6 +12,6 @@ |
12 | 12 | = markdown(note.note) |
13 | 13 | - if note.attachment.url |
14 | 14 | .right |
15 | - %span.file | |
16 | - = link_to note.attachment_identifier, note.attachment.url, :target => "_blank" | |
15 | + %div.file | |
16 | + = link_to note.attachment_identifier, note.attachment.url, :target => "_blank" | |
17 | 17 | .clear | ... | ... |
db/schema.rb
vendor/assets/stylesheets/chosen.css
... | ... | @@ -107,13 +107,13 @@ |
107 | 107 | z-index: 1010; |
108 | 108 | } |
109 | 109 | .chzn-container-single .chzn-search input { |
110 | - background: #fff url('chosen-sprite.png') no-repeat 100% -22px; | |
111 | - background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); | |
112 | - background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%); | |
113 | - background: url('chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); | |
114 | - background: url('chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%); | |
115 | - background: url('chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%); | |
116 | - background: url('chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%,#eeeeee 99%); | |
110 | + background: #fff url('chosen-sprite.png') no-repeat 100% -21px; | |
111 | + background: url('chosen-sprite.png') no-repeat 100% -21px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee)); | |
112 | + background: url('chosen-sprite.png') no-repeat 100% -21px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%); | |
113 | + background: url('chosen-sprite.png') no-repeat 100% -21px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%); | |
114 | + background: url('chosen-sprite.png') no-repeat 100% -21px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%); | |
115 | + background: url('chosen-sprite.png') no-repeat 100% -21px, -ms-linear-gradient(top, #ffffff 85%,#eeeeee 99%); | |
116 | + background: url('chosen-sprite.png') no-repeat 100% -21px, linear-gradient(top, #ffffff 85%,#eeeeee 99%); | |
117 | 117 | margin: 1px 0; |
118 | 118 | padding: 4px 20px 4px 5px; |
119 | 119 | outline: 0; | ... | ... |