fine_print 2.0.3 → 2.1.1

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
  SHA1:
3
- metadata.gz: 28b2452c298f159a6bd4b338f64ab80d1dd0a4ed
4
- data.tar.gz: 9b97e5a3483c1924278b704f7313b5d20ae99128
3
+ metadata.gz: 3c2040f491481de447b7827441b7521ede77b90d
4
+ data.tar.gz: 56a00a531867d1199de81bfab77331df64741f0b
5
5
  SHA512:
6
- metadata.gz: 463b5c7a4c522fb7bff295d9d088a89aae45f8b1799b6f5eeb40f6e2963c37298d115c275ca0bed4c114c99bbeacb759b1214b91565447e1f0f4f0cab96420ae
7
- data.tar.gz: c239a71ca6ee4a8c6495cd2bab5dbb9ac34ac50c74e58daaaf7c197629c5f00a89a55377c9010414f804829993c54dffbf3062568af543cd9f941dbe0c0f5e08
6
+ metadata.gz: f5ee1434ceb9b7c449b05eda5e926fdebb689b2451f60b43f0a36e9e42522e5b5853867b1da6bbaeafe3a8ed389d0d8d4d8677e1522304215e440ea5b76b1215
7
+ data.tar.gz: 1f782cd57f57cd7a7c5f7d1079024a3bb9aa982db5e6fb25d9f203af41af0269356c1437c7ba500a164449436eb653e7993e096940f94719faed16616ca7e792
@@ -4,6 +4,10 @@ module FinePrint
4
4
 
5
5
  before_filter :get_user, :can_manage
6
6
 
7
+ layout FinePrint.layout
8
+
9
+ helper FinePrint.helpers
10
+
7
11
  protected
8
12
 
9
13
  def get_user
@@ -19,7 +19,7 @@ module FinePrint
19
19
  @contract.content = params[:contract][:content]
20
20
 
21
21
  if @contract.save
22
- redirect_to @contract, :notice => 'Contract was successfully created.'
22
+ redirect_to @contract, :notice => t('fine_print.contract.notices.created')
23
23
  else
24
24
  render :action => 'new', :alert => merge_errors_for(@contract)
25
25
  end
@@ -40,7 +40,7 @@ module FinePrint
40
40
  @contract.content = params[:contract][:content]
41
41
 
42
42
  if @contract.save
43
- redirect_to @contract, :notice => 'Contract was successfully updated.'
43
+ redirect_to @contract, :notice => t('fine_print.contract.notices.updated')
44
44
  else
45
45
  render :action => 'edit', :alert => merge_errors_for(@contract)
46
46
  end
@@ -48,7 +48,7 @@ module FinePrint
48
48
 
49
49
  def destroy
50
50
  if @contract.destroy
51
- redirect_to contracts_path, :notice => 'Contract was successfully deleted.'
51
+ redirect_to contracts_path, :notice => t('fine_print.contract.notices.deleted')
52
52
  else
53
53
  redirect_to contracts_path, :alert => merge_errors_for(@contract)
54
54
  end
@@ -56,7 +56,7 @@ module FinePrint
56
56
 
57
57
  def publish
58
58
  if @contract.publish
59
- redirect_to contracts_path, :notice => 'Contract was successfully published.'
59
+ redirect_to contracts_path, :notice => t('fine_print.contract.notices.published')
60
60
  else
61
61
  redirect_to contracts_path, :alert => merge_errors_for(@contract)
62
62
  end
@@ -64,7 +64,7 @@ module FinePrint
64
64
 
65
65
  def unpublish
66
66
  if @contract.unpublish
67
- redirect_to contracts_path, :notice => 'Contract was successfully unpublished.'
67
+ redirect_to contracts_path, :notice => t('fine_print.contract.notices.unpublished')
68
68
  else
69
69
  redirect_to contracts_path, :alert => merge_errors_for(@contract)
70
70
  end
@@ -20,7 +20,7 @@ module FinePrint
20
20
  @signature = Signature.new
