Sha256: 3b37baafa9935e80c6676d725e3bb05ac22f0004f18f29fc2d8f4a3cdc674eb8
Contents?: true
Size: 742 Bytes
Versions: 10
Compression:
Stored size: 742 Bytes
Contents
module Georgia class SubpagePortlet < Portlet delegate :position, :title, :url, to: :portlet def to_s output = ActiveSupport::SafeBuffer.new output << handle_tag output << position_input_tag output << title_tag output << actions_tag portlet_tag(output) end private def position_input_tag hidden_field_tag("page_tree[#{id}][position]", position, class: 'js-position') end def title_tag content_tag(:h4, (title + url_tag).html_safe, class: 'title') end def url_tag content_tag(:small, url) end def actions_tag content_tag(:div, class: 'actions') do link_to(icon_tag('pencil'), [:edit, portlet]) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems