Mercurial > hg > MPIWGWeb
changeset 74:e424b68244c8
better template for additional project publications.
author | casties |
---|---|
date | Mon, 06 May 2013 16:56:19 +0200 |
parents | 33c663a08025 |
children | df56982ecb03 |
files | MPIWGProjects.py zpt/project/project_template.zpt zpt/project/pubman/show_publications.zpt |
diffstat | 3 files changed, 52 insertions(+), 49 deletions(-) [+] |
line wrap: on
line diff
--- a/MPIWGProjects.py Sun May 05 17:09:49 2013 +0200 +++ b/MPIWGProjects.py Mon May 06 16:56:19 2013 +0200 @@ -279,7 +279,7 @@ # # templates # - project_template = PageTemplateFile('zpt/project/project_template', globals()) + project_html = PageTemplateFile('zpt/project/project_template', globals()) # edit templates edit_css = ImageFile('css/edit.css', globals()) # make css refreshable for development @@ -301,7 +301,7 @@ loadNewFileForm = PageTemplateFile('zpt/project/manage_newfile', globals()) description_only_html = PageTemplateFile('zpt/project/description_only_html', globals()) # additional pages - additionalPublications = PageTemplateFile('zpt/project/pubman/show_publications', globals()) + additional_publications_html = PageTemplateFile('zpt/project/pubman/show_publications', globals()) # TODO: remove compat edit_MPIWGProject_main = edit_template @@ -329,7 +329,7 @@ """default html representation""" # TODO: do we need to do date-stuff? # get template - pt = getattr(self, 'project_template') + pt = self.project_html # render template return pt()
--- a/zpt/project/project_template.zpt Sun May 05 17:09:49 2013 +0200 +++ b/zpt/project/project_template.zpt Mon May 06 16:56:19 2013 +0200 @@ -126,7 +126,7 @@ <div class="sideblock" tal:condition="here/hasAdditionalPublications"> <h2>Additional Publications</h2> <div class="item"> - <a class="internal" tal:attributes="href python:here.getUrl(baseUrl=proBaseUrl)+'/additionalPublications'"> + <a class="internal" tal:attributes="href python:here.getUrl(baseUrl=proBaseUrl)+'/additional_publications_html'"> Publications in the context of this project </a> </div>
--- a/zpt/project/pubman/show_publications.zpt Sun May 05 17:09:49 2013 +0200 +++ b/zpt/project/pubman/show_publications.zpt Mon May 06 16:56:19 2013 +0200 @@ -1,31 +1,38 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="here/main_template/macros/page"> - <head> - <tal:block metal:fill-slot="head"> - </tal:block> - </head> - <body> - <div class="center" metal:fill-slot="center"> - - <h2 tal:condition="not:here/isCurrentVersion"> - This is an outdated version of this project! For the current version, please refer to - <a tal:define="parentUrl python:here.aq_parent.getUrl(baseUrl=proBaseUrl)" - tal:attributes="href parentUrl" tal:content="parentUrl"/> +<html xmlns="http://www.w3.org/1999/xhtml" metal:use-macro="here/pro_sec_template/macros/page"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<tal:block metal:fill-slot="title"> + <title tal:content="string:${here/getNumber} ${here/getLabel} - Publications" /> +</tal:block> +<tal:block metal:fill-slot="head" + tal:define="global proBaseUrl string:$root/${secmap/research}/projects; + global dept here/getDepartmentId;" /> +</head> +<body> + <div class="center" metal:fill-slot="center"> + + <h2 tal:condition="not:here/isCurrentVersion"> + This is an outdated version of this project! For the current version, please refer to <a + tal:define="parentUrl python:here.aq_parent.getUrl(baseUrl=proBaseUrl)" tal:attributes="href parentUrl" + tal:content="parentUrl" /> </h2> <tal:x tal:define="started here/getStartedAt" tal:condition="here/isArchivedProject"> <p> - (<span tal:condition="started" tal:content="string:$started-"/><span tal:condition="not:started">Completed:</span> - <span tal:content="here/getCompletedAt"/>) + (<span tal:condition="started" tal:content="string:$started-" /><span tal:condition="not:started">Completed:</span> <span + tal:content="here/getCompletedAt" />) </p> </tal:x> <h1 tal:content="here/getProjectTitle">History of Scientific Objectivity, 18th-19th Cs</h1> <p class="maintext_authors"> <tal:block tal:repeat="person here/getResponsibleScientistsList"> - <a tal:define="username person/username|nothing" tal:omit-tag="python:not username or not here.getStaffFolder().isActiveMember(key=person.get('key',None))" - tal:attributes="href string:$root/${secmap/staff}/members/$username" tal:content="person/name"> Name of - responsible person</a><tal:block tal:condition="not:repeat/person/end">, </tal:block> + <a tal:define="username person/username|nothing" + tal:omit-tag="python:not username or not here.getStaffFolder().isActiveMember(key=person.get('key',None))" + tal:attributes="href string:$root/${secmap/staff}/members/$username" tal:content="person/name"> Name of responsible + person</a> + <tal:block tal:condition="not:repeat/person/end">, </tal:block> </tal:block> </p> @@ -37,34 +44,30 @@ </p> <h2>Selected publications</h2> - + <tal:block tal:define="publications here/getAdditionalPublicationList;"> - <tal:x define="publicationsSorted python:here.mpiwgPubman.getEntriesFromPubman(publications)"> - <h2>Books</h2> - <ul class="publicationlist"> - <li tal:repeat="found3 python:publicationsSorted['book'] "> - - <a tal:attributes="href python:'http://pubman.mpiwg-berlin.mpg.de/pubman/faces/viewItemFullPage.jsp?itemId='+found3[0]" - tal:content="structure python:found3[1]"/> - </li> - </ul> - <h2>Chapters</h2> - <ul class="publicationlist"> - <li tal:repeat="found3 python:publicationsSorted['book-item']"> - <a tal:attributes="href python:'http://pubman.mpiwg-berlin.mpg.de/pubman/faces/viewItemFullPage.jsp?itemId='+found3[0]" - tal:content="structure python:found3[1]"/> - </li> - </ul> - <h2>Articles</h2> - <ul class="publicationlist"> - <li tal:repeat="found3 python:publicationsSorted['book-item']"> - <a tal:attributes="href python:'http://pubman.mpiwg-berlin.mpg.de/pubman/faces/viewItemFullPage.jsp?itemId='+found3[0]" - tal:content="structure python:found3[1]"/> - </li> - </ul> - </tal:x> - - <!-- - <ul class="publicationlist"> + <tal:x define="publicationsSorted python:here.mpiwgPubman.getEntriesFromPubman(publications)"> + <h2>Books</h2> + <ul class="publicationlist"> + <li tal:repeat="found3 python:publicationsSorted['book'] "><a + tal:attributes="href python:'http://pubman.mpiwg-berlin.mpg.de/pubman/faces/viewItemFullPage.jsp?itemId='+found3[0]" + tal:content="structure python:found3[1]" /></li> + </ul> + <h2>Chapters</h2> + <ul class="publicationlist"> + <li tal:repeat="found3 python:publicationsSorted['book-item']"><a + tal:attributes="href python:'http://pubman.mpiwg-berlin.mpg.de/pubman/faces/viewItemFullPage.jsp?itemId='+found3[0]" + tal:content="structure python:found3[1]" /></li> + </ul> + <h2>Articles</h2> + <ul class="publicationlist"> + <li tal:repeat="found3 python:publicationsSorted['book-item']"><a + tal:attributes="href python:'http://pubman.mpiwg-berlin.mpg.de/pubman/faces/viewItemFullPage.jsp?itemId='+found3[0]" + tal:content="structure python:found3[1]" /></li> + </ul> + </tal:x> + + <!-- <ul class="publicationlist"> <li tal:repeat="found3 books"> <a tal:attributes="href python:'http://pubman.mpiwg-berlin.mpg.de/pubman/faces/viewItemFullPage.jsp?itemId='+found3.escidocid" @@ -74,5 +77,5 @@ </tal:block> </div> - </body> +</body> </html> \ No newline at end of file