Rev 6519 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.1 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>List of Entities</title><link rel="stylesheet" href="css/colorbox.css" type="text/css" /><link rel="stylesheet" href="css/datatable.css" type="text/css" /><script type="text/javascript" src="jquery/jquery-1.4.2.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.core.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.widget.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.position.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.autocomplete.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.dialog.js"></script><script type="text/javascript" src="jquery/validation/jquery.validate.js"></script><script type="text/javascript" src="jquery/jquery.dataTables.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.mouse.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.draggable.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.resizable.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.effects.core.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.effects.blind.js"></script><script type="text/javascript" src="jquery/jqueryui/ui/jquery.effects.drop.js"></script><script type="text/javascript" src="jquery/jquery.chained.js"></script><script type="text/javascript" src="jquery/jquery.tablesorter.js"></script><script type="text/javascript" src="jquery/thirdparty/jquery.colorbox-min.js"></script><script type="text/javascript" src="js/common.js"></script><script type="text/javascript" src="js/events.js"></script><script type="text/javascript" src="js/entity-index.js"></script><script type="text/javascript">Entity = {};Entity.arr = #generateEntities($entitiesState);Entity.arr.splice(-1,1);Entity.arr.reverse();Entity.start = $entitiesState.size();</script><link type="text/css" href="jquery/jqueryui/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" /><style type="text/css">* { font-family: Verdana; font-size: 96%; }fieldset.label { width: 10em; float: left; }label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }p { clear: both; }.submit { margin-left: 12em; }em { font-weight: bold; padding-right: 1em; vertical-align: top; }table {border-width: 1px 1px 1px 1px;border-spacing: 2px;border-style: outset outset outset outset;border-color: gray gray gray gray;border-collapse: separate;background-color: white;}th {border-width: 1px 1px 1px 1px;padding: 1px 1px 1px 1px;border-style: inset inset inset inset;border-color: gray gray gray gray;background-color: white;-moz-border-radius: 0px 0px 0px 0px;}td {border-width: 1px 1px 1px 1px;padding: 1px 1px 1px 1px;border-style: inset inset inset inset;border-color: gray gray gray gray;background-color: white;-moz-border-radius: 0px 0px 0px 0px;}div.dialog {padding:12px;font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif";}</style></head><body><div><span align="right"> Welcome $action.getUsername() <a href="$request.contextPath/logout">logout</a></span></div><div><p/><span align="right"> <a href="$request.contextPath/special-page">Go to special pages</a></span><span align="right"> <a href="$request.contextPath/tag-page">Create Tag</a></span><span align="right"> <a href="$request.contextPath/synonym">Synonyms Map</a></span><p/><p/><span align="right"> <a href="$request.contextPath/helpdoc">Go to helpdoc</a></span><p/><h1>Entities</h1><div style="color:green;">#sactionmessage()</div><div style="color:red;">#sactionerror()</div>#set($inconsistententities = $action.getInconsistentEntities())#if($inconsistententities && !$inconsistententities.isEmpty())<div style="color:red;">Following entities are not yet complete.<ul>#foreach($inconsistententity in $inconsistententities)<li>$inconsistententity</li>#end</ul>Please complete them before 2.45 PM. Otherwise these entities will be removed from www.saholic.com.</div>#end<!--<a href="$request.contextPath/entity/new">Create New</a>--><p></p>#set ( $entitiesState = $action.getEntitiesState() )#set ( $users = $action.getAllUserNames() )<div><table id="myTable" style="width:100%"></table></div></div><div id="dialog" title=""></div><div style="display:none;"><div id="dialog-form" title="Select an user to assign"><p class="validateTips">All form fields are required.</p><form><fieldset><label for="user">Username</label><select id="username" name="username">#foreach($user in $users)<option value="$user" class="text ui-widget-content ui-corner-all">$user</option>#end</select></fieldset></form></div><div style="display:none;"><div id="dialog-duplicate" title="Enter the entity id."><p class="validateTips">Import from existing entity.</p><form><fieldset><label for="entityId">Existing Entity id</label><input type="text" id="dup-entity" class="required number" name="dup-entity"/></fieldset></form></div></div><div id="items"></div></body></html>#macro (drawAllEntities $entitiesState)<table id="myTable" style="display:none"><thead><tr style="border: 1px"><th rowspan="2">#</th><th rowspan="2">Entity ID</th><th rowspan="2">Category</th><th rowspan="2">Brand</th><th rowspan="2">Model Name</th><th rowspan="2">Model Number</th><th rowspan="2">Item details</th><th rowspan="2">Current Status</th><th rowspan="2">Created By</th><th rowspan="2">Assigned To</th><th rowspan="2">Completed By</th><th rowspan="1" colspan="5">Actions</th></tr><tr style="display:none"><th rowspan="1" colspan="1"></th><th rowspan="1" colspan="1"></th><th rowspan="1" colspan="1"></th><th rowspan="1" colspan="1"></th><th rowspan="1" colspan="1"></th></tr></thead><tbody>#foreach ( $entityid in $entitiesState.keySet() )#set($entityState = $entitiesState.get($entityid))<tr style="border: 1px"><td>$velocityCount</td><td><a href="/content/entity/$entityid/edit">$entityid</a></td><td>$action.getCategoryName($entityState.getCategoryID())</td><td>$entityState.getBrand()</td><td>$entityState.getModelName()</td><td>$entityState.getModelNumber()</td><td><a class="details-from-catalog" entityId="$entityid" href="#">see items</a></td><td>$entityState.getStatus()</td><td>$entityState.getCreatedBy()</td><td>#if($entityState.getAssignedTo())$entityState.getAssignedTo()#end</td><td>#if($entityState.getCompletedBy())$entityState.getCompletedBy()#end</td></tr>#end</tbody></table>#end#macro (generateEntities $entitiesState)[#foreach ( $entityid in $entitiesState.keySet() )#set($entityState = $entitiesState.get($entityid))[$velocityCount,$entityid,"$action.getCategoryName($entityState.getCategoryID())","$action.getJavascriptSafe($entityState.getBrand())","$action.getJavascriptSafe($entityState.getModelName())","$action.getJavascriptSafe($entityState.getModelNumber())",$entityid,"$entityState.getStatus()","#if($entityState.getMerkedReadyOn())$action.getFormattedDate($entityState.getMerkedReadyOn())#end","#if($entityState.getAssignedTo())$entityState.getAssignedTo()#end","#if($entityState.getCompletedBy())$entityState.getCompletedBy()#end",$entityid],#end0]#end