Commit 566724a7658d2efe755ad12abbc901c885dce84e

Authored by Rodrigo Souto
1 parent 7911d32b

[work-assignment] Preparing base view

plugins/work_assignment/lib/work_assignment_plugin/helper.rb 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +module WorkAssignmentPlugin::Helper
  2 + def display_submissions(work_assignment)
  3 + "Displaying submissions..."
  4 + end
  5 +end
... ...
plugins/work_assignment/lib/work_assignment_plugin/work_assignment.rb
... ... @@ -11,4 +11,15 @@ class WorkAssignmentPlugin::WorkAssignment < Folder
11 11 def self.description
12 12 _('Defines a work to be done by the members and receives their submissions about this work.')
13 13 end
  14 +
  15 + def accept_comments?
  16 + true
  17 + end
  18 +
  19 + def to_html(options = {})
  20 + lambda do
  21 + render :file => 'content_viewer/work_assignment.html.erb'
  22 + end
  23 + end
  24 +
14 25 end
... ...
plugins/work_assignment/views/cms/work_assignment_plugin/_work_assignment.html.erb 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +<%= render :partial => 'folder', :locals => {:f => f} %>
  2 +
  3 +Extra content...
... ...
plugins/work_assignment/views/content_viewer/work_assignment.html.erb 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +<% extend WorkAssignmentPlugin::Helper %>
  2 +
  3 +<% unless @page.body.blank? %>
  4 + <div><%= @page.body %></div>
  5 + <hr/>
  6 +<% end %>
  7 +
  8 +<%= display_submissions(@page) %>
... ...