Merge lp:~sebastian-meyer/goobi-presentation/volume-handling into lp:~sebastian-meyer/goobi-presentation/old-trunk

Proposed by Sebastian Meyer
Status: Merged
Merged at revision: 11
Proposed branch: lp:~sebastian-meyer/goobi-presentation/volume-handling
Merge into: lp:~sebastian-meyer/goobi-presentation/old-trunk
Diff against target: 242 lines (+49/-9)
10 files modified
dlf/common/class.tx_dlf_document.php (+6/-2)
dlf/common/class.tx_dlf_indexing.php (+13/-1)
dlf/ext_tables.sql (+1/-0)
dlf/locallang_db.xml (+2/-0)
dlf/plugins/collection/class.tx_dlf_collection.php (+2/-1)
dlf/plugins/search/class.tx_dlf_search.php (+1/-0)
dlf/plugins/toc/class.tx_dlf_toc.php (+5/-2)
dlf/plugins/toc/setup.txt (+4/-0)
dlf/repository/ApacheSolr/conf/schema.xml (+3/-1)
dlf/tca.php (+12/-2)
To merge this branch: bzr merge lp:~sebastian-meyer/goobi-presentation/volume-handling
Reviewer Review Type Date Requested Status
Sebastian Meyer Approve
Review via email: mp+65535@code.launchpad.net

Commit message

Fix Bug #791160: Show volumes' descriptive name in list view and navigation

Description of the change

Fix Bug #791160: Show volumes' descriptive name in list view and navigation

