app/cms/scrivito/page_config.rb in scrivito_sdk-1.12.0 vs app/cms/scrivito/page_config.rb in scrivito_sdk-1.13.0.rc1
- old
+ new
@@ -32,33 +32,11 @@
def current_page_config
return {} unless obj
{
id: obj.id,
- obj_class: obj.obj_class,
- description_for_editor: obj.description_for_editor,
- has_children: obj.children.any?,
- has_conflict: obj.has_conflict?,
- has_details_view: obj_has_details_view?,
- modification: modification(obj),
- parent_path: obj.parent_path,
is_restricted: editor.restriction_messages_for(obj).any?,
}
- end
-
- def obj_has_details_view?
- lookup_context.find(obj.details_view_path).present?
- rescue ActionView::MissingTemplate
- false
- end
-
- def modification(obj_or_resource)
- comparison = editing_context.comparison
- if comparison.active?
- comparison.modification(obj_or_resource)
- else
- obj_or_resource.modification
- end
end
def editor
editing_context.editor
end