Sha256: 553b35d17f1fb2fe2f0b7e9c9f290a91734e07fe11c33c0f67027a31c4acd278
Contents?: true
Size: 811 Bytes
Versions: 27
Compression:
Stored size: 811 Bytes
Contents
pages = sort_list(@pages, :list_order) json.records do json.array!(pages) do |page| json.extract!(page, :title, :lft, :rgt, :to_param, :parent_id, :id, :list_order) json.updated_at page.updated_at.strftime('%B %e, %Y at %l:%m%p') json.updater page.updater.present? ? page.updater.email : 'Unknown User' json.edit_path edit_page_path(page) if page.published? && route_exist?(page) json.view_link action_link("View on Site", main_app.polymorphic_path(page), "laptop") end json.subpage_link action_link("Create a Sub-Page", new_page_path(:parent_id => page.id), "plus") json.edit_link edit_link(page) if page.key.blank? json.delete_link delete_link(page) else json.delete_link action_link("Required Page, Can't Delete", "#", "star") end end end
Version data entries
27 entries across 27 versions & 1 rubygems