87 lines
4.1 KiB
Plaintext
87 lines
4.1 KiB
Plaintext
<% @page_title = "Edit #{@bucket.name}" %>
|
|
|
|
<% content_for :header do %>
|
|
<nav>
|
|
<%= link_to bubbles_path(bucket_ids: [ @bbucket ]), class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
|
<%= icon_tag "arrow-left" %>
|
|
<span class="for-screen-reader">Go back</span>
|
|
<% end %>
|
|
|
|
<%= form_with model: @bucket, class: "flex-item-justify-end", method: :delete do |form| %>
|
|
<%= form.button class: "btn btn--negative", data: { turbo_confirm: "Are you sure you want to delete this?" } do %>
|
|
<%= icon_tag "minus" %>
|
|
<span class="for-screen-reader">Delete <%= @bucket.name %></span>
|
|
<% end %>
|
|
<% end %>
|
|
</nav>
|
|
<% end %>
|
|
|
|
<div class="panel shadow center" style="--panel-size: 55ch;">
|
|
<%= form_with model: @bucket, class: "flex flex-column gap txt-large", data: { controller: "form" } do |form| %>
|
|
<div class="flex align-center gap">
|
|
<%= translation_button(:bucket_name) %>
|
|
|
|
<label class="flex-item-grow txt-large">
|
|
<strong><%= form.text_field :name, name: "bucket[name]", class: "input full-width",
|
|
required: true, autofocus: true, placeholder: "Give it a name…",
|
|
data: { action: "keydown.enter->form#submit:prevent, keydown.esc->form#cancel" } %></strong>
|
|
</label>
|
|
</div>
|
|
|
|
<section class="margin-block pad-inline fill-shade border-radius">
|
|
<%= access_menu_tag @bucket do %>
|
|
<li class="flex align-center gap margin-none">
|
|
<figure class="avatar flex-item-no-shrink" style="--avatar-border-radius: 0; --avatar-size: 4ch;">
|
|
<%= icon_tag "everyone" %>
|
|
<span class="for-screen-reader">Everyone</span>
|
|
</figure>
|
|
|
|
<div class="min-width">
|
|
<div class="overflow-ellipsis fill-shade"><strong>Everyone</strong></div>
|
|
</div>
|
|
|
|
<hr class="separator--horizontal flex-item-grow" style="--border-color: var(--color-subtle-dark); --border-style: dashed" aria-hidden="true" />
|
|
|
|
<label for="bucket_all_access" class="switch">
|
|
<%= form.check_box :all_access, class: "switch__input", checked: @bucket.all_access?, data: { action: "change->toggle-class#toggle" } %>
|
|
<span class="switch__btn round"></span>
|
|
<span class="for-screen-reader">Give everyone access to this project</span>
|
|
</label>
|
|
</li>
|
|
|
|
<hr class="separator--horizontal full-width" style="--border-color: var(--color-subtle-dark);" aria-hidden="true" />
|
|
|
|
<% if User.active.count > 20 %>
|
|
<input placeholder="Filter…" class="input input--transparent full-width" type="search" autocorrect="off" autocomplete="off" data-1p-ignore="true" data-action="input->filter#filter">
|
|
<% end %>
|
|
|
|
<div data-filter-target="list">
|
|
<%= access_toggles_for @selected_users, selected: true %>
|
|
|
|
<% if @selected_users.any? && @unselected_users.any? %>
|
|
<hr class="separator full-width" style="--border-style: solid">
|
|
<% end %>
|
|
|
|
<%= access_toggles_for @unselected_users, selected: false %>
|
|
</div>
|
|
<% end %>
|
|
</section>
|
|
|
|
<button type="submit" id="log_in" class="btn btn--reversed center txt-medium">
|
|
<%= icon_tag "check" %>
|
|
<span class="for-screen-reader">Save</span>
|
|
</button>
|
|
|
|
<%= link_to "Cancel and go back", bubbles_path(bucket_ids: [ @bucket ]), data: { form_target: "cancel", turbo_frame: "_top" }, hidden: true %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="panel shadow center flex flex-column gap-half margin-block-double" style="--panel-size: 55ch;">
|
|
<strong class="txt-large">Choose a workflow</strong>
|
|
<p class="margin-none">Use a workflow to track progress in this collection.</p>
|
|
<%= form_with model: @bucket, url: bucket_workflow_path(@bucket), local: true, method: :patch, data: { controller: "form" } do |form| %>
|
|
<%= form.select :workflow_id, Current.account.workflows.map { |w| [w.name, w.id] }, { include_blank: "Choose…" }, class: "input input--select full-width", data: { action: "change->form#submit" } %>
|
|
<% end %>
|
|
<p><%= link_to "Manage workflows", workflows_path, class: "btn btn--plain txt-link" %></p>
|
|
</div>
|