|
| 1 | +{% extends "base-pdf.html" %} |
1 | 2 | {% load i18n %} |
2 | 3 |
|
3 | | -<html> |
4 | | - <head> |
5 | | - <title>{{ title|default:"" }}</title> |
6 | | - |
7 | | - {% block style_base %} |
8 | | - {% comment %} |
9 | | - See DEFAULT_CSS in https://github.com/chrisglass/xhtml2pdf/blob/master/xhtml2pdf/default.py |
10 | | - for base style. |
11 | | - {% endcomment %} |
12 | | - |
13 | | - {% block layout_style %} |
14 | | - <style type="text/css"> |
15 | | - @page { |
16 | | - size: {{ pagesize|default:"A4" }}; |
17 | | - margin-left: 2cm; |
18 | | - margin-right: 2cm; |
19 | | - margin-top: 1cm; |
20 | | - margin-bottom: 2cm; |
21 | | - |
22 | | - @frame header { |
23 | | - -pdf-frame-content: page-header; |
24 | | - margin-top: 3cm; |
25 | | - margin-right: 2mm; |
26 | | - margin-bottom: 2cm; |
27 | | - margin-left: 1.2cm; |
28 | | - } |
29 | | - |
30 | | - @frame footer { |
31 | | - -pdf-frame-content: page-footer; |
32 | | - bottom: 0cm; |
33 | | - margin-left: 1cm; |
34 | | - margin-right: 1cm; |
35 | | - height: 1cm; |
36 | | - } |
37 | | - } |
38 | | - </style> |
39 | | - {% endblock %} |
40 | | - |
41 | | - <style type="text/css"> |
42 | | - .title { |
43 | | - text-align: center; |
44 | | - font-size: 22px; |
45 | | - } |
46 | | - p { |
47 | | - font-size: 16px; |
48 | | - } |
49 | | - #page-width { |
50 | | - width: 100%; |
51 | | - font-size: 16px; |
52 | | - } |
53 | | - .align-left { |
54 | | - display: inline-block; |
55 | | - padding-left: 100px; |
56 | | - } |
57 | | - .align-right { |
58 | | - display: inline-block; |
59 | | - padding-right: 100px; |
60 | | - } |
61 | | - </style> |
62 | | - |
63 | | - {% block extra_style %}{% endblock %} |
64 | | - |
65 | | - {% endblock %} |
66 | | - </head> |
67 | | - <body> |
68 | | - <div> |
69 | | - {% block content %} |
70 | | - <table id="page-width"> |
71 | | - <!-- Project details in table format --> |
72 | | - <tr> |
73 | | - <td rowspan="4" align="left" class="align-left"> |
74 | | - <p class="title"> <b>{{ org_name|upper }}</b> PROJECT FORM</p> |
75 | | - </td> |
76 | | - <td align="right" class="align-right"> |
77 | | - <b>{% trans "Project title" %}</b> |
78 | | - </td> |
79 | | - </tr> |
80 | | - <tr> |
81 | | - <td align="right" class="align-right"> |
82 | | - <a href="{{ project_link }}">{{ title }}</a> |
83 | | - </td> |
84 | | - </tr> |
85 | | - <tr> |
86 | | - <td align="right" class="align-right"> |
87 | | - <b>{% trans "Project ID" %}</b> |
88 | | - </td> |
89 | | - </tr> |
90 | | - <tr> |
91 | | - <td align="right" class="align-right"> |
92 | | - {{ id }} |
93 | | - </td> |
94 | | - </tr> |
95 | | - </table> |
96 | | - |
97 | | - <hr> |
98 | | - |
99 | | - <!-- PAF fields data in paragraph format --> |
100 | | - {% for field_name, field_value in paf_data.items %} |
101 | | - <p><b>{{ field_name }}</b></p> |
102 | | - <p>{{ field_value|safe|default:"-" }}</p> |
103 | | - {% endfor %} |
104 | | - |
105 | | - <!-- SOW fields data in paragraph format--> |
106 | | - {% for field_name, field_value in sow_data.items %} |
107 | | - <p><b>{{ field_name }}</b></p> |
108 | | - <p>{{ field_value|safe|default:"-" }}</p> |
109 | | - {% endfor %} |
110 | | - |
111 | | - <!-- Approvers data in paragraph format--> |
112 | | - <p><b> Approvals </b></p> |
113 | | - {% if approvals %} |
114 | | - {% for approval in approvals %} |
115 | | - <p>{{ approval.paf_reviewer_role.label }} - {% if approval.approved %} Approved {% else %} Pending{% endif %} |
116 | | - {% if approval.user %}({{ approval.user }}){% endif %}</p> |
117 | | - {% endfor %} |
118 | | - {% else %} |
119 | | - <p>-</p> |
120 | | - {% endif %} |
121 | | - |
122 | | - <!-- Supporting Documents with links--> |
123 | | - <p> <b>{% trans "Supporting Documents" %}</b></p> |
124 | | - {% if supporting_documents %} |
125 | | - {% for document, document_link in supporting_documents.items %} |
126 | | - <p><a href="{{ document_link }}">{{ document }}</a></p> |
127 | | - {% endfor %} |
128 | | - {% else %} |
129 | | - <p>-</p> |
130 | | - {% endif %} |
131 | | - |
132 | | - <!-- Submission title with link--> |
133 | | - <p><b>{% trans "Submission" %}</b></p> |
134 | | - <p><a href="{{ submission_link }}">{{ submission }}</a></p> |
135 | | - |
136 | | - {% endblock %} |
137 | | - </div> |
138 | | - |
139 | | - {% if show_footer %} |
140 | | - <div id="page-footer"> |
141 | | - {%block page_foot%} |
142 | | - <table> |
143 | | - <tr> |
144 | | - <td>{% blocktrans %}Exported by {{ export_user }} on {{ export_date }}{% endblocktrans %}</td> |
145 | | - <td align="right"> |
146 | | - Page: <pdf:pagenumber /> |
147 | | - </td> |
148 | | - </tr> |
149 | | - </table> |
150 | | - {%endblock%} |
151 | | - </div> |
152 | | - {% endif %} |
153 | | - </body> |
154 | | - |
155 | | -</html> |
| 4 | +{% block content %} |
| 5 | + <table id="page-width"> |
| 6 | + <!-- Project details in table format --> |
| 7 | + <tr> |
| 8 | + <td rowspan="4" align="left" class="align-left"> |
| 9 | + <p class="title"> <b>{{ org_name|upper }}</b> PROJECT FORM</p> |
| 10 | + </td> |
| 11 | + <td align="right" class="align-right"> |
| 12 | + <b>{% trans "Project title" %}</b> |
| 13 | + </td> |
| 14 | + </tr> |
| 15 | + <tr> |
| 16 | + <td align="right" class="align-right"> |
| 17 | + <a href="{{ project_link }}">{{ title }}</a> |
| 18 | + </td> |
| 19 | + </tr> |
| 20 | + <tr> |
| 21 | + <td align="right" class="align-right"> |
| 22 | + <b>{% trans "Project ID" %}</b> |
| 23 | + </td> |
| 24 | + </tr> |
| 25 | + <tr> |
| 26 | + <td align="right" class="align-right"> |
| 27 | + {{ id }} |
| 28 | + </td> |
| 29 | + </tr> |
| 30 | + </table> |
| 31 | + |
| 32 | + <hr> |
| 33 | + |
| 34 | + <!-- PAF fields data in paragraph format --> |
| 35 | + {% for field_name, field_value in paf_data.items %} |
| 36 | + <p><b>{{ field_name }}</b></p> |
| 37 | + <p>{{ field_value|safe|default:"-" }}</p> |
| 38 | + {% endfor %} |
| 39 | + |
| 40 | + <!-- SOW fields data in paragraph format--> |
| 41 | + {% for field_name, field_value in sow_data.items %} |
| 42 | + <p><b>{{ field_name }}</b></p> |
| 43 | + <p>{{ field_value|safe|default:"-" }}</p> |
| 44 | + {% endfor %} |
| 45 | + |
| 46 | + <!-- Approvers data in paragraph format--> |
| 47 | + <p><b> Approvals </b></p> |
| 48 | + {% if approvals %} |
| 49 | + {% for approval in approvals %} |
| 50 | + <p>{{ approval.paf_reviewer_role.label }} - {% if approval.approved %} Approved {% else %} Pending{% endif %} |
| 51 | + {% if approval.user %}({{ approval.user }}){% endif %}</p> |
| 52 | + {% endfor %} |
| 53 | + {% else %} |
| 54 | + <p>-</p> |
| 55 | + {% endif %} |
| 56 | + |
| 57 | + <!-- Supporting Documents with links--> |
| 58 | + <p> |
| 59 | + <b>{% trans "Supporting Documents" %}</b> |
| 60 | + </p> |
| 61 | + |
| 62 | + {% if supporting_documents %} |
| 63 | + {% for document, document_link in supporting_documents.items %} |
| 64 | + <p><a href="{{ document_link }}">{{ document }}</a></p> |
| 65 | + {% endfor %} |
| 66 | + {% else %} |
| 67 | + <p>-</p> |
| 68 | + {% endif %} |
| 69 | + |
| 70 | + <!-- Submission title with link--> |
| 71 | + <p><b>{% trans "Submission" %}</b></p> |
| 72 | + <p><a href="{{ submission_link }}">{{ submission }}</a></p> |
| 73 | + |
| 74 | +{% endblock %} |
0 commit comments