mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 17:26:21 +00:00
10 lines
556 B
Text
10 lines
556 B
Text
- if policy(site).build?
|
|
%div{ 'hx-get': site_button_path(site, class: local_assigns[:class]), 'hx-trigger': 'every 10s', 'hx-swap': 'outerHTML' }
|
|
= form_tag site_enqueue_path(site),
|
|
method: :post,
|
|
class: 'form-inline inline' do
|
|
= submit_tag site.enqueued? ? t('sites.enqueued') : t('sites.enqueue'),
|
|
class: "btn btn-secondary #{local_assigns[:class]}",
|
|
title: site.enqueued? ? t('help.sites.enqueued') : t('help.sites.enqueue'),
|
|
data: { disable_with: t('sites.enqueued') },
|
|
disabled: !site.waiting?
|