Mercurial > hg > MPIWGWeb
diff 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 |
line wrap: on
line diff
--- a/zpt/project/project_index_html.zpt Fri Sep 19 13:04:42 2014 +0200 +++ b/zpt/project/project_index_html.zpt Tue Sep 30 12:37:21 2014 +0200 @@ -85,16 +85,18 @@ <!-- right column --> <div class="sidebar" metal:fill-slot="sidebar"> - <!-- this project is part of -- + <!-- this project is part of --> + <tal:block tal:condition="oldnav"> <div class="sideblock" tal:define="parents here/getSuperProjects;" tal:condition="parents"> <div class="project parent"> Part of: <a tal:define="parent python:parents[-1]" tal:content="parent/getLabel" - tal:attributes="href python:parent.getUrl(baseUrl=proBaseUrl)+test(here.isArchivedProject(),'?showArchive=yes','')" /> + tal:attributes="href python:parent.getUrl(baseUrl=proBaseUrl)+test(here.isArchivedProject(),'?archived=2','')" /> </div> - <!-- end parent -- + <!-- end parent --> </div> + </tal:block> <!-- sideblock --> <!-- related projects --> @@ -151,35 +153,36 @@ </tal:block> <!-- related publications --> - <!-- projects covered -- + <!-- projects covered --> + <tal:block tal:condition="oldnav"> <div class="sideblock" - tal:define="showArchive python:(request.get('showArchive','no')=='yes'); - children here/getSubProjects;" + tal:define="children python:here.getSubProjects(archived=archived);" tal:condition="children"> <h2> Projects <span class="proj_state"> - <a href="?" tal:omit-tag="python:not (here.isArchivedProject() or showArchive)">current</a> + <a href="?" tal:omit-tag="python:not (here.isArchivedProject() or archived==2)">current</a> - <a href="?showArchive=yes" tal:omit-tag="python:here.isArchivedProject() or showArchive">completed</a> + <a href="?archived=2" tal:omit-tag="python:here.isArchivedProject() or archived==2">completed</a> </span> </h2> <tal:y tal:repeat="child children"> - <tal:x tal:condition="python:not (child.isArchivedProject() or showArchive)"> + <tal:x tal:condition="python:not child.isArchivedProject()"> <div class="project"> <a tal:content="child/getLabel" tal:attributes="href python:child.getUrl(baseUrl=proBaseUrl)" /> </div> </tal:x> - <tal:x tal:condition="python:child.isArchivedProject() and (here.isArchivedProject() or showArchive)"> + <tal:x tal:condition="python:child.isArchivedProject()"> <div class="project inactive" tal:define="started child/getStartedAt"> <a tal:content="child/getLabel" - tal:attributes="href python:child.getUrl(baseUrl=proBaseUrl)" /> + tal:attributes="href python:child.getUrl(baseUrl=proBaseUrl)+'?archived=2'" /> (<span tal:condition="started" tal:content="string:$started-"/><tal:x tal:condition="not:started">Completed: </tal:x><span tal:content="child/getCompletedAt"/>) </div> </tal:x> </tal:y> </div> + </tal:block> <!-- projects covered --> <!-- custom info blocks -->