diff options
Diffstat (limited to 'ishtar/templates/sheet_file.html')
-rw-r--r-- | ishtar/templates/sheet_file.html | 151 |
1 files changed, 76 insertions, 75 deletions
diff --git a/ishtar/templates/sheet_file.html b/ishtar/templates/sheet_file.html index 57f1c00fc..ea0fc20bd 100644 --- a/ishtar/templates/sheet_file.html +++ b/ishtar/templates/sheet_file.html @@ -2,58 +2,53 @@ {% load i18n %} {% block content %} <h3>{% trans "General"%}</h3> -<p><label>{%trans "Year:"%}</label> {{ item.year }}</p> -<p><label>{%trans "Numerical reference:"%}</label> {{ item.numeric_reference }}</p> +<p><label>{%trans "Year:"%}</label><span class='value'>{{ item.year }}</span></p> +<p><label>{%trans "Numerical reference:"%}</label><span class='value'>{{ item.numeric_reference }}</span></p> -<p><label>{%trans "File's name:"%}</label> {{ item.internal_reference }}</p> +<p><label>{%trans "File's name:"%}</label><span class='value'>{{ item.internal_reference }}</span></p> -<p><label>{%trans "Edition date:"%}</label> {{ item.history.all.0.history_date }}</p> <!-- date = now --> -{% if item.reception_date %}<p><label>{%trans "Reception date:"%}</label> {{ item.reception_date }}</p>{% endif %} -<p><label>{%trans "Creation date:"%}</label> {{ item.creation_date }}</p> +<p><label>{%trans "Edition date:"%}</label><span class='value'>{{ item.history.all.0.history_date }}</span></p> <!-- date = now --> +{% if item.reception_date %}<p><label>{%trans "Reception date:"%}</label><span class='value'>{{ item.reception_date }}</span></p>{% endif %} +<p><label>{%trans "Creation date:"%}</label><span class='value'>{{ item.creation_date }}</span></p> {% comment %} {% if item.deadline_date and not item.acts %} - <p>{%trans "Deadline"%} : {% item.deadline_date %}</p> <!-- calculated deadline for some preventive files , see saisine_type, not displayed if an act as been send --> + <p><label>{%trans "Deadline:"%}</label><span class='value'>{% item.deadline_date %}</span></p> <!-- calculated deadline for some preventive files , see saisine_type, not displayed if an act as been send --> {% endif %} {% endcomment %} -<p><label>{%trans "In charge:"%}</label> {{ item.in_charge.full_label }}</p> -<p><label>{%trans "State"%}</label> -{% if item.is_active %}{%trans "Active file"%}</strong></p> -{% else %}{%trans "Closed file"%}</p> -<p><label>{%trans "Closing date:"%}</label> {{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user }}</p> +<p><label>{%trans "In charge:"%}</label><span class='value'>{{ item.in_charge.full_label }}</span></p> +<p><label>{%trans "State"%}</label><span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p> +{% else %}{%trans "Closed file"%}</span></p> +<p><label>{%trans "Closing date:"%}</label><span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user }}</span></p> {% endif %} -<p><label>{%trans "Type:"%}</label> {{ item.file_type }}</p> +<p><label>{%trans "Type:"%}</label><span class='value'>{{ item.file_type }}</span></p> -{% if item.related_file %}<p>{%trans "Related file:"%} {{ item.related_file }}</p>{% endif %} <!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related file --> -<p><label>{%trans "Comment:"%}</label> {{ item.comment }}</p> +{% if item.related_file %}<p><label>{%trans "Related file:"%}</label><span class='value'><a href='{% url show-file item.related_file.pk %}'>{{ item.related_file }}</a></span></p>{% endif %} <!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related file --> +{% if item.comment %}<p><label>{%trans "Comment:"%}</label><span class='value'>{{ item.comment }}</span></p>{%endif%} <h3>{% trans "Localisation"%}</h3> -<p><label>{%trans "Towns:"%}</label> {{ item.towns.all|join:", " }}</p> +<p><label>{%trans "Towns:"%}</label><span class='value'>{{ item.towns.all|join:", " }}</span></p> -<p><label>{%trans "Main address:"%}</label> {{ item.address }}</p> -<p><label>{%trans "Complement:"%}</label> {{ item.complem_adress }}</p> -<p><label>{%trans "Postal code:"%}</label> {{ item.postal_code }}</p> +<p><label>{%trans "Main address:"%}</label><span class='value'>{{ item.address }}</span></p> +{% if item.address_complement %}<p><label>{%trans "Complement:"%}</label><span class='value'>{{ item.address_complement }}</span></p>{%endif%} +{% if item.postal_code %}<p><label>{%trans "Postal code:"%}</label><span class='value'>{{ item.postal_code }}</span></p>{%endif%} -<p><label>{%trans "Surface:"%}</label> {{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)</p> +<p><label>{%trans "Surface:"%}</label><span class='value'>{{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)</span></p> {% if item.is_preventive %} <h3>{% trans "Preventive archaelogical file"%}</h3> -<p><label>{%trans "Planed surface:"%}</label> {{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)</p> -<p><label>{%trans "Saisine type:"%}</label> {{ item.saisine_type }}</p> -{% if item.town_planning_service %}<p><label>{%trans "Town planning service:"%}</label>{{ item.town_planning_service }}</p>{% endif %} -{% if item.permit_type %}<p><label>{%trans "Permit type:"%}</label> {{ item.permit_type }}</p>{% endif %} -{% if item.permit_reference %}<p><label>{%trans "Permit reference:"%}</label> {{ item.permit_reference }}</p>{% endif %} -{% if item.general_contractor.attached_to %}<p><label>{%trans "General contractor organisation:"%}</label> {{ item.general_contractor.attached_to }}</p>{% endif %} <!-- Contractor's organisation displayed as concat of Name/Adress/postal_code/city --> -{% if item.general_contractor %}<p><label>{%trans "General contractor:"%}</label> {{ item.general_contractor.full_label }}</p>{% endif %} -{% comment %} -<p>{%trans "Numerical reference"%} : {% item.index %}</p> <!-- index --> -{% endcomment %} +<p><label>{%trans "Planed surface:"%}</label><span class='value'>{{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)</span></p> +<p><label>{%trans "Saisine type:"%}</label><span class='value'>{{ item.saisine_type }}</span></p> +{% if item.town_planning_service %}<p><label>{%trans "Town planning service:"%}</label><span class='value'>{{ item.town_planning_service }}</span></p>{% endif %} +{% if item.permit_type %}<p><label>{%trans "Permit type:"%}</label><span class='value'>{{ item.permit_type }}</span></p>{% endif %} +{% if item.permit_reference %}<p><label>{%trans "Permit reference:"%}</label><span class='value'>{{ item.permit_reference }}</span></p>{% endif %} +{% if item.general_contractor.attached_to %}<p><label>{%trans "General contractor organisation:"%}</label><span class='value'>{{ item.general_contractor.attached_to }}</span></p>{% endif %} <!-- Contractor's organisation displayed as concat of Name/Adress/postal_code/city --> +{% if item.general_contractor %}<p><label>{%trans "General contractor:"%}</label><span class='value'>{{ item.general_contractor.full_label }}</span></p>{% endif %} {% endif %} -{% if item.administrative_act.all %} <table> <caption>{%trans "Admninistrative acts"%}</caption> <tr> @@ -66,53 +61,59 @@ <tr> <td>{{act.signature_date.year}}</td> <td>{{act.ref_sra}}</td> - <td>{{act.act_type}}</td> + <td class='string'>{{act.act_type}}</td> <td>{{act.signature_date}}</td> </tr> + {% empty %} + <tr><td colspan="4" class='no_items'>{% trans "No administrative act associated to this archaelogical file" %}</td></tr> {% endfor %} </table> -{%endif%} -{% comment %} -<!-- associated operations --> - - <table class='adm_ope'> <!-- associated ope class--> - <caption>{%trans "Associated operations"%}</caption> - <tr> - {% for label, in item.data_ope %} - <th>{{label}}</th> - {% endfor %} - </tr> - {% for data, in item.data_ope %} - <tr> - <td>{{year}}</td> - <td>{{reference}}</td> - <td>{{patriarche}}</td> - <td>{{type}}</td> - <td>{{head_scientist}}</td> - <td>{{date_debut}}</td> - <td>{{date_fin}}</td> - <td>{{link_to_ope_sheet}}</td> - </tr> - {% endfor %} - </table> -<!-- Operation's associated acts --> - - <table class='adm_acts'> <!-- associated acts class--> - <caption>{%trans "Admninistrative acts linked to associated operations"%}</caption> - <tr> - {% for label, in item.ope.data_acts %} - <th>{{label}}</th> - {% endfor %} - </tr> - {% for data, in item.ope.data_acts %} - <tr> - <td>{{year}}</td> - <td>{{reference}}</td> - <td>{{type}}</td> - <td>{{date}}</td> - </tr> - {% endfor %} - </table> -{% endcomment %} +<table> + <caption>{%trans "Associated operations"%}</caption> + <tr> + <th>{% trans "Year" %}</th> + <th>{% trans "Reference" %}</th> + <th>Code Patriarche</th> + <th>{% trans "Type" %}</th> + <th>{% trans "In charge" %}</th> + <th>{% trans "Start date" %}</th> + <th>{% trans "End date" %}</th> + <th></th> + </tr> + {% for operation in item.operations.all %} + <tr> + <td>{{operation.year}}</td> + <td>{{operation.operation_code}}</td> + <td>{{operation.code_patriarche|default:""}}</td> + <td class='string'>{{operation.operation_type}}</td> + <td class='string'>{{operation.in_charge|default:""}}</td> + <td>{{operation.start_date|default:""}}</td> + <td>{{operation.end_date|default:""}}</td> + <td><a href="#{#{%url show-operation operation.pk%}#}">{% trans "Details" %}</a></td> + </tr> + {% empty %} + <tr><td colspan="4" class='no_items'>{% trans "No operation associated to this archaelogical file" %}</td></tr> + {% endfor %} +</table> + +<table> + <caption>{%trans "Admninistrative acts linked to associated operations"%}</caption> + <tr> + <th>{% trans "Year" %}</th> + <th>{% trans "Reference" %}</th> + <th>{% trans "Type" %}</th> + <th>{% trans "Date" %}</th> + </tr> + {% for act in item.operation_acts %} + <tr> + <td>{{act.signature_date.year}}</td> + <td>{{act.ref_sra}}</td> + <td class='string'>{{act.act_type}}</td> + <td>{{act.signature_date}}</td> + </tr> + {% empty %} + <tr><td colspan="4" class='no_items'>{% trans "No administrative act linked to operations" %}</td></tr> + {% endfor %} +</table> {% endblock %} |