l4d.tools/app/views/overlays/index.html.slim
2026-01-18 18:16:01 +01:00

24 lines
779 B
Text

.overlays
h2 Overlays
= link_to "New Overlay", new_overlay_path, class: "btn btn--primary"
- all_overlays = (@system_overlays + @custom_overlays).sort_by(&:name)
- if all_overlays.any?
table
thead
tr
th Name
th Dir (slug)
th Type
th Actions
tbody
- all_overlays.each do |overlay|
tr
td = overlay.name
td = overlay.slug
td = overlay.overlay_type.humanize
td
- if overlay.overlay_type == "custom" && overlay.user_id == current_user.id
= link_to "Delete", overlay_path(overlay), method: :delete, data: { confirm: "Delete this overlay?" }, class: "btn btn--small btn--danger"
- else
p No overlays available.