To post a comment you must log in.
Revision history for this message
Sebastian Meyer (sebastian-meyer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dlf/common/class.tx_dlf_document.php'
--- dlf/common/class.tx_dlf_document.php 2011-05-20 19:39:31 +0000
+++ dlf/common/class.tx_dlf_document.php 2011-06-22 16:58:28 +0000
@@ -392,6 +392,8 @@
392392
393 $_details['label'] = (isset($_struct['LABEL']) ? (string) $_struct['LABEL'] : '');393 $_details['label'] = (isset($_struct['LABEL']) ? (string) $_struct['LABEL'] : '');
394394
395 $_details['volume'] = '';
396
395 $_details['pagination'] = '';397 $_details['pagination'] = '';
396398
397 $_details['type'] = (string) $_struct['TYPE'];399 $_details['type'] = (string) $_struct['TYPE'];
@@ -504,6 +506,7 @@
504 'urn' => array (),506 'urn' => array (),
505 'purl' => array (),507 'purl' => array (),
506 'type' => array (),508 'type' => array (),
509 'volume' => array (),
507 'volume_sorting' => array (),510 'volume_sorting' => array (),
508 'collection' => array (),511 'collection' => array (),
509 'owner' => array (),512 'owner' => array (),
@@ -702,9 +705,9 @@
702705
703 // Get available data formats from database.706 // Get available data formats from database.
704 $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(707 $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
705 'type,other_type,root,namespace,class',708 'tx_dlf_formats.type AS type,tx_dlf_formats.other_type AS other_type,tx_dlf_formats.root AS root,tx_dlf_formats.namespace AS namespace,tx_dlf_formats.class AS class',
706 'tx_dlf_formats',709 'tx_dlf_formats',
707 'pid=0'.tx_dlf_helper::whereClause('tx_dlf_formats'),710 'tx_dlf_formats.pid=0'.tx_dlf_helper::whereClause('tx_dlf_formats'),
708 '',711 '',
709 '',712 '',
710 ''713 ''
@@ -1062,6 +1065,7 @@
1062 'metadata' => json_encode($listed),1065 'metadata' => json_encode($listed),
1063 'structure' => $structure,1066 'structure' => $structure,
1064 'partof' => $partof,1067 'partof' => $partof,
1068 'volume' => $metadata['volume'][0],
1065 'volume_sorting' => $metadata['volume_sorting'][0],1069 'volume_sorting' => $metadata['volume_sorting'][0],
1066 'collections' => $collections,1070 'collections' => $collections,
1067 'owner' => $owner,1071 'owner' => $owner,
10681072
=== modified file 'dlf/common/class.tx_dlf_indexing.php'
--- dlf/common/class.tx_dlf_indexing.php 2011-05-20 19:39:31 +0000
+++ dlf/common/class.tx_dlf_indexing.php 2011-06-22 16:58:28 +0000
@@ -396,7 +396,7 @@
396396
397 if (!empty($metadata['year_sorting'][0])) {397 if (!empty($metadata['year_sorting'][0])) {
398398
399 $solrDoc->setField('year_sorting', $metadata['year_sorting'][0]);399 $solrDoc->setField('year_sorting', intval($metadata['year_sorting'][0]));
400400
401 }401 }
402402
@@ -416,6 +416,18 @@
416416
417 unset ($metadata['place_sorting']);417 unset ($metadata['place_sorting']);
418418
419 $solrDoc->setField('volume', $metadata['volume'][0], self::$fieldboost['volume']);
420
421 unset ($metadata['volume']);
422
423 if (!empty($metadata['volume_sorting'][0])) {
424
425 $solrDoc->setField('volume_sorting', intval($metadata['volume_sorting'][0]));
426
427 }
428
429 unset ($metadata['volume_sorting']);
430
419 foreach ($metadata as $index_name => $data) {431 foreach ($metadata as $index_name => $data) {
420432
421 if (!empty($data)) {433 if (!empty($data)) {
422434
=== modified file 'dlf/ext_tables.sql'
--- dlf/ext_tables.sql 2011-03-09 15:36:27 +0000
+++ dlf/ext_tables.sql 2011-06-22 16:58:28 +0000
@@ -28,6 +28,7 @@
28 metadata longtext NOT NULL,28 metadata longtext NOT NULL,
29 structure int(11) DEFAULT '0' NOT NULL,29 structure int(11) DEFAULT '0' NOT NULL,
30 partof int(11) DEFAULT '0' NOT NULL,30 partof int(11) DEFAULT '0' NOT NULL,
31 volume tinytext NOT NULL,
31 volume_sorting int(11) DEFAULT '0' NOT NULL,32 volume_sorting int(11) DEFAULT '0' NOT NULL,
32 collections int(11) DEFAULT '0' NOT NULL,33 collections int(11) DEFAULT '0' NOT NULL,
33 owner int(11) DEFAULT '0' NOT NULL,34 owner int(11) DEFAULT '0' NOT NULL,
3435
=== modified file 'dlf/locallang_db.xml'
--- dlf/locallang_db.xml 2011-04-01 15:53:16 +0000
+++ dlf/locallang_db.xml 2011-06-22 16:58:28 +0000
@@ -25,6 +25,7 @@
25 <label index="tx_dlf_documents.structure">Typ of Document</label>25 <label index="tx_dlf_documents.structure">Typ of Document</label>
26 <label index="tx_dlf_documents.partof">Part of ...</label>26 <label index="tx_dlf_documents.partof">Part of ...</label>
27 <label index="tx_dlf_documents.partof.none">none</label>27 <label index="tx_dlf_documents.partof.none">none</label>
28 <label index="tx_dlf_documents.volume">Number of Volume</label>
28 <label index="tx_dlf_documents.volume_sorting">Number of Volume (Sorting)</label>29 <label index="tx_dlf_documents.volume_sorting">Number of Volume (Sorting)</label>
29 <label index="tx_dlf_documents.collections">Collections</label>30 <label index="tx_dlf_documents.collections">Collections</label>
30 <label index="tx_dlf_documents.owner">Owner</label>31 <label index="tx_dlf_documents.owner">Owner</label>
@@ -139,6 +140,7 @@
139 <label index="tx_dlf_documents.structure">Dokumententyp</label>140 <label index="tx_dlf_documents.structure">Dokumententyp</label>
140 <label index="tx_dlf_documents.partof">Übergeordnete Einheit</label>141 <label index="tx_dlf_documents.partof">Übergeordnete Einheit</label>
141 <label index="tx_dlf_documents.partof.none">keine</label>142 <label index="tx_dlf_documents.partof.none">keine</label>
143 <label index="tx_dlf_documents.volume">Bandnummer</label>
142 <label index="tx_dlf_documents.volume_sorting">Bandnummer (Sortierung)</label>144 <label index="tx_dlf_documents.volume_sorting">Bandnummer (Sortierung)</label>
143 <label index="tx_dlf_documents.collections">Sammlungen</label>145 <label index="tx_dlf_documents.collections">Sammlungen</label>
144 <label index="tx_dlf_documents.owner">Besitzer</label>146 <label index="tx_dlf_documents.owner">Besitzer</label>
145147
=== modified file 'dlf/plugins/collection/class.tx_dlf_collection.php'
--- dlf/plugins/collection/class.tx_dlf_collection.php 2011-04-01 15:53:16 +0000
+++ dlf/plugins/collection/class.tx_dlf_collection.php 2011-06-22 16:58:28 +0000
@@ -235,7 +235,7 @@
235 }235 }
236236
237 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(237 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
238 'tx_dlf_collections.label AS collLabel,tx_dlf_collections.description AS collDesc,tx_dlf_documents.uid AS uid,tx_dlf_documents.title AS title,tx_dlf_documents.author AS author,tx_dlf_documents.place AS place,tx_dlf_documents.year AS year,tx_dlf_documents.structure AS type',238 'tx_dlf_collections.label AS collLabel,tx_dlf_collections.description AS collDesc,tx_dlf_documents.uid AS uid,tx_dlf_documents.title AS title,tx_dlf_documents.volume AS volume,tx_dlf_documents.author AS author,tx_dlf_documents.place AS place,tx_dlf_documents.year AS year,tx_dlf_documents.structure AS type',
239 'tx_dlf_documents',239 'tx_dlf_documents',
240 'tx_dlf_relations',240 'tx_dlf_relations',
241 'tx_dlf_collections',241 'tx_dlf_collections',
@@ -266,6 +266,7 @@
266 'uid' => $resArray['uid'],266 'uid' => $resArray['uid'],
267 'page' => 1,267 'page' => 1,
268 'title' => array ($resArray['title']),268 'title' => array ($resArray['title']),
269 'volume' => array ($resArray['volume']),
269 'author' => array ($resArray['author']),270 'author' => array ($resArray['author']),
270 'year' => array ($resArray['year']),271 'year' => array ($resArray['year']),
271 'place' => array ($resArray['place']),272 'place' => array ($resArray['place']),
272273
=== modified file 'dlf/plugins/search/class.tx_dlf_search.php'
--- dlf/plugins/search/class.tx_dlf_search.php 2011-04-01 15:53:16 +0000
+++ dlf/plugins/search/class.tx_dlf_search.php 2011-06-22 16:58:28 +0000
@@ -104,6 +104,7 @@
104 'uid' => $doc->uid,104 'uid' => $doc->uid,
105 'page' => $doc->page,105 'page' => $doc->page,
106 'title' => array ($doc->title),106 'title' => array ($doc->title),
107 'volume' => array ($doc->volume),
107 'author' => array ($doc->author),108 'author' => array ($doc->author),
108 'year' => array ($doc->year),109 'year' => array ($doc->year),
109 'place' => array ($doc->place),110 'place' => array ($doc->place),
110111
=== modified file 'dlf/plugins/toc/class.tx_dlf_toc.php'
--- dlf/plugins/toc/class.tx_dlf_toc.php 2011-05-20 19:39:31 +0000
+++ dlf/plugins/toc/class.tx_dlf_toc.php 2011-06-22 16:58:28 +0000
@@ -61,9 +61,11 @@
6161
62 $entryArray = array ();62 $entryArray = array ();
6363
64 // Set "title", "type" and "pagination" from $entry array.64 // Set "title", "volume", "type" and "pagination" from $entry array.
65 $entryArray['title'] = $entry['label'];65 $entryArray['title'] = $entry['label'];
6666
67 $entryArray['volume'] = $entry['volume'];
68
67 $entryArray['type'] = $this->pi_getLL($entry['type'], tx_dlf_helper::translate($entry['type'], 'tx_dlf_structures', $this->conf['pages']), FALSE);69 $entryArray['type'] = $this->pi_getLL($entry['type'], tx_dlf_helper::translate($entry['type'], 'tx_dlf_structures', $this->conf['pages']), FALSE);
6870
69 $entryArray['pagination'] = $entry['pagination'];71 $entryArray['pagination'] = $entry['pagination'];
@@ -262,7 +264,7 @@
262264
263 // Build table of contents from database.265 // Build table of contents from database.
264 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(266 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
265 'tx_dlf_documents.uid AS uid,tx_dlf_documents.title AS title,tx_dlf_structures.index_name AS type',267 'tx_dlf_documents.uid AS uid,tx_dlf_documents.title AS title,tx_dlf_documents.volume AS volume,tx_dlf_structures.index_name AS type',
266 'tx_dlf_documents,tx_dlf_structures',268 'tx_dlf_documents,tx_dlf_structures',
267 $whereClause,269 $whereClause,
268 '',270 '',
@@ -281,6 +283,7 @@
281 $_entry = array (283 $_entry = array (
282 'label' => $resArray['title'],284 'label' => $resArray['title'],
283 'type' => $resArray['type'],285 'type' => $resArray['type'],
286 'volume' => $resArray['volume'],
284 'pagination' => '',287 'pagination' => '',
285 'points' => array ('doc' => $resArray['uid'])288 'points' => array ('doc' => $resArray['uid'])
286 );289 );
287290
=== modified file 'dlf/plugins/toc/setup.txt'
--- dlf/plugins/toc/setup.txt 2011-03-09 15:36:27 +0000
+++ dlf/plugins/toc/setup.txt 2011-06-22 16:58:28 +0000
@@ -6,6 +6,10 @@
6 1.NO = 16 1.NO = 1
7 1.NO.stdWrap.crop = 55 | &nbsp;... | 17 1.NO.stdWrap.crop = 55 | &nbsp;... | 1
8 1.NO.stdWrap.ifEmpty.field = type8 1.NO.stdWrap.ifEmpty.field = type
9 1.NO.stdWrap.ifEmpty.append.fieldRequired = volume
10 1.NO.stdWrap.ifEmpty.append = TEXT
11 1.NO.stdWrap.ifEmpty.append.field = volume
12 1.NO.stdWrap.ifEmpty.append.wrap = &nbsp;|
9 1.NO.stdWrap.dataWrap = <span class="tx-dlf-toc-title">|</span> <span class="tx-dlf-toc-pagination">{field:pagination}</span>13 1.NO.stdWrap.dataWrap = <span class="tx-dlf-toc-title">|</span> <span class="tx-dlf-toc-pagination">{field:pagination}</span>
10 1.NO.doNotLinkIt.field = doNotLinkIt14 1.NO.doNotLinkIt.field = doNotLinkIt
11 1.NO.ATagTitle.field = type15 1.NO.ATagTitle.field = type
1216
=== modified file 'dlf/repository/ApacheSolr/conf/schema.xml'
--- dlf/repository/ApacheSolr/conf/schema.xml 2011-03-09 15:36:27 +0000
+++ dlf/repository/ApacheSolr/conf/schema.xml 2011-06-22 16:58:28 +0000
@@ -124,10 +124,12 @@
124 <field name="type" type="string" indexed="true" stored="true" required="true" default="" />124 <field name="type" type="string" indexed="true" stored="true" required="true" default="" />
125 <!-- Next four fields are used for displaying search hits. -->125 <!-- Next four fields are used for displaying search hits. -->
126 <field name="title" type="standard" indexed="true" stored="true" required="true" default="" multiValued="false" />126 <field name="title" type="standard" indexed="true" stored="true" required="true" default="" multiValued="false" />
127 <field name="volume" type="standard" indexed="true" stored="true" multiValued="false" />
127 <field name="author" type="standard" indexed="true" stored="true" multiValued="true" />128 <field name="author" type="standard" indexed="true" stored="true" multiValued="true" />
128 <field name="year" type="standard" indexed="true" stored="true" multiValued="true" />129 <field name="year" type="standard" indexed="true" stored="true" multiValued="true" />
129 <field name="place" type="standard" indexed="true" stored="true" multiValued="true" />130 <field name="place" type="standard" indexed="true" stored="true" multiValued="true" />
130 <!-- For sorting purposes, the year of publication should be handled as an integer. -->131 <!-- For sorting purposes, the some fields should be handled as an integer. -->
132 <field name="volume_sorting" type="int" indexed="true" stored="false" multiValued="false" />
131 <field name="year_sorting" type="int" indexed="true" stored="false" multiValued="false" />133 <field name="year_sorting" type="int" indexed="true" stored="false" multiValued="false" />
132 <!-- CatchAll field. See <copyField> below. -->134 <!-- CatchAll field. See <copyField> below. -->
133 <field name="default" type="standard" indexed="true" stored="false" required="true" default="" multiValued="true" />135 <field name="default" type="standard" indexed="true" stored="false" required="true" default="" multiValued="true" />
134136
=== modified file 'dlf/tca.php'
--- dlf/tca.php 2011-04-01 15:53:16 +0000
+++ dlf/tca.php 2011-06-22 16:58:28 +0000
@@ -27,7 +27,7 @@
27$TCA['tx_dlf_documents'] = array (27$TCA['tx_dlf_documents'] = array (
28 'ctrl' => $TCA['tx_dlf_documents']['ctrl'],28 'ctrl' => $TCA['tx_dlf_documents']['ctrl'],
29 'interface' => array (29 'interface' => array (
30 'showRecordFieldList' => 'title,author,year,place,uid,prod_id,location,oai_id,opac_id,union_id,urn',30 'showRecordFieldList' => 'title,volume,author,year,place,uid,prod_id,location,oai_id,opac_id,union_id,urn',
31 'maxDBListItems' => 50,31 'maxDBListItems' => 50,
32 'maxSingleDBListItems' => 250,32 'maxSingleDBListItems' => 250,
33 ),33 ),
@@ -242,6 +242,16 @@
242 'default' => 0,242 'default' => 0,
243 ),243 ),
244 ),244 ),
245 'volume' => array (
246 'exclude' => 1,
247 'label' => 'LLL:EXT:dlf/locallang_db.xml:tx_dlf_documents.volume',
248 'config' => array (
249 'type' => 'input',
250 'size' => 30,
251 'max' => 255,
252 'eval' => 'trim',
253 ),
254 ),
245 'volume_sorting' => array (255 'volume_sorting' => array (
246 'exclude' => 1,256 'exclude' => 1,
247 'label' => 'LLL:EXT:dlf/locallang_db.xml:tx_dlf_documents.volume_sorting',257 'label' => 'LLL:EXT:dlf/locallang_db.xml:tx_dlf_documents.volume_sorting',
@@ -319,7 +329,7 @@
319 '2' => array ('showitem' => 'author_sorting', 'canNotCollapse' => 1),329 '2' => array ('showitem' => 'author_sorting', 'canNotCollapse' => 1),
320 '3' => array ('showitem' => 'year_sorting', 'canNotCollapse' => 1),330 '3' => array ('showitem' => 'year_sorting', 'canNotCollapse' => 1),
321 '4' => array ('showitem' => 'place_sorting', 'canNotCollapse' => 1),331 '4' => array ('showitem' => 'place_sorting', 'canNotCollapse' => 1),
322 '5' => array ('showitem' => 'partof, --linebreak--, volume_sorting', 'canNotCollapse' => 1),332 '5' => array ('showitem' => 'partof, --linebreak--, volume, volume_sorting', 'canNotCollapse' => 1),
323 ),333 ),
324);334);
325335

Subscribers

People subscribed via source and target branches

to all changes: