Initial commit
This commit is contained in:
1
app/views/blank_contracts/_logo.html.erb
Normal file
1
app/views/blank_contracts/_logo.html.erb
Normal file
@@ -0,0 +1 @@
|
||||
<%= image_tag logo.variant(auto_orient: true, resize: "100x100") %><br />
|
||||
9
app/views/blank_contracts/_project_info.html.erb
Normal file
9
app/views/blank_contracts/_project_info.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<p class="heading"><strong><u><%= t ".heading" %></u></strong></p>
|
||||
<dl>
|
||||
<%= description_list_pair_for project, :producer_name, append: ":" %>
|
||||
<%= description_list_pair_for project, :producer_address, append: ":" %>
|
||||
<%= description_list_pair_for project, :name, append: ":" %>
|
||||
<%= description_list_pair_for project, :client_name, append: ":" %>
|
||||
<%= description_list_pair_for project, :description, append: ":" %>
|
||||
<%= description_list_pair_for project, :details, append: ":" %>
|
||||
</dl>
|
||||
39
app/views/blank_contracts/_signature_page.html.erb
Normal file
39
app/views/blank_contracts/_signature_page.html.erb
Normal file
@@ -0,0 +1,39 @@
|
||||
<p class="heading"><strong><u><%= t ".heading" %></u></strong></p>
|
||||
<p><%= t ".instructions", releasable_name: "#{releasable.model_name.name.titleize}" %></p>
|
||||
|
||||
<% # Signer information %>
|
||||
<dl>
|
||||
<% # Only guardian signs if talent is a minor %>
|
||||
<% if contract_template.guardian_clause.blank? %>
|
||||
<%= description_list_pair "Signature:", "___________________________________________" %>
|
||||
<% end %>
|
||||
<%= description_list_pair "Name:", "___________________________________________" %>
|
||||
<%= description_list_pair "Contact Address:", "___________________________________________" %>
|
||||
<%= description_list_pair "Contact Phone:", "___________________________________________" %>
|
||||
<%= description_list_pair "Contact Email:", "___________________________________________" %>
|
||||
<% if releasable.model_name == "AppearanceRelease" %>
|
||||
<%= description_list_pair "Person Date of Birth:", "___________________________________________" %>
|
||||
<% end %>
|
||||
<%= description_list_pair "Signed On:", "___________________________________________" %>
|
||||
<% if releasable.model_name == "LocationRelease" %>
|
||||
<%= description_list_pair "Filming Started On:", "___________________________________________" %>
|
||||
<%= description_list_pair "Filming Ended On:", "___________________________________________" %>
|
||||
<% end %>
|
||||
<% if contract_template.fee? %>
|
||||
<%= description_list_pair "Fee:", number_to_currency(contract_template.fee) %>
|
||||
<% end %>
|
||||
</dl>
|
||||
|
||||
<% if contract_template.guardian_clause.present? %>
|
||||
<% # Guardian information %>
|
||||
<br/>
|
||||
<p class="text-left"><strong>Guardian Information</strong></p>
|
||||
<dl>
|
||||
<%= description_list_pair "Signature:", "___________________________________________" %>
|
||||
<%= description_list_pair "Guardian Name:", "___________________________________________" %>
|
||||
<%= description_list_pair "Guardian Address:", "___________________________________________" %>
|
||||
<%= description_list_pair "Guardian Phone:", "___________________________________________" %>
|
||||
<%= description_list_pair "Signed On:", "___________________________________________" %>
|
||||
</dl>
|
||||
|
||||
<% end %>
|
||||
8
app/views/blank_contracts/new.html.erb
Normal file
8
app/views/blank_contracts/new.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<%= bootstrap_form_with url: contract_template_blank_contracts_path, local: true, layout: :inline do |form| %>
|
||||
<%= form.number_field :number_of_copies, value: 1 %>
|
||||
<%= form.submit t 'shared.print' %>
|
||||
<% end %>
|
||||
|
||||
<hr>
|
||||
<h3 class="text-center"><%= t ".preview_heading" %></h3>
|
||||
<embed class="embeded-contract-preview" type="application/pdf" src="../blank_contracts" width="80%" height="1200" />
|
||||
39
app/views/blank_contracts/pdf.html.erb
Normal file
39
app/views/blank_contracts/pdf.html.erb
Normal file
@@ -0,0 +1,39 @@
|
||||
<% copies.times do |copy_index| %>
|
||||
<div class="page">
|
||||
<% has_logo = local_assigns[:logo] %>
|
||||
<table class="heading-table">
|
||||
<tr>
|
||||
<td>
|
||||
<% if has_logo %>
|
||||
<div class="logo">
|
||||
<%= render "blank_contracts/logo", logo: logo %>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<img src="<%= qr_codes[copy_index] %>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td class="serial-number"><%= serial_numbers[copy_index] %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><strong><%= t '.do_not_copy_warning' %></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<% if contract_template.body.present? %>
|
||||
<%= contract_template.body %>
|
||||
<br/>
|
||||
<% end %>
|
||||
<% if contract_template.guardian_clause.present? %>
|
||||
<p class="text-left"><strong>Guardian Clause</strong></p>
|
||||
<%= contract_template.guardian_clause %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="page">
|
||||
<%= render "blank_contracts/signature_page", releasable: releasable, contract_template: contract_template %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user