From 1fe643357ffdfa927e4a0c048412d09ef478f8c0 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 10 Mar 2011 00:29:26 +0100 Subject: Manage multiple windows --- ishtar/furnitures/views.py | 2 ++ ishtar/templates/sheet.html | 9 +++++++-- ishtar/templates/sheet_file.html | 4 ++-- ishtar/templates/sheet_operation.html | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) (limited to 'ishtar') diff --git a/ishtar/furnitures/views.py b/ishtar/furnitures/views.py index b212dee77..b22257839 100644 --- a/ishtar/furnitures/views.py +++ b/ishtar/furnitures/views.py @@ -246,6 +246,8 @@ def show_item(model, name): return HttpResponse(None) doc_type = 'type' in dct and dct.pop('type') dct['item'], dct['item_name'] = item, name + dct['window_id'] = "%s-%d-%s" % (name, item.pk, + datetime.datetime.now().strftime('%M%s')) context_instance = RequestContext(request) context_instance.update(dct) n = datetime.datetime.now() diff --git a/ishtar/templates/sheet.html b/ishtar/templates/sheet.html index c157b61a0..8da56345c 100644 --- a/ishtar/templates/sheet.html +++ b/ishtar/templates/sheet.html @@ -12,8 +12,13 @@ {% endblock %} -
- +
+ +
{% block content %}{% endblock %}
diff --git a/ishtar/templates/sheet_file.html b/ishtar/templates/sheet_file.html index 314fcaf06..8a004b0a5 100644 --- a/ishtar/templates/sheet_file.html +++ b/ishtar/templates/sheet_file.html @@ -25,7 +25,7 @@

{{ item.file_type }}

-{% if item.related_file %}

{{ item.related_file }}

{% endif %} +{% if item.related_file %}

{{ item.related_file }}

{% endif %} {% if item.comment %}

{{ item.comment }}

{%endif%}

{% trans "Localisation"%}

@@ -91,7 +91,7 @@ {{operation.in_charge|default:""}} {{operation.start_date|default:""}} {{operation.end_date|default:""}} - {% trans "Details" %} + {% trans "Details" %} {% empty %} {% trans "No operation associated to this archaelogical file" %} diff --git a/ishtar/templates/sheet_operation.html b/ishtar/templates/sheet_operation.html index 8902126c6..d0e31ae5a 100644 --- a/ishtar/templates/sheet_operation.html +++ b/ishtar/templates/sheet_operation.html @@ -30,7 +30,7 @@

{{ item.periods.all|join:", " }}

{% if item.associated_file %} -

{{ item.associated_file }}

+

{{ item.associated_file }}

{% if item.associated_file.is_preventive %} {#{% if item.operator_reference_code %}

{{ item.operator_reference_code }}

{% endif %}#} {% if item.associated_file.town_planning_service %}

{{ item.associated_file.town_planning_service }}

{% endif %} @@ -115,7 +115,7 @@ {{ context_record.datings.all|join:", " }}{# periods ?#} {{ context_record.description }} {{ parcel.section }} - {{parcel.parcel_number}} - {% trans "Details" %} + {% trans "Details" %} {% empty %} {% trans "No context record associated to parcel " %}{{ parcel.section }} - {{parcel.parcel_number}} -- cgit v1.2.3