diff options
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 |
commit | df2405cb949e268dda4c880d2685054c0eab4a80 (patch) | |
tree | e27f01bf29b9fe16dfccc157f2a1f2d6fcb872e4 /archaeological_context_records | |
parent | fa03f91834500f7589ba1912a681227186d7974e (diff) | |
download | Ishtar-df2405cb949e268dda4c880d2685054c0eab4a80.tar.bz2 Ishtar-df2405cb949e268dda4c880d2685054c0eab4a80.zip |
Display dynamicaly large tables in windows
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/models.py | 2 | ||||
-rw-r--r-- | archaeological_context_records/templates/ishtar/sheet_contextrecord.html | 6 | ||||
-rw-r--r-- | archaeological_context_records/views.py | 1 |
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', |