Commit 5ad4be295f68310bbd031585bbf6e203084f325e
1 parent
70947fed
Exists in
master
and in
4 other branches
remove notify checkboxes from note forms
Showing
5 changed files
with
12 additions
and
30 deletions
Show diff stats
app/assets/stylesheets/sections/notes.scss
... | ... | @@ -274,6 +274,15 @@ ul.notes { |
274 | 274 | } |
275 | 275 | |
276 | 276 | |
277 | +.common-note-form { | |
278 | + margin: 0; | |
279 | + height: 140px; | |
280 | + background: #F9F9F9; | |
281 | + padding: 3px; | |
282 | + padding-bottom: 25px; | |
283 | + border: 1px solid #DDD; | |
284 | +} | |
285 | + | |
277 | 286 | |
278 | 287 | .note-form-actions { |
279 | 288 | background: #F9F9F9; |
... | ... | @@ -281,8 +290,8 @@ ul.notes { |
281 | 290 | padding: 0 5px; |
282 | 291 | |
283 | 292 | .note-form-option { |
284 | - margin-top: 8px; | |
285 | - margin-left: 15px; | |
293 | + margin-top: 10px; | |
294 | + margin-left: 30px; | |
286 | 295 | @extend .pull-left; |
287 | 296 | } |
288 | 297 | ... | ... |
app/contexts/notes/create_context.rb
app/models/note.rb
... | ... | @@ -22,9 +22,6 @@ class Note < ActiveRecord::Base |
22 | 22 | attr_accessible :note, :noteable, :noteable_id, :noteable_type, :project_id, |
23 | 23 | :attachment, :line_code, :commit_id |
24 | 24 | |
25 | - attr_accessor :notify | |
26 | - attr_accessor :notify_author | |
27 | - | |
28 | 25 | belongs_to :project |
29 | 26 | belongs_to :noteable, polymorphic: true |
30 | 27 | belongs_to :author, class_name: "User" |
... | ... | @@ -143,14 +140,6 @@ class Note < ActiveRecord::Base |
143 | 140 | nil |
144 | 141 | end |
145 | 142 | |
146 | - def notify | |
147 | - @notify ||= false | |
148 | - end | |
149 | - | |
150 | - def notify_author | |
151 | - @notify_author ||= false | |
152 | - end | |
153 | - | |
154 | 143 | # Returns true if this is an upvote note, |
155 | 144 | # otherwise false is returned |
156 | 145 | def upvote? | ... | ... |
app/views/notes/_form.html.haml
1 | -= form_for [@project, @note], remote: true, html: { multipart: true, id: nil, class: "new_note js-new-note-form" } do |f| | |
1 | += form_for [@project, @note], remote: true, html: { multipart: true, id: nil, class: "new_note js-new-note-form common-note-form" } do |f| | |
2 | 2 | |
3 | 3 | = note_target_fields |
4 | 4 | = f.hidden_field :commit_id |
... | ... | @@ -27,15 +27,6 @@ |
27 | 27 | %a.btn.grouped.js-close-discussion-note-form Cancel |
28 | 28 | |
29 | 29 | .note-form-option |
30 | - = label_tag :notify do | |
31 | - = check_box_tag :notify, 1, false | |
32 | - %span.light Notify team via email | |
33 | - | |
34 | - .js-notify-commit-author | |
35 | - = label_tag :notify_author do | |
36 | - = check_box_tag :notify_author, 1 , false | |
37 | - %span.light Notify commit author | |
38 | - .note-form-option | |
39 | 30 | %a.choose-btn.btn.btn-small.js-choose-note-attachment-button |
40 | 31 | %i.icon-paper-clip |
41 | 32 | %span Choose File ... | ... | ... |
app/views/walls/show.html.haml
... | ... | @@ -12,11 +12,6 @@ |
12 | 12 | = f.submit 'Add Comment', class: "btn comment-btn grouped js-comment-button" |
13 | 13 | |
14 | 14 | .note-form-option |
15 | - = label_tag :notify do | |
16 | - = check_box_tag :notify, 1, false | |
17 | - %span.light Notify team via email | |
18 | - | |
19 | - .note-form-option | |
20 | 15 | %a.choose-btn.btn.btn-small.js-choose-note-attachment-button |
21 | 16 | %i.icon-paper-clip |
22 | 17 | %span Choose File ... | ... | ... |