OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/views/hooks/_view_issues_context_menu_e...

21 lines
747 B

<%
possible_cost_objects = issues.inject(issues.first.project.cost_objects) do |intersect, issue|
issue.project.cost_objects & intersect
end
%>
<li class="folder">
<a href="#" class="submenu"><%= l(:cost_objects_title) %></a>
<ul>
<% unless possible_cost_objects.empty? -%>
<% possible_cost_objects.each do |co| -%>
<li>
<%= context_menu_link co.subject, {:controller => 'issues', :action => 'bulk_edit', :ids => issues.collect(&:id), 'cost_object_id' => co, :back_url => back}, :method => :post,
:selected => (@issue && co == @issue.cost_object), :disabled => !can[:edit] %>
</li>
<% end -%>
<% else -%>
<li><%= l(:notice_cost_object_conflict)%></li>
<% end -%>
</ul>
</li>