diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-22 08:32:44 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-22 08:32:44 +0200 | 
| commit | 2319c633a92965b045f1c34810dd605d08d16a10 (patch) | |
| tree | 7a3e627da6cb5e7f3fd0d5ba507e94a345e78ee8 | |
| parent | 81a350fcca34b4252a53bd81a04f5788ce7ab910 (diff) | |
| download | Ishtar-2319c633a92965b045f1c34810dd605d08d16a10.tar.bz2 Ishtar-2319c633a92965b045f1c34810dd605d08d16a10.zip  | |
Add columns to find list (refs #1325)
| -rw-r--r-- | archaeological_context_records/templates/ishtar/sheet_contextrecord.html | 4 | ||||
| -rw-r--r-- | archaeological_finds/models.py | 1 | ||||
| -rw-r--r-- | archaeological_finds/views.py | 2 | ||||
| -rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 4 | ||||
| -rw-r--r-- | archaeological_warehouse/models.py | 2 | 
5 files changed, 11 insertions, 2 deletions
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 41e8ebe2a..38c8d2160 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -108,6 +108,8 @@      <th>{% trans "Weight" %}</th>      <th>{% trans "Numbers" %}</th>      <th>{% trans "Parcel" %}</th> +    <th>{% trans "Container ref." %}</th> +    <th>{% trans "Warehouse" %}</th>      <th class='link'> </th>    </tr>    {% for find in item.base_finds.all %} @@ -123,6 +125,8 @@      <td>{{ find.get_last_find.weight|default:"" }}</td>      <td>{{ find.get_last_find.item_number }}</td>      <td>{{ item.context_record.parcel.short_label }}</td> +    <td class='ref'>{{ find.get_last_find.container.reference|default:""}}</td> +    <td class='string'>{{ find.get_last_find.container.location|default:""}}</td>      <td class='link'><a href="#">{% trans "Details" %}</a></td>      {#<a href="#" onclick='load_window("{% url show-find find.pk%}");'>{%trans "Details"%}</a></td>#}    </tr> diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index e4ccaf212..e0c72c79a 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -137,6 +137,7 @@ class Find(BaseHistorizedItem, OwnPerms):                    'base_finds.context_record.parcel.town',                    'base_finds.context_record.parcel.operation.year',                    'base_finds.context_record.parcel.operation.operation_code', +                  'container.reference', 'container.location',                    'base_finds.is_isolated']      if settings.COUNTRY == 'fr':          TABLE_COLS.insert(6, diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index c0ee19c9f..1cf93e080 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2010-2012  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2013  Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index e1ea28882..7d78af3c5 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -153,6 +153,8 @@      <th>{% trans "Weight" %}</th>      <th>{% trans "Numbers" %}</th>      <th>{% trans "Parcel" %}</th> +    <th>{% trans "Container ref." %}</th> +    <th>{% trans "Warehouse" %}</th>      <th class='link'> </th>    </tr>    {% for context_record in item.context_record.all %} @@ -169,6 +171,8 @@      <td>{{ find.get_last_find.weight|default:"" }}</td>      <td>{{ find.get_last_find.item_number }}</td>      <td class="ref">{{ context_record.parcel.short_label }}</td> +    <td class='ref'>{{ find.get_last_find.container.reference|default:""}}</td> +    <td class='string'>{{ find.get_last_find.container.location|default:""}}</td>      <td class='link'><a href="#">{% trans "Details" %}</a></td>      {#<a href="#" onclick='load_window("{% url show-find find.pk%}");'>{%trans "Details"%}</a></td>#}    </tr> diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index d67a5768c..14e3a248c 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -68,7 +68,7 @@ class Container(LightHistorizedItem):      location = models.ForeignKey(Warehouse, verbose_name=_(u"Warehouse"))      container_type = models.ForeignKey(ContainerType,                                         verbose_name=_("Container type")) -    reference = models.CharField(_(u"Reference"), max_length=40) +    reference = models.CharField(_(u"Container ref."), max_length=40)      comment = models.TextField(_(u"Comment"))      class Meta:  | 
