Module: Card::Set::Abstract::CodeFile::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
card/tmpsets/set/mod007-card-mod-content/abstract/code_file.rb,
card/tmpsets/set/mod006-card-mod-content/abstract/code_file.rb

Instance Method Summary collapse

Instance Method Details

#short_contentObject



91
92
93
94
# File 'card/tmpsets/set/mod007-card-mod-content/abstract/code_file.rb', line 91

def short_content
  fa_icon("exclamation-circle", class: "text-muted pr-2") +
    wrap_with(:span, "file", class: "text-muted")
end

#standard_submit_buttonObject



96
97
98
# File 'card/tmpsets/set/mod007-card-mod-content/abstract/code_file.rb', line 96

def standard_submit_button
  multi_card_editor? ? super : ""
end

#view: file_sizeObject



87
88
89
# File 'card/tmpsets/set/mod007-card-mod-content/abstract/code_file.rb', line 87

view :file_size do
  "#{card.name}: #{number_to_human_size card.content.bytesize}"
end

#view: inputObject



83
84
85
# File 'card/tmpsets/set/mod007-card-mod-content/abstract/code_file.rb', line 83

view :input do
  "Content is stored in file and can't be edited."
end