21
21
 
22
22
  unless params[:signature_accept]
23
- @signature.errors.add(:contract, 'must be accepted to proceed')
23
+ @signature.errors.add(:contract, t('fine_print.signature.errors.contract.must_agree'))
24
24
  render :action => 'new'
25
25
  return
26
26
  end
@@ -40,7 +40,7 @@ module FinePrint
40
40
 
41
41
  @signature.destroy
42
42
  redirect_to contract_signatures_path(@signature.contract),
43
- :notice => 'Signature was successfully deleted.'
43
+ :notice => t('fine_print.signature.notices.deleted')
44
44
  end
45
45
 
46
46
  protected
@@ -30,7 +30,8 @@ module FinePrint
30
30
  end
31
31
 
32
32
  def publish
33
- errors.add(:base, 'Contract is already published') if is_published?
33
+ errors.add(:base, I18n.t('fine_print.contract.errors.already_published')) \
34
+ if is_published?
34
35
  return false unless errors.empty?
35
36
 
36
37
  self.version = (same_name.published.first.try(:version) || 0) + 1
@@ -38,7 +39,8 @@ module FinePrint
38
39
  end
39
40
 
40
41
  def unpublish
41
- errors.add(:base, 'Contract is not the latest published version') unless is_latest?
42
+ errors.add(:base, I18n.t('fine_print.contract.errors.not_latest')) \
43
+ unless is_latest?
42
44
  return false unless errors.empty?
43
45
 
44
46
  self.version = nil
@@ -56,7 +58,7 @@ module FinePrint
56
58
 
57
59
  def no_signatures
58
60
  return if signatures.empty?
59
- errors.add(:base, 'Contract cannot be modified because users have signed it')
61
+ errors.add(:base, I18n.t('fine_print.contract.errors.already_signed'))
60
62
  false
61
63
  end
62
64
 
@@ -19,7 +19,8 @@ module FinePrint
19
19
 
20
20
  def contract_published
21
21
  return if contract.is_published?
22
- errors.add(:contract, 'needs to be published before it can be signed')
22
+ errors.add(:contract, I18n.t(
23
+ 'fine_print.signature.errors.contract.not_published'))
23
24
  false
24
25
  end
25
26
  end
@@ -1,7 +1,9 @@
1
1
  <%= form_for(@contract, :html => {:class => 'fine_print'}) do |f| %>
2
2
  <% if @contract.errors.any? %>
3
3
  <div id='error_explanation' class='fine_print errors'>
4
- <h2 class='fine_print heading'><%= pluralize(@contract.errors.count, 'error') %> prohibited this contract from being saved:</h2>
4
+ <h4 class='fine_print heading'>
5
+ <%= t 'fine_print.error', count: @contract.errors.count %>
6
+ </h4>
5
7
 
6
8
  <ul>
7
9
  <% @contract.errors.full_messages.each do |msg| %>
@@ -14,21 +16,24 @@
14
16
  <div class='field'>
15
17
  <%= f.label :name, :class => 'fine_print' %>
16
18
  <%= f.text_field :name, :size => 40, :class => 'fine_print text_field' %>
17
- <div class='fine_print field_help'>
18
- used internally by your code, only letters, numbers, underscores; changing this will start a new contract with new version counts
19
+ <div class='fine_print field_description'>
20
+ <%= t 'fine_print.contract.descriptions.name' %>
19
21
  </div>
20
22
  </div>
21
23
  <div class='field'>
22
24
  <%= f.label :title, :class => 'fine_print' %>
23
25
  <%= f.text_field :title, :size => 40, :class => 'fine_print text_field' %>
24
- <div class='fine_print field_help'>
25
- e.g., 'Terms of Use'
26
+ <div class='fine_print field_description'>
27
+ <%= t 'fine_print.contract.descriptions.title' %>
26
28
  </div>
27
29
  </div>
28
30
  <div class='field'>
29
31
  <%= f.label :content, :class => 'fine_print' %>
