alembic 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/alembic/flows/complete.html.erb +2 -2
- data/app/views/alembic/flows/step.html.erb +4 -0
- data/lib/alembic/version.rb +1 -1
- data/lib/alembic.rb +13 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae4f6fdd30b863971ed64168da8b19b238930a9d6983978e8fd80f5bad0ff206
|
|
4
|
+
data.tar.gz: 54d74ca4152be0bee97e02a639b11c240f76bd595523d1a21577b43e062caee0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b507037a195cb807bccae95dbcfbb982a4325e535631fa4e53ba8f21316dca572904e9d2b92fc71b501407819ab1a4dc137718323730829911046af406363fe
|
|
7
|
+
data.tar.gz: 0cfdcb1374201572a0fadbd1a9671f2dca43cbedddb8c8e480fa845d415399412883faf53f854bbbc9756b2173766e52f84392ecdf5e85ffed6a7f14c77c86dd
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<% starting_over = start_over_path %>
|
|
4
4
|
|
|
5
5
|
<%= ui_page(max_width: :md) do %>
|
|
6
|
-
<%= ui_page_header(title:
|
|
6
|
+
<%= ui_page_header(title: Alembic.finish_title, subtitle: Alembic.finish_subtitle) do |header| %>
|
|
7
7
|
<% if starting_over %>
|
|
8
8
|
<% header.action do %>
|
|
9
9
|
<%= ui_button(label: "Start over", href: starting_over, variant: :secondary) %>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
<% end %>
|
|
36
36
|
<% end %>
|
|
37
37
|
|
|
38
|
-
<%= ui_section(title: @outputs.any? ?
|
|
38
|
+
<%= ui_section(title: @outputs.any? ? Alembic.finish_answers_heading : nil) do %>
|
|
39
39
|
<ul class="divide-y divide-(color:--ks-color-divider) border-y border-(color:--ks-color-divider) dark:divide-(color:--ks-color-divider-dark) dark:border-(color:--ks-color-divider-dark)">
|
|
40
40
|
<% @answered.each do |step, value| %>
|
|
41
41
|
<li data-answer="<%= step %>" class="flex items-baseline justify-between gap-6 py-3">
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
<%= render @drawing, step: shown(@question), chosen: chosen_answer(@question) %>
|
|
33
33
|
<% end %>
|
|
34
34
|
|
|
35
|
+
<% if (right_answer = chosen_answer(@question)).present? %>
|
|
36
|
+
<%= ui_value_list(rows: [ { label: ui_badge(label: "Right answer", variant: :success), value: @guide.choice_label(@question.id, right_answer) } ]) %>
|
|
37
|
+
<% end %>
|
|
38
|
+
|
|
35
39
|
<div class="mt-8 flex items-center gap-4">
|
|
36
40
|
<%= ui_button(label: "Next", type: :submit) unless single_choice?(@question) %>
|
|
37
41
|
<% if @answers.any? %>
|
data/lib/alembic/version.rb
CHANGED
data/lib/alembic.rb
CHANGED
|
@@ -15,6 +15,19 @@ module Alembic
|
|
|
15
15
|
class << self
|
|
16
16
|
attr_accessor :lead_address, :lead_fields_partial, :lead_note, :start_over_address, :finish_link
|
|
17
17
|
attr_reader :admin_authentication_method, :visitor_authorization_method, :refusal_method, :owner_method
|
|
18
|
+
attr_writer :finish_title, :finish_subtitle, :finish_answers_heading
|
|
19
|
+
|
|
20
|
+
def finish_title
|
|
21
|
+
@finish_title || "That's everything"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def finish_subtitle
|
|
25
|
+
@finish_subtitle || "Thanks — here's what you told us"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def finish_answers_heading
|
|
29
|
+
@finish_answers_heading || "What you told us"
|
|
30
|
+
end
|
|
18
31
|
|
|
19
32
|
FLOW_HOST_SETTINGS.each do |name|
|
|
20
33
|
define_method(:"#{name}=") do |value|
|