summaryrefslogtreecommitdiff
path: root/archaeological_context_records
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-09-29 02:43:19 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2015-09-29 02:43:19 +0200
commit37cb695ba14761c5c579ace7797dcd99f5b486c2 (patch)
treee27f01bf29b9fe16dfccc157f2a1f2d6fcb872e4 /archaeological_context_records
parent2ff0b6a2d4e1f862a44774d56c84a9b9d39fe923 (diff)
downloadIshtar-37cb695ba14761c5c579ace7797dcd99f5b486c2.tar.bz2
Ishtar-37cb695ba14761c5c579ace7797dcd99f5b486c2.zip
Display dynamicaly large tables in windows
Diffstat (limited to 'archaeological_context_records')
-rw-r--r--archaeological_context_records/models.py2
-rw-r--r--archaeological_context_records/templates/ishtar/sheet_contextrecord.html6
-rw-r--r--archaeological_context_records/views.py1
3 files changed, 5 insertions, 4 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 9c5cf52f4..d86d4aaa9 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -19,7 +19,6 @@
from django.conf import settings
from django.contrib.gis.db import models
-from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.db.models.signals import post_delete
from django.utils.translation import ugettext_lazy as _, ugettext, pgettext
@@ -284,6 +283,7 @@ class RelationType(GeneralRelationType):
verbose_name_plural = _(u"Relation types")
ordering = ('order',)
+
class RecordRelations(GeneralRecordRelations, models.Model):
left_record = models.ForeignKey(ContextRecord,
related_name='right_relations')
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
index 1a18f1cd5..8d1a4de63 100644
--- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
+++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
@@ -66,7 +66,7 @@
{% if item.right_relations.count %}
<h3>{% trans "In relation with"%}</h3>
-<table>
+<table class='simple'>
<tr>
<th>{% trans "Relation type" %}</th>
<th>{% trans "ID" %}</th>
@@ -87,7 +87,7 @@
<td class='link'><a href="#" class='display_details' onclick='load_window("{%url show-contextrecord relation.right_record.pk ''%}")'>{% trans "Details" %}</a></td>
</tr>
{% endfor %}
-<table>
+<table class='simple'>
{% endif %}
@@ -126,7 +126,7 @@
{% trans "Document from this context record" as cr_docs %}
{% if item.source.count %} {% table_document cr_docs item.source.all %}{% endif %}
-<table>
+<table class='simple'>
<caption>{%trans "Finds"%}</caption>
<tr>
<th>{% trans "Complete Id" %}</th>
diff --git a/archaeological_context_records/views.py b/archaeological_context_records/views.py
index d92e162c3..483630b3c 100644
--- a/archaeological_context_records/views.py
+++ b/archaeological_context_records/views.py
@@ -49,6 +49,7 @@ get_contextrecordsource = get_item(
extra_request_keys={
'context_record__parcel__town': 'context_record__parcel__town__pk',
'context_record__operation__year': 'context_record__operation__year',
+ 'context_record__operation': 'context_record__operation__pk',
'context_record__datings__period':
'context_record__datings__period__pk',
'context_record__unit': 'context_record__unit__pk',