Module: Card::Set::All::Board::RelatedSection::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod011-edit/all/board/related_section.rb
Constant Summary collapse
- RELATED_ITEMS =
{ "by name" => [["children", :children]], # FIXME: too slow; optimize: # ["mates", :mates], "by content" => [["links out", :links_to], ["links in", :linked_to_by], ["nests", :nests], ["nested by", :nested_by], ["references out", :refers_to], ["references in", :referred_to_by]] # ["by edit", [["creator", :creator], # ["editors", :editors], # ["last edited", :last_edited]]] }.freeze
Instance Method Summary collapse
Instance Method Details
#related_by_content_items ⇒ Object
35 36 37 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board/related_section.rb', line 35 def RELATED_ITEMS["by content"] end |
#related_by_name_items ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board/related_section.rb', line 26 def pills = [] if card.name.compound? pills += card.name.ancestors.map { |a| [a, a, { mark: :absolute }] } end pills += RELATED_ITEMS["by name"] pills end |
#related_by_type_items ⇒ Object
39 40 41 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board/related_section.rb', line 39 def [["#{card.type} cards", [card.type, :type, :by_name], { mark: :absolute }]] end |