OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/controllers/meeting_minutes_controller.rb

40 lines
1013 B

class MeetingMinutesController < ApplicationController
unloadable
menu_item :meetings
include MeetingContentsHelper
before_filter :find_meeting, :find_minutes
before_filter :authorize
def show
# TODO: Accept showing versions
@content = @minutes
render 'meeting_contents/show'
end
def update
@minutes.attributes = params[:meeting_minutes]
@minutes.author = User.current
if @minutes.save
flash[:notice] = l(:notice_successful_update)
redirect_to @meeting
else
end
end
def history
#@version_count = @page.content.versions.count
#@version_pages = Paginator.new self, @version_count, per_page_option, params['p']
# don't load text
@content_versions = @minutes.versions.all :select => "id, author_id, comment, updated_at, version", :order => 'version DESC'
render 'meeting_contents/history'
end
private
def find_minutes
@minutes = @meeting.minutes || MeetingMinutes.new(:meeting => @meeting)
end
end