Module: Card::Set::Type::File::HtmlFormat

Extended by:
AbstractFormat
Included in:
Image::HtmlFormat
Defined in:
tmpsets/set/mod019-carrierwave/type/file.rb

Instance Method Summary collapse

Instance Method Details

#cached_upload_card_nameObject



110
111
112
# File 'tmpsets/set/mod019-carrierwave/type/file.rb', line 110

def cached_upload_card_name
  Card::Env.params[:attachment_upload].gsub(/\[\w+\]$/, "[action_id_of_cached_upload]")
end

#file_chooser_action_textObject



90
91
92
93
# File 'tmpsets/set/mod019-carrierwave/type/file.rb', line 90

def file_chooser_action_text
  action = card.new_card? ? "Add" : "Replace"
  "#{action} #{humanized_attachment_name}..."
end

#humanized_attachment_nameObject



102
103
104
# File 'tmpsets/set/mod019-carrierwave/type/file.rb', line 102

def humanized_attachment_name
  card.attachment_name.to_s.humanize
end

#previewObject



106
107
108
# File 'tmpsets/set/mod019-carrierwave/type/file.rb', line 106

def preview
  ""
end

#preview_editor_delete_textObject



114
115
116
# File 'tmpsets/set/mod019-carrierwave/type/file.rb', line 114

def preview_editor_delete_text
  tr :delete
end