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
150 151 152 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 150 def cached_upload_card_name Card::Env.params[:attachment_upload].gsub(/\[\w+\]$/, "[action_id_of_cached_upload]") end |
#file_chooser_action_text ⇒ Object
137 138 139 140 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 137 def file_chooser_action_text action = card.new_card? ? "Add" : "Replace" "#{action} #{}..." end |
#humanized_attachment_name ⇒ Object
142 143 144 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 142 def card..to_s.humanize end |
#preview ⇒ Object
146 147 148 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 146 def preview "" end |
#preview_editor_delete_text ⇒ Object
154 155 156 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 154 def preview_editor_delete_text t :carrierwave_delete end |
#view: core ⇒ Object
119 120 121 122 123 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 119 view :core do handle_source do |source| haml :core, source: source end end |
#view: input ⇒ Object
125 126 127 128 129 130 131 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 125 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
133 134 135 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 133 view :preview_editor, unknown: true, cache: :never do haml :preview_editor end |