view .svn/pristine/bc/bc5cd9a0ce7e6dce66f1e1a15e9e36c9090b2ffd.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
<h3><%= l(:label_calendar) %></h3>

<% calendar = Redmine::Helpers::Calendar.new(Date.today, current_language, :week)
   calendar.events = Issue.visible.find :all,
                     :conditions => ["#{Issue.table_name}.project_id in (#{@user.projects.collect{|m| m.id}.join(',')}) AND ((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", calendar.startdt, calendar.enddt, calendar.startdt, calendar.enddt],
                     :include => [:project, :tracker, :priority, :assigned_to] unless @user.projects.empty? %>

<%= render :partial => 'common/calendar', :locals => {:calendar => calendar } %>