Sha256: 3f2ab65fdda562ebd2fff7dc5925f2b216596dbce7985a16fdca7ad786772c87
Contents?: true
Size: 763 Bytes
Versions: 2
Compression:
Stored size: 763 Bytes
Contents
module Cms module UiElementsHelper # Renders a Save And Publish button if: # 1. Current User has publish rights # 2. Block is publishable def save_and_publish_button(block, content_type) if current_user.able_to?(:publish_content) && block.publishable? html = %Q{<button type="submit" name="#{content_type.content_block_type.singularize}[publish_on_save]" value="true" class="submit" tabindex="#{next_tabindex}"><span>Save And Publish</span></button>} lt_button_wrapper html.html_safe end end def select_content_type_tag(type, &block) options = {:rel => "select-#{type.key}"} options[:class] = "on" if content_type == type content_tag_for(:li, type, nil, options, &block) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
browsercms-3.4.0.rc2 | app/helpers/cms/ui_elements_helper.rb |
browsercms-3.4.0.rc1 | app/helpers/cms/ui_elements_helper.rb |