Merge branch 'main' into two-cols
* main: Fix setting the workflow on a collection Extract icon_tag helper to reduce repetition Proper spacing If there are no tags, show no tag column for the filter Protect against an account without workflows
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
class Buckets::WorkflowsController < ApplicationController
|
||||
include BucketScoped
|
||||
|
||||
before_action :set_workflow
|
||||
|
||||
def update
|
||||
@bucket.update! workflow: @workflow
|
||||
|
||||
redirect_to bubbles_path(bucket_ids: [ @bucket ])
|
||||
end
|
||||
|
||||
private
|
||||
def set_workflow
|
||||
@workflow = Current.account.workflows.find(params.expect(bucket: [ :workflow_id ]).require(:workflow_id))
|
||||
end
|
||||
end
|
||||
@@ -33,8 +33,7 @@ class BucketsController < ApplicationController
|
||||
end
|
||||
|
||||
def bucket_params
|
||||
params.expect(bucket: [ :name, :all_access, :workflow_id ]).with_defaults(all_access: false)
|
||||
params.require(:bucket).permit(:name, :all_access, :workflow_id)
|
||||
params.expect(bucket: [ :name, :all_access ]).with_defaults(all_access: false)
|
||||
end
|
||||
|
||||
def grantees
|
||||
|
||||
@@ -2,4 +2,8 @@ module ApplicationHelper
|
||||
def page_title_tag
|
||||
tag.title @page_title || "Fizzy"
|
||||
end
|
||||
|
||||
def icon_tag(name, aria: { hidden: true }, size: 24, **options)
|
||||
image_tag "#{name}.svg", aria: aria, size: size, **options
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<form method="dialog" class="margin-block-start flex justify-center">
|
||||
<button class="btn">
|
||||
<%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "remove" %>
|
||||
<span class="for-screen-reader">Close</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<%= button_to account_user_path(user), method: :delete, class: "btn btn--small btn--negative flex-item-no-shrink",
|
||||
disabled: !Current.user.can_remove?(user),
|
||||
data: { turbo_confirm: "Are you sure you want to permanently remove this person from the account?" } do %>
|
||||
<%= image_tag "minus.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "minus" %>
|
||||
<span class="for-screen-reader">Remove <%= user.name %> from the account</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<% content_for :header do %>
|
||||
<nav class="align-start">
|
||||
<%= link_to root_path, class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<span class="for-screen-reader">Go back</span>
|
||||
<% end %>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</header>
|
||||
|
||||
<%= link_to workflows_path, class: "btn flex-item-justify-end" do %>
|
||||
<%= image_tag "bolt.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "bolt" %>
|
||||
<span class="for-screen-reader">Workflows</span>
|
||||
<% end %>
|
||||
</nav>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<span><%= bubble.boosts_count == 1 ? "boost" : "boosts" %></span>
|
||||
</span>
|
||||
<%= tag.button class: "btn", type: :submit, style: "font-size: 0.5em" do %>
|
||||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">Boost</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div class="position-relative" data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside">
|
||||
<button class="btn card__hide-on-index <%= bubble.creating? || bubble.drafted? ? "fill-highlight" : "fill-transparent" %>" data-action="click->dialog#open:stop">
|
||||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">Assign</span>
|
||||
</button>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
}, user.id %>
|
||||
|
||||
<%= form.label "assignee_id[]", user.name, for: dom_id(user, :assign), class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="position-relative" data-controller="dialog" data-action="keydown.esc->dialog#close">
|
||||
<button class="btn" data-action="dialog#open:stop">
|
||||
<%= image_tag "art.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "art" %>
|
||||
<span class="for-screen-reader">Change color</span>
|
||||
</button>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<form method="dialog">
|
||||
<button class="btn txt-small" title="Close (esc)">
|
||||
<%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "remove" %>
|
||||
<span class="for-screen-reader">Close</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<% if bubble.image.attached? %>
|
||||
<%= button_to bucket_bubble_image_path(bubble.bucket, bubble), method: :delete, class: "btn" do %>
|
||||
<%= image_tag "picture-remove.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "picture-remove" %>
|
||||
<span class="for-screen-reader">Clear background image</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= form_with model: bubble, url: bucket_bubble_path(bubble.bucket, bubble), data: { controller: "form" } do |form| %>
|
||||
<label class="btn">
|
||||
<%= image_tag "picture-add.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "picture-add" %>
|
||||
<span class="for-screen-reader">Add background image</span>
|
||||
<%= form.file_field :image, class: "input",
|
||||
accept: "image/png, image/jpeg, image/jpg, image/webp",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<%= form_with url: bucket_bubble_tagging_toggles_path(bubble.bucket, bubble), class: "flex gap-half align-center full-width pad-inline-half margin-block-end" do |form| %>
|
||||
<%= form.text_field :tag_title, placeholder: "New tag name...", class: "input txt-small full-width" %>
|
||||
<%= form.button "Add a tag…", type: "submit", class: "btn txt-small" do %>
|
||||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">Add a tag</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -22,7 +22,7 @@
|
||||
}, tag.id %>
|
||||
|
||||
<%= form.label "tag_id[]", tag.hashtag, for: dom_id(tag, :tag), class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<div class="position-relative" data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside">
|
||||
<button class="tag-picker__button btn card__hide-on-index <%= bubble.creating? || bubble.drafted? ? "fill-highlight" : "fill-transparent" %>" data-action="click->dialog#open:stop">
|
||||
<%= image_tag "tag.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "tag" %>
|
||||
<span class="for-screen-reader">Add a tag</span>
|
||||
</button>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<% content_for :header do %>
|
||||
<nav class="align-start">
|
||||
<%= link_to root_path, class: "btn", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "home.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "home" %>
|
||||
<span class="for-screen-reader">Home</span>
|
||||
<% end %>
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
<% if bucket = @filter.buckets.first %>
|
||||
<%= link_to edit_bucket_path(bucket), class: "btn flex-item-justify-end" do %>
|
||||
<%= image_tag "settings.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "settings" %>
|
||||
<span class="for-screen-reader">Settings for <%= bucket.name %></span>
|
||||
<% end %>
|
||||
|
||||
<%= button_to bucket_bubbles_path(bucket), method: :post, class: "btn" do %>
|
||||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">Create a new bubble</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
@@ -33,22 +33,17 @@
|
||||
</nav>
|
||||
<% end %>
|
||||
|
||||
<div class="cards--columns">
|
||||
<section class="cards position-relative" style="align-items: center; border-inline-end: 1px solid var(--color-subtle);">
|
||||
<h2 class="txt-align-center flex-inline center txt-uppercase txt-medium margin-none-block-start margin-block-end">
|
||||
Considering
|
||||
</h2>
|
||||
<%= render partial: "bubbles/card_mini", collection: @bubbles.where(stage: [@filter.buckets.first&.workflow&.stages&.first, nil]), as: :bubble, cached: true %>
|
||||
</section>
|
||||
<section class="cards gap position-relative" style="align-items: center; view-transition-name: cards-container;" data-controller="bubble-size" data-action="turbo:morph@window->bubble-size#resize">
|
||||
<h2 class="txt-align-center flex-inline center txt-uppercase txt-medium margin-none-block-start margin-block-end">
|
||||
Doing
|
||||
</h2>
|
||||
<% if @bubbles.any? %>
|
||||
<%#= render "display_count_selector", display_count: @display_count, filter: @filter %>
|
||||
<%= render partial: "bubbles/card", collection: @bubbles.where.not(stage: @filter.buckets.first&.workflow&.stages&.first), as: :bubble, cached: true %>
|
||||
<% else %>
|
||||
<p class="txt-medium"><strong>Nothing here.</strong></p>
|
||||
<% end %>
|
||||
</section>
|
||||
</div>
|
||||
<section class="cards gap position-relative" style="view-transition-name: cards-container;" data-controller="bubble-size" data-action="turbo:morph@window->bubble-size#resize">
|
||||
<% if @bubbles.any? %>
|
||||
<%= render "display_count_selector", display_count: @display_count, filter: @filter %>
|
||||
<%= render partial: "bubbles/card", collection: @bubbles.limit(@display_count), as: :bubble, cached: true %>
|
||||
<% else %>
|
||||
<p class="txt-medium"><strong>Nothing here.</strong></p>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
<section class="bubbles-list margin-block-start">
|
||||
<ul class="unpad margin-none flex flex-column txt-align-start">
|
||||
<%= render partial: "bubbles/list/bubble", collection: @bubbles.offset(@display_count), as: :bubble, cached: true %>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<nav class="align-start max-width">
|
||||
<%= link_to root_path, class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "home.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "home" %>
|
||||
<span class="for-screen-reader">Home</span>
|
||||
<% end %>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
method: :delete,
|
||||
class: "btn",
|
||||
data: { turbo_confirm: "Are you sure you want to delete this?" } do %>
|
||||
<%= image_tag "trash.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "trash" %>
|
||||
<span class="for-screen-reader">Delete</span>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -110,4 +110,4 @@
|
||||
<%= link_to "Go back", "#", class: "btn", hidden: true,
|
||||
data: { controller: "back-navigation hotkey",
|
||||
action: "keydown.esc@document->hotkey#click",
|
||||
back_navigation_fallback_destination_value: bubbles_path(bucket_id: @bubble.bucket) } %>
|
||||
back_navigation_fallback_destination_value: bubbles_path(bucket_id: @bubble.bucket) } %>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<% end %>
|
||||
|
||||
<%= link_to edit_bucket_path(bucket), class: "btn txt-small bucket__button" do %>
|
||||
<%= image_tag "settings.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "settings" %>
|
||||
<span class="for-screen-reader">Settings for <%= bucket.name %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<% 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 %>
|
||||
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= 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 %>
|
||||
<%= image_tag "minus.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "minus" %>
|
||||
<span class="for-screen-reader">Delete <%= @bucket.name %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -68,7 +68,7 @@
|
||||
</section>
|
||||
|
||||
<button type="submit" id="log_in" class="btn btn--reversed center txt-medium">
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "check" %>
|
||||
<span class="for-screen-reader">Save</span>
|
||||
</button>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<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, local: true, data: { controller: "form" } do |form| %>
|
||||
<%= 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>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<% content_for :header do %>
|
||||
<nav>
|
||||
<%= link_to root_path, class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<span class="for-screen-reader">Go back</span>
|
||||
<% end %>
|
||||
</nav>
|
||||
@@ -17,7 +17,7 @@
|
||||
</label>
|
||||
|
||||
<button type="submit" id="log_in" class="btn btn--reversed center">
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "check" %>
|
||||
<span class="for-screen-reader">Save</span>
|
||||
</button>
|
||||
<%= link_to "Cancel and go back", root_path, data: { form_target: "cancel", turbo_frame: "_top" }, hidden: true %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<%= tag.button type: :submit, class: "btn btn--negative flex-item-justify-end", form: dom_id(@comment, :delete_form),
|
||||
data: { turbo_confirm: "Are you sure you want to delete this comment?" } do %>
|
||||
<%= image_tag "trash.svg", aria: { hidden: true }, size: 16 %>
|
||||
<%= icon_tag "trash", size: 16 %>
|
||||
<span class="for-screen-reader">Delete</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
}, bucket.id %>
|
||||
|
||||
<%= form.label "bucket_ids[]", bucket.name, for: dom_id(bucket, :filter), class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
|
||||
<%= link_to account_users_path, class: "btn flex-item-justify-end" do %>
|
||||
<%= image_tag "settings.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "settings" %>
|
||||
<span class="for-screen-reader">Account settings</span>
|
||||
<% end %>
|
||||
</nav>
|
||||
@@ -38,7 +38,7 @@
|
||||
<div class="flex align-start gap min-width" >
|
||||
<h2 class="txt-normal txt-uppercase overflow-ellipsis">Collections</h2>
|
||||
<%= link_to new_bucket_path, class: "btn txt-xx-small flex-item-justify-end flex-item-no-shrink", style: "view-transition-name: new-bucket" do %>
|
||||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">New</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
}, "unassigned" %>
|
||||
|
||||
<%= form.label :assignment_status, "No one", class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
|
||||
<% Current.account.users.active.order(:name).each do |user| %>
|
||||
@@ -44,10 +44,10 @@
|
||||
}, user.id %>
|
||||
|
||||
<%= form.label "assignee_ids[]", user.name, for: dom_id(user, :filter), class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</dialog>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
}, bucket.id %>
|
||||
|
||||
<%= form.label "bucket_ids[]", bucket.name, for: dom_id(bucket, :filter), class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
}, Current.user.id %>
|
||||
|
||||
<%= form.label :creator_ids, "Me", for: form.field_id(:creator_ids, Current.user.id), class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
|
||||
<% Current.account.users.active.without(Current.user).order(:name).each do |user| %>
|
||||
@@ -47,7 +47,7 @@
|
||||
}, user.id %>
|
||||
|
||||
<%= form.label :creator_ids, user.name, for: form.field_id(:creator_ids, user.id), class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<span class="btn btn--placeholder txt-small" aria-hidden="true"></span>
|
||||
|
||||
<h2 class="txt-large flex align-center gap-half margin-none">
|
||||
<%= image_tag "filter.svg", aria: { hidden: true }, size: 30 %>
|
||||
<%= icon_tag "filter", size: 30 %>
|
||||
<span>Filter</span>
|
||||
</h2>
|
||||
|
||||
<form method="dialog">
|
||||
<button class="btn panel__close txt-small" title="Close (esc)">
|
||||
<%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "remove" %>
|
||||
<span class="for-screen-reader">Close</span>
|
||||
</button>
|
||||
</form>
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<button class="btn">
|
||||
<span class="for-screen-reader">Apply</span>
|
||||
<%= image_tag "arrow-right.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-right" %>
|
||||
</button>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -45,12 +45,13 @@
|
||||
<span>All Collections</span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<% Current.user.buckets.order(:name).each do |bucket| %>
|
||||
<li>
|
||||
<%= label_tag "bucket_ids_#{bucket.id}", class: "btn filter__button" do %>
|
||||
<%= check_box_tag "bucket_ids[]", bucket.id, filter.buckets.include?(bucket), id: "bucket_ids_#{bucket.id}", hidden: true %>
|
||||
<span><%= bucket.name %></span>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "close" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
@@ -62,7 +63,7 @@
|
||||
<%= label_tag "indexed_by_#{filter.default_indexed_by}", class: "btn filter__button" do %>
|
||||
<%= radio_button_tag "indexed_by", filter.default_indexed_by, filter.default_indexed_by?, hidden: true %>
|
||||
<span>Most active</span>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "close" %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
@@ -71,68 +72,74 @@
|
||||
<label class="btn filter__button">
|
||||
<%= radio_button_tag "indexed_by", index, filter.indexed_by == index, class: "visually-hidden" %>
|
||||
<span><%= index.humanize %></span>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "close" %>
|
||||
</label>
|
||||
</li>
|
||||
<% end %>
|
||||
</menu>
|
||||
|
||||
<menu class="filter__menu">
|
||||
<li class="filter__label"><strong>In Stage</strong></li>
|
||||
<% workflow = Current.account.workflows.first %>
|
||||
<% workflow.stages.each do |stage| %>
|
||||
<li>
|
||||
<%= label_tag "stage_ids_#{stage.id}", class: "btn filter__button" do %>
|
||||
<%= check_box_tag "stage_ids[]", stage.id, filter.stages.include?(stage), id: "stage_ids_#{stage.id}", hidden: true %>
|
||||
<span><%= stage.name %></span>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</menu>
|
||||
<% if workflow = Current.account.workflows.first %>
|
||||
<menu class="filter__menu">
|
||||
<li class="filter__label"><strong>In Stage</strong></li>
|
||||
<% workflow.stages.each do |stage| %>
|
||||
<li>
|
||||
<%= label_tag "stage_ids_#{stage.id}", class: "btn filter__button" do %>
|
||||
<%= check_box_tag "stage_ids[]", stage.id, filter.stages.include?(stage), id: "stage_ids_#{stage.id}", hidden: true %>
|
||||
<span><%= stage.name %></span>
|
||||
<%= icon_tag "close" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</menu>
|
||||
<% end %>
|
||||
|
||||
<div class="filter__menu" role="group" aria-label="Tagged">
|
||||
<div class="filter__label"><strong>Tagged</strong></div>
|
||||
<% Current.account.tags.order(:title).each do |tag| %>
|
||||
<div>
|
||||
<label class="btn filter__button">
|
||||
<%= check_box_tag "tag_ids[]", tag.id, filter.tags.include?(tag), class: "visually-hidden" %>
|
||||
<span><%= tag.hashtag %></span>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
</label>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if (tags = Current.account.tags.order(:title)).any? %>
|
||||
<div class="filter__menu" role="group" aria-label="Tagged">
|
||||
<div class="filter__label"><strong>Tagged</strong></div>
|
||||
|
||||
<% tags.each do |tag| %>
|
||||
<div>
|
||||
<label class="btn filter__button">
|
||||
<%= check_box_tag "tag_ids[]", tag.id, filter.tags.include?(tag), class: "visually-hidden" %>
|
||||
<span><%= tag.hashtag %></span>
|
||||
<%= icon_tag "close" %>
|
||||
</label>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="filter__menu" role="group" aria-label="Assigned to…">
|
||||
<div class="filter__label"><strong>Assigned to…</strong></div>
|
||||
|
||||
<div>
|
||||
<label class="btn filter__button">
|
||||
<%= check_box_tag "assignment_status", "unassigned", filter.assignment_status.unassigned?,
|
||||
class: "visually-hidden",
|
||||
data: {
|
||||
class: "visually-hidden", data: {
|
||||
action: "filter-form#clearCategory",
|
||||
filter_form_name_param: "assignee_ids[],assigner_ids[]" } %>
|
||||
<span>No one</span>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "close" %>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="btn filter__button">
|
||||
<%= check_box_tag "assignee_ids[]", Current.user.id, filter.assignees.include?(Current.user),
|
||||
class: "visually-hidden",
|
||||
data: { action: "filter-form#clearCategory", filter_form_name_param: "assignment_status" } %>
|
||||
<span>Me</span>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "close" %>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<% Current.account.users.active.without(Current.user).order(:name).each do |user| %>
|
||||
<div>
|
||||
<label class="btn filter__button">
|
||||
<%= check_box_tag "assignee_ids[]", user.id, filter.assignees.include?(user), class: "visually-hidden",
|
||||
data: { action: "filter-form#clearCategory", filter_form_name_param: "assignment_status" } %>
|
||||
<span><%= user.name %></span>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "close" %>
|
||||
</label>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -140,20 +147,22 @@
|
||||
|
||||
<div class="filter__menu" role="group" aria-label="Added by…">
|
||||
<div class="filter__label"><strong>Added by…</strong></div>
|
||||
|
||||
<div>
|
||||
<label class="btn filter__button">
|
||||
<%= check_box_tag "creator_ids[]", Current.user.id, filter.creators.include?(Current.user),
|
||||
class: "visually-hidden" %>
|
||||
<span>Me</span>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "close" %>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<% Current.account.users.active.without(Current.user).order(:name).each do |user| %>
|
||||
<div>
|
||||
<label class="btn filter__button">
|
||||
<%= check_box_tag "creator_ids[]", user.id, filter.creators.include?(user), class: "visually-hidden" %>
|
||||
<span><%= user.name %></span>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "close" %>
|
||||
</label>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -164,13 +173,13 @@
|
||||
|
||||
<div class="flex align-center txt-align-center justify-space-between gap-half margin-block-start">
|
||||
<%= tag.button class: "btn", form: :filter_form, formaction: filters_path, formmethod: :post do %>
|
||||
<%= image_tag "bubbles.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "bubbles" %>
|
||||
<span>Save collection</span>
|
||||
<% end %>
|
||||
|
||||
<button class="btn btn--reversed" form="filter_form">
|
||||
<span>Apply</span>
|
||||
<%= image_tag "arrow-right.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-right" %>
|
||||
</button>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
<div class="flex align-center justify-center flex-column flex-wrap center gap-half position-relative full-width">
|
||||
<%= link_to bubbles_path(**filter.as_params), class: "txt-ink" do %>
|
||||
<strong class="txt-medium"><%= image_tag "filter.svg", aria: { hidden: true }, size: 24, class: "flex-inline", style: "vertical-align: bottom" %> <%= filter.summary %></strong>
|
||||
<strong class="txt-medium"><%= icon_tag "filter", class: "flex-inline", style: "vertical-align: bottom" %> <%= filter.summary %></strong>
|
||||
<% end %>
|
||||
<%= button_to filter_path(filter), method: :delete, class: "btn txt-small btn--negative bucket__button", data: { turbo_confirm: "Are you sure you want to delete this filter?" } do %>
|
||||
<%= image_tag "minus.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "minus" %>
|
||||
<span class="for-screen-reader">Delete</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
data: { action: "change->form#submit" } %>
|
||||
|
||||
<%= form.label :indexed_by, "Most active", value: filter.default_indexed_by, class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
|
||||
<% Filter::INDEXES.each do |index| %>
|
||||
@@ -32,7 +32,7 @@
|
||||
data: { action: "change->form#submit" } %>
|
||||
|
||||
<%= form.label :indexed_by, index.humanize, value: index, class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="filters flex-inline align-center gap-half margin-block-end margin-block-start-half">
|
||||
<button class="btn btn--plain txt-small" data-action="click->dialog#toggle">
|
||||
<%= image_tag "filter.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "filter" %>
|
||||
<span class="for-screen-reader">Filter</span>
|
||||
</button>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<% if any_filters?(filter) %>
|
||||
<%= link_to bubbles_path, class: "btn btn--remove txt-small" do %>
|
||||
<%= image_tag "close.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "close" %>
|
||||
<span class="for-screen-reader">Clear all</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
}, stage.id %>
|
||||
|
||||
<%= form.label :stage_ids, stage.name, for: form.field_id(:stage_ids, stage.id), class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
}, tag.id %>
|
||||
|
||||
<%= form.label "tag_ids[]", tag.hashtag, for: dom_id(tag, :filter), class: "overflow-ellipsis" %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</dialog>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" id="log_in" class="btn btn--reversed center">
|
||||
<%= image_tag "arrow-right.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-right" %>
|
||||
<span class="for-screen-reader">Create your account</span>
|
||||
</button>
|
||||
<% end %>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<%= button_to notifications_mark_all_read_path,
|
||||
class: "notification-tray__read_action btn btn--reversed fill-transparent borderless flex-item-justify-start shadow txt-xx-small",
|
||||
data: { action: "click->dialog#close", turbo_frame: "notifications" } do %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "check" %>
|
||||
<span class="for-screen-reader">Mark all read</span>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<% content_for :header do %>
|
||||
<nav class="align-start">
|
||||
<%= link_to root_path, class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "home.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "home" %>
|
||||
<span class="for-screen-reader">Home</span>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<% content_for :header do %>
|
||||
<nav class="align-start">
|
||||
<%= link_to notifications_path, class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<span class="for-screen-reader">Go back</span>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
|
||||
<button type="submit" id="log_in" class="btn btn--reversed center">
|
||||
<%= image_tag "arrow-right.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-right" %>
|
||||
<span class="for-screen-reader">Sign in</span>
|
||||
</button>
|
||||
<% end %>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</span>
|
||||
|
||||
<%= button_to tag_path(tag), class: "btn txt-small", method: :delete, data: { turbo_confirm: "Are you sure?" } do %>
|
||||
<%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "remove" %>
|
||||
<span class="for-screen-reader">Delete</span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
<form method="dialog" class="margin-block-start flex justify-center">
|
||||
<button class="btn">
|
||||
<%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "remove" %>
|
||||
<span class="for-screen-reader">Close</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<% content_for :header do %>
|
||||
<nav>
|
||||
<%= link_to user_path(@user), class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<span class="for-screen-reader">Back</span>
|
||||
<% end %>
|
||||
</nav>
|
||||
@@ -53,7 +53,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" id="log_in" class="btn btn--reversed center">
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "check" %>
|
||||
<span class="for-screen-reader">Sign in</span>
|
||||
</button>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" id="log_in" class="btn btn--reversed center">
|
||||
<%= image_tag "arrow-right.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-right" %>
|
||||
<span class="for-screen-reader">Sign in</span>
|
||||
</button>
|
||||
<% end %>
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<% content_for :header do %>
|
||||
<nav>
|
||||
<%= link_to "javascript:window.history.back()", class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<span class="for-screen-reader">Back</span>
|
||||
<% end %>
|
||||
|
||||
<% if Current.user == @user %>
|
||||
<%= link_to edit_user_path(@user), class: "btn flex-item-justify-end", data: { turbo_frame: dom_id(@user) } do %>
|
||||
<%= image_tag "pencil.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "pencil" %>
|
||||
<span class="for-screen-reader">Edit</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<div class="panel shadow center margin-block-double">
|
||||
<%= button_to session_path, method: :delete, class: "btn center txt-medium" do %>
|
||||
<%= image_tag "logout.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "logout" %>
|
||||
<span class="for-screen-reader">Sign out</span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<%= render partial: "workflows/stages/stage", collection: workflow.stages %>
|
||||
|
||||
<%= link_to new_workflow_stage_path(workflow), class: "btn btn--small" do %>
|
||||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">New stage</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -8,17 +8,17 @@
|
||||
<% end %>
|
||||
|
||||
<%= tag.button type: :submit, class: "btn btn--small btn--positive", form: dom_id(@workflow, :form) do %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "check" %>
|
||||
<span class="for-screen-reader">Save</span>
|
||||
<% end %>
|
||||
|
||||
<%= link_to workflow_path(@workflow), class: "btn btn--small", data: { turbo_frame: dom_id(@workflow) } do %>
|
||||
<%= image_tag "remove-med.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "remove-med" %>
|
||||
<span class="for-screen-reader">Cancel</span>
|
||||
<% end %>
|
||||
|
||||
<%= button_to workflow_path(@workflow), method: :delete, class: "btn btn--small btn--negative", data: { turbo_frame: :workflows, turbo_confirm: "Are you sure you want to delete this workflow?" } do %>
|
||||
<%= image_tag "minus.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "minus" %>
|
||||
<span class="for-screen-reader">Delete <%= @workflow.name %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<% content_for :header do %>
|
||||
<nav>
|
||||
<%= link_to account_users_path, class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<span class="for-screen-reader">Go back</span>
|
||||
<% end %>
|
||||
<span class="btn btn--placeholder"></span>
|
||||
@@ -11,7 +11,7 @@
|
||||
<h1 class="txt-large"><%= @page_title %></h1>
|
||||
|
||||
<%= link_to new_workflow_path, class: "btn flex-item-justify-end" do %>
|
||||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">Create a new workflow</span>
|
||||
<% end %>
|
||||
</nav>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<% content_for :header do %>
|
||||
<nav>
|
||||
<%= link_to workflows_path, class: "btn flex-item-justify-start", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "arrow-left" %>
|
||||
<span class="for-screen-reader">Go back</span>
|
||||
<% end %>
|
||||
<h1 class="txt-large center"><%= @page_title %></h1>
|
||||
@@ -16,7 +16,7 @@
|
||||
<%= form_with model: @workflow, url: workflows_path, data: { controller: "form" } do |form| %>
|
||||
<%= form.text_field :name, required: true, autofocus: true, class: "input txt-large", placeholder: "Name your Workflow…", data: { action: "keydown.esc@document->form#cancel" } %>
|
||||
<%= form.button type: :submit, class: "btn btn--reversed center margin-block-start txt-large" do %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "check" %>
|
||||
<span class="for-screen-reader">Create Workflow</span>
|
||||
<% end %>
|
||||
<%= link_to "Go back", workflows_path, data: { form_target: "cancel", turbo_frame: "_top" }, hidden: true %>
|
||||
|
||||
@@ -6,19 +6,19 @@
|
||||
|
||||
<div class="flex align-center gap-half">
|
||||
<%= tag.button type: :submit, class: "btn btn--small btn--positive", form: dom_id(@stage, :form) do %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "check" %>
|
||||
<span class="for-screen-reader">Save</span>
|
||||
<% end %>
|
||||
|
||||
<%= link_to workflow_path(@workflow), class: "btn btn--small", data: { turbo_frame: dom_id(@workflow) } do %>
|
||||
<%= image_tag "remove-med.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "remove-med" %>
|
||||
<span class="for-screen-reader">Cancel</span>
|
||||
<% end %>
|
||||
|
||||
<% if @stage.workflow.stages.many? %>
|
||||
<%= button_to workflow_stage_path(@stage.workflow, @stage), method: :delete, class: "btn btn--negative btn--small",
|
||||
data: { turbo_frame: dom_id(@workflow), turbo_confirm: "Are you sure you want to delete this stage?" } do %>
|
||||
<%= image_tag "minus.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "minus" %>
|
||||
<span class="for-screen-reader">Delete <%= @stage.name %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<%= form_with model: @stage, url: workflow_stages_path(@stage.workflow), class: "flex align-center gap-half", data: { controller: "form" } do |form| %>
|
||||
<%= form.text_field :name, required: true, autofocus: true, class: "input", data: { action: "keydown.esc@document->form#cancel" } %>
|
||||
<%= form.button type: :submit, class: "btn btn--positive txt-small" do %>
|
||||
<%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "check" %>
|
||||
<span class="for-screen-reader">Add stage</span>
|
||||
<% end %>
|
||||
<%= link_to workflow_path(@workflow), class: "btn btn--small", data: { form_target: "cancel", controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<%= image_tag "remove-med.svg", aria: { hidden: true }, size: 24 %>
|
||||
<%= icon_tag "remove-med" %>
|
||||
<span class="for-screen-reader">Cancel</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -35,6 +35,7 @@ Rails.application.routes.draw do
|
||||
resources :buckets do
|
||||
scope module: :buckets do
|
||||
resource :subscriptions
|
||||
resource :workflow, only: :update
|
||||
end
|
||||
|
||||
resources :bubbles do
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
require "test_helper"
|
||||
|
||||
class Buckets::WorkflowsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in_as :kevin
|
||||
end
|
||||
|
||||
test "update" do
|
||||
bucket = buckets(:writebook)
|
||||
|
||||
patch bucket_workflow_url(bucket), params: { bucket: { workflow_id: workflows(:on_call).id } }
|
||||
|
||||
assert_redirected_to bubbles_path(bucket_ids: [ bucket.id ])
|
||||
assert_equal workflows(:on_call), bucket.reload.workflow
|
||||
end
|
||||
end
|
||||
Vendored
+16
@@ -13,3 +13,19 @@ qa_on_hold:
|
||||
qa_review:
|
||||
name: Review
|
||||
workflow: qa
|
||||
|
||||
on_call_inbox:
|
||||
name: Inbox
|
||||
workflow: on_call
|
||||
|
||||
on_call_in_progress:
|
||||
name: In progress
|
||||
workflow: on_call
|
||||
|
||||
on_call_on_hold:
|
||||
name: Waiting on customers
|
||||
workflow: on_call
|
||||
|
||||
on_call_review:
|
||||
name: Pending deploy
|
||||
workflow: on_call
|
||||
|
||||
Vendored
+4
@@ -1,3 +1,7 @@
|
||||
qa:
|
||||
account: 37s
|
||||
name: QA
|
||||
|
||||
on_call:
|
||||
account: 37s
|
||||
name: "On call"
|
||||
|
||||
Reference in New Issue
Block a user