Feature #33868 » 33868-tracker-based-POC.patch
| app/models/issue.rb | ||
|---|---|---|
| 216 | 216 | |
| 217 | 217 |
# Returns true if user or current user is allowed to add notes to the issue |
| 218 | 218 |
def notes_addable?(user=User.current) |
| 219 |
user_tracker_permission?(user, :add_issue_notes) |
|
| 219 |
return false unless user_tracker_permission?(user, :add_issue_notes) |
|
| 220 |
return false if !tracker.allow_comments_on_closed_issues && closed? && !closing? |
|
| 221 | ||
| 222 |
true |
|
| 220 | 223 |
end |
| 221 | 224 | |
| 222 | 225 |
# Returns true if user or current user is allowed to delete the issue |
| app/models/tracker.rb | ||
|---|---|---|
| 74 | 74 |
'name', |
| 75 | 75 |
'default_status_id', |
| 76 | 76 |
'is_in_roadmap', |
| 77 |
'allow_comments_on_closed_issues', |
|
| 77 | 78 |
'core_fields', |
| 78 | 79 |
'position', |
| 79 | 80 |
'custom_field_ids', |
| app/views/issues/edit.js.erb | ||
|---|---|---|
| 5 | 5 |
$('#log_time').hide();
|
| 6 | 6 |
<% end %> |
| 7 | 7 | |
| 8 |
<% byebug %> |
|
| 8 | 9 |
<% if @issue.notes_addable? %> |
| 9 | 10 |
$('#add_notes').show();
|
| 10 | 11 |
$('#add_attachments').show();
|
| app/views/trackers/_form.html.erb | ||
|---|---|---|
| 11 | 11 |
:required => true %> |
| 12 | 12 |
</p> |
| 13 | 13 |
<p><%= f.check_box :is_in_roadmap %></p> |
| 14 |
<p><%= f.check_box :allow_comments_on_closed_issues %></p> |
|
| 14 | 15 |
<p><%= f.text_area :description, :rows => 4 %></p> |
| 15 | 16 |
<p> |
| 16 | 17 |
<label><%= l(:field_core_fields) %></label> |
| config/locales/en.yml | ||
|---|---|---|
| 425 | 425 |
field_estimated_remaining_hours: Estimated remaining time |
| 426 | 426 |
field_last_activity_date: Last activity |
| 427 | 427 |
field_thousands_delimiter: Thousands delimiter |
| 428 |
field_allow_comments_on_closed_issues: Allow comments on closed issues |
|
| 428 | 429 | |
| 429 | 430 |
setting_app_title: Application title |
| 430 | 431 |
setting_welcome_text: Welcome text |
- « Previous
- 1
- 2
- Next »