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
1=== modified file 'dlf/common/class.tx_dlf_document.php'
2--- dlf/common/class.tx_dlf_document.php 2011-05-20 19:39:31 +0000
3+++ dlf/common/class.tx_dlf_document.php 2011-06-22 16:58:28 +0000
4@@ -392,6 +392,8 @@
5
6 $_details['label'] = (isset($_struct['LABEL']) ? (string) $_struct['LABEL'] : '');
7
8+ $_details['volume'] = '';
9+
10 $_details['pagination'] = '';
11
12 $_details['type'] = (string) $_struct['TYPE'];
13@@ -504,6 +506,7 @@
14 'urn' => array (),
15 'purl' => array (),
16 'type' => array (),
17+ 'volume' => array (),
18 'volume_sorting' => array (),
19 'collection' => array (),
20 'owner' => array (),
21@@ -702,9 +705,9 @@
22
23 // Get available data formats from database.
24 $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
25- 'type,other_type,root,namespace,class',
26+ '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',
27 'tx_dlf_formats',
28- 'pid=0'.tx_dlf_helper::whereClause('tx_dlf_formats'),
29+ 'tx_dlf_formats.pid=0'.tx_dlf_helper::whereClause('tx_dlf_formats'),
30 '',
31 '',
32 ''
33@@ -1062,6 +1065,7 @@
34 'metadata' => json_encode($listed),
35 'structure' => $structure,
36 'partof' => $partof,
37+ 'volume' => $metadata['volume'][0],
38 'volume_sorting' => $metadata['volume_sorting'][0],
39 'collections' => $collections,
40 'owner' => $owner,
41
42=== modified file 'dlf/common/class.tx_dlf_indexing.php'
43--- dlf/common/class.tx_dlf_indexing.php 2011-05-20 19:39:31 +0000
44+++ dlf/common/class.tx_dlf_indexing.php 2011-06-22 16:58:28 +0000
45@@ -396,7 +396,7 @@
46
47 if (!empty($metadata['year_sorting'][0])) {
48
49- $solrDoc->setField('year_sorting', $metadata['year_sorting'][0]);
50+ $solrDoc->setField('year_sorting', intval($metadata['year_sorting'][0]));
51
52 }
53
54@@ -416,6 +416,18 @@
55
56 unset ($metadata['place_sorting']);
57
58+ $solrDoc->setField('volume', $metadata['volume'][0], self::$fieldboost['volume']);
59+
60+ unset ($metadata['volume']);
61+
62+ if (!empty($metadata['volume_sorting'][0])) {
63+
64+ $solrDoc->setField('volume_sorting', intval($metadata['volume_sorting'][0]));
65+
66+ }
67+
68+ unset ($metadata['volume_sorting']);
69+
70 foreach ($metadata as $index_name => $data) {
71
72 if (!empty($data)) {
73
74=== modified file 'dlf/ext_tables.sql'
75--- dlf/ext_tables.sql 2011-03-09 15:36:27 +0000
76+++ dlf/ext_tables.sql 2011-06-22 16:58:28 +0000
77@@ -28,6 +28,7 @@
78 metadata longtext NOT NULL,
79 structure int(11) DEFAULT '0' NOT NULL,
80 partof int(11) DEFAULT '0' NOT NULL,
81+ volume tinytext NOT NULL,
82 volume_sorting int(11) DEFAULT '0' NOT NULL,
83 collections int(11) DEFAULT '0' NOT NULL,
84 owner int(11) DEFAULT '0' NOT NULL,
85
86=== modified file 'dlf/locallang_db.xml'
87--- dlf/locallang_db.xml 2011-04-01 15:53:16 +0000
88+++ dlf/locallang_db.xml 2011-06-22 16:58:28 +0000
89@@ -25,6 +25,7 @@
90 <label index="tx_dlf_documents.structure">Typ of Document</label>
91 <label index="tx_dlf_documents.partof">Part of ...</label>
92 <label index="tx_dlf_documents.partof.none">none</label>
93+ <label index="tx_dlf_documents.volume">Number of Volume</label>
94 <label index="tx_dlf_documents.volume_sorting">Number of Volume (Sorting)</label>
95 <label index="tx_dlf_documents.collections">Collections</label>
96 <label index="tx_dlf_documents.owner">Owner</label>
97@@ -139,6 +140,7 @@
98 <label index="tx_dlf_documents.structure">Dokumententyp</label>
99 <label index="tx_dlf_documents.partof">Übergeordnete Einheit</label>
100 <label index="tx_dlf_documents.partof.none">keine</label>
101+ <label index="tx_dlf_documents.volume">Bandnummer</label>
102 <label index="tx_dlf_documents.volume_sorting">Bandnummer (Sortierung)</label>
103 <label index="tx_dlf_documents.collections">Sammlungen</label>
104 <label index="tx_dlf_documents.owner">Besitzer</label>
105
106=== modified file 'dlf/plugins/collection/class.tx_dlf_collection.php'
107--- dlf/plugins/collection/class.tx_dlf_collection.php 2011-04-01 15:53:16 +0000
108+++ dlf/plugins/collection/class.tx_dlf_collection.php 2011-06-22 16:58:28 +0000
109@@ -235,7 +235,7 @@
110 }
111
112 $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
113- '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',
114+ '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',
115 'tx_dlf_documents',
116 'tx_dlf_relations',
117 'tx_dlf_collections',
118@@ -266,6 +266,7 @@
119 'uid' => $resArray['uid'],
120 'page' => 1,
121 'title' => array ($resArray['title']),
122+ 'volume' => array ($resArray['volume']),
123 'author' => array ($resArray['author']),
124 'year' => array ($resArray['year']),
125 'place' => array ($resArray['place']),
126
127=== modified file 'dlf/plugins/search/class.tx_dlf_search.php'
128--- dlf/plugins/search/class.tx_dlf_search.php 2011-04-01 15:53:16 +0000
129+++ dlf/plugins/search/class.tx_dlf_search.php 2011-06-22 16:58:28 +0000
130@@ -104,6 +104,7 @@
131 'uid' => $doc->uid,
132 'page' => $doc->page,
133 'title' => array ($doc->title),
134+ 'volume' => array ($doc->volume),
135 'author' => array ($doc->author),
136 'year' => array ($doc->year),
137 'place' => array ($doc->place),
138
139=== modified file 'dlf/plugins/toc/class.tx_dlf_toc.php'
140--- dlf/plugins/toc/class.tx_dlf_toc.php 2011-05-20 19:39:31 +0000
141+++ dlf/plugins/toc/class.tx_dlf_toc.php 2011-06-22 16:58:28 +0000
142@@ -61,9 +61,11 @@
143
144 $entryArray = array ();
145
146- // Set "title", "type" and "pagination" from $entry array.
147+ // Set "title", "volume", "type" and "pagination" from $entry array.
148 $entryArray['title'] = $entry['label'];
149
150+ $entryArray['volume'] = $entry['volume'];
151+
152 $entryArray['type'] = $this->pi_getLL($entry['type'], tx_dlf_helper::translate($entry['type'], 'tx_dlf_structures', $this->conf['pages']), FALSE);
153
154 $entryArray['pagination'] = $entry['pagination'];
155@@ -262,7 +264,7 @@
156
157 // Build table of contents from database.
158 $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
159- 'tx_dlf_documents.uid AS uid,tx_dlf_documents.title AS title,tx_dlf_structures.index_name AS type',
160+ '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',
161 'tx_dlf_documents,tx_dlf_structures',
162 $whereClause,
163 '',
164@@ -281,6 +283,7 @@
165 $_entry = array (
166 'label' => $resArray['title'],
167 'type' => $resArray['type'],
168+ 'volume' => $resArray['volume'],
169 'pagination' => '',
170 'points' => array ('doc' => $resArray['uid'])
171 );
172
173=== modified file 'dlf/plugins/toc/setup.txt'
174--- dlf/plugins/toc/setup.txt 2011-03-09 15:36:27 +0000
175+++ dlf/plugins/toc/setup.txt 2011-06-22 16:58:28 +0000
176@@ -6,6 +6,10 @@
177 1.NO = 1
178 1.NO.stdWrap.crop = 55 | &nbsp;... | 1
179 1.NO.stdWrap.ifEmpty.field = type
180+ 1.NO.stdWrap.ifEmpty.append.fieldRequired = volume
181+ 1.NO.stdWrap.ifEmpty.append = TEXT
182+ 1.NO.stdWrap.ifEmpty.append.field = volume
183+ 1.NO.stdWrap.ifEmpty.append.wrap = &nbsp;|
184 1.NO.stdWrap.dataWrap = <span class="tx-dlf-toc-title">|</span> <span class="tx-dlf-toc-pagination">{field:pagination}</span>
185 1.NO.doNotLinkIt.field = doNotLinkIt
186 1.NO.ATagTitle.field = type
187
188=== modified file 'dlf/repository/ApacheSolr/conf/schema.xml'
189--- dlf/repository/ApacheSolr/conf/schema.xml 2011-03-09 15:36:27 +0000
190+++ dlf/repository/ApacheSolr/conf/schema.xml 2011-06-22 16:58:28 +0000
191@@ -124,10 +124,12 @@
192 <field name="type" type="string" indexed="true" stored="true" required="true" default="" />
193 <!-- Next four fields are used for displaying search hits. -->
194 <field name="title" type="standard" indexed="true" stored="true" required="true" default="" multiValued="false" />
195+ <field name="volume" type="standard" indexed="true" stored="true" multiValued="false" />
196 <field name="author" type="standard" indexed="true" stored="true" multiValued="true" />
197 <field name="year" type="standard" indexed="true" stored="true" multiValued="true" />
198 <field name="place" type="standard" indexed="true" stored="true" multiValued="true" />
199- <!-- For sorting purposes, the year of publication should be handled as an integer. -->
200+ <!-- For sorting purposes, the some fields should be handled as an integer. -->
201+ <field name="volume_sorting" type="int" indexed="true" stored="false" multiValued="false" />
202 <field name="year_sorting" type="int" indexed="true" stored="false" multiValued="false" />
203 <!-- CatchAll field. See <copyField> below. -->
204 <field name="default" type="standard" indexed="true" stored="false" required="true" default="" multiValued="true" />
205
206=== modified file 'dlf/tca.php'
207--- dlf/tca.php 2011-04-01 15:53:16 +0000
208+++ dlf/tca.php 2011-06-22 16:58:28 +0000
209@@ -27,7 +27,7 @@
210 $TCA['tx_dlf_documents'] = array (
211 'ctrl' => $TCA['tx_dlf_documents']['ctrl'],
212 'interface' => array (
213- 'showRecordFieldList' => 'title,author,year,place,uid,prod_id,location,oai_id,opac_id,union_id,urn',
214+ 'showRecordFieldList' => 'title,volume,author,year,place,uid,prod_id,location,oai_id,opac_id,union_id,urn',
215 'maxDBListItems' => 50,
216 'maxSingleDBListItems' => 250,
217 ),
218@@ -242,6 +242,16 @@
219 'default' => 0,
220 ),
221 ),
222+ 'volume' => array (
223+ 'exclude' => 1,
224+ 'label' => 'LLL:EXT:dlf/locallang_db.xml:tx_dlf_documents.volume',
225+ 'config' => array (
226+ 'type' => 'input',
227+ 'size' => 30,
228+ 'max' => 255,
229+ 'eval' => 'trim',
230+ ),
231+ ),
232 'volume_sorting' => array (
233 'exclude' => 1,
234 'label' => 'LLL:EXT:dlf/locallang_db.xml:tx_dlf_documents.volume_sorting',
235@@ -319,7 +329,7 @@
236 '2' => array ('showitem' => 'author_sorting', 'canNotCollapse' => 1),
237 '3' => array ('showitem' => 'year_sorting', 'canNotCollapse' => 1),
238 '4' => array ('showitem' => 'place_sorting', 'canNotCollapse' => 1),
239- '5' => array ('showitem' => 'partof, --linebreak--, volume_sorting', 'canNotCollapse' => 1),
240+ '5' => array ('showitem' => 'partof, --linebreak--, volume, volume_sorting', 'canNotCollapse' => 1),
241 ),
242 );
243

Subscribers

People subscribed via source and target branches

to all changes: