Skip to content

Commit d1c825a

Browse files
authored
Merge pull request #229 from isawnyu/issue227
incorporate all updates for romance and reason exhibition
2 parents fa29ad7 + 39e4b01 commit d1c825a

File tree

3 files changed

+65
-66
lines changed

3 files changed

+65
-66
lines changed

scripts/batch_update.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,38 @@
1515
from plone.namedfile.file import NamedBlobImage
1616

1717

18-
FIELDS = ['artist',
19-
'title',
20-
'description',
21-
'exhibition_context',
18+
FIELDS = [
19+
'artist',
20+
'author',
21+
'copyist',
22+
'copyright',
23+
'credits',
2224
'date',
23-
'not_before',
24-
'not_after',
25+
'description',
26+
'download_link',
27+
'download_link_text',
28+
'download_link_type',
2529
'dimensions',
30+
'exhibition_context',
31+
'full_title',
2632
'id',
33+
'image',
2734
'inventory_num',
35+
'label',
2836
'lender',
2937
'lender_link',
3038
'medium',
39+
'not_after',
40+
'not_before',
3141
'notes',
32-
'image',
33-
'text',
34-
'label',
35-
'credits',
36-
'copyright',
37-
'subjects',
38-
'pleiades_url',
3942
'object_language',
40-
'object_location'
43+
'object_location',
44+
'pleiades_url',
45+
'subjects',
46+
'text',
47+
'title',
48+
'title_detail',
49+
'translator'
4150
]
4251

4352

src/isaw.exhibitions/isaw/exhibitions/browser/exhibition_object.pt

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@
1212
tal:condition="nocall:image"
1313
tal:content="structure image">
1414
</div>
15-
<div class="ExhibitObjectInfo">
15+
<div class="ExhibitObjectInfo" tal:define="short context/title; full context/full_title|nothing; detail context/title_detail|nothing">
16+
<div class="ExhibitObjectTitle">
17+
<h2 tal:condition="full" tal:content="full">FULL</h2>
18+
<h2 tal:condition="not:full" tal:content="short">SHORT</h2>
19+
</div>
20+
<dl class="ExhibitObjectTitleDetail" tal:condition="python:detail != full"><dt>Description:</dt><dd tal:content="context/title_detail">Title Detail</dd></dl>
1621
<dl class="ExhibitObjectArtist" tal:condition="context/artist|nothing"><dt>Artist:</dt><dd tal:content="context/artist">Artist</dd></dl>
17-
<dl class="ExhibitObjectTitle"><dt>Title:</dt><dd tal:content="context/title">Title</dd></dl>
22+
<dl class="ExhibitObjectAuthor" tal:condition="context/author|nothing"><dt>Author:</dt><dd tal:content="context/author">Author</dd></dl>
23+
<dl class="ExhibitObjectCopyist" tal:condition="context/copyist|nothing"><dt>Copyist:</dt><dd tal:content="context/copyist">Copyist</dd></dl>
24+
<dl class="ExhibitObjectTranslator" tal:condition="context/translator|nothing"><dt>Translator:</dt><dd tal:content="context/translator">Translator</dd></dl>
1825
<dl class="ExhibitObjectLanguage" tal:condition="context/object_language|nothing"><dt>Languge:</dt><dd tal:content="context/object_language">Object Language</dd></dl>
1926
<dl class="ExhibitObjectMedium" tal:condition="context/medium|nothing"><dt>Medium:</dt><dd tal:content="context/medium">Medium</dd></dl>
2027
<dl class="ExhibitObjectSite" tal:condition="context/object_location|nothing"><dt>Location:</dt><dd tal:content="context/object_location">Object Location</dd></dl>
@@ -27,15 +34,22 @@
2734
<dl class="ExhibitObjectInventoryNum" tal:condition="context/inventory_num|nothing"><dt>Inventory Number:</dt><dd tal:content="context/inventory_num">Inventory Number</dd></dl>
2835
<dl class="ExhibitObjectLender" tal:condition="context/lender|nothing">
2936
<dt>Lender:</dt>
30-
<dd><a href="" title="Lender" tal:attributes="href context/lender_link" tal:omit-tag="not:context/lender_link" tal:content="context/lender">Lender</a></dd>
37+
<dd><a href="" rel="external" title="Visit the website of the lender" tal:attributes="href context/lender_link" tal:omit-tag="not:context/lender_link" tal:content="context/lender">Lender</a></dd>
38+
</dl>
39+
<dl class="ExhibitObjectDownload" tal:define="dlink context/download_link|nothing; dtext context/download_link_text|string:select link to download; dtype context/download_link_type|nothing" tal:condition="dlink">
40+
<dt>Download:</dt>
41+
<dd>
42+
<a tal:condition="dtype" href="" title="Download the document" type="" rel="external" tal:attributes="href dlink; type dtype" tal:content="dtext">link text</a>
43+
<a tal:condition="not:dtype" href="" title="Download the document" rel="external" tal:attributes="href dlink; type dtype" tal:content="dtext">link text</a>
44+
</dd>
3145
</dl>
3246
<dl class="ExhibitObjectLabel"
3347
tal:define="text context/label/output|nothing"
3448
tal:condition="text">
3549
<dt>Label:</dt>
3650
<dd tal:content="structure text">Rich Text Content</dd>
3751
</dl>
38-
<div class="ExhibitObjectCredits discreet" tal:condition="context/credits|nothing" tal:content="context/credits">Credit Line</div>
52+
<dl class="ExhibitObjectCredits" tal:condition="context/credits|nothing"><dt>Credit:</dt><dd tal:content="context/credits">Credit Line</dd></dl>
3953
<div class="ExhibitObjectCopyright discreet" tal:condition="context/copyright|nothing" tal:content="context/copyright">Copyright Notice</div>
4054
</div>
4155
<div class="ExhibitObjectText"

src/isaw.exhibitions/isaw/exhibitions/interfaces/__init__.py

Lines changed: 24 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -14,55 +14,31 @@ class IISAWExhibitionsLayer(Interface):
1414
class IExhibitionObject(model.Schema):
1515
"""Schema for Exhibition Objects."""
1616

17-
artist = schema.TextLine(title=_(u'Artist'),
18-
required=False)
19-
20-
exhibition_context = schema.TextLine(title=_(u'Context'),
21-
required=False)
22-
23-
date = schema.TextLine(title=_(u'Date'),
24-
required=False)
25-
26-
not_before = schema.Int(title=_(u'Not Before'),
27-
required=False)
28-
29-
not_after = schema.Int(title=_(u'Not After'),
30-
required=False)
31-
32-
dimensions = schema.TextLine(title=_(u'Dimensions'),
33-
required=False)
34-
17+
full_title = schema.TextLine(title=_(u'Full Title'), required=False)
18+
title_detail = schema.TextLine(title=_(u'Title Detail'), required=False)
19+
artist = schema.TextLine(title=_(u'Artist'), required=False)
20+
author = schema.TextLine(title=_(u'Author'), required=False)
21+
copyist = schema.TextLine(title=_(u'Copyist'), required=False)
22+
download_link = schema.TextLine(title=_(u'Download Link'), required=False)
23+
download_link_text = schema.TextLine(title=_(u'Download Link Text'), required=False)
24+
download_link_type = schema.TextLine(title=_(u'Download Link Type'), required=False)
25+
translator = schema.TextLine(title=_(u'Translator'), required=False)
26+
copyright = schema.TextLine(title=_(u'Copyright Notice'), required=False)
27+
credits = schema.TextLine(title=_(u'Credit Line'), required=False)
28+
date = schema.TextLine(title=_(u'Date'), required=False)
29+
dimensions = schema.TextLine(title=_(u'Dimensions'), required=False)
30+
exhibition_context = schema.TextLine(title=_(u'Context'), required=False)
31+
image = namedfile.NamedBlobImage(title=_(u'Lead Image'), required=False)
32+
inventory_num = schema.TextLine(title=_(u'Inventory Number'), required=True)
33+
lender = schema.TextLine(title=_(u'Lender'), required=False)
34+
lender_link = schema.URI(title=_(u'Lender Link'), required=False)
35+
medium = schema.TextLine(title=_(u'Medium'), required=False)
36+
not_after = schema.Int(title=_(u'Not After'), required=False)
37+
not_before = schema.Int(title=_(u'Not Before'), required=False)
38+
notes = schema.TextLine(title=_(u'Notes'), required=False)
3539
object_language = schema.TextLine(title=_(u'Object Language'), required=False)
36-
37-
inventory_num = schema.TextLine(title=_(u'Inventory Number'),
38-
required=True)
39-
40-
lender = schema.TextLine(title=_(u'Lender'),
41-
required=False)
42-
43-
lender_link = schema.URI(title=_(u'Lender Link'),
44-
required=False)
45-
46-
medium = schema.TextLine(title=_(u'Medium'),
47-
required=False)
48-
4940
object_location = schema.TextLine(title=_(u'Object Location'), required=False)
5041

51-
notes = schema.TextLine(title=_(u'Notes'),
52-
required=False)
53-
54-
credits = schema.TextLine(title=_(u'Credit Line'),
55-
required=False)
56-
57-
copyright = schema.TextLine(title=_(u'Copyright Notice'),
58-
required=False)
59-
60-
image = namedfile.NamedBlobImage(title=_(u'Lead Image'),
61-
required=False)
62-
6342
dexteritytextindexer.searchable('text')
64-
text = RichText(title=_(u'Body'),
65-
required=False)
66-
67-
label = RichText(title=_(u'Label'),
68-
required=False)
43+
text = RichText(title=_(u'Body'), required=False)
44+
label = RichText(title=_(u'Label'), required=False)

0 commit comments

Comments
 (0)