Feature #34303 » 34303-poc.patch
| app/controllers/context_menus_controller.rb | ||
|---|---|---|
|
:log_time => (@project && User.current.allowed_to?(:log_time, @project)),
|
||
|
:copy => User.current.allowed_to?(:copy_issues, @projects) && Issue.allowed_target_projects.any?,
|
||
|
:add_watchers => User.current.allowed_to?(:add_issue_watchers, @projects),
|
||
|
:delete => @issues.all?(&:deletable?)
|
||
|
:delete => @issues.all?(&:deletable?),
|
||
|
:add_subtask => (@project && User.current.allowed_to?(:manage_subtasks, @project))
|
||
|
}
|
||
|
@assignables = @issues.map(&:assignable_users).reduce(:&)
|
||
| app/helpers/issues_helper.rb | ||
|---|---|---|
|
# Returns a link for adding a new subtask to the given issue
|
||
|
def link_to_new_subtask(issue)
|
||
|
link_to(l(:button_add), url_for_new_subtask(issue))
|
||
|
end
|
||
|
def url_for_new_subtask(issue)
|
||
|
attrs = {
|
||
|
:parent_issue_id => issue
|
||
|
}
|
||
|
attrs[:tracker_id] = issue.tracker unless issue.tracker.disabled_core_fields.include?('parent_issue_id')
|
||
|
link_to(l(:button_add), new_project_issue_path(issue.project, :issue => attrs, :back_url => issue_path(issue)))
|
||
|
params = {}
|
||
|
params[:issue] = attrs
|
||
|
params[:back_url] = issue_path(issue) if controller_name == 'issues' && action_name == 'show'
|
||
|
new_project_issue_path(issue.project, params)
|
||
|
end
|
||
|
def trackers_options_for_select(issue)
|
||
| app/views/context_menus/issues.html.erb | ||
|---|---|---|
|
<li><%= context_menu_link l(:button_log_time), new_issue_time_entry_path(@issue),
|
||
|
:class => 'icon icon-time-add' %></li>
|
||
|
<% end %>
|
||
|
<% if @can[:add_subtask] -%>
|
||
|
<li><%= context_menu_link l(:button_add_subtask), url_for_new_subtask(@issue),
|
||
|
:class => 'icon icon-add' %></li>
|
||
|
<% end %>
|
||
|
<li><%= context_menu_link l(:button_copy), project_copy_issue_path(@project, @issue),
|
||
|
:class => 'icon icon-copy', :disabled => !@can[:copy] %></li>
|
||
|
<% else %>
|
||
| config/locales/en.yml | ||
|---|---|---|
|
button_project_bookmark_delete: Remove bookmark
|
||
|
button_filter: Filter
|
||
|
button_actions: Actions
|
||
|
button_add_subtask: Add subtask
|
||
|
status_active: active
|
||
|
status_registered: registered
|
||