Module: Card::Set::All::Title::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod004-format/all/title.rb
Instance Method Summary collapse
-
#safe_name ⇒ Object
-
#title_in_context(title = nil) ⇒ Object
-
#title_with_link(link_text) ⇒ Object
-
#view: title ⇒ Object
-
#view: title_link ⇒ Object
-
#view: title_no_link ⇒ Object
-
#wrapped_joint ⇒ Object
-
#wrapped_title(title) ⇒ Object
Instance Method Details
#safe_name ⇒ Object
35 36 37 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/title.rb', line 35 def safe_name h super end |
#title_in_context(title = nil) ⇒ Object
39 40 41 42 43 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/title.rb', line 39 def title_in_context title=nil title = title&.html_safe # escape titles generated from card names, but not those set explicitly h super(title) end |
#title_with_link(link_text) ⇒ Object
31 32 33 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/title.rb', line 31 def title_with_link link_text link_to_card card.name, link_text end |
#view: title ⇒ Object
19 20 21 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/title.rb', line 19 view :title do show_view?(:title_link, :hide) ? render_title_link : render_title_no_link end |
#view: title_link ⇒ Object
23 24 25 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/title.rb', line 23 view :title_link, compact: true, perms: :none do link_to_card card.name, render_title_no_link end |
#view: title_no_link ⇒ Object
27 28 29 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/title.rb', line 27 view :title_no_link, compact: true, perms: :none do wrapped_title standard_title end |
#wrapped_joint ⇒ Object
51 52 53 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/title.rb', line 51 def wrapped_joint wrap_with :span, "+", classy("joint") end |
#wrapped_title(title) ⇒ Object
45 46 47 48 49 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/title.rb', line 45 def wrapped_title title wrap_with :span, class: classy("card-title"), title: title do title.to_name.parts.join wrapped_joint end end |