Mercurial > hg > MPIWGWeb
annotate zpt/project/project_index_html.zpt @ 270:d672a6f6c902 new_pro_struct
make having old navigation configurable.
author | casties |
---|---|
date | Tue, 30 Sep 2014 12:37:21 +0200 |
parents | 1926bee2aa20 |
children |
rev | line source |
---|---|
34 | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
3 <html metal:use-macro="here/pro_sec_template/macros/page"> | |
4 <head> | |
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
92 | 6 <title metal:fill-slot="title" tal:content="string:${here/getNumber} ${here/getProjectTitle}" /> |
7 <metal:block metal:fill-slot="head"> | |
90 | 8 <meta name="description" content="project"/> |
9 <tal:block | |
10 tal:define="global proBaseUrl string:$root/${secmap/research}/projects; | |
11 global images here/getImageList; | |
260 | 12 global dept here/getDepartmentId; |
13 global pNum here/getNumber;" /> | |
14 <script tal:content="string:var sliderUrl = 'api/subProjects_slider_html?pro=$pNum';"> | |
15 </script> | |
16 <script> | |
17 $(window).on('load', function () { | |
18 $('.ajaxSlider').each(function () { | |
19 var $this = $(this); | |
20 $this.AjaxSlider({ | |
21 dataUrl : sliderUrl, | |
22 dataSel : 'div.center>div', | |
23 scrollBy: '130px', | |
24 }); | |
25 }); | |
26 initialize_swipe(".ajaxSlider"); | |
27 }); | |
28 </script> | |
92 | 29 </metal:block> |
34 | 30 </head> |
31 <body> | |
32 | |
33 <!-- middle column --> | |
80 | 34 <div class="center project" metal:fill-slot="center"> |
35 <!-- version header --> | |
44 | 36 <h2 tal:condition="not:here/isCurrentVersion"> |
37 This is an outdated version of this project! For the current version, please refer to | |
38 <a tal:define="parentUrl python:here.aq_parent.getUrl(baseUrl=proBaseUrl)" | |
39 tal:attributes="href parentUrl" tal:content="parentUrl"/> | |
40 </h2> | |
39 | 41 <tal:x tal:define="started here/getStartedAt" tal:condition="here/isArchivedProject"> |
34 | 42 <p> |
39 | 43 (<span tal:condition="started" tal:content="string:$started-"/><span tal:condition="not:started">Completed:</span> |
44 <span tal:content="here/getCompletedAt"/>) | |
34 | 45 </p> |
46 </tal:x> | |
80 | 47 <!-- /version header --> |
34 | 48 |
90 | 49 <h1 class="mpiwg-title" tal:content="here/getProjectTitle">History of Scientific Objectivity, 18th-19th Cs</h1> |
50 <h3 class="authors mpiwg-authors"> | |
35 | 51 <tal:block tal:repeat="person here/getResponsibleScientistsList"> |
100 | 52 <a class="mpiwg-author" tal:define="username person/username|nothing; key person/key|nothing;" |
53 tal:omit-tag="python:not username or not here.getStaffFolder().isActiveMember(key=key)" | |
54 tal:attributes="href string:$root/${secmap/staff}/members/$username" tal:content="person/name"> Name of responsible | |
101 | 55 person </a><tal:block tal:condition="not:repeat/person/end">, </tal:block> |
34 | 56 </tal:block> |
80 | 57 </h3> |
34 | 58 |
80 | 59 <h3 class="authors" tal:define="others here/getInvolvedScholars" tal:condition="others"> |
60 Other involved scholars: <span tal:content="structure others">Scholars </span> | |
61 </h3> | |
62 <h3 class="authors" tal:define="partners here/getCooperationPartners" tal:condition="partners"> | |
63 Cooperation Partners: <span tal:content="structure partners">Partners</span> | |
64 </h3> | |
65 | |
66 <div class="description"> | |
67 <!-- inline image --> | |
98
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
68 <tal:block tal:condition="images" tal:repeat="image python:images"> |
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
69 <div class="figure" tal:condition="python:image.getCaption() or repeat['image'].start"> |
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
70 <div class="image"> |
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
71 <a tal:define="url image/getLink" tal:attributes="href url" tal:omit-tag="not:url" target="_blank"><img |
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
72 tal:attributes="src image/getUrl" alt="" /></a> |
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
73 </div> |
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
74 <div class="figcaption" tal:condition="image/caption" tal:content="structure image/getCaption"> |
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
75 J.-A.-D. Ingres: Mme Moitessier, 1856. Oel/Lw. 120 x 92,1 cm. London, National Gallery. |
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
76 </div> |
34 | 77 </div> |
98
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
78 </tal:block> |
97 | 79 <!-- project description --> |
80 | 80 <div tal:content="structure python:here.getDescription(filter=True)">Project description</div> |
34 | 81 </div> |
82 | |
98
d29425348cbd
show image without caption in project description if its the first one.
casties
parents:
97
diff
changeset
|
83 </div><!-- /center --> |
34 | 84 |
85 <!-- right column --> | |
86 <div class="sidebar" metal:fill-slot="sidebar"> | |
87 | |
270 | 88 <!-- this project is part of --> |
89 <tal:block tal:condition="oldnav"> | |
34 | 90 <div class="sideblock" |
39 | 91 tal:define="parents here/getSuperProjects;" tal:condition="parents"> |
34 | 92 <div class="project parent"> |
93 Part of: | |
40 | 94 <a tal:define="parent python:parents[-1]" tal:content="parent/getLabel" |
270 | 95 tal:attributes="href python:parent.getUrl(baseUrl=proBaseUrl)+test(here.isArchivedProject(),'?archived=2','')" /> |
34 | 96 </div> |
270 | 97 <!-- end parent --> |
34 | 98 </div> |
270 | 99 </tal:block> |
34 | 100 <!-- sideblock --> |
101 | |
39 | 102 <!-- related projects --> |
61 | 103 <div class="sideblock" tal:define="projects here/getRelatedProjectList" tal:condition="projects"> |
39 | 104 <h2>Related Projects</h2> |
80 | 105 <div class="project" tal:repeat="project projects"> |
61 | 106 <a tal:attributes="href string:$proBaseUrl/${project/getProjectId}" |
107 tal:content="project/getProjectLabel" /> | |
34 | 108 </div> |
39 | 109 <!-- end item --> |
110 </div> | |
111 <!-- sideblock --> | |
34 | 112 |
39 | 113 <!-- related publications --> |
61 | 114 <tal:block tal:define="publications here/getPublicationList"> |
39 | 115 <div class="sideblock" tal:condition="publications"> |
34 | 116 <h2>Related Publications</h2> |
61 | 117 <tal:block tal:repeat="publication publications"> |
118 <div class="item" tal:define="bookid publication/getBookId" tal:condition="publication/text"> | |
119 <tal:y condition="not:bookid"> | |
120 <tal:x tal:define="img publication/publicationImage1 | nothing" tal:condition="img"> | |
121 <a target="_blank" tal:attributes="href img/absolute_url"> <img width="150" | |
122 tal:attributes="src img/absolute_url" /> | |
123 </a> | |
124 <br /> | |
125 </tal:x> | |
126 <a tal:define="link publication/link | nothing;" tal:omit-tag="not:link" tal:content="structure publication/text" | |
127 tal:attributes="href link" /> | |
128 </tal:y> | |
129 <tal:y condition="bookid"> | |
130 <tal:x | |
131 tal:define="book python:here.books[bookid]; bookurl python:book.getUrl(baseUrl=root+'/'+secmap['resources']+'/books')"> | |
132 <a tal:attributes="href bookurl"><img width="150" tal:attributes="src book/getImageUrl" /></a> | |
133 <br /> | |
134 <a tal:attributes="href bookurl" tal:content="structure publication/text" /> | |
135 </tal:x> | |
136 </tal:y> | |
63 | 137 <tal:x tal:condition="python:hasattr(publication, 'description')"> |
61 | 138 <div tal:content="structure publication/description" /> |
34 | 139 </tal:x> |
80 | 140 </div><!-- end item --> |
61 | 141 </tal:block> |
34 | 142 </div> |
143 <!-- sideblock --> | |
144 | |
61 | 145 <div class="sideblock" tal:condition="here/hasAdditionalPublications"> |
146 <h2>Additional Publications</h2> | |
34 | 147 <div class="item"> |
74
e424b68244c8
better template for additional project publications.
casties
parents:
63
diff
changeset
|
148 <a class="internal" tal:attributes="href python:here.getUrl(baseUrl=proBaseUrl)+'/additional_publications_html'"> |
61 | 149 Publications in the context of this project |
150 </a> | |
34 | 151 </div> |
152 </div> | |
153 </tal:block> | |
154 <!-- related publications --> | |
155 | |
270 | 156 <!-- projects covered --> |
157 <tal:block tal:condition="oldnav"> | |
34 | 158 <div class="sideblock" |
270 | 159 tal:define="children python:here.getSubProjects(archived=archived);" |
39 | 160 tal:condition="children"> |
34 | 161 <h2> |
43 | 162 Projects |
39 | 163 <span class="proj_state"> |
270 | 164 <a href="?" tal:omit-tag="python:not (here.isArchivedProject() or archived==2)">current</a> |
39 | 165 |
270 | 166 <a href="?archived=2" tal:omit-tag="python:here.isArchivedProject() or archived==2">completed</a> |
34 | 167 </span> |
168 </h2> | |
39 | 169 <tal:y tal:repeat="child children"> |
270 | 170 <tal:x tal:condition="python:not child.isArchivedProject()"> |
34 | 171 <div class="project"> |
39 | 172 <a tal:content="child/getLabel" |
173 tal:attributes="href python:child.getUrl(baseUrl=proBaseUrl)" /> | |
34 | 174 </div> |
175 </tal:x> | |
270 | 176 <tal:x tal:condition="python:child.isArchivedProject()"> |
39 | 177 <div class="project inactive" tal:define="started child/getStartedAt"> |
178 <a tal:content="child/getLabel" | |
270 | 179 tal:attributes="href python:child.getUrl(baseUrl=proBaseUrl)+'?archived=2'" /> |
39 | 180 (<span tal:condition="started" tal:content="string:$started-"/><tal:x tal:condition="not:started">Completed: </tal:x><span tal:content="child/getCompletedAt"/>) |
34 | 181 </div> |
182 </tal:x> | |
183 </tal:y> | |
184 </div> | |
270 | 185 </tal:block> |
34 | 186 <!-- projects covered --> |
187 | |
81 | 188 <!-- custom info blocks --> |
189 <div class="sideblock" tal:repeat="block here/getInfoBlockList"> | |
190 <h2 tal:content="block/getTitle">Info block</h2> | |
191 <div class="item" tal:repeat="item block/getItems"> | |
205 | 192 <a class="external" tal:attributes="href item/link" target="_blank" tal:omit-tag="not:item/link" |
81 | 193 tal:content="structure item/text"> |
194 info item | |
195 </a> | |
196 </div> | |
197 </div> | |
198 | |
249 | 199 <!-- project calendar --> |
200 <div class="sideblock" tal:define="calendar here/getProjectCalendar" tal:condition="calendar"> | |
201 <tal:block tal:define="upcoming python:calendar.getFlag('only_upcoming', False); | |
250
2e507e256726
added filtering by category (including substring) to project calendar display.
casties
parents:
249
diff
changeset
|
202 show_num python:calendar.getFlag('show_num', 2); cat_match python:calendar.getFlag('cat_match'); |
2e507e256726
added filtering by category (including substring) to project calendar display.
casties
parents:
249
diff
changeset
|
203 filter python:here.getProjectNumberMatcher(cat_match, lambda x:unicode(x.getValue('categories'))); |
2e507e256726
added filtering by category (including substring) to project calendar display.
casties
parents:
249
diff
changeset
|
204 events python:test(upcoming, calendar.getAllItemsFromTodayOn(filter=filter)[:show_num], calendar.getNext(show_num, reverse=False, filter=filter))" |
249 | 205 tal:condition="events"> |
206 <h2 class="line" tal:condition="upcoming">Upcoming events</h2> | |
207 <h2 class="line" tal:condition="not:upcoming">Events</h2> | |
208 <div class="item" tal:repeat="event events"> | |
209 <tal:block tal:define="url python:event.getValue('url'); loc python:event.getValue('location');"> | |
210 <span tal:content="python:event.getDate()" />: | |
211 <span tal:replace="loc" /> <span tal:condition="loc">–</span> | |
212 <a target="_blank" tal:omit-tag="not:url" tal:attributes="href url"> | |
213 <i><span tal:replace="python:event.getValue('title')" /></i> | |
214 </a> | |
215 </tal:block> | |
216 </div> | |
217 </tal:block> | |
218 </div> | |
219 | |
39 | 220 <!-- related digital sources --> |
221 <div class="sideblock" tal:define="sources here/getRelatedDigitalSources" tal:condition="sources"> | |
81 | 222 <h2>OLD! Related digital sources</h2> |
39 | 223 <div class="item" tal:content="structure sources"> |
224 digital sources | |
34 | 225 </div> |
226 </div> | |
227 | |
39 | 228 <!-- funding institutions --> |
229 <div class="sideblock" tal:define="funding here/getFundingInstitutions" tal:condition="funding"> | |
34 | 230 <h2>Funding Institutions</h2> |
39 | 231 <div class="item" tal:content="structure funding"> |
232 Funding | |
233 </div> | |
34 | 234 </div> |
249 | 235 |
34 | 236 <!-- sideblock --> |
220 | 237 <div class="sideblock" tal:define="tags python:here.thesaurus.getTagsAsHash(here.getId())" tal:condition="tags"> |
224 | 238 <h2>Keywords</h2> |
239 <div class="item" tal:define="anc python:here.thesaurus.thes_quote(here.getId())"> | |
240 <tal:x tal:repeat="key python:tags.keys()"> | |
241 <tal:y tal:repeat="tag python:tags[key]"> | |
225 | 242 <tal:z tal:condition="python:not (repeat['key'].start and repeat['tag'].start)">- </tal:z><a tal:content="python:here.thesaurus.formatTag(tag)" |
224 | 243 tal:attributes="href python:root+'/'+secmap['research']+'/thesaurus/show_'+lang+'.html?dep='+key+'&open='+here.thesaurus.thes_quote(tag)+'#'+anc">tag</a> |
244 </tal:y> | |
245 </tal:x> | |
219 | 246 |
247 </div> | |
248 </div> | |
34 | 249 </div> |
250 <!-- sidebar --> | |
251 | |
260 | 252 <!-- subrow --> |
261 | 253 <div id="subrow" metal:fill-slot="subrow" |
268
1926bee2aa20
show only "project" projects in scroll-strip on project page.
casties
parents:
264
diff
changeset
|
254 tal:define="projects python:here.getProjectsAsList(start=pNum, filter=lambda p:p.getNumber()!=pNum and p.getProjectType()=='Project');" |
261 | 255 tal:condition="projects"> |
260 | 256 <div class="leftbox"></div> |
257 <div class="main"> | |
258 <!-- sub-project thumbs --> | |
259 <div class="box"> | |
261 | 260 <div tal:attributes="class python:test(len(projects)>5, 'ajaxSlider', None);"> |
260 | 261 <div class="row quintuple"> |
262 <div class="col" tal:repeat="project python:projects[:5]"> | |
263 <div class="mini project" | |
264 tal:define="url python:project.getUrl(baseUrl=proBaseUrl)"> | |
265 <div class="thumb"> | |
266 <a tal:attributes="href url"><img | |
267 tal:attributes="src python:project.getThumbUrl(default=root+'/images/dummy_thumb.jpg')" /></a> | |
268 </div> | |
269 <div class="title"> | |
270 <a tal:attributes="href url" | |
271 tal:content="project/getLabel"> Mental Models in | |
272 the History of Knowledge </a> | |
273 </div> | |
274 <div class="author" | |
275 tal:content="python:project.getContent('xdata_01')"> | |
276 Matteo Valleriani, Jürgen Renn</div> | |
277 </div> | |
278 </div> | |
279 </div> | |
280 <!-- /row --> | |
281 </div> | |
282 <!-- /item --> | |
283 </div> | |
284 </div> | |
285 </div> | |
286 | |
34 | 287 </body> |
288 </html> |