Module: Card::Set::Type::File::HtmlFormat
- Extended by:
- AbstractFormat
- Included in:
- Image::HtmlViews::HtmlFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb
Instance Method Summary collapse
-
#cached_upload_card_name ⇒ Object
-
#file_chooser_action_text ⇒ Object
-
#humanized_attachment_name ⇒ Object
-
#preview ⇒ Object
-
#preview_editor_delete_text ⇒ Object
-
#view: core ⇒ Object
-
#view: input ⇒ Object
-
#view: preview_editor ⇒ Object
Instance Method Details
#cached_upload_card_name ⇒ Object
133 134 135 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 133 def cached_upload_card_name Card::Env.params[:attachment_upload].gsub(/\[\w+\]$/, "[action_id_of_cached_upload]") end |
#file_chooser_action_text ⇒ Object
120 121 122 123 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 120 def file_chooser_action_text action = card.new_card? ? "Add" : "Replace" "#{action} #{}..." end |
#humanized_attachment_name ⇒ Object
125 126 127 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 125 def card..to_s.humanize end |
#preview ⇒ Object
129 130 131 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 129 def preview "" end |
#preview_editor_delete_text ⇒ Object
137 138 139 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 137 def preview_editor_delete_text t :carrierwave_delete end |
#view: core ⇒ Object
102 103 104 105 106 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 102 view :core do handle_source do |source| haml :core, source: source end end |
#view: input ⇒ Object
108 109 110 111 112 113 114 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 108 view :input do if card.no_upload? text_field :content, class: "d0-card-content" else haml :file_chooser, action_text: file_chooser_action_text end end |
#view: preview_editor ⇒ Object
116 117 118 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 116 view :preview_editor, unknown: true, cache: :never do haml :preview_editor end |