Module: Card::Set::All::ReferenceEditor::NestEditor::NestEditorTabs::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_editor/nest_editor_tabs.rb
Instance Method Summary collapse
-
#default_active_tab ⇒ Object
-
#image_content_tab(snippet) ⇒ Object
-
#image_find_tab(snippet) ⇒ Object
-
#image_nest_editor_tabs(snippet) ⇒ Object
-
#image_preview_tab(snippet) ⇒ Object
-
#nest_content_tab ⇒ Object
-
#nest_editor_tabs ⇒ Object
-
#nest_rules_tab ⇒ Object
-
#show_content_tab? ⇒ Boolean
Instance Method Details
#default_active_tab ⇒ Object
50 51 52 |
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_editor/nest_editor_tabs.rb', line 50 def default_active_tab voo.show?(:content_tab) ? :content : :basics end |
#image_content_tab(snippet) ⇒ Object
30 31 32 |
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_editor/nest_editor_tabs.rb', line 30 def image_content_tab snippet nest(snippet.name, view: :new_image, type: :image, hide: :guide) end |
#image_find_tab(snippet) ⇒ Object
34 35 36 37 38 |
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_editor/nest_editor_tabs.rb', line 34 def image_find_tab snippet wrap true do nest(snippet.name, view: :new_image, type: :image, hide: :guide) end end |
#image_nest_editor_tabs(snippet) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_editor/nest_editor_tabs.rb', line 19 def image_nest_editor_tabs snippet # tab_hash[:content] = nest_content_tab if voo.show? :content_tab tab_hash = { upload: image_content_tab(snippet), select: haml(:_image_find, snippet: snippet), options: haml(:_image_options, snippet: snippet), preview: image_preview_tab(snippet) } class_up "nav", "nav-fill" tabs tab_hash, :content, panel_attr: { class: "nest-options" } end |
#image_preview_tab(snippet) ⇒ Object
40 41 42 43 44 |
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_editor/nest_editor_tabs.rb', line 40 def image_preview_tab snippet wrap true do nest(snippet.name, view: :core, type: :image, hide: :guide) end end |
#nest_content_tab ⇒ Object
54 55 56 57 58 59 |
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_editor/nest_editor_tabs.rb', line 54 def nest_content_tab name_dependent_slot do @nest_content_tab || nest(card.name.field(nest_snippet.name), view: :nest_content, hide: :guide) end end |
#nest_editor_tabs ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_editor/nest_editor_tabs.rb', line 9 def nest_editor_tabs tab_hash = {} # tab_hash[:content] = nest_content_tab if voo.show? :content_tab tab_hash.merge! view: haml(:_basics, snippet: nest_snippet), options: haml(:_options, snippet: nest_snippet), rules: nest_rules_tab tabs tab_hash, default_active_tab, panel_attr: { class: "nest-options" } end |
#nest_rules_tab ⇒ Object
61 62 63 64 65 |
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_editor/nest_editor_tabs.rb', line 61 def nest_rules_tab name_dependent_slot do nest(set_name_for_nest_rules, view: :nest_rules) end end |
#show_content_tab? ⇒ Boolean
46 47 48 |
# File 'platypus/tmp/set/gem-defaults/mod033-tinymce_editor/all/reference_editor/nest_editor/nest_editor_tabs.rb', line 46 def show_content_tab? !card.is_structure? end |