Commit 4d2177e3 authored by Ales Rosina's avatar Ales Rosina Committed by Ales Rosina
Browse files

Assignment PDF styling.

parent 0e51f150
......@@ -8,3 +8,4 @@
@import 'layout/content';
@import 'layout/footer';
@import 'layout/forms';
@import 'layout/pdf';
.pdf-logo-image {
height: 30px;
width: 75px;
img {
width: 100%;
height: auto;
}
}
.pdf-header {
font-size: $font-size-small;
}
.col-input {
border-bottom: 1px solid $gray-light;
height: $line-height-computed;
}
.row-box {
border: 1px solid $black;
padding-top: $padding-large-horizontal;
margin-bottom: 0;
}
.row-bottom {
padding-top: $padding-large-horizontal;
margin-bottom: 0;
}
......@@ -13,7 +13,7 @@ class AssignmentsController < ApplicationController
respond_to do |format|
format.html
format.pdf do
render pdf: "assignment_#{@assignment.id}", template: 'assignments/show.html.slim', layout: 'pdf.pdf'
render pdf: "assignment_#{@assignment.id}", template: 'assignments/show.html.slim', layout: 'pdf.pdf', encoding: 'UTF-8'
end
end
end
......
.row
.col-xs-12
h1= t_title(:show, Assignment)
.col-xs-11.col-xs-offset-1
h3= t('assignment_pdf.title')
.row
.col-xs-12
.table-responsive
table.table.table-no-border-top
tbody
tr
td= t_attr(:client, Assignment)
td= @assignment.client
tr
td= t_attr(:volunteer, Assignment)
td= @assignment.volunteer
tr
td= t_attr(:agreement, Assignment)
td= link_to @assignment.agreement, @assignment.agreement.url
.col-xs-11.col-xs-offset-1
h4= t('assignment_pdf.volunteer_title')
.row
.col-xs-11.col-xs-offset-1
.row
.col-xs-6
.row
.col-xs-5
= t_attr(:last_name, Contact)
.col-xs-7.col-input
= @assignment.volunteer.contact.last_name
.row
.col-xs-5
= t_attr(:street, Contact)
.col-xs-7.col-input
= @assignment.volunteer.contact.street
.row
.col-xs-5
= t_attr(:primary_phone, Contact)
.col-xs-7.col-input
= @assignment.volunteer.contact.primary_phone
.row
.col-xs-5
= t_attr(:date_of_birth, Volunteer)
.col-xs-7.col-input
= @assignment.volunteer.date_of_birth
.col-xs-6
.row
.col-xs-5
= t_attr(:first_name, Contact)
.col-xs-7.col-input
= @assignment.volunteer.contact.first_name
.row
.col-xs-5
= "#{t_attr(:postal_code, Contact)} / #{t_attr(:city, Contact)}"
.col-xs-7.col-input
= "#{@assignment.volunteer.contact.postal_code} #{@assignment.volunteer.contact.city}"
.row
.col-xs-5
= t_attr(:primary_email, Contact)
.col-xs-7.col-input
= @assignment.volunteer.contact.primary_email
.row
.col-xs-5
= t_attr(:nationality, Volunteer)
.col-xs-7.col-input
= @assignment.volunteer.nationality
.row.row-box
.col-xs-12
.row
.col-xs-4
= t('assignment_pdf.location')
.col-xs-8.col-input
.row
.col-xs-4
= t('assignment_pdf.location_description')
.col-xs-8.col-input
.row
.col-xs-4
= t('assignment_pdf.day_time')
.col-xs-8.col-input
.row
.col-xs-4
= t('assignment_pdf.frequency')
.col-xs-8.col-input
.row
.col-xs-4
= t('assignment_pdf.start')
.col-xs-8.col-input
.row
.col-xs-4
= t('assignment_pdf.trial_time')
.col-xs-8.col-input
.row
.col-xs-12
= t('assignment_pdf.agreement_disclamer')
.row
.col-xs-11.col-xs-offset-1
h4= t('assignment_pdf.client_title')
.row
.col-xs-11.col-xs-offset-1
.row
.col-xs-6
.row
.col-xs-5
= t_attr(:last_name, Contact)
.col-xs-7.col-input
= @assignment.client.contact.last_name
.row
.col-xs-5
= t_attr(:street, Contact)
.col-xs-7.col-input
= @assignment.client.contact.street
.row
.col-xs-5
= t('assignment_pdf.position')
.col-xs-7.col-input
.row
.col-xs-5
= t_attr(:primary_email, Contact)
.col-xs-7.col-input
= @assignment.client.contact.primary_email
.col-xs-6
.row
.col-xs-5
= t_attr(:first_name, Contact)
.col-xs-7.col-input
= @assignment.client.contact.first_name
.row
.col-xs-5
= "#{t_attr(:postal_code, Contact)} / #{t_attr(:city, Contact)}"
.col-xs-7.col-input
= "#{@assignment.client.contact.postal_code} #{@assignment.client.contact.city}"
.row
.col-xs-5
= t_attr(:primary_phone, Contact)
.col-xs-7.col-input
= @assignment.client.contact.primary_phone
.row
.col-xs-5
= t('assignment_pdf.mobile')
.col-xs-7.col-input
.row.row-box
.col-xs-12
p= t('assignment_pdf.agreement_text.list1.title')
ul
li= t('assignment_pdf.agreement_text.list1.item1')
li= t('assignment_pdf.agreement_text.list1.item2')
li= t('assignment_pdf.agreement_text.list1.item3')
p= t('assignment_pdf.agreement_text.list1.title')
ul
li= t('assignment_pdf.agreement_text.list1.item1')
li= t('assignment_pdf.agreement_text.list1.item2')
.row.row-bottom
.col-xs-6
.row
.col-xs-5
= t('assignment_pdf.city_date')
.col-xs-7.col-input
= "#{t('assignment_pdf.zurich')}, #{l @assignment.created_at.to_date}"
.row
.col-xs-5
= t('assignment_pdf.for_aoc')
.col-xs-7.col-input
.col-xs-6
.row
.col-xs-5
= t('assignment_pdf.city_date')
.col-xs-7.col-input
.row
.col-xs-5
= t_attr(:volunteer, Assignment)
.col-xs-7.col-input
......@@ -3,5 +3,16 @@ html
head
= wicked_pdf_stylesheet_link_tag 'application'
body
.row.pdf-header
.col-xs-3
.pdf-logo-image
= wicked_pdf_image_tag 'AOZ_Logo.svg'
.col-xs-4
b= t('pdf_header.title').html_safe
.col-xs-2
= t('pdf_header.address').html_safe
.col-xs-3
= t('pdf_header.contact').html_safe
.container
= yield
......@@ -11,4 +11,4 @@ Rails.application.config.assets.paths << Rails.root.join('node_modules')
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
Rails.application.config.assets.precompile += %w( pdf.css )
......@@ -526,3 +526,33 @@ de:
when: Zeit
working_days: Arbeitstage
your_region: In welcher Region können Sie sich Ihren Einsatz vorstellen?
pdf_header:
title: Fachstelle Freiwilligenarbeit
address: Fluelastrasse 32<br>8047 Zurich<br>www.aoz.ch
contact: Telefon 044 415 66 72<br>Telefax n.v.<br>jeannine.stauffer@aoz.ch
assignment_pdf:
title: Vereinbarung zwischen AOZ und Freiwilligen
volunteer_title: Freiwillige Person
client_title: Verantwortliche Person in der AOZ
mobile: Handy
position: Funktion
location: Einsatzort
location_description: Beschreibung des Einsatzes
day_time: Tag / Zeit
frequency: Frequenz
start: Einsatzbeginn
trial_time: 4 Wochen Probezeit bis
agreement_disclamer: Die Einsatzdauer beträgt mindestens 6 Monate. Entscheiden sich Freiwillige, ihre Tätigkeit aufzugeben, so teilen sie dies der verantwortlichen Person vor Ort spätestens vier Wochen vor Einsatzende mit.
agreement_text:
list1:
title: Freiwillige beachten folgende Grundsätze während ihres Einsatzes in der AOZ
item1: Verhaltenskodex für Freiwillige
item2: Rechte und Pflichten für Freiwillige
item3: AOZ Leitlinien Praktische Integrationsarbeit 2011
list2:
title: Allenfalls auch
item1: Abmachungen für die freiwillige Begleitung von unbegleiteten minderjährigen Jugendlichen (MNA)
item2: Abmachungen für das Leiten von niederschwelligen Deutschkursen
city_date: Ort, Datum
for_aoc: Fur die AOZ
zurich: Zürich
......@@ -376,3 +376,33 @@ en:
working_days: Working days
your_expectations: What do you expect from a person who would accompany you / your volunteer work?
your_region: In which region can you imagine your employment?
pdf_header:
title: Fachstelle Freiwilligenarbeit
address: Fluelastrasse 32<br>8047 Zurich<br>www.aoz.ch
contact: Telefon 044 415 66 72<br>Telefax n.v.<br>jeannine.stauffer@aoz.ch
assignment_pdf:
title: Vereinbarung zwischen AOZ und Freiwilligen
volunteer_title: Freiwillige Person
client_title: Verantwortliche Person in der AOZ
mobile: Handy
position: Funktion
location: Einsatzort
location_description: Beschreibung des Einsatzes
day_time: Tag / Zeit
frequency: Frequenz
start: Einsatzbeginn
trial_time: 4 Wochen Probezeit bis
agreement_disclamer: Die Einsatzdauer beträgt mindestens 6 Monate. Entscheiden sich Freiwillige, ihre Tätigkeit aufzugeben, so teilen sie dies der verantwortlichen Person vor Ort spätestens vier Wochen vor Einsatzende mit.
agreement_text:
list1:
title: Freiwillige beachten folgende Grundsätze während ihres Einsatzes in der AOZ
item1: Verhaltenskodex für Freiwillige
item2: Rechte und Pflichten für Freiwillige
item3: AOZ Leitlinien Praktische Integrationsarbeit 2011
list2:
title: Allenfalls auch
item1: Abmachungen für die freiwillige Begleitung von unbegleiteten minderjährigen Jugendlichen (MNA)
item2: Abmachungen für das Leiten von niederschwelligen Deutschkursen
city_date: Ort, Datum
for_aoc: Fur die AOZ
zurich: Zürich
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment