12
13
14
15
16
17
18
19
20
21
22
|
# File 'app/helpers/stay/admin/stores_helper.rb', line 12
def store_switcher_link(store)
if current_store.id == store.id
classes = 'disabled bg-light'
icon = svg_icon name: 'circle-fill.svg', width: '18', height: '18'
else
classes = nil
icon = svg_icon name: 'circle.svg', width: '18', height: '18'
end
url = store.default? ? '#' : set_default_admin_store_path(store)
button_to icon + store.unique_name, url, method: :put, class: "#{classes} py-3 px-4 dropdown-item rounded", id: store.code, form: { data: { turbo: false } }
end
|