Class: Card::Format::HtmlFormat
- Inherits:
-
Card::Format
- Object
- Card::Format
- Card::Format::HtmlFormat
- Defined in:
- mod/core/format/html_format.rb
Overview
Main Format class for formatting card views in HTML
Direct Known Subclasses
Constant Summary
Constants included from MethodDelegation
MethodDelegation::RENDER_METHOD_RE
Instance Attribute Summary collapse
-
#options_need_save ⇒ Object
Returns the value of attribute options_need_save.
-
#skip_autosave ⇒ Object
Returns the value of attribute skip_autosave.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
Attributes inherited from Card::Format
#card, #error_status, #form, #main_opts, #modal_opts, #parent, #rendered
Instance Method Summary collapse
- #default_item_view ⇒ Object
- #default_nest_view ⇒ Object
- #final_render_call(method) ⇒ Object
-
#focal? ⇒ Boolean
is the current card the requested card?.
- #main? ⇒ Boolean
- #mime_type ⇒ Object
Methods inherited from Card::Format
#controller, #include_set_format_modules, #initialize, #page, #params, #require_card_to_initialize!, #session, #template, #to_sym, view_caching?
Methods included from Registration
#class_from_name, #format_ancestry, #format_class, #format_class_name, #format_sym, #new, #register
Methods included from MethodDelegation
#api_render, #method_missing, #pass_method_to_template_object, #render_args, #respond_to_missing?
Methods included from Error
#anyone_can?, #error_cardname, #loud_error, #loud_error?, #monitor_depth, #ok?, #quiet_error, #rendering_error, #rescue_view, #view_for_denial, #view_for_unknown
Methods included from Content
#add_class, #content_nest, #css_classes, #format_date, #id_counter, #output, #prepend_class, #process_content, #safe_process_content, #unique_id
Methods included from ContextNames
#add_name_context, #context_names, #context_names_from_params, #context_names_to_params, #initial_context_names, #naming, #relevant_context_names, #title_in_context
Methods included from Render
#add_debug_info, #before_view, #current_view, #expand_stubs, #final_render, #prepare_stub_nest, #pretty_path, #raise_wrap_error, #render!, #render_with_card_layout, #render_with_wrapper, #show_debug_info?, #show_view?, #stub_debugging, #stub_nest, #stub_render, #supports_view?, #view_cache_setting, #view_method, #view_setting, #voo, #with_voo, #with_wrapper, #wrap_with_wrapper
Methods included from Nesting
#field_nest, #implicit_nest_view, #nest, #nest_path
Methods included from Nesting::Mode
#configured_view_in_compact_mode, #hide_view_in_edit_mode?, #modal_nest_view, #nest_mode, #view_in_compact_mode, #view_in_edit_mode, #with_altered_nest_mode, #with_nest_mode
Methods included from Nesting::Subformat
#depth, #field_subformat, #inherit, #main, #root, #root?, #subformat
Methods included from Nesting::Main
#already_mained?, #main!, #main_nest, #main_nest?, #main_nest_options, #main_nest_render, #wrap_main
Methods included from Env::Location
#card_path, #card_url, #protocol_and_host
Constructor Details
This class inherits a constructor from Card::Format
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Card::Format::MethodDelegation
Instance Attribute Details
#options_need_save ⇒ Object
Returns the value of attribute options_need_save.
11 12 13 |
# File 'mod/core/format/html_format.rb', line 11 def @options_need_save end |
#skip_autosave ⇒ Object
Returns the value of attribute skip_autosave.
11 12 13 |
# File 'mod/core/format/html_format.rb', line 11 def skip_autosave @skip_autosave end |
#start_time ⇒ Object
Returns the value of attribute start_time.
11 12 13 |
# File 'mod/core/format/html_format.rb', line 11 def start_time @start_time end |
Instance Method Details
#default_item_view ⇒ Object
27 28 29 |
# File 'mod/core/format/html_format.rb', line 27 def default_item_view :bar end |
#default_nest_view ⇒ Object
22 23 24 25 |
# File 'mod/core/format/html_format.rb', line 22 def default_nest_view # FIXME: not sure this makes sense as a rule... card.rule(:default_html_view) || :titled end |
#final_render_call(method) ⇒ Object
35 36 37 38 |
# File 'mod/core/format/html_format.rb', line 35 def final_render_call method rendered = super rendered.is_a?(Array) ? output(rendered) : rendered end |
#focal? ⇒ Boolean
is the current card the requested card?
18 19 20 |
# File 'mod/core/format/html_format.rb', line 18 def focal? @focal ||= show_layout? ? main? : depth.zero? end |
#main? ⇒ Boolean
13 14 15 |
# File 'mod/core/format/html_format.rb', line 13 def main? !@main.nil? end |
#mime_type ⇒ Object
31 32 33 |
# File 'mod/core/format/html_format.rb', line 31 def mime_type "text/html" end |