[Zapp-cvs-commit] ZApp/www_ui filterDisplay_html.plain,NONE,1.1
Brought to you by:
sspickle
|
From: <ssp...@us...> - 2003-10-08 20:34:05
|
Update of /cvsroot/zapp/ZApp/www_ui
In directory sc8-pr-cvs1:/tmp/cvs-serv21411/www_ui
Added Files:
filterDisplay_html.plain
Log Message:
adde new ui methods
--- NEW FILE: filterDisplay_html.plain ---
Id: filterDisplay_html
Meta-Type: DTML Method
Permissions:
Proxy-Roles:
Title:
<dtml-call "REQUEST.set('size',REQUEST.get('size',20))">
<dtml-let propertyNameList="ZApp_getAttributeList()">
<dtml-call "REQUEST.set('start',REQUEST.get('start',0))">
<dtml-call "REQUEST.set('itemIdName',REQUEST.get('itemIdName','ids:list'))">
<dtml-call "REQUEST.set('itemControlType',REQUEST.get('itemControlType','checkbox'))">
<dtml-call "REQUEST.set('actionProperties', REQUEST.get('actionProperties',{}))">
<dtml-call "REQUEST.get('actionProperties').update({'size:int':size})">
<dtml-call "REQUEST.set('formParams', REQUEST.get('formParams',{}))">
<dtml-call "REQUEST.set('batchSize',size)">
<dtml-call "REQUEST.set('currStart',start)">
<dtml-call "REQUEST.set('nextStart',currStart + batchSize)">
<dtml-call "REQUEST.set('prevStart',currStart - batchSize)">
<form action="&dtml-URL0;"><br><br>
<dtml-in propertyNameList>
<dtml-let tList=sequence-item
currID="tList[0]"
currType="tList[1]"
defVal="tList[2]">
<dtml-if sequence-start>
<dtml-let primaryKey=currID>
<table>
<dtml-call "REQUEST.set('sort_on',REQUEST.get('sort_on',primaryKey))">
<dtml-call "REQUEST.get('actionProperties').update({'sort_on':sort_on})">
</dtml-let>
</dtml-if>
<tr><td> &dtml-currID;:</td>
<td><input name="&dtml-currID;" value="<dtml-var "REQUEST.get(currID,'')" html_quote>"></td>
</tr>
<dtml-call "REQUEST.get('actionProperties').update({currID:REQUEST.get(currID,'')})">
<dtml-if sequence-end>
<tr><td> Size:</td>
<td><input name="size:int" value="&dtml.missing-size;"></td>
</tr>
<tr><td> SortOn:</td>
<td><input name="sort_on" value="&dtml.missing-sort_on;"></td>
</tr>
<dtml-in "filterProperties.keys()">
<input type="hidden" name="&dtml-sequence-item;" value="<dtml-var "filterProperties.get(_['sequence-item'],'')">">
</dtml-in>
<tr><td colspan="2" align="center"><input type="submit" value="filter"></td></tr>
</table>
</dtml-if>
</dtml-let>
</dtml-in>
<br>
</form>
<dtml-call "REQUEST.set('queryDisplayText',ZApp_getItemIds(displayQuery=1))">
<dtml-let searchResults="ZApp_getItemIds()"
foo="REQUEST.set('countMinMax',getPrimaryKey())"
foo="REQUEST.set('start',0)"
foo="REQUEST.set('size',20)"
stats="ZApp_querySearchDirect()"
names="stats.names()"
formAction="formParams.get('action','deleteSelectedItems_html')"
formSubmitValue="formParams.get('submit','Delete Selected Item(s)')"
hiddenFormItems="formParams.get('hiddenFormItems',[])"
formItems="formParams.get('formItems',[])">
<form action="&dtml-formAction;">
<div align="left">
<dtml-in stats>
<dtml-if sequence-start>
<dtml-call "REQUEST.set('countval',countval)">
<dtml-call "REQUEST.set('numBatches',((countval-1)/batchSize) + 1)">
<dtml-call "REQUEST.set('currBatch',(nextStart)/batchSize)">
Page <dtml-var currBatch> out of <dtml-var numBatches> (Total Number of results = <dtml-var countval>)
</dtml-if>
</dtml-in>
</div>
<div align="left">
<dtml-if "currStart != 0">
<a href="&dtml-URL0;?<dtml-var "buildQueryString(actionProperties)">&start:int=<dtml-var prevStart>">Prev Items</a>
</dtml-if>
<dtml-if "nextStart < countval">
<a href="&dtml-URL0;?<dtml-var "buildQueryString(actionProperties)">&start:int=&dtml-nextStart;">Next Items</a>
</dtml-if>
<br>
</div>
<dtml-in searchResults>
<dtml-let itemID=sequence-item
currItem="getItem(itemID)">
<dtml-if sequence-start>
<table>
<dtml-in propertyNameList>
<dtml-let tList=sequence-item
currID="tList[0]"
currType="tList[1]">
<dtml-if sequence-start>
<tr><td> </td>
</dtml-if>
<td align="center">&dtml-currID;</td>
<dtml-if sequence-end>
</tr>
</dtml-if>
</dtml-let>
</dtml-in>
</dtml-if>
<tr>
<dtml-in propertyNameList>
<dtml-let tList=sequence-item
currID="tList[0]">
<dtml-if sequence-start>
<td><input type="&dtml-itemControlType;" name="<dtml-var itemIdName>" value="<dtml-var itemID>"></td>
<td align="center"><a href="<dtml-var "itemID.replace('/',',')" url_quote>/displayUpdateForm_html"><dtml-var itemID html_quote></a></td>
<dtml-else>
<td align="center"><dtml-var "'\n'.join(`_.getattr(currItem,currID,'')`.split(r'\n'))" html_quote></td>
</dtml-if>
</dtml-let>
</dtml-in>
</dtml-let>
</tr>
<dtml-if sequence-end>
<dtml-in hiddenFormItems mapping>
<input type="hidden" name="<dtml-var name>" value="<dtml-var value>">
</dtml-in>
<dtml-in formItems mapping>
<tr><th> &dtml-label; </th> <td align="left" colspan="<dtml-var "_.len(propertyNameList)">">
<input type="input" name="&dtml-name;" value="&dtml-value;">
</tr>
</dtml-in>
<tr><td align="center" colspan="<dtml-var "_.len(propertyNameList)+1">">
<input type="submit" value="&dtml-formSubmitValue;"></td></tr>
</tr>
</table>
</dtml-if>
<dtml-else>
Sorry there are no Items In this Area.
</dtml-in>
<div align="left">
<dtml-if "currStart != 0">
<a href="&dtml-URL0;?<dtml-var "buildQueryString(actionProperties)">&start:int=<dtml-var prevStart>">Prev Items</a>
</dtml-if>
<dtml-if "nextStart < countval">
<a href="&dtml-URL0;?<dtml-var "buildQueryString(actionProperties)">&start:int=&dtml-nextStart;">Next Items</a>
</dtml-if>
<br>
</div>
</dtml-let>
</dtml-let>
<dtml-var queryDisplayText html_quote><br>
|