lib/scrivito/controller_actions.rb in scrivito_sdk-0.40.0 vs lib/scrivito/controller_actions.rb in scrivito_sdk-0.41.0.rc1
- old
+ new
@@ -15,13 +15,14 @@
module ControllerActions
extend ActiveSupport::Concern
included do
before_filter :require_authenticated_editor, only: [
- :details_page,
:show_widget,
:widget_details,
+ :page_details,
+ :resource_details,
]
before_filter :load_object
end
@@ -46,10 +47,15 @@
widget = load_widget
template_path = "#{widget.obj_class_name.underscore}/details"
render template_path, layout: 'scrivito_dialog', locals: {widget: widget}
end
- def details_page
+ def page_details
+ assert_dialog_layout
+ render @obj.details_view_path, layout: 'scrivito_dialog'
+ end
+
+ def resource_details
assert_dialog_layout
@scrivito_resource = editing_context.selected_workspace.objs
.find_including_deleted(params[:resource_id])
render text: '', layout: 'scrivito_dialog'
end