Skip to content

Commit

Permalink
Fixed query polling
Browse files Browse the repository at this point in the history
  • Loading branch information
bradbeattie committed Mar 26, 2009
1 parent 6abcd8c commit 85f9016
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions app/views/my/blocks/_custom_queries.html.erb
@@ -1,23 +1,24 @@
<h3><%= l(:label_query_plural) %></h3>

<% form_tag({}) do %>
<table class="list queries">
<thead><tr>
<th><%=l(:label_query)%></th>
<th>#</th>
</tr></thead>
<tbody>
<table class="list queries">
<thead>
<tr>
<th><%=l(:label_query)%></th>
<th>#</th>
</tr>
</thead>
<tbody>
<% sidebar_queries.each do |query|
query = Query.find(query.id) # Necessary as sidebar_queries doesn't correctly initialize filters
issue_count = Issue.count(:include => [:status, :project], :conditions => query.statement)
%>
<tr class="<%= cycle('odd', 'even') %> <%= 'empty' if issue_count == 0 %>">
<td class="query"><%= link_to(h(query.name), :controller => 'issues', :action => 'index', :project_id => @project, :query_id => query) %></td>
<td class="count"><%= issue_count %></td>
</tr>
<% end %>
</tbody>
</table>
<% end %>
</tbody>
</table>

<% content_for :header_tags do %>
<%= stylesheet_link_tag 'my_widgets', :plugin => 'redmine_my_widgets' %>
Expand Down

0 comments on commit 85f9016

Please sign in to comment.