30
32
  <%= f.text_area :content, :cols => 56, :class => 'fine_print text_area' %>
31
33
  </div>
34
+
35
+ <br>
36
+
32
37
  <div class='actions'>
33
38
  <%= f.submit nil, :class => 'fine_print submit' %>
34
39
  </div>
@@ -1,10 +1,12 @@
1
1
  <%# Clients of this partial must provide the following variable:
2
2
  contract %>
3
3
 
4
- <h2 class='fine_print heading'><%= contract.title %> <%= @contract.version ? \
5
- "(v.#{@contract.version})" : 'Draft' %></h2>
4
+ <h2 class='fine_print heading'><%= contract.title %> (<%= contract.version ? \
5
+ t('fine_print.contract.status.version', version: contract.version.to_s) : \
6
+ t('fine_print.contract.status.draft') %>)</h2>
6
7
 
7
- <h4 class='fine_print heading'>Last updated: <%= contract.updated_at %></h4>
8
+ <h4 class='fine_print heading'><%= t('fine_print.contract.status.updated_at', \
9
+ updated_at: l(contract.updated_at, format: :fine_print)) %></h4>
8
10
 
9
11
  <div class='fine_print contract'>
10
12
  <pre><%= @contract.content.html_safe %></pre>
@@ -1,10 +1,15 @@
1
- <h1 class='fine_print heading'>Editing Contract</h1>
1
+ <h1 class='fine_print heading'><%= t 'fine_print.contract.actions.editing',
2
+ contract: @contract.title.to_s %></h1>
2
3
 
3
4
  <div class='fine_print edit_contract'>
4
5
  <%= render 'form' %>
5
6
 
7
+ <br>
8
+
6
9
  <div class='fine_print links'>
7
- <%= link_to 'Show', @contract, :class => 'fine_print link' %> |
8
- <%= link_to 'List', contracts_path, :class => 'fine_print link' %>
10
+ <%= link_to t('fine_print.contract.actions.show'), @contract,
11
+ :class => 'fine_print link' %> |
12
+ <%= link_to t('fine_print.contract.actions.list'), contracts_path,
13
+ :class => 'fine_print link' %>
9
14
  </div>
10
15
  </div>
@@ -1,4 +1,4 @@
1
- <h1 class='fine_print heading'>FinePrint Contracts</h1>
1
+ <h1 class='fine_print heading'><%= t 'fine_print.contract.status.index' %></h1>
2
2
 
3
3
  <div class='fine_print contract_index'>
4
4
 
@@ -12,19 +12,30 @@
12
12
 
13
13
  <ul class='fine_print'>
14
14
  <% contracts.each do |contract| %>
15
- <li><%= link_to contract.title, contract %>
16
- (<%= contract.version.nil? ? 'draft' : "v.#{contract.version.to_s}" %>)
15
+ <li><%= link_to contract.title, contract, :class => 'fine_print link' %>
16
+ (<%= contract.version.nil? ? t('fine_print.contract.status.draft') : \
17
+ t('fine_print.contract.status.version', version: contract.version.to_s) %>)
17
18
  <% if contract.signatures.empty? %>
18
- [<%= link_to 'Edit', edit_contract_path(contract), :class => 'fine_print link' %>]
19
+ [<%= link_to t('fine_print.contract.actions.edit'),
20
+ edit_contract_path(contract), :class => 'fine_print link' %>]
19
21
  <% if contract.is_published? %>
20
- [<%= link_to 'Unpublish', unpublish_contract_path(contract), :method => :put, :data => {:confirm => 'Are you sure you want to unpublish this contract?'} %>]
22
+ [<%= link_to t('fine_print.contract.actions.unpublish'),
23
+ unpublish_contract_path(contract), :method => :put,
24
+ :data => {:confirm => t('fine_print.contract.actions.confirm.unpublish')}, :class => 'fine_print link' %>]
21
25
  <% else %>
