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