diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-02 20:43:39 +0100 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-03 22:51:56 +0100 |
commit | 494ae87840bf719e5fb4094781cc1dfc179af463 (patch) | |
tree | 1006864b4695c0810f7005e742eed4f52b922abc /app/helpers/notes_helper.rb | |
parent | 1319373d58c49eb96c1ec176f3057c2c31750b0e (diff) | |
download | gitlab-ce-494ae87840bf719e5fb4094781cc1dfc179af463.tar.gz |
Refactor discussion reply
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r-- | app/helpers/notes_helper.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 02dec2a043e..e82537a336f 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -1,7 +1,12 @@ module NotesHelper # Helps to distinguish e.g. commit notes in mr notes list def note_for_main_target?(note) - !@mixed_targets || (@target.class.name == note.noteable_type && !note.for_diff_line?) + @target_type.camelize == note.noteable_type && !note.for_diff_line? + end + + def note_target_fields + hidden_field_tag(:target_type, @target_type) + + hidden_field_tag(:target_id, @target_id) end def link_to_commit_diff_line_note(note) |