22
- [<%= link_to 'Publish', publish_contract_path(contract), :method => :put, :data => {:confirm => 'Are you sure you want to publish this contract?'} %>]
26
+ [<%= link_to t('fine_print.contract.actions.publish'),
27
+ publish_contract_path(contract), :method => :put,
28
+ :data => {:confirm => t('fine_print.contract.actions.confirm.publish')}, :class => 'fine_print link' %>]
23
29
  <% end %>
24
- [<%= link_to 'Delete', contract, :method => :delete, :data => {:confirm => 'Are you sure you wish to delete this contract?'}, :class => 'fine_print link' %>]
30
+ [<%= link_to t('fine_print.contract.actions.delete'), contract,
31
+ :method => :delete, :data => {:confirm => t('fine_print.contract.actions.confirm.delete')}, :class => 'fine_print link' %>]
25
32
  <% else %>
26
- [<%= link_to 'New version', new_version_contract_path(contract), :method => :post %>]
27
- [<%= link_to 'Signatures', contract_signatures_path(contract) %>]
33
+ [<%= link_to t('fine_print.contract.actions.new_version'),
34
+ new_version_contract_path(contract), :method => :post,
35
+ :class => 'fine_print link' %>]
36
+ [<%= link_to t('fine_print.contract.actions.signatures'),
37
+ contract_signatures_path(contract),
38
+ :class => 'fine_print link' %>]
28
39
  <% end %>
29
40
  </li>
30
41
  <% end %>
@@ -1,9 +1,11 @@
1
- <h1 class='fine_print heading'>New Contract</h1>
1
+ <h1 class='fine_print heading'><%= t('fine_print.contract.actions.new') %></h1>
2
2
 
3
3
  <div class='fine_print new_contract'>
4
4
  <%= render 'form' %>
5
5
 
6
+ <br>
7
+
6
8
  <div class='fine_print links'>
7
- <%= link_to 'List', contracts_path, :class => 'fine_print link' %>
9
+ <%= link_to t('fine_print.contract.actions.list'), contracts_path, :class => 'fine_print link' %>
8
10
  </div>
9
11
  </div>
@@ -1,9 +1,13 @@
1
- <h1 class='fine_print heading'>New Version of <%= @contract.name %></h1>
1
+ <h1 class='fine_print heading'><%= t('fine_print.contract.actions.new_version_of',
2
+ contract: @contract.name) %></h1>
2
3
 
3
4
  <div class='fine_print new_contract_version'>
4
5
  <%= render 'form' %>
5
6
 
7
+ <br>
8
+
6
9
  <div class='fine_print links'>
7
- <%= link_to 'List', contracts_path, :class => 'fine_print link' %>
10
+ <%= link_to t('fine_print.contract.actions.list'), contracts_path,
11
+ :class => 'fine_print link' %>
8
12
  </div>
9
13
  </div>
@@ -1,22 +1,38 @@
1
- <h1 class='fine_print heading'>Contract Details</h1>
1
+ <h1 class='fine_print heading'><%= t('fine_print.contract.actions.show') %></h1>
2
2
 
3
- <h4 class='fine_print heading'>Name: <%= @contract.name %></h4>
3
+ <br>
4
+
5
+ <h4 class='fine_print heading'><%= t('fine_print.contract.status.name', name: @contract.name) %></h4>
4
6
 
5
7
  <%= render :partial => 'show', :locals => {:contract => @contract} %>
6
8
 
9
+ <br>
10
+
7
11
  <div class='fine_print links'>
8
12
  <% if @contract.signatures.empty? %>
9
- <%= link_to 'Edit', edit_contract_path(@contract), :class => 'fine_print link' %> |
13
+ <%= link_to t('fine_print.contract.actions.edit'), edit_contract_path(@contract),
14
+ :class => 'fine_print link' %> |
10
15
  <% if @contract.is_published? %>
