Mercurial > hg > MPIWGThesaurus
changeset 38:a8907351ddf2
fixed only /en/research links.
author | casties |
---|---|
date | Tue, 29 Oct 2013 16:47:36 +0100 |
parents | ca608b31ec8d |
children | 4342a81e0aa0 |
files | MPIWGThesaurus.py zpt/levelFormatted.zpt |
diffstat | 2 files changed, 19 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/MPIWGThesaurus.py Thu Oct 24 15:32:28 2013 +0200 +++ b/MPIWGThesaurus.py Tue Oct 29 16:47:36 2013 +0100 @@ -1545,13 +1545,13 @@ return ret - def getProjectDetails(self,getID): - project=getattr(self.projects,getID,None) + def getProjectDetails(self,projectId): + project=getattr(self.projects,projectId,None) if project is None: - logging.debug("no project!! " +getID) + logging.debug("no project!! " +projectId) return None - link="/en/research/projects/"+getID + link=projectId title=project.getContent("WEB_title") #persons=project.getPersonKeyList()
--- a/zpt/levelFormatted.zpt Thu Oct 24 15:32:28 2013 +0200 +++ b/zpt/levelFormatted.zpt Tue Oct 29 16:47:36 2013 +0100 @@ -1,21 +1,24 @@ <!-- level template --> -<tal:x tal:repeat="level1 python:options['level1_entries']"> +<tal:x tal:define="MPIWGroot here/getMPIWGRoot; lang MPIWGroot/getLang; root here/MPIWGrootURL; proBaseUrl python:test(lang=='de',root+'/forschung/projects/',root+'/research/projects/');" + tal:repeat="level1 python:options['level1_entries']"> <ul class="foldable" tal:define="level1entries python:here.getProjectsWithTag(options['type'],here.getTitle(level1))" tal:condition="level1entries"> <li class="fold_head level_1"> <h3> - <img class="fold_open" tal:attributes="src python:root.absolute_url()+'/www/images/foldout_open.png'" alt="" /><img - class="fold_closed" tal:attributes="src python:root.absolute_url()+'/www/images/foldout_closed.png'" alt=""> - <span tal:attributes="id python:here.thes_quote(here.getTitle(level1))" class="linklike" tal:content="python:here.getTitle(level1) +' ('+ str(len(level1entries)) +')' ">Lorem</span> + <img class="fold_open" tal:attributes="src string:$root/images/foldout_open.png" alt="" /><img + class="fold_closed" tal:attributes="src string:$root/images/foldout_closed.png" alt=""> + <span tal:attributes="id python:here.thes_quote(here.getTitle(level1))" class="linklike" + tal:content="python:here.getTitle(level1) +' ('+ str(len(level1entries)) +')' ">Lorem</span> </h3> </li> <li class="fold_body"> <table class="items"> <tr class="line" tal:repeat="proj level1entries"> - <td><a tal:attributes="href python:proj[0]"><img class="thumb" tal:define="imgUrl python:proj[3]" + <td><a tal:attributes="href python:proBaseUrl+proj[0]"><img class="thumb" tal:define="imgUrl python:proj[3]" tal:condition="imgUrl" tal:attributes="src imgUrl" alt="" /></a></td> - <td><a tal:condition="proj" tal:attributes="href python:proj[0]; id python:here.thesaurus.thes_quote(proj[0])" tal:content="python:proj[1]">my proj</a>; <span + <td><a tal:condition="proj" tal:attributes="href python:proBaseUrl+proj[0]; id python:here.thesaurus.thes_quote(proj[0])" + tal:content="python:proj[1]">my proj</a>; <span class="person_projects" tal:define="person python:proj[2]" tal:content="person" /></td> </tr> </table> @@ -27,16 +30,17 @@ <li class="level_2 fold_body"> <div class="foldable2"> <h3 class="fold_head2"> - <img class="fold_open" tal:attributes="src python:root.absolute_url()+'/www/images/foldout_open.png'" alt="" /><img - class="fold_closed" tal:attributes="src python:root.absolute_url()+'/www/images/foldout_closed.png'" alt=""> - <span tal:attributes="id python:here.thes_quote((here.getTitle(level1)+'_'+here.getTitle(proj)))" class="linklike" tal:content="python:here.getTitle(proj)+' ('+str(len(subitems))+')'">Lor</span> + <img class="fold_open" tal:attributes="src string:$root/images/foldout_open.png" alt="" /><img + class="fold_closed" tal:attributes="src string:$root/images/foldout_closed.png" alt=""> + <span tal:attributes="id python:here.thes_quote((here.getTitle(level1)+'_'+here.getTitle(proj)))" class="linklike" + tal:content="python:here.getTitle(proj)+' ('+str(len(subitems))+')'">Lor</span> </h3> <div class="level2 fold_body2"> <table class="items"> <tr class="line" tal:repeat="proj python:subitems"> - <td><a tal:attributes="href python:proj[0]"><img class="thumb" tal:define="imgUrl python:proj[3]" + <td><a tal:attributes="href python:proBaseUrl+proj[0]"><img class="thumb" tal:define="imgUrl python:proj[3]" tal:condition="imgUrl" tal:attributes="src imgUrl" src="" alt="" /></a></td> - <td><a tal:condition="python:proj!=None" tal:attributes="href python:proj[0]; id python:here.thesaurus.thes_quote(proj[0])"><span + <td><a tal:condition="python:proj!=None" tal:attributes="href python:proBaseUrl+proj[0]; id python:here.thesaurus.thes_quote(proj[0])"><span tal:replace="python:proj[1]">my proj</span></a>; <span class="person_projects" tal:define="person python:proj[2]" tal:content="person" /></td> </tr>