annotate .svn/pristine/92/926f7ffacb41db843665d9a691a5c04902b1ca31.svn-base @ 1524:82fac3dcf466 redmine-2.5-integration

Fix failure to interpret Javascript when autocompleting members for project
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 11 Sep 2014 10:24:38 +0100
parents 261b3d9a4903
children
rev   line source
Chris@1464 1 <ul>
Chris@1464 2 <%= call_hook(:view_issues_context_menu_start, {:issues => @issues, :can => @can, :back => @back }) %>
Chris@1464 3
Chris@1464 4 <% if @issue -%>
Chris@1464 5 <li><%= context_menu_link l(:button_edit), edit_issue_path(@issue),
Chris@1464 6 :class => 'icon-edit', :disabled => !@can[:edit] %></li>
Chris@1464 7 <% else %>
Chris@1464 8 <li><%= context_menu_link l(:button_edit), bulk_edit_issues_path(:ids => @issue_ids),
Chris@1464 9 :class => 'icon-edit', :disabled => !@can[:edit] %></li>
Chris@1464 10 <% end %>
Chris@1464 11
Chris@1464 12 <% if @allowed_statuses.present? %>
Chris@1464 13 <li class="folder">
Chris@1464 14 <a href="#" class="submenu"><%= l(:field_status) %></a>
Chris@1464 15 <ul>
Chris@1464 16 <% @allowed_statuses.each do |s| -%>
Chris@1464 17 <li><%= context_menu_link h(s.name), bulk_update_issues_path(:ids => @issue_ids, :issue => {:status_id => s}, :back_url => @back), :method => :post,
Chris@1464 18 :selected => (@issue && s == @issue.status), :disabled => !@can[:update] %></li>
Chris@1464 19 <% end -%>
Chris@1464 20 </ul>
Chris@1464 21 </li>
Chris@1464 22 <% end %>
Chris@1464 23
Chris@1464 24 <% if @trackers.present? %>
Chris@1464 25 <li class="folder">
Chris@1464 26 <a href="#" class="submenu"><%= l(:field_tracker) %></a>
Chris@1464 27 <ul>
Chris@1464 28 <% @trackers.each do |t| -%>
Chris@1464 29 <li><%= context_menu_link h(t.name), bulk_update_issues_path(:ids => @issue_ids, :issue => {'tracker_id' => t}, :back_url => @back), :method => :post,
Chris@1464 30 :selected => (@issue && t == @issue.tracker), :disabled => !@can[:edit] %></li>
Chris@1464 31 <% end -%>
Chris@1464 32 </ul>
Chris@1464 33 </li>
Chris@1464 34 <% end %>
Chris@1464 35
Chris@1464 36 <% if @safe_attributes.include?('priority_id') && @priorities.present? -%>
Chris@1464 37 <li class="folder">
Chris@1464 38 <a href="#" class="submenu"><%= l(:field_priority) %></a>
Chris@1464 39 <ul>
Chris@1464 40 <% @priorities.each do |p| -%>
Chris@1464 41 <li><%= context_menu_link h(p.name), bulk_update_issues_path(:ids => @issue_ids, :issue => {'priority_id' => p}, :back_url => @back), :method => :post,
Chris@1464 42 :selected => (@issue && p == @issue.priority), :disabled => (!@can[:edit] || @issues.detect {|i| !i.leaf?}) %></li>
Chris@1464 43 <% end -%>
Chris@1464 44 </ul>
Chris@1464 45 </li>
Chris@1464 46 <% end %>
Chris@1464 47
Chris@1464 48 <% if @safe_attributes.include?('fixed_version_id') && @versions.present? -%>
Chris@1464 49 <li class="folder">
Chris@1464 50 <a href="#" class="submenu"><%= l(:field_fixed_version) %></a>
Chris@1464 51 <ul>
Chris@1464 52 <% @versions.sort.each do |v| -%>
Chris@1464 53 <li><%= context_menu_link format_version_name(v), bulk_update_issues_path(:ids => @issue_ids, :issue => {'fixed_version_id' => v}, :back_url => @back), :method => :post,
Chris@1464 54 :selected => (@issue && v == @issue.fixed_version), :disabled => !@can[:update] %></li>
Chris@1464 55 <% end -%>
Chris@1464 56 <li><%= context_menu_link l(:label_none), bulk_update_issues_path(:ids => @issue_ids, :issue => {'fixed_version_id' => 'none'}, :back_url => @back), :method => :post,
Chris@1464 57 :selected => (@issue && @issue.fixed_version.nil?), :disabled => !@can[:update] %></li>
Chris@1464 58 </ul>
Chris@1464 59 </li>
Chris@1464 60 <% end %>
Chris@1464 61
Chris@1464 62 <% if @safe_attributes.include?('assigned_to_id') && @assignables.present? -%>
Chris@1464 63 <li class="folder">
Chris@1464 64 <a href="#" class="submenu"><%= l(:field_assigned_to) %></a>
Chris@1464 65 <ul>
Chris@1464 66 <% if @assignables.include?(User.current) %>
Chris@1464 67 <li><%= context_menu_link "<< #{l(:label_me)} >>", bulk_update_issues_path(:ids => @issue_ids, :issue => {'assigned_to_id' => User.current}, :back_url => @back), :method => :post,
Chris@1464 68 :disabled => !@can[:update] %></li>
Chris@1464 69 <% end %>
Chris@1464 70 <% @assignables.each do |u| -%>
Chris@1464 71 <li><%= context_menu_link h(u.name), bulk_update_issues_path(:ids => @issue_ids, :issue => {'assigned_to_id' => u}, :back_url => @back), :method => :post,
Chris@1464 72 :selected => (@issue && u == @issue.assigned_to), :disabled => !@can[:update] %></li>
Chris@1464 73 <% end -%>
Chris@1464 74 <li><%= context_menu_link l(:label_nobody), bulk_update_issues_path(:ids => @issue_ids, :issue => {'assigned_to_id' => 'none'}, :back_url => @back), :method => :post,
Chris@1464 75 :selected => (@issue && @issue.assigned_to.nil?), :disabled => !@can[:update] %></li>
Chris@1464 76 </ul>
Chris@1464 77 </li>
Chris@1464 78 <% end %>
Chris@1464 79
Chris@1464 80 <% if @safe_attributes.include?('category_id') && @project && @project.issue_categories.any? -%>
Chris@1464 81 <li class="folder">
Chris@1464 82 <a href="#" class="submenu"><%= l(:field_category) %></a>
Chris@1464 83 <ul>
Chris@1464 84 <% @project.issue_categories.each do |u| -%>
Chris@1464 85 <li><%= context_menu_link h(u.name), bulk_update_issues_path(:ids => @issue_ids, :issue => {'category_id' => u}, :back_url => @back), :method => :post,
Chris@1464 86 :selected => (@issue && u == @issue.category), :disabled => !@can[:update] %></li>
Chris@1464 87 <% end -%>
Chris@1464 88 <li><%= context_menu_link l(:label_none), bulk_update_issues_path(:ids => @issue_ids, :issue => {'category_id' => 'none'}, :back_url => @back), :method => :post,
Chris@1464 89 :selected => (@issue && @issue.category.nil?), :disabled => !@can[:update] %></li>
Chris@1464 90 </ul>
Chris@1464 91 </li>
Chris@1464 92 <% end -%>
Chris@1464 93
Chris@1464 94 <% if @safe_attributes.include?('done_ratio') && Issue.use_field_for_done_ratio? %>
Chris@1464 95 <li class="folder">
Chris@1464 96 <a href="#" class="submenu"><%= l(:field_done_ratio) %></a>
Chris@1464 97 <ul>
Chris@1464 98 <% (0..10).map{|x|x*10}.each do |p| -%>
Chris@1464 99 <li><%= context_menu_link "#{p}%", bulk_update_issues_path(:ids => @issue_ids, :issue => {'done_ratio' => p}, :back_url => @back), :method => :post,
Chris@1464 100 :selected => (@issue && p == @issue.done_ratio), :disabled => (!@can[:edit] || @issues.detect {|i| !i.leaf?}) %></li>
Chris@1464 101 <% end -%>
Chris@1464 102 </ul>
Chris@1464 103 </li>
Chris@1464 104 <% end %>
Chris@1464 105
Chris@1464 106 <% @options_by_custom_field.each do |field, options| %>
Chris@1464 107 <li class="folder cf_<%= field.id %>">
Chris@1464 108 <a href="#" class="submenu"><%= h(field.name) %></a>
Chris@1464 109 <ul>
Chris@1464 110 <% options.each do |text, value| %>
Chris@1464 111 <li><%= bulk_update_custom_field_context_menu_link(field, text, value || text) %></li>
Chris@1464 112 <% end %>
Chris@1464 113 <% unless field.is_required? %>
Chris@1464 114 <li><%= bulk_update_custom_field_context_menu_link(field, l(:label_none), '__none__') %></li>
Chris@1464 115 <% end %>
Chris@1464 116 </ul>
Chris@1464 117 </li>
Chris@1464 118 <% end %>
Chris@1464 119
Chris@1464 120 <% if User.current.logged? %>
Chris@1464 121 <li><%= watcher_link(@issues, User.current) %></li>
Chris@1464 122 <% end %>
Chris@1464 123
Chris@1464 124 <% if @issue.present? %>
Chris@1464 125 <% if @can[:log_time] -%>
Chris@1464 126 <li><%= context_menu_link l(:button_log_time), new_issue_time_entry_path(@issue),
Chris@1464 127 :class => 'icon-time-add' %></li>
Chris@1464 128 <% end %>
Chris@1464 129 <li><%= context_menu_link l(:button_copy), project_copy_issue_path(@project, @issue),
Chris@1464 130 :class => 'icon-copy', :disabled => !@can[:copy] %></li>
Chris@1464 131 <% else %>
Chris@1464 132 <li><%= context_menu_link l(:button_copy), bulk_edit_issues_path(:ids => @issue_ids, :copy => '1'),
Chris@1464 133 :class => 'icon-copy', :disabled => !@can[:move] %></li>
Chris@1464 134 <% end %>
Chris@1464 135 <li><%= context_menu_link l(:button_delete), issues_path(:ids => @issue_ids, :back_url => @back),
Chris@1464 136 :method => :delete, :data => {:confirm => issues_destroy_confirmation_message(@issues)}, :class => 'icon-del', :disabled => !@can[:delete] %></li>
Chris@1464 137
Chris@1464 138 <%= call_hook(:view_issues_context_menu_end, {:issues => @issues, :can => @can, :back => @back }) %>
Chris@1464 139 </ul>