summaryrefslogtreecommitdiff
path: root/ishtar
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar')
-rw-r--r--ishtar/furnitures/views.py2
-rw-r--r--ishtar/templates/sheet.html9
-rw-r--r--ishtar/templates/sheet_file.html4
-rw-r--r--ishtar/templates/sheet_operation.html4
4 files changed, 13 insertions, 6 deletions
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 @@
</head>
<body>
{% endblock %}
-<div class="sheet">
-<div class="head"><a href='#' onclick='$("#window").hide("slow")'>{% trans "Close" %}</a></div>
+<div class="sheet" id='{{window_id}}'>
+<script type="text/javascript">var last_window='{{window_id}}';</script>
+<div class="head">
+<a href='#' onclick='$("#{{window_id}}").hide("slow")'>{% trans "Close" %}</a> -
+<a href='#' onclick='$("#window > div").hide("slow");$("#window").html("")'>
+{% trans "Close all windows" %}
+</a></div>
<div class="body">
{% block content %}{% endblock %}
</div>
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 @@
<p><label>{%trans "Type:"%}</label> <span class='value'>{{ item.file_type }}</span></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.related_file %}<p><label>{%trans "Related file:"%}</label> <span class='value'><a href='#' onclick='load_window("{% 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>
@@ -91,7 +91,7 @@
<td class='string'>{{operation.in_charge|default:""}}</td>
<td>{{operation.start_date|default:""}}</td>
<td>{{operation.end_date|default:""}}</td>
- <td class='link'><a href="#{#{%url show-operation operation.pk%}#}">{% trans "Details" %}</a></td>
+ <td class='link'><a href="#" onclick='load_window("{%url show-operation operation.pk ''%}")'>{% trans "Details" %}</a></td>
</tr>
{% empty %}
<tr><td colspan="8" class='no_items'>{% trans "No operation associated to this archaelogical file" %}</td></tr>
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 @@
<p><label>{%trans "Periods:"%}</label> <span class='value'>{{ item.periods.all|join:", " }}</span></p>
{% if item.associated_file %}
-<p><label>{%trans "Associated file:"%}</label> <span class='value'><a href='{% url show-file item.associated_file.pk ''%}'>{{ item.associated_file }}</a></span></p><!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related file -->
+<p><label>{%trans "Associated file:"%}</label> <span class='value'><a href='#' onclick='load_window("{% url show-file item.associated_file.pk ''%}")'>{{ item.associated_file }}</a></span></p><!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related file -->
{% if item.associated_file.is_preventive %}
{#{% if item.operator_reference_code %}<p><label>{%trans "Operator's reference code:"%}</label> <span class='value'>{{ item.operator_reference_code }}</span></p>{% endif %}#}
{% if item.associated_file.town_planning_service %}<p><label>{%trans "Town planning service:"%}</label> <span class='value'>{{ item.associated_file.town_planning_service }}</span></p>{% endif %}
@@ -115,7 +115,7 @@
<td>{{ context_record.datings.all|join:", " }}</td>{# periods ?#}
<td class='string'>{{ context_record.description }}</td>
<td>{{ parcel.section }} - {{parcel.parcel_number}}</td>
- <td class='link'><a href="{%url show-context_record context_record.pk%}">{% trans "Details" %}</a></td>
+ <td class='link'><a href="#" onclick='load_window("{%url show-context_record context_record.pk%}")'>{% trans "Details" %}</a></td>
</tr>
{% empty %}
<tr><td colspan="5" class='no_items'>{% trans "No context record associated to parcel " %}{{ parcel.section }} - {{parcel.parcel_number}}</td></tr>