Sha256: 75dd02848d73ac3e3648064ea838bf41c6671cdb366e2bfddd78856a401c869a
Contents?: true
Size: 1.44 KB
Versions: 6
Compression:
Stored size: 1.44 KB
Contents
require 'rexml/document' module BulmaFormRails # rdoc-image:../images/moderngeosystems_logo.png # # https://moderngeosystems.com # # This Ruby on Rails Helper module allows easy and efficient index and form page header and footer rendering. module HeaderAndFooterHelpers # Render the header for a standard index page. Automatically calls +bulma_message_box+. # * +name+ - a symbol representing the model name # * +models_path+ - the controller URL path for the action that renders the model collection def bulma_index_header(name, models_path) render partial: 'bulma_form_rails/index_header', locals: {name: name, models_path: models_path} end # Render a standard model form page footer. # * +form+ - the form object # * +models_path+ - the controller URL path for the action that renders the model collection # * +options+ - a hash of additional options: # * +exclude_submit_button+ - don't include a submit button if true # * +block+ - optional ERb to render any additional content for the footer, such as additional buttons def bulma_form_footer(form, models_path, options = {}, &block) if block_given? render layout: 'bulma_form_rails/form_footer', locals: {form: form, url: models_path, options: options}, &block else render partial: 'bulma_form_rails/form_footer', locals: {form: form, url: models_path, options: options} end end end end
Version data entries
6 entries across 6 versions & 1 rubygems