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

32 lines
873 B

class MeetingMinutesController < ApplicationController
unloadable
include MeetingContentsHelper
before_filter :find_meeting, :find_minutes
before_filter :authorize
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