Module: Engine2::ActionPanelSupport
- Included in:
- ActionFormSupport, ActionListSupport, ActionViewSupport, ConfirmAction, InfraAction, InspectModalAction, LogoutFormAction
- Defined in:
- lib/engine2/action.rb
Instance Method Summary collapse
- #modal_action(modal = true) ⇒ Object
- #panel ⇒ Object
- #panel_class(cls) ⇒ Object
- #panel_footer(ftr) ⇒ Object
- #panel_header(hdr) ⇒ Object
- #panel_panel_template(tmpl) ⇒ Object
- #panel_template(tmpl) ⇒ Object
- #panel_title(tle) ⇒ Object
- #post_run ⇒ Object
- #pre_run ⇒ Object
Instance Method Details
#modal_action(modal = true) ⇒ Object
514 515 516 |
# File 'lib/engine2/action.rb', line 514 def modal_action modal = true panel[:modal_action] = modal end |
#panel ⇒ Object
510 511 512 |
# File 'lib/engine2/action.rb', line 510 def panel @meta[:panel] ||= {} end |
#panel_class(cls) ⇒ Object
526 527 528 |
# File 'lib/engine2/action.rb', line 526 def panel_class cls panel[:class] = cls end |
#panel_footer(ftr) ⇒ Object
538 539 540 |
# File 'lib/engine2/action.rb', line 538 def ftr panel[:footer] = ftr end |
#panel_header(hdr) ⇒ Object
534 535 536 |
# File 'lib/engine2/action.rb', line 534 def panel_header hdr panel[:header] = hdr end |
#panel_panel_template(tmpl) ⇒ Object
522 523 524 |
# File 'lib/engine2/action.rb', line 522 def panel_panel_template tmpl panel[:panel_template] = tmpl end |
#panel_template(tmpl) ⇒ Object
518 519 520 |
# File 'lib/engine2/action.rb', line 518 def panel_template tmpl panel[:template] = tmpl end |
#panel_title(tle) ⇒ Object
530 531 532 |
# File 'lib/engine2/action.rb', line 530 def panel_title tle panel[:title] = tle end |
#post_run ⇒ Object
499 500 501 502 503 504 505 506 507 508 |
# File 'lib/engine2/action.rb', line 499 def post_run super if @meta[:panel] panel_panel_template 'menu_m' if panel[:panel_template].nil? # modal_action false if panel[:panel_template] == false panel_class '' unless panel[:class] true if panel[:footer] != false && (:panel_menu) panel_header true if panel[:header] != false end end |
#pre_run ⇒ Object
494 495 496 497 |
# File 'lib/engine2/action.rb', line 494 def pre_run modal_action true super end |