11
- <%= link_to 'Unpublish', unpublish_contract_path(@contract), :method => :put, :data => {:confirm => 'Are you sure you want to unpublish this contract?'} %>
16
+ <%= link_to t('fine_print.contract.actions.unpublish'),
17
+ unpublish_contract_path(@contract), :method => :put, :data => {
18
+ :confirm => t('fine_print.contract.actions.confirm.unpublish')},
19
+ :class => 'fine_print link' %>
12
20
  <% else %>
13
- <%= link_to 'Publish', publish_contract_path(@contract), :method => :put, :data => {:confirm => 'Are you sure you want to publish this contract?'} %> |
21
+ <%= link_to t('fine_print.contract.actions.publish'),
22
+ publish_contract_path(@contract), :method => :put, :data => {
23
+ :confirm => t('fine_print.contract.actions.confirm.publish')},
24
+ :class => 'fine_print link' %> |
14
25
  <% end %>
15
- <%= link_to 'Delete', @contract, :method => :delete, :data => {:confirm => 'Are you sure you wish to delete this contract?'}, :class => 'fine_print link' %>
26
+ <%= link_to t('fine_print.contract.actions.delete'), @contract, :method => :delete,
27
+ :data => {:confirm => t('fine_print.contract.actions.confirm.delete')},
28
+ :class => 'fine_print link' %>
16
29
  <% else %>
17
- <%= link_to 'New version', new_version_contract_path(@contract), :method => :post %> |
18
- <%= link_to 'Signatures', contract_signatures_path(@contract),
19
- :class => 'fine_print link' %>
30
+ <%= link_to t('fine_print.contract.actions.new_version'),
31
+ new_version_contract_path(@contract), :method => :post,
32
+ :class => 'fine_print link' %> |
33
+ <%= link_to t('fine_print.contract.actions.signatures'),
34
+ contract_signatures_path(@contract), :class => 'fine_print link' %>
20
35
  <% end %>
21
- | <%= link_to 'List', contracts_path, :class => 'fine_print link' %>
36
+ | <%= link_to t('fine_print.contract.actions.list'), contracts_path,
37
+ :class => 'fine_print link' %>
22
38
  </div>
@@ -1,7 +1,9 @@
1
1
  <%= form_for([@contract, @signature], :html => {:class => 'fine_print'}) do |f| %>
2
2
  <% if @signature.errors.any? %>
3
3
  <div id='error_explanation' class='fine_print errors'>
4
- <h4 class='fine_print heading'>Error:</h4>
4
+ <h4 class='fine_print heading'>
5
+ <%= t 'fine_print.error', count: @signature.errors.count %>
6
+ </h4>
5
7
 
6
8
  <ul>
7
9
  <% @signature.errors.full_messages.each do |msg| %>
@@ -12,10 +14,13 @@
12
14
  <% end %>
13
15
 
14
16
  <div class='field'>
15
- <%= f.label :accept, 'I have read and accept the terms above.', :class => 'fine_print' %>
17
+ <%= f.label :accept, t('fine_print.signature.actions.accept'), :class => 'fine_print' %>
16
18
  <%= check_box_tag :signature_accept, :class => 'fine_print check_box' %>
17
19
  </div>
20
+
21
+ <br>
22
+
18
23
  <div class='actions'>
19
- <%= f.submit 'I agree', :class => 'fine_print submit' %>
24
+ <%= f.submit t('fine_print.signature.actions.sign'), :class => 'fine_print submit' %>
20
25
  </div>
21
26
  <% end %>
@@ -1,32 +1,39 @@
1
- <h1 class='fine_print heading'>Signatures for <%= link_to "#{@contract.title} (v.#{@contract.version})", @contract %></h1>
1
+ <h1 class='fine_print heading'>
2
+ <%= t('fine_print.signature.status.for_contract', contract: link_to(
3
+ "#{@contract.title} #{t('fine_print.contract.status.version',
4
+ version: @contract.version.to_s)}", @contract)).html_safe %>
5
+ </h1>
2
6
 
3
7
  <div class='fine_print signature_index'>
4
8
 
5
9
  <table class='fine_print top_heading index'>
6
10
  <tr class='fine_print heading-row'>
