Sha256: 001783877117f6e54f717ac17635c82ec09ed23ca1a5247be895d70db0bf17dc

Contents?: true

Size: 857 Bytes

Versions: 41

Compression:

Stored size: 857 Bytes

Contents

module Pageflow
  class RevisionsController < Pageflow::ApplicationController
    include QuotaVerification

    before_action :authenticate_user!, :unless => lambda { |controller| controller.request.format.css? }

    respond_to :json

    def show
      revision = Revision.find(params[:id])
      authorize!(:show, revision) unless request.format.css?

      @entry = PublishedEntry.new(revision.entry, revision)
      I18n.locale = @entry.locale

      @widget_scope = :preview
      render :template => 'pageflow/entries/show'
    end

    def depublish_current
      entry = Entry.find(params[:entry_id])
      authorize!(:publish, entry)

      entry.revisions.depublish_all
      redirect_to(main_app.admin_entry_path(entry))
    end

    private

    def revision_params
      params.fetch(:revision, {}).permit(:published_until)
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
pageflow-14.5.2 app/controllers/pageflow/revisions_controller.rb
pageflow-15.1.0.beta2 app/controllers/pageflow/revisions_controller.rb
pageflow-15.1.0.beta1 app/controllers/pageflow/revisions_controller.rb
pageflow-15.0.2 app/controllers/pageflow/revisions_controller.rb
pageflow-15.0.1 app/controllers/pageflow/revisions_controller.rb
pageflow-15.0.0 app/controllers/pageflow/revisions_controller.rb
pageflow-14.5.1 app/controllers/pageflow/revisions_controller.rb
pageflow-14.5.0 app/controllers/pageflow/revisions_controller.rb
pageflow-15.0.0.rc2 app/controllers/pageflow/revisions_controller.rb
pageflow-15.0.0.rc1 app/controllers/pageflow/revisions_controller.rb
pageflow-15.0.0.beta4 app/controllers/pageflow/revisions_controller.rb
pageflow-15.0.0.beta3 app/controllers/pageflow/revisions_controller.rb
pageflow-14.4.0 app/controllers/pageflow/revisions_controller.rb
pageflow-15.0.0.beta2 app/controllers/pageflow/revisions_controller.rb
pageflow-15.0.0.beta1 app/controllers/pageflow/revisions_controller.rb
pageflow-14.3.0 app/controllers/pageflow/revisions_controller.rb
pageflow-14.2.1 app/controllers/pageflow/revisions_controller.rb
pageflow-14.2.0 app/controllers/pageflow/revisions_controller.rb
pageflow-14.1.1 app/controllers/pageflow/revisions_controller.rb
pageflow-14.1.0 app/controllers/pageflow/revisions_controller.rb