Sha256: 5fcb6c272c53d70ccb4121e17cc9f4a8ff1194321833a41e954ac3dabe6f6193
Contents?: true
Size: 1011 Bytes
Versions: 12
Compression:
Stored size: 1011 Bytes
Contents
format :html do view :box do class_up "box-middle", "p-0" voo.hide :customize_button, :box_middle super() end view :box_bottom, template: :haml view :customize_button, cache: :never do customize_button end def customize_button target: parent&.card, text: "Apply and customize" return "" unless card.codename.present? theme = card.codename.match(/^(?<theme_name>.+)_skin$/).capture(:theme_name) link_to_card target, text, path: { action: :update, card: { content: "[[#{card.name}]]" }, customize: true, theme: theme }, class: "btn btn-sm btn-outline-primary mr-2" end view :box_middle do return unless card.field(:image) field_nest(:image, view: :full_width, size: :large) end def select_button target=parent.card link_to_card target, "Apply", path: { action: :update, card: { content: "[[#{card.name}]]" } }, class: "btn btn-sm btn-primary" end end
Version data entries
12 entries across 12 versions & 1 rubygems