alembic 0.7.1 → 0.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebd0ef51eea97e6370103e3a49348ada05fcc41807ed10328e441297e93bb3b2
4
- data.tar.gz: 26e892bfe991ca206d5ef15747b3d57a1434fd714e6748f9811d3fb3fb685586
3
+ metadata.gz: ef24a6bad349612e40a70a030fee5e1f7d5eaee540c29fb20645f489fde6de05
4
+ data.tar.gz: 633acbe75014d6fbb3d5735e9141d08fd90b54e32c89fa20f2abc09583d03569
5
5
  SHA512:
6
- metadata.gz: 651e4f43dac80bc3de140bbbbe92e728acb3ce0fc22423dc47ed7a89d7fb7cf8f0cf501f5ec96ec60fbb1926b3f73692a7e1b43a359afca8c3ff01beff9db6f6
7
- data.tar.gz: 283bbbbc4909b992333b4cf71808338b6fd9849d1b01ec0945b89a893ca98c18ffc0c614fecb990b616cc45b01ac304ed42662551636b338351bed1f3cd851ec
6
+ metadata.gz: a92ef4a24bb3a47ae63d14b999043b5f48d393960e18e6a338a0e0074a11e311508f6637e0393250ae928e2013ce0fa5fda97e40ac5f732e3afa7b7323eec4bd
7
+ data.tar.gz: 20b1066d5f7977222a01d415db83fe5de05f0d28c94c126baab9592b431b514bd5a46cefcfc6efbaef9443a44948063f546ed4666f32a68ca444e7a3d77d6e41
@@ -48,6 +48,10 @@ module Alembic
48
48
  Alembic.start_over_address&.call(run&.flow || flow) || super
49
49
  end
50
50
 
51
+ def finish_link
52
+ Alembic.finish_link&.call(run&.flow || flow)
53
+ end
54
+
51
55
  def flow_step_path(slug)
52
56
  alembic.flow_step_path(slug)
53
57
  end
@@ -9,7 +9,7 @@ module Alembic
9
9
  helper ResultBlocksHelper
10
10
  helper ContentBlocksHelper
11
11
  helper KsBlocks::LayoutHelper
12
- helper_method :flow_summary, :first_step_path, :summary_values, :intro_values, :start_over_path, :visited_flow_address
12
+ helper_method :flow_summary, :first_step_path, :summary_values, :intro_values, :start_over_path, :finish_link, :visited_flow_address
13
13
  end
14
14
 
15
15
  private
@@ -26,6 +26,8 @@ module Alembic
26
26
  flow_start_path(visited_flow_address)
27
27
  end
28
28
 
29
+ def finish_link; end
30
+
29
31
  def visited_flow_address
30
32
  flow_address((run&.flow || flow).slug)
31
33
  end
@@ -21,6 +21,12 @@
21
21
  <% end %>
22
22
  <% end %>
23
23
 
24
+ <% if (link = finish_link) %>
25
+ <%= ui_section do %>
26
+ <%= ui_button(label: link[:label], href: link[:url]) %>
27
+ <% end %>
28
+ <% end %>
29
+
24
30
  <% if Alembic.lead_address %>
25
31
  <%= ui_section do %>
26
32
  <%= alembic_lead_block(slug: summary_values["slug"], note: summary_values["note"]) %>
@@ -5,5 +5,10 @@
5
5
  <section class="py-20 md:py-28">
6
6
  <div class="max-w-2xl mx-auto px-6">
7
7
  <%= drawn_page(@summary_page, values: summary_values) %>
8
+ <% if (link = finish_link) %>
9
+ <div class="mt-10">
10
+ <%= ui_button(label: link[:label], href: link[:url]) %>
11
+ </div>
12
+ <% end %>
8
13
  </div>
9
14
  </section>
@@ -1,3 +1,3 @@
1
1
  module Alembic
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
data/lib/alembic.rb CHANGED
@@ -13,7 +13,7 @@ module Alembic
13
13
  visitor_authorization_method refusal_method owner_method].freeze
14
14
 
15
15
  class << self
16
- attr_accessor :lead_address, :lead_fields_partial, :lead_note, :start_over_address
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
18
 
19
19
  FLOW_HOST_SETTINGS.each do |name|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alembic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tylercschneider