File:  [Repository] / basket / zpt / BasketMain_manage_template_standard.zpt
Revision 1.15: download - view: text, annotated - select for diffs - revision graph
Tue Apr 21 13:42:30 2009 UTC (15 years, 1 month ago) by dwinter
Branches: MAIN
CVS tags: HEAD
post in form CVS: ----------------------------------------------------------------------

<html metal:use-macro="here/main_template/macros/page">
<head>
<title>Default</title>
<style metal:fill-slot="additionalStyles" type="text/css">
td.vario { background-color:#AC1D15 } 
</style>
</head>
<body>

<!-- span = bodytext -->
<span metal:fill-slot="body" tal:omit-tag="">
<tal:block tal:define="authorized python:here.checkPermission('edit')">

<!-- user is logged in -->
<tal:block tal:condition="authorized"
	 tal:define="global currentBasket here/getCurrentBasket">
	
	<!--  -->
	<tal:block tal:condition="python:here.checkPermission('edit') or here.checkPermission('admin')">
	
	<h2 class="setTitle"><span tal:replace="here/getTitle" /> <a class="editLink" tal:attributes="href python: '../' + here.id">|&nbsp;return to set</a></h2>

	<i tal:condition="python: 
		currentBasket and (here.title == currentBasket.title)">- This is the active set -</i>
	<h4>Edit the set description:</h4>
	<br>
	<form method="post" action="changeBasket">
		<input type="hidden" name="target" value="manageBasket">
		Title:<br>
		<input class="setTitle" type="text" name="title" 
			tal:attributes="value here/getTitle"><br>
		Short Description:<br>
		<textarea class="setDescription" name="shortDescription" rows="2" 
			tal:content="here/getShortDescription">Short description</textarea><br>
		Comment:<br>
		<textarea class="setComment" name="comment" rows="7" 
			tal:content="here/getComment">A longer comment / introduction</textarea><br><br>
			
		<input type="submit" value="save">
	</form>
	<hr>
	<i tal:content="structure python: 
		' - the access status of this set is: <b>' + here.publicationStatus + '</b> - '"/><br>
	<a tal:condition="python:
		here.checkPermission('admin')" 
		href="manageUserRights_html">Manage the access rights for this set.</a>
	<i tal:condition="not: python: here.checkPermission('admin')">
		You don't have the permission to change the access rights for this set.</i><br>
	<hr>

	<h4>Add a new element to the end of this set</h4><br>
	<a href="addBasketText">Add a new textelement</a><br>
	<a href="addBasketExternalLink">Add a new hyperlink</a><br>
	<a href="addBasketFile">Add a file</a><br>

	<p><i>To add any objects from inside the Virtual Laboratory to the active set, 
		please locate them and click the 'add to set' link on the bottom of the datasheet 
		or the 	'addToSet' button <img src="images/addToSet.gif" width=16 height=16 align="middle"> 
		in lists respectivly</i></p>
		
	<!-- Change active basket -->
	<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/getTitle"/>!</span>
		</i></p>
		
	<p tal:condition="not: python: 
		currentBasket and here.title == currentBasket.title">
	<a class="editLink"
		tal:condition="python: 
			currentBasket and here.title != currentBasket.title" 
		tal:attributes="
			href python: 'selectThisBasketAsCurrent?target=/users/setFolder/' + 
				here.id + '/manageBasket'">Select this set as the active set.</a>
	<a class="editLink"
		tal:condition="
			not: currentBasket"
		tal:attributes="
			href python: 'selectThisBasketAsCurrent?target=/users/setFolder/' + 
				here.id + '/manageBasket'">Make this set the active set.</a>
	</p>

	<hr>
	
	</tal:block>
	
	<!-- Content -->
	<tal:block tal:define="items here/getBasketObjects"
		tal:condition="items">
	<h4>Edit Contents:</h4><br>
	
	<form method="post" action="changeBasketComments" name="changeSetContents">
	<input type="hidden" name="actualId" value="empty">
	<div class="seperator"> </div>
	<div class="item" tal:repeat="item items">
	<br><a tal:attributes="name item/id" />
	<div tal:condition="item/content_html" tal:content="structure item/content_html"
			class="setItem" />
	<table tal:condition="python:getattr(item, 'link', None) is not None"
		cellspacing=0 cellpadding=0 width="100%" border=0 style="margin-top:5px;">
	<tr>
		<td width="1%">URL:&nbsp;</td>
		<td><input type="text" style="width:100%"
			tal:attributes="
				name python:item.getId()+'_link';
	 			value python:getattr(item,'link', 'http://')"></td>
	</tr>
	<tr>
		<td>Link&nbsp;title:&nbsp;</td>
		<td><input type="text" style="width:100%"
			tal:attributes="
				name python:item.getId()+'_linkText';
	 			value python:getattr(item,'linkText', 'Untitled Link')"></td>
	</tr>	 											   
	</table>
	 
	 <textarea class="setItemComment" rows="3" 
	 	tal:attributes="name python:item.getId()+'_comment'" 
	 	tal:content="structure item/getComment"></textarea>	
	<div> <!-- move / update file / save / delete -->
		<div style="float:right">
			<a class="editLink" 
				tal:condition="python:item.meta_type=='BasketFile'" 
				tal:attributes="href python:item.absolute_url()+'/upDateFile'">update file</a>
			<span tal:condition="python:item.meta_type=='BasketFile'" tal:replace="python:' - '" />
			<tal:x tal:replace="structure python:here.saveButton(item.id)"/>
			
			<noscript>
				<input type="submit" value="change" align="right">
			</noscript>
			<a tal:attributes="class python:'editLink'; 
				href python:'deleteObject?id=%s'%item.getId()"
				onclick="return window.confirm(
					'Do you really want to remove this item?\nThis is not undoable.')" >delete</a>
		</div>
		move item: <a tal:attributes="class python:'editLink'; 
			href python:'moveTop?id=%s'%item.getId()">top</a>
	 	<a tal:attributes="class python:'editLink'; 
	 		href python:'moveUp?id=%s'%item.getId()">up</a>
	 	<a tal:attributes="class python:'editLink'; 
	 		href python:'moveDown?id=%s'%item.getId()">down</a>
	 	<a tal:attributes="class python:'editLink'; 
	 		href python:'moveBottom?id=%s'%item.getId()">bottom</a>

	
	</div><br>
	<div class="seperator"> </div>
</div>
</form>
<br>
<a tal:attributes="href python: '../' + here.id">return to set</a>

</tal:block>
</tal:block>


<!-- user is not logged in -->
<tal:block tal:condition="not: authorized">
	<h3>No access</h3>
	<p>You are not authorized to access this page, please <a href="/users/login.html">log in</a>.</p>
</tal:block>
</tal:block>
</span>
<!-- ende bodytext -->
</body>
</html>

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