summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-28 15:39:18 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-28 15:39:18 +0200
commit5ad4be295f68310bbd031585bbf6e203084f325e (patch)
tree7e2ed3915a87f007c8578d0e3effce3be47d3abc
parent70947fedda4f955f69d928ad0309b3f042056582 (diff)
downloadgitlab-ce-5ad4be295f68310bbd031585bbf6e203084f325e.tar.gz
remove notify checkboxes from note forms
-rw-r--r--app/assets/stylesheets/sections/notes.scss13
-rw-r--r--app/contexts/notes/create_context.rb2
-rw-r--r--app/models/note.rb11
-rw-r--r--app/views/notes/_form.html.haml11
-rw-r--r--app/views/walls/show.html.haml5
5 files changed, 12 insertions, 30 deletions
diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss
index ae2e1b258d3..a8628fc58f2 100644
--- a/app/assets/stylesheets/sections/notes.scss
+++ b/app/assets/stylesheets/sections/notes.scss
@@ -274,6 +274,15 @@ ul.notes {
}
+.common-note-form {
+ margin: 0;
+ height: 140px;
+ background: #F9F9F9;
+ padding: 3px;
+ padding-bottom: 25px;
+ border: 1px solid #DDD;
+}
+
.note-form-actions {
background: #F9F9F9;
@@ -281,8 +290,8 @@ ul.notes {
padding: 0 5px;
.note-form-option {
- margin-top: 8px;
- margin-left: 15px;
+ margin-top: 10px;
+ margin-left: 30px;
@extend .pull-left;
}
diff --git a/app/contexts/notes/create_context.rb b/app/contexts/notes/create_context.rb
index 1367dff4699..36ea76ff949 100644
--- a/app/contexts/notes/create_context.rb
+++ b/app/contexts/notes/create_context.rb
@@ -3,8 +3,6 @@ module Notes
def execute
note = project.notes.new(params[:note])
note.author = current_user
- note.notify = params[:notify].present?
- note.notify_author = params[:notify_author].present?
note.save
note
end
diff --git a/app/models/note.rb b/app/models/note.rb
index f56f999fda1..f26420ca2a0 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -22,9 +22,6 @@ class Note < ActiveRecord::Base
attr_accessible :note, :noteable, :noteable_id, :noteable_type, :project_id,
:attachment, :line_code, :commit_id
- attr_accessor :notify
- attr_accessor :notify_author
-
belongs_to :project
belongs_to :noteable, polymorphic: true
belongs_to :author, class_name: "User"
@@ -143,14 +140,6 @@ class Note < ActiveRecord::Base
nil
end
- def notify
- @notify ||= false
- end
-
- def notify_author
- @notify_author ||= false
- end
-
# Returns true if this is an upvote note,
# otherwise false is returned
def upvote?
diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml
index c2bdeafb830..7add2921830 100644
--- a/app/views/notes/_form.html.haml
+++ b/app/views/notes/_form.html.haml
@@ -1,4 +1,4 @@
-= form_for [@project, @note], remote: true, html: { multipart: true, id: nil, class: "new_note js-new-note-form" } do |f|
+= form_for [@project, @note], remote: true, html: { multipart: true, id: nil, class: "new_note js-new-note-form common-note-form" } do |f|
= note_target_fields
= f.hidden_field :commit_id
@@ -27,15 +27,6 @@
%a.btn.grouped.js-close-discussion-note-form Cancel
.note-form-option
- = label_tag :notify do
- = check_box_tag :notify, 1, false
- %span.light Notify team via email
-
- .js-notify-commit-author
- = label_tag :notify_author do
- = check_box_tag :notify_author, 1 , false
- %span.light Notify commit author
- .note-form-option
%a.choose-btn.btn.btn-small.js-choose-note-attachment-button
%i.icon-paper-clip
%span Choose File ...
diff --git a/app/views/walls/show.html.haml b/app/views/walls/show.html.haml
index 0cd29486d93..78693b9997c 100644
--- a/app/views/walls/show.html.haml
+++ b/app/views/walls/show.html.haml
@@ -12,11 +12,6 @@
= f.submit 'Add Comment', class: "btn comment-btn grouped js-comment-button"
.note-form-option
- = label_tag :notify do
- = check_box_tag :notify, 1, false
- %span.light Notify team via email
-
- .note-form-option
%a.choose-btn.btn.btn-small.js-choose-note-attachment-button
%i.icon-paper-clip
%span Choose File ...