Mercurial > hg > soundsoftware-site
view .svn/pristine/e0/e024de91ca039f46f93f26d8b35e2dac179b2d3a.svn-base @ 1080:5bd8c86cfa6a issue_540
Makes the Publication model act as an activity; overloading the default ActivitiesController#index view in the Bibliography Plugin in order to differentiate Publications from the other event types.
* Known issues:
** route to /activities is not working (only to /activity);
** publication cache needs to be implemented in the model, not in the helper;
** when a publication is added to n projects, n events are created (all with the same content).
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 22 Nov 2012 16:51:23 +0000 |
parents | cbb26bc654de |
children |
line wrap: on
line source
<% if @statuses.empty? or rows.empty? %> <p><i><%=l(:label_no_data)%></i></p> <% else %> <% col_width = 70 / (@statuses.length+3) %> <table class="list"> <thead><tr> <th style="width:25%"></th> <% for status in @statuses %> <th style="width:<%= col_width %>%"><%=h status.name %></th> <% end %> <th align="center" style="width:<%= col_width %>%"><strong><%=l(:label_open_issues_plural)%></strong></th> <th align="center" style="width:<%= col_width %>%"><strong><%=l(:label_closed_issues_plural)%></strong></th> <th align="center" style="width:<%= col_width %>%"><strong><%=l(:label_total)%></strong></th> </tr></thead> <tbody> <% for row in rows %> <tr class="<%= cycle("odd", "even") %>"> <td><%= link_to h(row.name), :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), :set_filter => 1, :subproject_id => '!*', "#{field_name}" => row.id %></td> <% for status in @statuses %> <td align="center"><%= aggregate_link data, { field_name => row.id, "status_id" => status.id }, :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), :set_filter => 1, :subproject_id => '!*', "status_id" => status.id, "#{field_name}" => row.id %></td> <% end %> <td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 0 }, :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), :set_filter => 1, :subproject_id => '!*', "#{field_name}" => row.id, "status_id" => "o" %></td> <td align="center"><%= aggregate_link data, { field_name => row.id, "closed" => 1 }, :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), :set_filter => 1, :subproject_id => '!*', "#{field_name}" => row.id, "status_id" => "c" %></td> <td align="center"><%= aggregate_link data, { field_name => row.id }, :controller => 'issues', :action => 'index', :project_id => ((row.is_a?(Project) ? row : @project)), :set_filter => 1, :subproject_id => '!*', "#{field_name}" => row.id, "status_id" => "*" %></td> </tr> <% end %> </tbody> </table> <% end reset_cycle %>