Merge lp:~henrik-lochmann/goobi-presentation/bug-956155 into lp:~slub.team/goobi-presentation/old-bzr-trunk
- bug-956155
- Merge into old-bzr-trunk
Proposed by
Henrik Lochmann
Status: | Merged |
---|---|
Approved by: | Sebastian Meyer |
Approved revision: | 105 |
Merged at revision: | 116 |
Proposed branch: | lp:~henrik-lochmann/goobi-presentation/bug-956155 |
Merge into: | lp:~slub.team/goobi-presentation/old-bzr-trunk |
Diff against target: |
451 lines (+232/-10) 10 files modified
dlf/common/class.tx_dlf_document.php (+159/-1) dlf/common/class.tx_dlf_indexing.php (+7/-0) dlf/ext_conf_template.txt (+3/-0) dlf/ext_tables.sql (+4/-1) dlf/locallang.xml (+7/-1) dlf/plugins/collection/class.tx_dlf_collection.php (+3/-2) dlf/plugins/listview/class.tx_dlf_listview.php (+12/-1) dlf/plugins/listview/template.tmpl (+1/-0) dlf/plugins/search/class.tx_dlf_search.php (+5/-3) dlf/tca.php (+31/-1) |
To merge this branch: | bzr merge lp:~henrik-lochmann/goobi-presentation/bug-956155 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sebastian Meyer | Approve | ||
Review via email:
|
Commit message
Description of the change
- fixing after internal review
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
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 2012-05-15 07:43:50 +0000 | |||
3 | +++ dlf/common/class.tx_dlf_document.php 2012-07-27 10:23:21 +0000 | |||
4 | @@ -29,7 +29,7 @@ | |||
5 | 29 | /** | 29 | /** |
6 | 30 | * Document class 'tx_dlf_document' for the 'dlf' extension. | 30 | * Document class 'tx_dlf_document' for the 'dlf' extension. |
7 | 31 | * | 31 | * |
9 | 32 | * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de> | 32 | * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>, Henrik Lochmann <dev@mentalmotive.com> |
10 | 33 | * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden | 33 | * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden |
11 | 34 | * @package TYPO3 | 34 | * @package TYPO3 |
12 | 35 | * @subpackage tx_dlf | 35 | * @subpackage tx_dlf |
13 | @@ -248,6 +248,23 @@ | |||
14 | 248 | */ | 248 | */ |
15 | 249 | protected $tableOfContentsLoaded = FALSE; | 249 | protected $tableOfContentsLoaded = FALSE; |
16 | 250 | 250 | ||
17 | 251 | /** | ||
18 | 252 | * This holds the document's thumbnail. | ||
19 | 253 | * | ||
20 | 254 | * @var string | ||
21 | 255 | * @access protected | ||
22 | 256 | */ | ||
23 | 257 | protected $thumbnail = NULL; | ||
24 | 258 | |||
25 | 259 | /** | ||
26 | 260 | * Is the thumbnail loaded? | ||
27 | 261 | * @see $thumbnail | ||
28 | 262 | * | ||
29 | 263 | * @var boolean | ||
30 | 264 | * @access protected | ||
31 | 265 | */ | ||
32 | 266 | protected $thumbnailLoaded = FALSE; | ||
33 | 267 | |||
34 | 251 | /** | 268 | /** |
35 | 252 | * This holds the UID or the URL of the document | 269 | * This holds the UID or the URL of the document |
36 | 253 | * | 270 | * |
37 | @@ -798,6 +815,146 @@ | |||
38 | 798 | 815 | ||
39 | 799 | } | 816 | } |
40 | 800 | 817 | ||
41 | 818 | /** | ||
42 | 819 | * Returns a document thumbnail depending on ext configuration and structure element settings. | ||
43 | 820 | * | ||
44 | 821 | * @access public | ||
45 | 822 | * | ||
46 | 823 | * @param integer $pid: The PID for the metadata definitions | ||
47 | 824 | * | ||
48 | 825 | * @return mixed The thumbnail url or FALSE, if none could be found. | ||
49 | 826 | */ | ||
50 | 827 | public function getThumbnail($pid = -1) { | ||
51 | 828 | |||
52 | 829 | if (!$this->thumbnailLoaded) { | ||
53 | 830 | |||
54 | 831 | if ($pid === -1) { | ||
55 | 832 | |||
56 | 833 | $pid = $this->pid; | ||
57 | 834 | |||
58 | 835 | } | ||
59 | 836 | |||
60 | 837 | $logicalUnitId = $this->getToplevelId(); | ||
61 | 838 | |||
62 | 839 | $metadata = $this->getMetadata($logicalUnitId, $pid); | ||
63 | 840 | |||
64 | 841 | $structureType = $metadata['type'][0]; | ||
65 | 842 | |||
66 | 843 | // Check if for this structure/document type thumbnails shall be rendered. | ||
67 | 844 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | ||
68 | 845 | 'tx_dlf_structures.thumbnail AS thumbnail, tx_dlf_structures.thumbnail_source AS thumbnail_source', | ||
69 | 846 | 'tx_dlf_structures', | ||
70 | 847 | 'tx_dlf_structures.pid='.intval($pid).' AND tx_dlf_structures.index_name='.$GLOBALS['TYPO3_DB']->fullQuoteStr($structureType, 'tx_dlf_structures').tx_dlf_helper::whereClause('tx_dlf_structures'), | ||
71 | 848 | '', | ||
72 | 849 | '', | ||
73 | 850 | '1' | ||
74 | 851 | ); | ||
75 | 852 | |||
76 | 853 | $resArray = array(); | ||
77 | 854 | |||
78 | 855 | if (!($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))) { | ||
79 | 856 | |||
80 | 857 | t3lib_div::devLog('[tx_dlf_document.getThumbnail] could not get thumbnail settings from DB', 'dlf', t3lib_div::SYSLOG_SEVERITY_ERROR); | ||
81 | 858 | |||
82 | 859 | return FALSE; | ||
83 | 860 | |||
84 | 861 | } | ||
85 | 862 | |||
86 | 863 | if ($resArray['thumbnail'] != '1') { | ||
87 | 864 | |||
88 | 865 | t3lib_div::devLog('[tx_dlf_document.getThumbnail] no thumbnail generation for '.$logicalUnitId, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE); | ||
89 | 866 | |||
90 | 867 | return FALSE; | ||
91 | 868 | |||
92 | 869 | } | ||
93 | 870 | |||
94 | 871 | // Check desired thumbnail source. | ||
95 | 872 | if (!empty($resArray['thumbnail_source'])) { | ||
96 | 873 | |||
97 | 874 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | ||
98 | 875 | 'tx_dlf_structures.index_name AS index_name', | ||
99 | 876 | 'tx_dlf_structures', | ||
100 | 877 | 'tx_dlf_structures.uid='.intval($resArray['thumbnail_source']).tx_dlf_helper::whereClause('tx_dlf_structures'), | ||
101 | 878 | '', | ||
102 | 879 | '', | ||
103 | 880 | '1' | ||
104 | 881 | ); | ||
105 | 882 | |||
106 | 883 | if (!($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result))) { | ||
107 | 884 | |||
108 | 885 | t3lib_div::devLog('[tx_dlf_document.getThumbnail] could not get thumbnail source index name from DB', 'dlf', t3lib_div::SYSLOG_SEVERITY_ERROR); | ||
109 | 886 | |||
110 | 887 | return FALSE; | ||
111 | 888 | |||
112 | 889 | } | ||
113 | 890 | |||
114 | 891 | // Check if this document has a sub element of the desired type. | ||
115 | 892 | $nodes = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="'.$resArray['index_name'].'"]/@ID'); | ||
116 | 893 | |||
117 | 894 | if (is_array($nodes) && count($nodes) > 0) { | ||
118 | 895 | |||
119 | 896 | $subId = (string) $nodes[0]; | ||
120 | 897 | |||
121 | 898 | t3lib_div::devLog('[tx_dlf_document.getThumbnail] thumb source element changed: oldId='.$logicalUnitId.', newId='.$subId, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE); | ||
122 | 899 | |||
123 | 900 | $logicalUnitId = $subId; | ||
124 | 901 | |||
125 | 902 | } else { | ||
126 | 903 | |||
127 | 904 | t3lib_div::devLog('[tx_dlf_document.getThumbnail] no sub element found, taking toplevel element as thumb source', 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE); | ||
128 | 905 | |||
129 | 906 | } | ||
130 | 907 | |||
131 | 908 | } | ||
132 | 909 | |||
133 | 910 | // Extract and set thumbnail, if desired. | ||
134 | 911 | t3lib_div::devLog('[tx_dlf_document.getThumbnail] thumbnails desired for '.$logicalUnitId, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE); | ||
135 | 912 | |||
136 | 913 | $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dlf']); | ||
137 | 914 | |||
138 | 915 | $fileGrp = $extConf['thumbFileGrp']; | ||
139 | 916 | |||
140 | 917 | $this->thumbnail = 'not found'; | ||
141 | 918 | |||
142 | 919 | $firstPageNode = $this->mets->xpath('./mets:structLink/mets:smLink[@xlink:from="'.$logicalUnitId.'"][1]/@xlink:to'); | ||
143 | 920 | |||
144 | 921 | if (is_array($firstPageNode) && count($firstPageNode) > 0) { | ||
145 | 922 | |||
146 | 923 | $firstPageId = $firstPageNode[0]; | ||
147 | 924 | |||
148 | 925 | // den rest via physical pages | ||
149 | 926 | t3lib_div::devLog('[tx_dlf_document.getThumbnail] first page='.$firstPageId, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE); | ||
150 | 927 | |||
151 | 928 | $thumbnailNode = $this->mets->xpath('./mets:structMap[@TYPE="PHYSICAL"]/mets:div[@TYPE="physSequence"]/mets:div[@ID="'.$firstPageId.'"]/mets:fptr[substring(@FILEID, string-length(@FILEID) - '.(strlen($fileGrp) - 1).') = "'.$fileGrp.'"]/@FILEID'); | ||
152 | 929 | |||
153 | 930 | if (is_array($firstPageNode) && count($thumbnailNode) > 0) { | ||
154 | 931 | |||
155 | 932 | $thumbnailFileId = (string) $thumbnailNode[0]; | ||
156 | 933 | |||
157 | 934 | $this->thumbnail = $this->getFileLocation($thumbnailFileId); | ||
158 | 935 | |||
159 | 936 | t3lib_div::devLog('[tx_dlf_document.getThumbnail] thumbnail found, logicalUnit='.$logicalUnitId.', page='.$firstPageId.', thumb='.$thumbnailFileId.', thumb_url='.$this->thumbnail, 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE); | ||
160 | 937 | |||
161 | 938 | } else { | ||
162 | 939 | |||
163 | 940 | t3lib_div::devLog('[tx_dlf_document.getThumbnail] no thumbnail found on first page (fileGrp='.$fileGrp.')', 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE); | ||
164 | 941 | |||
165 | 942 | } | ||
166 | 943 | |||
167 | 944 | } else { | ||
168 | 945 | |||
169 | 946 | t3lib_div::devLog('[tx_dlf_document.getThumbnail] no first page found', 'dlf', t3lib_div::SYSLOG_SEVERITY_NOTICE); | ||
170 | 947 | |||
171 | 948 | } | ||
172 | 949 | |||
173 | 950 | $this->thumbnailLoaded = TRUE; | ||
174 | 951 | |||
175 | 952 | } | ||
176 | 953 | |||
177 | 954 | return $this->thumbnail; | ||
178 | 955 | |||
179 | 956 | } | ||
180 | 957 | |||
181 | 801 | /** | 958 | /** |
182 | 802 | * This returns the ID of the toplevel logical structure node | 959 | * This returns the ID of the toplevel logical structure node |
183 | 803 | * | 960 | * |
184 | @@ -1343,6 +1500,7 @@ | |||
185 | 1343 | 'owner' => $owner, | 1500 | 'owner' => $owner, |
186 | 1344 | 'solrcore' => $core, | 1501 | 'solrcore' => $core, |
187 | 1345 | 'status' => 0, | 1502 | 'status' => 0, |
188 | 1503 | 'thumbnail' => $this->getThumbnail($pid), | ||
189 | 1346 | ); | 1504 | ); |
190 | 1347 | 1505 | ||
191 | 1348 | if ($location) { | 1506 | if ($location) { |
192 | 1349 | 1507 | ||
193 | === modified file 'dlf/common/class.tx_dlf_indexing.php' | |||
194 | --- dlf/common/class.tx_dlf_indexing.php 2012-04-30 16:05:21 +0000 | |||
195 | +++ dlf/common/class.tx_dlf_indexing.php 2012-07-27 10:23:21 +0000 | |||
196 | @@ -500,6 +500,13 @@ | |||
197 | 500 | 500 | ||
198 | 501 | $solrDoc->setField('type', $logicalUnit['type'], self::$fieldboost['type']); | 501 | $solrDoc->setField('type', $logicalUnit['type'], self::$fieldboost['type']); |
199 | 502 | 502 | ||
200 | 503 | // Index thumbnails for toplevel elements. | ||
201 | 504 | if (in_array($logicalUnit['type'], self::$toplevel)) { | ||
202 | 505 | |||
203 | 506 | $solrDoc->setField('thumbnail', $doc->getThumbnail($doc->pid)); | ||
204 | 507 | |||
205 | 508 | } | ||
206 | 509 | |||
207 | 503 | $solrDoc->setField('title', $metadata['title'][0], self::$fieldboost['title']); | 510 | $solrDoc->setField('title', $metadata['title'][0], self::$fieldboost['title']); |
208 | 504 | 511 | ||
209 | 505 | $solrDoc->setField('author', $metadata['author'], self::$fieldboost['author']); | 512 | $solrDoc->setField('author', $metadata['author'], self::$fieldboost['author']); |
210 | 506 | 513 | ||
211 | === modified file 'dlf/ext_conf_template.txt' | |||
212 | --- dlf/ext_conf_template.txt 2012-03-29 08:32:14 +0000 | |||
213 | +++ dlf/ext_conf_template.txt 2012-07-27 10:23:21 +0000 | |||
214 | @@ -10,6 +10,9 @@ | |||
215 | 10 | # cat=Basic; type=string; label=LLL:EXT:dlf/locallang.xml:config.fileGrps | 10 | # cat=Basic; type=string; label=LLL:EXT:dlf/locallang.xml:config.fileGrps |
216 | 11 | fileGrps = DEFAULT,MIN,MAX,THUMBS | 11 | fileGrps = DEFAULT,MIN,MAX,THUMBS |
217 | 12 | 12 | ||
218 | 13 | # cat=Basic; type=string; label=LLL:EXT:dlf/locallang.xml:config.thumbFileGrp | ||
219 | 14 | thumbFileGrp = THUMBS | ||
220 | 15 | |||
221 | 13 | # cat=Basic; type=boolean; label=LLL:EXT:dlf/locallang.xml:config.caching | 16 | # cat=Basic; type=boolean; label=LLL:EXT:dlf/locallang.xml:config.caching |
222 | 14 | caching = 0 | 17 | caching = 0 |
223 | 15 | 18 | ||
224 | 16 | 19 | ||
225 | === modified file 'dlf/ext_tables.sql' | |||
226 | --- dlf/ext_tables.sql 2012-03-24 12:06:31 +0000 | |||
227 | +++ dlf/ext_tables.sql 2012-07-27 10:23:21 +0000 | |||
228 | @@ -34,7 +34,8 @@ | |||
229 | 34 | owner int(11) DEFAULT '0' NOT NULL, | 34 | owner int(11) DEFAULT '0' NOT NULL, |
230 | 35 | solrcore int(11) DEFAULT '0' NOT NULL, | 35 | solrcore int(11) DEFAULT '0' NOT NULL, |
231 | 36 | status tinyint(4) unsigned DEFAULT '0' NOT NULL, | 36 | status tinyint(4) unsigned DEFAULT '0' NOT NULL, |
233 | 37 | 37 | thumbnail tinytext NOT NULL, | |
234 | 38 | |||
235 | 38 | PRIMARY KEY (uid), | 39 | PRIMARY KEY (uid), |
236 | 39 | KEY parent (pid), | 40 | KEY parent (pid), |
237 | 40 | INDEX partof (partof) | 41 | INDEX partof (partof) |
238 | @@ -58,6 +59,8 @@ | |||
239 | 58 | label tinytext NOT NULL, | 59 | label tinytext NOT NULL, |
240 | 59 | index_name tinytext NOT NULL, | 60 | index_name tinytext NOT NULL, |
241 | 60 | oai_name tinytext NOT NULL, | 61 | oai_name tinytext NOT NULL, |
242 | 62 | thumbnail tinyint(4) DEFAULT '0' NOT NULL, | ||
243 | 63 | thumbnail_source int(11) DEFAULT '0' NOT NULL, | ||
244 | 61 | status tinyint(4) unsigned DEFAULT '0' NOT NULL, | 64 | status tinyint(4) unsigned DEFAULT '0' NOT NULL, |
245 | 62 | 65 | ||
246 | 63 | PRIMARY KEY (uid), | 66 | PRIMARY KEY (uid), |
247 | 64 | 67 | ||
248 | === modified file 'dlf/locallang.xml' | |||
249 | --- dlf/locallang.xml 2012-04-20 08:23:36 +0000 | |||
250 | +++ dlf/locallang.xml 2012-07-27 10:23:21 +0000 | |||
251 | @@ -21,7 +21,7 @@ | |||
252 | 21 | <label index="tx_dlf_documents.year">Year of Publication</label> | 21 | <label index="tx_dlf_documents.year">Year of Publication</label> |
253 | 22 | <label index="tx_dlf_documents.year_sorting">Year of Publication (Sorting)</label> | 22 | <label index="tx_dlf_documents.year_sorting">Year of Publication (Sorting)</label> |
254 | 23 | <label index="tx_dlf_documents.place">Place of Publication</label> | 23 | <label index="tx_dlf_documents.place">Place of Publication</label> |
256 | 24 | <label index="tx_dlf_documents.place_sorting">Place of Publication</label> | 24 | <label index="tx_dlf_documents.place_sorting">Place of Publication (Sorting)</label> |
257 | 25 | <label index="tx_dlf_documents.structure">Typ of Document</label> | 25 | <label index="tx_dlf_documents.structure">Typ of Document</label> |
258 | 26 | <label index="tx_dlf_documents.partof">Part of ...</label> | 26 | <label index="tx_dlf_documents.partof">Part of ...</label> |
259 | 27 | <label index="tx_dlf_documents.partof.none">none</label> | 27 | <label index="tx_dlf_documents.partof.none">none</label> |
260 | @@ -39,6 +39,8 @@ | |||
261 | 39 | <label index="tx_dlf_structures.label">Display Label</label> | 39 | <label index="tx_dlf_structures.label">Display Label</label> |
262 | 40 | <label index="tx_dlf_structures.index_name">Index Name</label> | 40 | <label index="tx_dlf_structures.index_name">Index Name</label> |
263 | 41 | <label index="tx_dlf_structures.oai_name">OAI Mapping</label> | 41 | <label index="tx_dlf_structures.oai_name">OAI Mapping</label> |
264 | 42 | <label index="tx_dlf_structures.thumbnail">Show Thumbnail</label> | ||
265 | 43 | <label index="tx_dlf_structures.thumbnail_source">Thumbnail Source</label> | ||
266 | 42 | <label index="tx_dlf_structures.status">Status</label> | 44 | <label index="tx_dlf_structures.status">Status</label> |
267 | 43 | <label index="tx_dlf_structures.status.default">default</label> | 45 | <label index="tx_dlf_structures.status.default">default</label> |
268 | 44 | <label index="tx_dlf_structures.tab1">General</label> | 46 | <label index="tx_dlf_structures.tab1">General</label> |
269 | @@ -124,6 +126,7 @@ | |||
270 | 124 | <label index="config.makeCliUserGroup">Create and configure CLI user/group automatically?: (default is "FALSE")</label> | 126 | <label index="config.makeCliUserGroup">Create and configure CLI user/group automatically?: (default is "FALSE")</label> |
271 | 125 | <label index="config.useragent">DLF User-Agent: (default is "Goobi.Presentation")</label> | 127 | <label index="config.useragent">DLF User-Agent: (default is "Goobi.Presentation")</label> |
272 | 126 | <label index="config.fileGrps">Additional METS fileGrps: comma-separated list of @USE attribute values (default is "DEFAULT,MIN,MAX,THUMBS")</label> | 128 | <label index="config.fileGrps">Additional METS fileGrps: comma-separated list of @USE attribute values (default is "DEFAULT,MIN,MAX,THUMBS")</label> |
273 | 129 | <label index="config.thumbFileGrp">Thumbnails METS fileGrp: selects the fileGrp with by this @USE attribute value for thumbnail extraction</label> | ||
274 | 127 | <label index="config.caching">Cache parsed METS files: caching improves performance a little bit but can result in a very large "fe_session_data" table (default is "FALSE")</label> | 130 | <label index="config.caching">Cache parsed METS files: caching improves performance a little bit but can result in a very large "fe_session_data" table (default is "FALSE")</label> |
275 | 128 | <label index="config.solrConnect">Solr Connection</label> | 131 | <label index="config.solrConnect">Solr Connection</label> |
276 | 129 | <label index="config.solrHost">Solr Server Host: (default is "localhost")</label> | 132 | <label index="config.solrHost">Solr Server Host: (default is "localhost")</label> |
277 | @@ -196,6 +199,8 @@ | |||
278 | 196 | <label index="tx_dlf_structures.label">Anzeigeform</label> | 199 | <label index="tx_dlf_structures.label">Anzeigeform</label> |
279 | 197 | <label index="tx_dlf_structures.index_name">Index-Bezeichnung</label> | 200 | <label index="tx_dlf_structures.index_name">Index-Bezeichnung</label> |
280 | 198 | <label index="tx_dlf_structures.oai_name">OAI-Mapping</label> | 201 | <label index="tx_dlf_structures.oai_name">OAI-Mapping</label> |
281 | 202 | <label index="tx_dlf_structures.thumbnail">Vorschau zeigen</label> | ||
282 | 203 | <label index="tx_dlf_structures.thumbnail_source">Vorschau-Quelle</label> | ||
283 | 199 | <label index="tx_dlf_structures.status">Status</label> | 204 | <label index="tx_dlf_structures.status">Status</label> |
284 | 200 | <label index="tx_dlf_structures.status.default">Standard</label> | 205 | <label index="tx_dlf_structures.status.default">Standard</label> |
285 | 201 | <label index="tx_dlf_structures.tab1">Allgemein</label> | 206 | <label index="tx_dlf_structures.tab1">Allgemein</label> |
286 | @@ -281,6 +286,7 @@ | |||
287 | 281 | <label index="config.makeCliUserGroup">CLI Benutzer/Gruppe automatisch anlegen?: (Standard ist "FALSE")</label> | 286 | <label index="config.makeCliUserGroup">CLI Benutzer/Gruppe automatisch anlegen?: (Standard ist "FALSE")</label> |
288 | 282 | <label index="config.useragent">DLF User-Agent: (Standard ist "Goobi.Presentation")</label> | 287 | <label index="config.useragent">DLF User-Agent: (Standard ist "Goobi.Presentation")</label> |
289 | 283 | <label index="config.fileGrps">Zusätzliche METS fileGrps: Komma-getrennte Liste von @USE Attributwerten (Standard ist "DEFAULT,MIN,MAX,THUMBS")</label> | 288 | <label index="config.fileGrps">Zusätzliche METS fileGrps: Komma-getrennte Liste von @USE Attributwerten (Standard ist "DEFAULT,MIN,MAX,THUMBS")</label> |
290 | 289 | <label index="config.thumbFileGrp">Vorschau METS fileGrp: wählt die fileGrp mit diesem @USE Attributwert für die Thumbnail-Extraktion aus</label> | ||
291 | 284 | <label index="config.caching">Eingelesene METS Dateien zwischenspeichern: Dies kann die Geschwindigkeit geringfügig verbessern, führt aber zu einer sehr großen "fe_session_data" Tabelle (Standard ist "FALSE")</label> | 290 | <label index="config.caching">Eingelesene METS Dateien zwischenspeichern: Dies kann die Geschwindigkeit geringfügig verbessern, führt aber zu einer sehr großen "fe_session_data" Tabelle (Standard ist "FALSE")</label> |
292 | 285 | <label index="config.solrConnect">Solr Verbindung</label> | 291 | <label index="config.solrConnect">Solr Verbindung</label> |
293 | 286 | <label index="config.solrHost">Solr Server Host: (Standard ist "localhost")</label> | 292 | <label index="config.solrHost">Solr Server Host: (Standard ist "localhost")</label> |
294 | 287 | 293 | ||
295 | === modified file 'dlf/plugins/collection/class.tx_dlf_collection.php' | |||
296 | --- dlf/plugins/collection/class.tx_dlf_collection.php 2012-05-15 07:51:09 +0000 | |||
297 | +++ dlf/plugins/collection/class.tx_dlf_collection.php 2012-07-27 10:23:21 +0000 | |||
298 | @@ -254,7 +254,7 @@ | |||
299 | 254 | 254 | ||
300 | 255 | // Get all documents in collection. | 255 | // Get all documents in collection. |
301 | 256 | $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query( | 256 | $result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query( |
303 | 257 | '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.volume_sorting AS volume_sorting,tx_dlf_documents.author AS author,tx_dlf_documents.place AS place,tx_dlf_documents.year AS year,tx_dlf_documents.structure AS type,tx_dlf_documents.partof AS partof', | 257 | '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.volume_sorting AS volume_sorting,tx_dlf_documents.author AS author,tx_dlf_documents.place AS place,tx_dlf_documents.year AS year,tx_dlf_documents.structure AS type,tx_dlf_documents.partof AS partof,tx_dlf_documents.thumbnail AS thumbnail', |
304 | 258 | 'tx_dlf_documents', | 258 | 'tx_dlf_documents', |
305 | 259 | 'tx_dlf_relations', | 259 | 'tx_dlf_relations', |
306 | 260 | 'tx_dlf_collections', | 260 | 'tx_dlf_collections', |
307 | @@ -297,7 +297,8 @@ | |||
308 | 297 | 'year' => array ($resArray['year']), | 297 | 'year' => array ($resArray['year']), |
309 | 298 | 'place' => array ($resArray['place']), | 298 | 'place' => array ($resArray['place']), |
310 | 299 | 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages'])), | 299 | 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages'])), |
312 | 300 | 'subparts' => array () | 300 | 'subparts' => array (), |
313 | 301 | 'thumbnail' => $resArray['thumbnail'] | ||
314 | 301 | ); | 302 | ); |
315 | 302 | 303 | ||
316 | 303 | } else { | 304 | } else { |
317 | 304 | 305 | ||
318 | === modified file 'dlf/plugins/listview/class.tx_dlf_listview.php' | |||
319 | --- dlf/plugins/listview/class.tx_dlf_listview.php 2012-05-15 07:51:09 +0000 | |||
320 | +++ dlf/plugins/listview/class.tx_dlf_listview.php 2012-07-27 10:23:21 +0000 | |||
321 | @@ -29,7 +29,7 @@ | |||
322 | 29 | /** | 29 | /** |
323 | 30 | * Plugin 'DLF: List View' for the 'dlf' extension. | 30 | * Plugin 'DLF: List View' for the 'dlf' extension. |
324 | 31 | * | 31 | * |
326 | 32 | * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de> | 32 | * @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>, Henrik Lochmann <dev@mentalmotive.com> |
327 | 33 | * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden | 33 | * @copyright Copyright (c) 2011, Sebastian Meyer, SLUB Dresden |
328 | 34 | * @package TYPO3 | 34 | * @package TYPO3 |
329 | 35 | * @subpackage tx_dlf | 35 | * @subpackage tx_dlf |
330 | @@ -232,6 +232,17 @@ | |||
331 | 232 | 232 | ||
332 | 233 | } | 233 | } |
333 | 234 | 234 | ||
334 | 235 | // Add thumbnail. | ||
335 | 236 | if (!empty($this->list->elements[$number]['thumbnail'])) { | ||
336 | 237 | |||
337 | 238 | $markerArray['###THUMBNAIL###'] = '<img title="" alt="" src="'.$this->list->elements[$number]['thumbnail'].'"/>'; | ||
338 | 239 | |||
339 | 240 | } else { | ||
340 | 241 | |||
341 | 242 | $markerArray['###THUMBNAIL###'] = ''; | ||
342 | 243 | |||
343 | 244 | } | ||
344 | 245 | |||
345 | 235 | if (!empty($this->list->elements[$number]['subparts'])) { | 246 | if (!empty($this->list->elements[$number]['subparts'])) { |
346 | 236 | 247 | ||
347 | 237 | $subpart = $this->getSubEntries($number, $template); | 248 | $subpart = $this->getSubEntries($number, $template); |
348 | 238 | 249 | ||
349 | === modified file 'dlf/plugins/listview/template.tmpl' | |||
350 | --- dlf/plugins/listview/template.tmpl 2012-03-16 09:06:25 +0000 | |||
351 | +++ dlf/plugins/listview/template.tmpl 2012-07-27 10:23:21 +0000 | |||
352 | @@ -6,6 +6,7 @@ | |||
353 | 6 | <ol class="tx-dlf-listview-list"> | 6 | <ol class="tx-dlf-listview-list"> |
354 | 7 | <!-- ###ENTRY### --> | 7 | <!-- ###ENTRY### --> |
355 | 8 | <li value="###NUMBER###"> | 8 | <li value="###NUMBER###"> |
356 | 9 | <span>###THUMBNAIL###</span> | ||
357 | 9 | <dl> | 10 | <dl> |
358 | 10 | ###METADATA### | 11 | ###METADATA### |
359 | 11 | </dl> | 12 | </dl> |
360 | 12 | 13 | ||
361 | === modified file 'dlf/plugins/search/class.tx_dlf_search.php' | |||
362 | --- dlf/plugins/search/class.tx_dlf_search.php 2012-05-05 11:10:37 +0000 | |||
363 | +++ dlf/plugins/search/class.tx_dlf_search.php 2012-07-27 10:23:21 +0000 | |||
364 | @@ -142,7 +142,8 @@ | |||
365 | 142 | 'year' => (is_array($doc->year) ? $doc->year : array ($doc->year)), | 142 | 'year' => (is_array($doc->year) ? $doc->year : array ($doc->year)), |
366 | 143 | 'place' => (is_array($doc->place) ? $doc->place : array ($doc->place)), | 143 | 'place' => (is_array($doc->place) ? $doc->place : array ($doc->place)), |
367 | 144 | 'type' => (is_array($doc->type) ? $doc->type : array ($doc->type)), | 144 | 'type' => (is_array($doc->type) ? $doc->type : array ($doc->type)), |
369 | 145 | 'subparts' => (!empty($toplevel[$doc->uid]['subparts']) ? $toplevel[$doc->uid]['subparts'] : array ()) | 145 | 'subparts' => (!empty($toplevel[$doc->uid]['subparts']) ? $toplevel[$doc->uid]['subparts'] : array ()), |
370 | 146 | 'thumbnail' => $doc->thumbnail | ||
371 | 146 | ); | 147 | ); |
372 | 147 | 148 | ||
373 | 148 | } else { | 149 | } else { |
374 | @@ -175,7 +176,7 @@ | |||
375 | 175 | 176 | ||
376 | 176 | // Get information for toplevel document. | 177 | // Get information for toplevel document. |
377 | 177 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 178 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( |
379 | 178 | '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', | 179 | '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,tx_dlf_documents.thumbnail AS thumbnail', |
380 | 179 | 'tx_dlf_documents', | 180 | 'tx_dlf_documents', |
381 | 180 | 'tx_dlf_documents.uid='.intval($_check).tx_dlf_helper::whereClause('tx_dlf_documents'), | 181 | 'tx_dlf_documents.uid='.intval($_check).tx_dlf_helper::whereClause('tx_dlf_documents'), |
382 | 181 | '', | 182 | '', |
383 | @@ -197,7 +198,8 @@ | |||
384 | 197 | 'year' => array ($resArray['year']), | 198 | 'year' => array ($resArray['year']), |
385 | 198 | 'place' => array ($resArray['place']), | 199 | 'place' => array ($resArray['place']), |
386 | 199 | 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages'])), | 200 | 'type' => array (tx_dlf_helper::getIndexName($resArray['type'], 'tx_dlf_structures', $this->conf['pages'])), |
388 | 200 | 'subparts' => $toplevel[$_check]['subparts'] | 201 | 'subparts' => $toplevel[$_check]['subparts'], |
389 | 202 | 'thumbnail' => $resArray['thumbnail'] | ||
390 | 201 | ); | 203 | ); |
391 | 202 | 204 | ||
392 | 203 | } else { | 205 | } else { |
393 | 204 | 206 | ||
394 | === modified file 'dlf/tca.php' | |||
395 | --- dlf/tca.php 2012-04-30 16:11:07 +0000 | |||
396 | +++ dlf/tca.php 2012-07-27 10:23:21 +0000 | |||
397 | @@ -314,6 +314,12 @@ | |||
398 | 314 | 'default' => 0, | 314 | 'default' => 0, |
399 | 315 | ), | 315 | ), |
400 | 316 | ), | 316 | ), |
401 | 317 | 'thumbnail' => array ( | ||
402 | 318 | 'exclude' => 1, | ||
403 | 319 | 'config' => array ( | ||
404 | 320 | 'type' => 'passthrough', | ||
405 | 321 | ), | ||
406 | 322 | ), | ||
407 | 317 | ), | 323 | ), |
408 | 318 | 'types' => array ( | 324 | 'types' => array ( |
409 | 319 | '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab1, title;;1;;1-1-1, author;;2, year;;3, place;;4, structure;;5;;2-2-2, collections;;;;3-3-3, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab2, location;;;;1-1-1, record_id, prod_id;;;;2-2-2, oai_id;;;;3-3-3, opac_id, union_id, urn, purl;;;;4-4-4, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab3, hidden;;;;1-1-1, fe_group;;;;2-2-2, status;;;;3-3-3, owner;;;;4-4-4'), | 325 | '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab1, title;;1;;1-1-1, author;;2, year;;3, place;;4, structure;;5;;2-2-2, collections;;;;3-3-3, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab2, location;;;;1-1-1, record_id, prod_id;;;;2-2-2, oai_id;;;;3-3-3, opac_id, union_id, urn, purl;;;;4-4-4, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_documents.tab3, hidden;;;;1-1-1, fe_group;;;;2-2-2, status;;;;3-3-3, owner;;;;4-4-4'), |
410 | @@ -411,6 +417,29 @@ | |||
411 | 411 | 'eval' => 'trim', | 417 | 'eval' => 'trim', |
412 | 412 | ), | 418 | ), |
413 | 413 | ), | 419 | ), |
414 | 420 | 'thumbnail' => array ( | ||
415 | 421 | 'exclude' => 1, | ||
416 | 422 | 'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_structures.thumbnail', | ||
417 | 423 | 'config' => array ( | ||
418 | 424 | 'type' => 'check', | ||
419 | 425 | 'default' => 0, | ||
420 | 426 | ), | ||
421 | 427 | ), | ||
422 | 428 | 'thumbnail_source' => array ( | ||
423 | 429 | 'exclude' => 1, | ||
424 | 430 | 'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_structures.thumbnail_source', | ||
425 | 431 | 'config' => array ( | ||
426 | 432 | 'type' => 'select', | ||
427 | 433 | 'items' => array ( | ||
428 | 434 | array ('[This Element]', 0), | ||
429 | 435 | ), | ||
430 | 436 | 'foreign_table' => 'tx_dlf_structures', | ||
431 | 437 | 'foreign_table_where' => 'AND tx_dlf_structures.pid=###CURRENT_PID### AND tx_dlf_structures.toplevel=0 AND tx_dlf_structures.sys_language_uid IN (-1,0) ORDER BY tx_dlf_structures.label ', | ||
432 | 438 | ), | ||
433 | 439 | 'minitems' => 0, | ||
434 | 440 | 'maxitems' => 1, | ||
435 | 441 | 'default' => 0, | ||
436 | 442 | ), | ||
437 | 414 | 'status' => array ( | 443 | 'status' => array ( |
438 | 415 | 'exclude' => 1, | 444 | 'exclude' => 1, |
439 | 416 | 'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_structures.status', | 445 | 'label' => 'LLL:EXT:dlf/locallang.xml:tx_dlf_structures.status', |
440 | @@ -427,10 +456,11 @@ | |||
441 | 427 | ), | 456 | ), |
442 | 428 | ), | 457 | ), |
443 | 429 | 'types' => array ( | 458 | 'types' => array ( |
445 | 430 | '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab1, toplevel;;;;1-1-1, label;;1, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab3, hidden;;;;1-1-1, status;;;;2-2-2'), | 459 | '0' => array ('showitem' => '--div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab1, toplevel;;;;1-1-1, label;;1, thumbnail;;2, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab2, sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, --div--;LLL:EXT:dlf/locallang.xml:tx_dlf_structures.tab3, hidden;;;;1-1-1, status;;;;2-2-2'), |
446 | 431 | ), | 460 | ), |
447 | 432 | 'palettes' => array ( | 461 | 'palettes' => array ( |
448 | 433 | '1' => array ('showitem' => 'index_name, --linebreak--, oai_name', 'canNotCollapse' => 1), | 462 | '1' => array ('showitem' => 'index_name, --linebreak--, oai_name', 'canNotCollapse' => 1), |
449 | 463 | '2' => array ('showitem' => 'thumbnail_source'), | ||
450 | 434 | ), | 464 | ), |
451 | 435 | ); | 465 | ); |
452 | 436 | 466 |