Feature #33868 » 33868-tracker-based-POC.patch
| app/models/issue.rb | ||
|---|---|---|
|
# Returns true if user or current user is allowed to add notes to the issue
|
||
|
def notes_addable?(user=User.current)
|
||
|
user_tracker_permission?(user, :add_issue_notes)
|
||
|
return false unless user_tracker_permission?(user, :add_issue_notes)
|
||
|
return false if !tracker.allow_comments_on_closed_issues && closed? && !closing?
|
||
|
true
|
||
|
end
|
||
|
# Returns true if user or current user is allowed to delete the issue
|
||
| app/models/tracker.rb | ||
|---|---|---|
|
'name',
|
||
|
'default_status_id',
|
||
|
'is_in_roadmap',
|
||
|
'allow_comments_on_closed_issues',
|
||
|
'core_fields',
|
||
|
'position',
|
||
|
'custom_field_ids',
|
||
| app/views/issues/edit.js.erb | ||
|---|---|---|
|
$('#log_time').hide();
|
||
|
<% end %>
|
||
|
<% byebug %>
|
||
|
<% if @issue.notes_addable? %>
|
||
|
$('#add_notes').show();
|
||
|
$('#add_attachments').show();
|
||
| app/views/trackers/_form.html.erb | ||
|---|---|---|
|
:required => true %>
|
||
|
</p>
|
||
|
<p><%= f.check_box :is_in_roadmap %></p>
|
||
|
<p><%= f.check_box :allow_comments_on_closed_issues %></p>
|
||
|
<p><%= f.text_area :description, :rows => 4 %></p>
|
||
|
<p>
|
||
|
<label><%= l(:field_core_fields) %></label>
|
||
| config/locales/en.yml | ||
|---|---|---|
|
field_estimated_remaining_hours: Estimated remaining time
|
||
|
field_last_activity_date: Last activity
|
||
|
field_thousands_delimiter: Thousands delimiter
|
||
|
field_allow_comments_on_closed_issues: Allow comments on closed issues
|
||
|
setting_app_title: Application title
|
||
|
setting_welcome_text: Welcome text
|
||