annotate app/views/projects/index.api.rsb @ 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 dffacf8a6908
rev   line source
Chris@119 1 api.array :projects, api_meta(:total_count => @project_count, :offset => @offset, :limit => @limit) do
Chris@119 2 @projects.each do |project|
Chris@119 3 api.project do
Chris@119 4 api.id project.id
Chris@119 5 api.name project.name
Chris@119 6 api.identifier project.identifier
Chris@119 7 api.description project.description
Chris@507 8 api.parent(:id => project.parent.id, :name => project.parent.name) if project.parent && project.parent.visible?
Chris@909 9
Chris@119 10 render_api_custom_values project.visible_custom_field_values, api
Chris@909 11
Chris@119 12 api.created_on project.created_on
Chris@119 13 api.updated_on project.updated_on
Chris@119 14 end
Chris@119 15 end
Chris@119 16 end