From ed7d8511d5e5d4a9d82abc0d0a6ab2e27b55d816 Mon Sep 17 00:00:00 2001 From: Bilal Date: Wed, 9 Sep 2020 14:23:51 +0300 Subject: [PATCH] fix MR comments --- app/views/contracts/_logo_page.html.erb | 37 +++++++++++++++++++++++++ app/views/contracts/pdf.html.erb | 33 ++++------------------ 2 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 app/views/contracts/_logo_page.html.erb diff --git a/app/views/contracts/_logo_page.html.erb b/app/views/contracts/_logo_page.html.erb new file mode 100644 index 0000000..307471e --- /dev/null +++ b/app/views/contracts/_logo_page.html.erb @@ -0,0 +1,37 @@ +<% has_logo = local_assigns[:logo] %> +<% has_user_photo = releasable.model_name == "AppearanceRelease" && releasable.person_photo.attached? %> + +<% if has_logo || has_user_photo %> + + + + + +
+ <% if has_logo %> + + <% end %> + + <% if has_user_photo %> + <%= image_tag releasable.photos.first.variant(auto_orient: true, resize: "200x200"), id: "top-person-photo" %> + <% end %> +
+ +
+<% end %> + +<% if preview %> +

PREVIEW ONLY

+<% end %> + +<% if contract_template.body.present? %> + <%= contract_template.body %> +
+<% end %> + +<% if releasable.minor? && contract_template.guardian_clause.present? %> +

Guardian Clause

+ <%= contract_template.guardian_clause %> +<% end %> \ No newline at end of file diff --git a/app/views/contracts/pdf.html.erb b/app/views/contracts/pdf.html.erb index c354ed5..fcc565f 100644 --- a/app/views/contracts/pdf.html.erb +++ b/app/views/contracts/pdf.html.erb @@ -1,33 +1,12 @@ -<% if local_assigns[:logo] %> -