summaryrefslogtreecommitdiffstats
path: root/app/views/issues/_list.rhtml
blob: b29476d58857b1f9cd86c35045f884a25e7f0839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<% form_tag({}) do -%>	
<%= hidden_field_tag 'back_url', url_for(params) %>
<div class="autoscroll">
<table class="list issues">
    <thead><tr>
        <th><%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
                                                           :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
        </th>
		<%= sort_header_tag('id', :caption => '#', :default_order => 'desc') %>
        <% query.columns.each do |column| %>
          <%= column_header(column) %>
        <% end %>
	</tr></thead>
	<% previous_group = false %>
	<tbody>
	<% issues.each do |issue| -%>
  <% if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group %>
    <% reset_cycle %>
    <tr class="group open">
    	<td colspan="<%= query.columns.size + 2 %>">
    		<span class="expander" onclick="toggleRowGroup(this); return false;">&nbsp;</span>
      	<%= group.blank? ? 'None' : column_content(@query.group_by_column, issue) %> <span class="count">(<%= @issue_count_by_group[group] %>)</span>
    	</td>
		</tr>
		<% previous_group = group %>
  <% end %>
	<tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %>">
	    <td class="checkbox"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
		<td><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td>
        <% query.columns.each do |column| %><%= content_tag 'td', column_content(column, issue), :class => column.name %><% end %>
	</tr>
	<% end -%>
	</tbody>
</table>
</div>
<% end -%>