File:  [Repository] / basket / zpt / BasketFolder_template_standard.zpt
Revision 1.13: download - view: text, annotated - select for diffs - revision graph
Wed Aug 15 15:49:03 2007 UTC (16 years, 10 months ago) by casties
Branches: MAIN
CVS tags: HEAD
simplified some methods and added getters for unicode in basket.py
changed templates to use unicode getters

    1: <html metal:use-macro="here/main_template/macros/page">
    2: <head>
    3:   <meta http-equiv="content-type" content="text/html; charset=utf-8">
    4:   <title>Default</title>
    5:   <style metal:fill-slot="additionalStyles" type="text/css">
    6: td.vario { background-color:#AC1D15 } 
    7:   </style>
    8: </head>
    9: <body>
   10: 
   11: <!-- span = bodytext -->
   12: <span metal:fill-slot="body" tal:omit-tag="">
   13: 
   14: <tal:block tal:define="authorized python:here.checkPermission('authorized') or
   15: 	options.get('mode', 'open') == 'open'; global listEmpty python:1">
   16: 
   17: <tal:block tal:condition="authorized">
   18: 	<h3 tal:define="global mode python: options.get('mode', 'open')"><span 
   19: 		tal:condition="python: mode == 'private'"
   20: 		tal:replace="python:'My '" /><span 
   21: 		tal:condition="python: mode == 'open_intern'" 
   22: 		tal:replace="python:'User '" /><span 
   23: 		tal:condition="python: mode == 'open'" 
   24: 		tal:replace="python:'Public '" />Sets
   25: 		<!-- ??
   26: 		<span tal:condition="python:here.checkPermission('edit') and mode != 'open_intern'">
   27: 			<a class="editLink" tal:attributes="
   28: 				href python:'manageBasketFolder?mode=%s'%mode"> |&nbsp;Edit overview</a></span>-->
   29: 		<span tal:condition="python:mode == 'private'">
   30: 			<a class="editLink" tal:attributes="
   31: 				href python:'manageBasketFolder?mode=%s'%mode"> |&nbsp;Manage your sets</a>
   32: 		</span>
   33: 	</h3>
   34: 	<!-- introduction -->
   35: 	<p><span 
   36: 		tal:condition="python: mode == 'private'"
   37: 		tal:replace="structure python: 
   38: 			'This is a list of all your sets, including the sets of other users you have ' +
   39: 			'the permission to work on as an editor or administrator.'"/><span 
   40: 		tal:condition="python: mode == 'open_intern'" 
   41: 		tal:replace="structure python: 
   42: 			'Browse through the sets of other registered users. To include one of ' +
   43: 			'your sets you have to change the access rights on its management page to ' +
   44: 			'<i>open_intern</i>.'"/><span 
   45: 		tal:condition="python: mode == 'open'" 
   46: 		tal:replace="structure python: 
   47: 			'These sets are thematic compilations of objects created by collaborators ' +
   48: 			'of the <i>Virtual Laboratory</i>.'"/></p><br>
   49: 			
   50: 	<!-- list of sets -->
   51: 	<tal:block tal:repeat="item python: here.getSets(mode=options.get('mode', 'open'))">
   52: 		<hr tal:define="
   53: 			global listEmpty python:0; 
   54: 			global currentBasket python: here.getCurrentBasket();
   55: 			global isActive python: currentBasket and currentBasket.id == item.id">
   56: 		<a class="editLink" style="float:right" 
   57: 			tal:condition="python: not isActive and mode == 'private'"
   58: 			tal:attributes="href python:'/users/setFolder/' + item.id + 
   59: 				'/selectThisBasketAsCurrent?target=/users/setFolder%3Fmode=' + mode">select</a>
   60: 		<i style="float:right" 
   61: 			tal:condition="isActive">- active set -</i>
   62: 			
   63: 		<a class="setTitleLink" tal:condition="item/title" 
   64: 			tal:attributes="href item/absolute_url" tal:content="item/getTitle"/>
   65: 		<a class="setTitleLink" tal:condition="not: item/title" 
   66: 			tal:attributes="href item/absolute_url" tal:content="python:'Untitled Set'"/>
   67: 		<i class="small" 
   68: 			tal:condition="python: 
   69: 				mode == 'private' and here.getActualUserName() != item.owner" 
   70: 			tal:content="python:
   71: 				' [shared set, created by ' + item.getOwner().split('@')[0] + ']'" 
   72: 		/><i class="small" 
   73: 			tal:condition="python: mode == 'open_intern' and item.owner != here.getActualUserName()" 
   74: 			tal:content="python:
   75: 				' [created by ' + item.getOwner() + ']'" 
   76: 		/><i class="small" 
   77: 			tal:condition="python: mode == 'open_intern' and item.owner == here.getActualUserName()" 
   78: 			tal:content="python:
   79: 				' [your set]'" />
   80: 		<div class="TOC" tal:content="structure item/getShortDescription"/>
   81:  	</tal:block>
   82:  	
   83: 	<form action="setFolder/addBasket" 
   84: 		tal:condition="python: listEmpty and mode == 'private'">
   85:  	<!-- no sets available -->
   86: 			There are no sets for your account.<br>
   87: 			Create a new set with title <input size="20" name="title">
   88: 			<input type="submit" value="add">
   89: 	</form>
   90:  	
   91: </tal:block>
   92: 
   93: <tal:block tal:condition="not: authorized">
   94: <h3>Private Page</h3>
   95: 
   96: <p>We are sorry, but only registered users may access this page,<br>
   97: please <a href="users">log in</a> to view it.</p>
   98: 
   99: <p>Not yet registered? <a href="register.html">Sign up</a> for a free account.</p>
  100: <br><br>
  101: 
  102: <p>You may find some thematic sets of objects compiled by collaborators <br>
  103: of the <i>Virtual Laboratory</i> in the <a href="?mode=open">Public Sets</a> section.</p>
  104: </tal:block>
  105: 
  106: </tal:block>
  107: 	
  108: </span>
  109: </body>
  110: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>