7
- <th>User ID</th>
8
- <th>Date accepted</th>
9
- <th></th>
11
+ <th><%= t 'activerecord.attributes.fine_print/signature.user_type' %>&nbsp;</th>
12
+ <th>&nbsp;<%= t 'activerecord.attributes.fine_print/signature.user_id' %>&nbsp;</th>
13
+ <th>&nbsp;<%= t 'activerecord.attributes.fine_print/signature.created_at' %>&nbsp;</th>
14
+ <th>&nbsp;</th>
10
15
  </tr>
11
16
 
12
17
  <% @signatures.each do |signature| %>
13
18
  <tr class='fine_print data-row <%= cycle('even', 'odd') %>'>
14
- <td><%= signature.user.id %></td>
15
- <td><%= signature.created_at %></td>
16
- <td><%= link_to 'Terminate',
17
- signature,
18
- :method => :delete,
19
- :data => {
20
- :confirm => 'User will be asked to accept the contract again. Are you sure?'
21
- },
22
- :class => 'fine_print link' %>
19
+ <td><%= signature.user_type %>&nbsp;</td>
20
+ <td>&nbsp;<%= signature.user_id %>&nbsp;</td>
21
+ <td>&nbsp;<%= l signature.created_at, format: :fine_print %>&nbsp;</td>
22
+ <td>&nbsp;<%= link_to t('fine_print.signature.actions.delete'),
23
+ signature, :method => :delete,
24
+ :data => {
25
+ :confirm => t('fine_print.signature.actions.confirm.delete')
26
+ }, :class => 'fine_print link' %>
23
27
  </td>
24
28
  </tr>
25
29
  <% end %>
26
30
  </table>
27
31
 
32
+ <br>
33
+
28
34
  <div class='fine_print links'>
29
- <%= link_to 'List', contracts_path, :class => 'fine_print link' %>
35
+ <%= link_to t('fine_print.contract.actions.list'), contracts_path,
36
+ :class => 'fine_print link' %>
30
37
  </div>
31
38
 
32
39
  </div>
@@ -1,3 +1,10 @@
1
+ <% if FinePrint.signed_any_version_of_contract?(@user, @contract) %>
2
+ <div class='fine_print notice'>
3
+ <h4 class='fine_print heading'><%= t('fine_print.signature.status.new_version',
4
+ contract: @contract.title) %></h4>
5
+ </div>
6
+ <% end %>
7
+
1
8
  <div class='fine_print contract'>
2
9
  <%= render :partial => 'fine_print/contracts/show',
3
10
  :locals => {:contract => @contract} %>
@@ -3,6 +3,7 @@
3
3
  FinePrint.configure do |config|
4
4
 
5
5
  # Engine Configuration
6
+ # Must be set in an initializer
6
7
 
7
8
  # Proc called with a controller as self.
8
9
  # Returns the current user.
@@ -26,7 +27,16 @@ FinePrint.configure do |config|
26
27
  # Default: lambda { |user| !user.nil? || head(:unauthorized) }
27
28
  config.can_sign_proc = lambda { |user| !user.nil? || head(:unauthorized) }
28
29
 
30
+ # Layout to be used for FinePrint's controllers
31
+ # Default: 'application'
32
+ config.layout = 'application'
33
+
34
+ # Array of custom helpers for FinePrint's controllers
35
+ # Default: [] (no custom helpers)
36
+ config.helpers = []
37
+
29
38
  # Controller Configuration
39
+ # Can be set either in an initializer or passed as options to `fine_print_require`
30
40
 
31
41
  # Proc called with a user and an array of contract ids as arguments and a controller as self.
32
42
  # This proc is called when a user tries to access a resource protected by FinePrint,
