Commit ac99441d authored by blackst0ne's avatar blackst0ne

Change 'exclude_author' param

parent aaa70a62
......@@ -180,14 +180,14 @@ module ApplicationHelper
element
end
def edited_time_ago_with_tooltip(object, placement: 'top', html_class: 'time_ago', include_author: false)
def edited_time_ago_with_tooltip(object, placement: 'top', html_class: 'time_ago', exclude_author: false)
return if object.last_edited_at == object.created_at || object.last_edited_at.blank?
content_tag :small, class: 'edited-text' do
output = content_tag(:span, 'Edited ')
output << time_ago_with_tooltip(object.last_edited_at, placement: placement, html_class: html_class)
if include_author && object.last_edited_by
if !exclude_author && object.last_edited_by
output << content_tag(:span, ' by ')
output << link_to_member(object.project, object.last_edited_by, avatar: false, author_class: nil)
end
......
......@@ -61,7 +61,7 @@
= markdown_field(@issue, :description)
%textarea.hidden.js-task-list-field
= @issue.description
= edited_time_ago_with_tooltip(@issue, placement: 'bottom', html_class: 'issue_edited_ago', include_author: true)
= edited_time_ago_with_tooltip(@issue, placement: 'bottom', html_class: 'issue_edited_ago')
#merge-requests{ data: { url: referenced_merge_requests_namespace_project_issue_url(@project.namespace, @project, @issue) } }
// This element is filled in using JavaScript.
......
......@@ -10,4 +10,4 @@
%textarea.hidden.js-task-list-field
= @merge_request.description
= edited_time_ago_with_tooltip(@merge_request, placement: 'bottom', include_author: true)
= edited_time_ago_with_tooltip(@merge_request, placement: 'bottom')
......@@ -40,7 +40,7 @@
.note-body{ class: note_editable ? 'js-task-list-container' : '' }
.note-text.md
= note.redacted_note_html
= edited_time_ago_with_tooltip(note, placement: 'bottom', html_class: 'note_edited_ago', include_author: true)
= edited_time_ago_with_tooltip(note, placement: 'bottom', html_class: 'note_edited_ago')
- if note_editable
- if note.for_personal_snippet?
= render 'snippets/notes/edit', note: note
......
......@@ -21,4 +21,4 @@
= markdown_field(@snippet, :title)
- if @snippet.updated_at != @snippet.created_at
= edited_time_ago_with_tooltip(@snippet, placement: 'bottom', html_class: 'snippet-edited-ago')
= edited_time_ago_with_tooltip(@snippet, placement: 'bottom', html_class: 'snippet-edited-ago', exclude_author: true)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment