The Rails Connector includes the display_field
helper for making fields directly editable in the preview. If a field value is output in the edited
mode using this helper, the Rails Connector displays a suitable editing element for it:
<%= display_field(@obj, :related_links) %>
This editing method is only available in the CMS preview, not in a preview opened outside the user interface of CMS Fiona.
Using another helper, edit_marker
, you can alternatively have an editing element displayed for a field without rendering the field value itself. This is helpful with fields that don't have values to be output but are used to control something, e.g. the visibility of a navigation.
<%= edit_marker(@obj, :related_links) %>
These markers are also only displayed in the edited
mode of the Rails Connector.
Next to making fields editable, you can offer editing elements for the actions provided by the CMS, e.g. releasing a CMS object. For this, the action_marker
helper is available.
<%= action_marker(:workflow_release,[@obj]) %>
The following actions, which are also available in the HTML user interface, can be integrated into the preview:
Keyword | Action |
:workflow_commit
|
Commits the passed objects. |
:workflow_sign
|
Signs the passed objects. |
:workflow_release
|
Releases the passed objects. |
:workflow_reject
|
Rejects the committed version of the passed objects. |
:workflow_revert
|
Deletes the edited version of the passed objects. |
:workflow_unrelease
|
Unreleases the passed objects. |
:workflow_take
|
Makes the current CMS user the editor of the passed objects. |
:workflow_give
|
Lets the current user change the editor of the passed objects. |
:workflow_edit
|
Creates the editable version of the passed objects. |
:tasks_overview
|
Opens the tasks overview page of the current user. |
:delete_reminder
|
Deletes a reminder for the passed object. |
:edit_reminder
|
Lets the user edit the reminders for the passed object. |
:delete_object
|
Deletes the passed objects. |
:copy_into_clipboard
|
Copies the passed objects to the clipboard. |
:cut_into_clipboard
|
Places the passed objects to the clipboard for moving them. |
:paste_objects
|
Pastes the objects on the clipboard underneath the passed object. |
:logout
|
Logs out the current user. |
:create_object_document
|
Creates a new document underneath the passed object. |
:create_object_publication
|
Creates a new folder underneath the passed object. |
:create_object_image
|
Creates a new image underneath the the passed object. |
:create_object_generic
|
creates a new resource object below the passed object. |
:importArchive
|
Imports a ZIP archive underneath the passed object. |
:import_file
|
Imports a file into the CMS and places it underneath the passed object. |
:view_protocol
|
Opens the protocol window for the passed object. |
:reminder_overview
|
Opens the overview of all reminders. |
:search_objects
|
Opens the CMS search page. |
The Rails Connector lets you add menus containing editing elements to the preview to enable editors to access the desired functions in place.
To offer a menu, first define its contents in the view concerned. In this view, you can use the edit_item
helper to make a particular field editable, or the action_item
helper to make CMS actions available.
<% marker_menu do %> <%= iconlist do %> <%= edit_item("edit title", "", @obj, :title) %> <%= action_item("create new blog", "", [@obj], :create_object_publication) %> <% end %> <% end %>
Afterwards, add the menu to your view using the maker_menu_target
helper:
<%= marker_menu_target(:div) do %> Special context Menue <% end %>