]> source.dussan.org Git - redmine.git/commitdiff
Adds context menu for related issues (#8006).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 5 Apr 2011 12:11:05 +0000 (12:11 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 5 Apr 2011 12:11:05 +0000 (12:11 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5321 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/issues/_relations.rhtml
public/stylesheets/application.css

index f8535b827b77921697aca4f0a7510c3bd225587c..cc2661ae7300b2339123cfa31fa6c97708d42b11 100644 (file)
@@ -7,22 +7,25 @@
 <p><strong><%=l(:label_related_issues)%></strong></p>
 
 <% if @relations.present? %>
-<table style="width:100%">
+<form>
+<table class="list issues">
 <% @relations.each do |relation| %>
-<tr>
-<td><%= l(relation.label_for(@issue)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %>
+<tr class="issue hascontextmenu">
+<td class="checkbox"><%= check_box_tag("ids[]", relation.other_issue(@issue).id, false, :id => nil) %></td>
+<td class="subject"><%= l(relation.label_for(@issue)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %>
     <%= h(relation.other_issue(@issue).project) + ' - ' if Setting.cross_project_issue_relations? %>
     <%= link_to_issue(relation.other_issue(@issue), :truncate => 60) %>
 </td>
-<td><%= relation.other_issue(@issue).status.name %></td>
-<td><%= format_date(relation.other_issue(@issue).start_date) %></td>
-<td><%= format_date(relation.other_issue(@issue).due_date) %></td>
-<td><%= link_to_remote(image_tag('delete.png'), { :url => {:controller => 'issue_relations', :action => 'destroy', :issue_id => @issue, :id => relation},                                              
+<td class="status"><%= relation.other_issue(@issue).status.name %></td>
+<td class="start_date"><%= format_date(relation.other_issue(@issue).start_date) %></td>
+<td class="due_date"><%= format_date(relation.other_issue(@issue).due_date) %></td>
+<td class="buttons"><%= link_to_remote(image_tag('delete.png'), { :url => {:controller => 'issue_relations', :action => 'destroy', :issue_id => @issue, :id => relation},                                              
                                                   :method => :post
                                                 }, :title => l(:label_relation_delete)) if authorize_for('issue_relations', 'destroy') %></td>
 </tr>
 <% end %>
 </table>
+</form>
 <% end %>
 
 <% remote_form_for(:relation, @relation, 
index b948d4e87af6252087217ba729119e8ff3a50820..2589b327fe0bc206d7ec4a27a12e6edbaba49981 100644 (file)
@@ -279,8 +279,9 @@ div.issue div.subject p {margin: 0; margin-bottom: 0.1em; font-size: 90%; color:
 div.issue div.subject>div>p { margin-top: 0.5em; }
 div.issue div.subject h3 {margin: 0; margin-bottom: 0.1em;}
 
-#issue_tree table.issues { border: 0; }
-#issue_tree td.checkbox {display:none;}
+#issue_tree table.issues, #relations table.issues { border: 0; }
+#issue_tree td.checkbox, #relations td.checkbox {display:none;}
+#relations td.buttons {padding:0;}
 
 fieldset.collapsible { border-width: 1px 0 0 0; font-size: 0.9em; }
 fieldset.collapsible legend { padding-left: 16px; background: url(../images/arrow_expanded.png) no-repeat 0% 40%; cursor:pointer; }