@@ -0,0 +1,89 @@
1
+ ---
2
+ en:
3
+ activerecord:
4
+ attributes:
5
+ fine_print/contract:
6
+ name: Name
7
+ version: Version
8
+ title: Title
9
+ content: Content
10
+ fine_print/signature:
11
+ contract: Contract
12
+ user: User
13
+ user_id: "User ID"
14
+ user_type: "User Class"
15
+ created_at: "Signed on"
16
+ errors:
17
+ models:
18
+ fine_print/signature:
19
+ attributes:
20
+ contract:
21
+ taken: "has already been signed"
22
+ models:
23
+ fine_print/contract:
24
+ one: contract
25
+ other: contracts
26
+ fine_print/signature:
27
+ one: signature
28
+ other: signatures
29
+ fine_print:
30
+ contract:
31
+ actions:
32
+ delete: Delete
33
+ edit: Edit
34
+ editing: "Editing %{contract}"
35
+ list: List
36
+ new: New Contract
37
+ new_version: "New Version"
38
+ new_version_of: "New version of %{contract}"
39
+ publish: Publish
40
+ signatures: Signatures
41
+ show: Details
42
+ unpublish: Unpublish
43
+ update: Update
44
+ confirm:
45
+ delete: "Are you sure you want to delete this contract?"
46
+ publish: "Are you sure you want to publish this contract?"
47
+ unpublish: "Are you sure you want to unpublish this contract?"
48
+ descriptions:
49
+ name: "Used internally by your code; only letters, numbers, underscores allowed; changing this will start a new contract at version 1"
50
+ title: 'e.g., "Terms of Use"'
51
+ errors:
52
+ already_published: "cannot be published because it is already published"
53
+ already_signed: "cannot be modified because it has already been signed"
54
+ not_latest: "cannot be unpublished because it is not the latest version"
55
+ notices:
56
+ created: "Contract created."
57
+ deleted: "Contract deleted."
58
+ published: "Contract published."
59
+ unpublished: "Contract unpublished."
60
+ updated: "Contract updated."
61
+ status:
62
+ draft: draft
63
+ index: Contracts
64
+ name: "Name: %{name}"
65
+ updated_at: "Last updated on %{updated_at}."
66
+ version: "v.%{version}"
67
+ signature:
68
+ actions:
69
+ accept: "I have read and accept the terms above."
70
+ delete: Terminate
71
+ sign: "I agree"
72
+ confirm:
73
+ delete: "User will be asked to accept the contract again. Are you sure?"
74
+ errors:
75
+ contract:
76
+ must_agree: "must be accepted to proceed"
77
+ not_published: "must be published before it can be signed"
78
+ notices:
79
+ deleted: "Signature deleted."
80
+ status:
81
+ for_contract: "Signatures for %{contract}"
82
+ new_version: "Please review and accept the newest version of the %{contract}:"
83
+ error:
84
+ one: "Error:"
85
+ other: "Errors:"
86
+ time:
87
+ formats:
88
+ fine_print: "%b %d %Y at %I:%M%p %Z"
89
+
@@ -17,5 +17,8 @@ module FinePrint
17
17
  g.assets false
18
18
  g.helper false
19
19
  end
20
+
21
+ # Load subfolders of config/locales as well
22
+ config.i18n.load_path += Dir[root.join('config', 'locales', '**', '*.{rb,yml}')]
20
23
  end
21
24
  end
@@ -1,3 +1,3 @@
1
1
  module FinePrint
2
- VERSION = '2.0.3'
2
+ VERSION = '2.1.1'
3
3
  end
data/lib/fine_print.rb CHANGED
@@ -8,7 +8,9 @@ module FinePrint
8
8
  ENGINE_OPTIONS = [
9
9
  :current_user_proc,
10
10
  :can_manage_proc,
11
- :can_sign_proc
11
+ :can_sign_proc,
12
+ :layout,
13
+ :helpers
12
14
  ]
13
15
 
14
16
  # Can be set in initializer or passed as an argument
@@ -1,5 +1,4 @@
1
- FINE_PRINT_COPY_TASKS = ['assets/stylesheets',
2
- 'views/layouts',
1
+ FINE_PRINT_COPY_TASKS = ['config/locales',
3
2
  'views',
4
3
  'controllers']
5
4
 
Binary file