Skip to content

Commit

Permalink
Merge pull request #111 from acdh-oeaw/feature/89-remodel-instance-di…
Browse files Browse the repository at this point in the history
…mension

Feature/89 remodel instance dimension
  • Loading branch information
gythaogg authored Jul 16, 2024
2 parents 60c3f5f + aec903e commit ff8807a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions apis_ontology/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class InstanceForm(TibscholEntityForm):
"drepung_number",
"provenance",
"zotero_ref",
"dimension",
"item_description",
"comments",
"notes",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.14 on 2024-07-16 05:42

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("apis_ontology", "0025_alter_instanceiscopiedfrominstance_options_and_more"),
]

operations = [
migrations.AddField(
model_name="instance",
name="dimension",
field=models.CharField(
blank=True, max_length=255, null=True, verbose_name="WxH size in cm"
),
),
migrations.AddField(
model_name="versioninstance",
name="dimension",
field=models.CharField(
blank=True, max_length=255, null=True, verbose_name="WxH size in cm"
),
),
]
3 changes: 3 additions & 0 deletions apis_ontology/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ class Instance(
null=True,
verbose_name="Availability",
)
dimension = models.CharField(
max_length=255, blank=True, null=True, verbose_name="WxH size in cm"
)
item_description = models.TextField(
blank=True, null=True, verbose_name="Item description"
)
Expand Down
6 changes: 6 additions & 0 deletions apis_ontology/templates/generic/partials/instance_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@
<td>{{object.tibschol_ref}}</td>
</tr>
{% endif %}
{% if object.dimension %}
<tr>
<th>WxH size in cm</th>
<td>{{ object.dimension }}</td>
</tr>
{% endif %}
{% if object.item_description %}
<tr>
<th>Item description</th>
Expand Down

0 comments on commit ff8807a

Please sign in to comment.