Module: CmisServer::ApplicationHelper
- Defined in:
- app/helpers/cmis_server/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#atom_entry_properties_for(object) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/helpers/cmis_server/application_helper.rb', line 5 def atom_entry_properties_for(object) { id: object&.cmis_object_id, title: object&.cmis_name, summary: object&.cmis_description, edited: object&.cmis_creation_date, updated: object&.cmis_last_modification_date, author: object&.cmis_created_by, content: object.try(:content_stream) } end |
#links_for(object) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/helpers/cmis_server/application_helper.rb', line 17 def links_for(object) result="" if lookup_context.find_all("cmis_server/atom_pub/entries/_#{object.type.base_id.path_sanitize}_links").any? result+=render(partial: "cmis_server/atom_pub/entries/#{object.type.base_id.path_sanitize}_links", locals: {object: object}) end if object.type.id != object.type.base_id if lookup_context.find_all("cmis_server/atom_pub/entries/_#{object.type.id.path_sanitize}_links").any? result+=render(partial: "cmis_server/atom_pub/entries/#{object.type.id.path_sanitize}_links", locals: {object: object}) end end result end |