Patch #8768 » Редактирование_комментариев_не_позже_4_часов.patch
| journals_helper.rb (working copy) | ||
|---|---|---|
|
module JournalsHelper
|
||
|
def render_notes(issue, journal, options={})
|
||
|
content = ''
|
||
|
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project)))
|
||
|
# editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project)))
|
||
|
#user can change his comment only if it was created in 4 hours before now (if user have only :edit_own_issue_notes)
|
||
|
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project) && ((Time.now - journal.created_on) < 14400)))
|
||
|
links = []
|
||
|
if !journal.notes.blank?
|
||
|
links << link_to_remote(image_tag('comment.png'),
|
||