File:  [Repository] / basket / zpt / BasketMain_manage_template_standard.zpt
Revision 1.8: download - view: text, annotated - select for diffs - revision graph
Wed Apr 5 17:09:14 2006 UTC (18 years, 3 months ago) by dwinter
Branches: MAIN
CVS tags: HEAD
minor

    1: <html metal:use-macro="here/main_template/macros/page">
    2: <head>
    3: <title>Default</title>
    4: <style metal:fill-slot="additionalStyles" type="text/css">
    5: td.vario { background-color:#AC1D15 } 
    6: </style>
    7: </head>
    8: <body>
    9: 
   10: <!-- span = bodytext -->
   11: <span metal:fill-slot="body" tal:omit-tag="">
   12: <tal:block tal:define="authorized python:here.isAuthorized()">
   13: 
   14: <!-- user is logged in -->
   15: <tal:block tal:condition="authorized"
   16: 	 tal:define="global currentBasket here/getCurrentBasket">
   17: 	
   18: 	<!--  -->
   19: 	<tal:block tal:condition="python:here.checkPermission('edit') or here.checkPermission('admin')">
   20: 	
   21: 	<h2 class="setTitle" tal:content="here/title"/>
   22: 	<i tal:condition="python: 
   23: 		currentBasket and (here.title == currentBasket.title)">- This is the active set -</i>
   24: 	<h4>Edit the set description:</h4>
   25: 	<br>
   26: 	<form action="changeBasket">
   27: 		<input type="hidden" name="target" value="manageBasket">
   28: 		Title:<br>
   29: 		<input class="setTitle" type="text" name="title" 
   30: 			tal:attributes="value here/title"><br>
   31: 		Short Description:<br>
   32: 		<textarea class="setDescription" name="shortDescription" rows="2" 
   33: 			tal:content="here/shortDescription">Short description</textarea><br>
   34: 		Comment:<br>
   35: 		<textarea class="setComment" name="comment" rows="7" 
   36: 			tal:content="here/comment">A longer comment / introduction</textarea><br><br>
   37: 			
   38: 		<input type="submit" value="save">
   39: 	</form>
   40: 	<hr>
   41: 	
   42: 	<a href="manageUserRights_html">Manage the access rights for this set.</a><br>
   43: 	<hr>
   44: 
   45: 	<h4>Add a new element to the end of this set</h4><br>
   46: 	<!-- Change active basket -->
   47: 	<a href="addBasketText">Add a new textelement</a><br>
   48: 	<a href="addBasketExternalLink">Add a new hyperlink</a><br>
   49: 	<a href="addBasketFile">Add a file</a><br>
   50: 
   51: 	<p><i>To add any objects from inside the Virtual Laboratory to the active set, 
   52: 	please locate their datasheet and click the 'addToSet' button: <img src="images/addToSet.gif" width=16 height=16 align="middle">.</i></p>
   53: 	<p><i><span tal:condition="not:currentBasket">Please note: there is no active set at this moment!</span><span tal:condition="python: currentBasket and here.title != currentBasket.title">Please note: This set is not the active set at this moment, objects will go to the set <b tal:content="currentBasket/title"/>!</span></i></p>
   54: 	<p tal:condition="not: python: 
   55: 		currentBasket and here.title == currentBasket.title">
   56: 	<a tal:condition="python: 
   57: 		currentBasket and here.title != currentBasket.title" 
   58: 		class="editLink"
   59: 		href="selectThisBasketAsCurrent">Select this set as the active set.</a>
   60: 
   61: 	<a tal:condition="
   62: 		not: currentBasket"
   63: 		class="editLink"
   64: 		href="selectThisBasketAsCurrent">Make this set the active set.</a>
   65: 	</p>
   66: 
   67: 	<hr>
   68: 	
   69: 	</tal:block>
   70: 	
   71: 	<!-- Content -->
   72: 	<tal:block tal:define="items here/getBasketObjects"
   73: 		tal:condition="items">
   74: 	<h4>Edit Contents:</h4><br>
   75: 	
   76: 	<form action="changeBasketComments" name="changeSetContents">
   77: 	<div class="seperator"> </div>
   78: 	<div class="item" tal:repeat="item items">
   79: 	<br><a tal:attributes="name item/id" />
   80: 	<div tal:condition="item/content_html" tal:content="structure item/content_html"
   81: 			class="setItem" />
   82: 	<table tal:condition="python:getattr(item, 'link', None) is not None"
   83: 		cellspacing=0 cellpadding=0 width="100%" border=0 style="margin-top:5px;">
   84: 	<tr>
   85: 		<td width="1%">URL:&nbsp;</td>
   86: 		<td><input type="text" style="width:100%"
   87: 			tal:attributes="
   88: 				name python:item.getId()+'_link';
   89: 	 			value python:getattr(item,'link',None)"></td>
   90: 	</tr>
   91: 	<tr>
   92: 		<td>Linktext:&nbsp;</td>
   93: 		<td><input type="text" style="width:100%"
   94: 			tal:attributes="
   95: 				name python:item.getId()+'_linkText';
   96: 	 			value python:getattr(item,'linkText',None)"></td>
   97: 	</tr>	 											   
   98: 	</table>
   99: 	 
  100: 	 <textarea class="setItemComment" rows="3" 
  101: 	 	tal:attributes="name python:item.getId()+'_comment'" 
  102: 	 	tal:content="structure item/comment"></textarea>	
  103: 	<div> <!-- change position / delete -->
  104: 		<div style="float:right">
  105: 			<script type="text/javascript">
  106: 			<!--
  107: 				document.write('<a class="editLink"' +
  108: 					'onClick="forms.changeSetContents.submit();">save<' + '/a> - ');
  109: 			// -->
  110: 			</script>
  111: 			<noscript>
  112: 				<input type="submit" value="change" align="right">
  113: 			</noscript>
  114: 			<a tal:attributes="class python:'editLink'; 
  115: 				href python:'deleteObject?id=%s'%item.getId()"
  116: 				onclick="return window.confirm('Do you really want to remove this item?\nThis is not undoable.')" >delete</a>
  117: 		</div>
  118: 		move item: <a tal:attributes="class python:'editLink'; 
  119: 			href python:'moveTop?id=%s'%item.getId()">top</a>
  120: 	 	<a tal:attributes="class python:'editLink'; 
  121: 	 		href python:'moveUp?id=%s'%item.getId()">up</a>
  122: 	 	<a tal:attributes="class python:'editLink'; 
  123: 	 		href python:'moveDown?id=%s'%item.getId()">down</a>
  124: 	 	<a tal:attributes="class python:'editLink'; 
  125: 	 		href python:'moveBottom?id=%s'%item.getId()">bottom</a>
  126: 
  127: 	<br>
  128: 	<div class="seperator"> </div>
  129: </div>
  130: <a tal:attributes="href python: '../' + here.id">return to set</a>
  131: 
  132: 
  133: 	 <div tal:condition="python:item.meta_type=='BasketFile'">
  134: 	 <a tal:attributes="href python:item.absolute_url()+'/upDateFile'">update file</a>
  135: 	 </div>
  136: 	 <div tal:replace="structure item/content_html"/>
  137: 	 <div tal:condition="python:getattr(item,'link',None) is not None">
  138: 	 	Link (url):<input type="text" size="40" tal:attributes="name python:item.getId()+'_link';
  139: 	 											   value python:getattr(item,'link',None)"><br>
  140:  	    Linktext:<input type="text" size="40" tal:attributes="name python:item.getId()+'_linkText';
  141: 	 											   value python:getattr(item,'linkText',None)"><br>
  142: 	 											   
  143: 	 </div>
  144: 	 
  145: 	 <div><textarea cols="50" rows="5" tal:attributes="name python:item.getId()+'_comment'" tal:content="structure item/comment"></textarea>	
  146: 	 </div>
  147: 	<input type="submit" value="change">
  148: </div>
  149: 
  150: 	</tal:block>
  151: 	</tal:block>
  152: 
  153: 
  154: <!-- user is not logged in -->
  155: <tal:block tal:condition="not: authorized">
  156: 	<h3>No access</h3>
  157: 	<p>You are not authorized to access this page, please <a href="/users/login.html">log in</a>.</p>
  158: </tal:block>
  159: </tal:block>
  160: </span>
  161: <!-- ende bodytext -->
  162: </body>
  163: </html>

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