Subversion Repositories SmartDukaan

Rev

Rev 6877 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
162 naveen 1
<!DOCTYPE html PUBLIC 
2
    "-//W3C//DTD XHTML 1.1 Transitional//EN"
3
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
 
5
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
<head>
7
<title>List of Entities</title>
4129 mandeep.dh 8
<link rel="stylesheet" href="css/colorbox.css" type="text/css" />
4755 amit.gupta 9
<link rel="stylesheet" href="css/datatable.css" type="text/css" />
242 naveen 10
<script type="text/javascript" src="jquery/jquery-1.4.2.js"></script>
11
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.core.js"></script>
12
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.widget.js"></script>
13
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.position.js"></script>
14
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.autocomplete.js"></script>
15
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.dialog.js"></script>
16
<script type="text/javascript" src="jquery/validation/jquery.validate.js"></script>
4755 amit.gupta 17
<script type="text/javascript" src="jquery/jquery.dataTables.js"></script>
242 naveen 18
 
19
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.mouse.js"></script>
20
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.draggable.js"></script>
21
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.resizable.js"></script>
22
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.effects.core.js"></script>
23
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.effects.blind.js"></script>
24
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.effects.drop.js"></script>
516 rajveer 25
<script type="text/javascript" src="jquery/jquery.chained.js"></script>
579 rajveer 26
<script type="text/javascript" src="jquery/jquery.tablesorter.js"></script>
4129 mandeep.dh 27
<script type="text/javascript" src="jquery/thirdparty/jquery.colorbox-min.js"></script>
28
<script type="text/javascript" src="js/common.js"></script>
29
<script type="text/javascript" src="js/events.js"></script>
4755 amit.gupta 30
<script type="text/javascript" src="js/entity-index.js"></script>
19601 amit.gupta 31
<script type="text/javascript" src="js/tableExport.js"></script>
32
<script type="text/javascript" src="js/jquery.base64.js"></script>
4755 amit.gupta 33
<script type="text/javascript">
34
    Entity = {};
35
    Entity.arr = #generateEntities($entitiesState);
36
    Entity.arr.splice(-1,1);
37
	Entity.arr.reverse();
38
	Entity.start = $entitiesState.size();
579 rajveer 39
 
516 rajveer 40
</script>
41
 
579 rajveer 42
 
198 naveen 43
<link type="text/css" href="jquery/jqueryui/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
162 naveen 44
<style type="text/css">
212 naveen 45
 
46
* { font-family: Verdana; font-size: 96%; }
4755 amit.gupta 47
fieldset.label { width: 10em; float: left; }
212 naveen 48
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
49
p { clear: both; }
50
.submit { margin-left: 12em; }
51
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
52
 
162 naveen 53
table {
54
    border-width: 1px 1px 1px 1px;
55
    border-spacing: 2px;
56
    border-style: outset outset outset outset;
57
    border-color: gray gray gray gray;
58
    border-collapse: separate;
59
    background-color: white;
60
}
61
th {
62
    border-width: 1px 1px 1px 1px;
63
    padding: 1px 1px 1px 1px;
64
    border-style: inset inset inset inset;
65
    border-color: gray gray gray gray;
66
    background-color: white;
67
    -moz-border-radius: 0px 0px 0px 0px;
68
}
69
td {
70
    border-width: 1px 1px 1px 1px;
71
    padding: 1px 1px 1px 1px;
72
    border-style: inset inset inset inset;
73
    border-color: gray gray gray gray;
74
    background-color: white;
75
    -moz-border-radius: 0px 0px 0px 0px;
76
}
242 naveen 77
div.dialog {
78
    padding:12px;
79
    font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif";
80
}
162 naveen 81
</style>
242 naveen 82
 
162 naveen 83
</head>
84
<body>
208 naveen 85
<div>
1051 rajveer 86
	<span align="right"> Welcome $action.getUsername()   <a href="$request.contextPath/logout">logout</a></span>
87
</div>
88
<div>
2768 mandeep.dh 89
    <p/>
2838 mandeep.dh 90
    <span align="right"> <a href="$request.contextPath/special-page">Go to special pages</a></span>
6519 kshitij.so 91
	<span align="right"> <a href="$request.contextPath/tag-page">Create Tag</a></span>
5074 amit.gupta 92
    <span align="right"> <a href="$request.contextPath/synonym">Synonyms Map</a></span>
2768 mandeep.dh 93
    <p/>
2276 rajveer 94
 
95
	<p/>
96
	<span align="right"> <a href="$request.contextPath/helpdoc">Go to helpdoc</a></span>
19601 amit.gupta 97
	<span align="right"> <a href="javascript:void(0)" onclick="exportEntities()">Export Entities</a></span>
2276 rajveer 98
	<p/>
162 naveen 99
    <h1>Entities</h1>
242 naveen 100
 
1051 rajveer 101
	<div style="color:green;">
242 naveen 102
    #sactionmessage()
1051 rajveer 103
	</div>
104
	<div style="color:red;">
105
	#sactionerror()
106
	</div>
2095 rajveer 107
 
108
	#set($inconsistententities = $action.getInconsistentEntities())
2097 rajveer 109
 
110
	#if($inconsistententities && !$inconsistententities.isEmpty())
111
		<div style="color:red;">
2095 rajveer 112
		Following entities are not yet complete.
113
		<ul>
114
		#foreach($inconsistententity in $inconsistententities)
115
			<li>$inconsistententity</li>
116
		#end
117
		</ul>
118
		Please complete them before 2.45 PM. Otherwise these entities will be removed from www.saholic.com. 
119
	</div>
120
	#end
1152 rajveer 121
    <!--
1051 rajveer 122
    <a href="$request.contextPath/entity/new">Create New</a>
1152 rajveer 123
	-->
162 naveen 124
    <p></p>
1152 rajveer 125
    #set ( $entitiesState = $action.getEntitiesState() )
1051 rajveer 126
	#set ( $users = $action.getAllUserNames() )
250 naveen 127
 
128
    <div>
4755 amit.gupta 129
        <table id="myTable" style="width:100%"></table>
250 naveen 130
    </div>
1051 rajveer 131
</div>
250 naveen 132
 
1051 rajveer 133
<div id="dialog" title="">
134
</div>
579 rajveer 135
 
1051 rajveer 136
<div style="display:none;">
137
<div id="dialog-form" title="Select an user to assign">
138
    <p class="validateTips">All form fields are required.</p> 
139
 	<form> 
140
	<fieldset> 
141
		<label for="user">Username</label> 
142
		<select id="username" name="username">
143
		#foreach($user in $users)
144
			<option value="$user" class="text ui-widget-content ui-corner-all">$user</option>
579 rajveer 145
		#end
1051 rajveer 146
        </select>
579 rajveer 147
 
1051 rajveer 148
	</fieldset> 
149
	</form>
150
</div> 
5012 amit.gupta 151
<div style="display:none;">
152
<div id="dialog-duplicate" title="Enter the entity id.">
153
    <p class="validateTips">Import from existing entity.</p> 
154
 	<form> 
155
	<fieldset> 
156
		<label for="entityId">Existing Entity id</label> 
157
		<input type="text" id="dup-entity" class="required number" name="dup-entity"/>
158
	</fieldset> 
159
	</form>
160
</div> 
250 naveen 161
</div>
4129 mandeep.dh 162
<div id="items">
163
</div>
250 naveen 164
</body>
165
</html>
166
 
1152 rajveer 167
#macro (drawAllEntities $entitiesState)
4755 amit.gupta 168
	    <table id="myTable" style="display:none">
579 rajveer 169
	        <thead>
170
            <tr style="border: 1px">
4755 amit.gupta 171
                <th rowspan="2">#</th>
172
                <th rowspan="2">Entity ID</th>
173
                <th rowspan="2">Category</th>
174
                <th rowspan="2">Brand</th>
175
                <th rowspan="2">Model Name</th>
176
                <th rowspan="2">Model Number</th>
177
                <th rowspan="2">Item details</th>
178
				<th rowspan="2">Current Status</th>
179
				<th rowspan="2">Created By</th>
180
				<th rowspan="2">Assigned To</th>
181
				<th rowspan="2">Completed By</th>
182
                <th rowspan="1" colspan="5">Actions</th>
579 rajveer 183
            </tr>
4755 amit.gupta 184
            <tr style="display:none">
185
                <th rowspan="1" colspan="1"></th>
186
                <th rowspan="1" colspan="1"></th>
187
                <th rowspan="1" colspan="1"></th>
188
                <th rowspan="1" colspan="1"></th>
189
                <th rowspan="1" colspan="1"></th>
190
            </tr>
579 rajveer 191
        </thead>
192
        <tbody>
1152 rajveer 193
 
194
 
195
    #foreach ( $entityid in $entitiesState.keySet() )
196
			#set($entityState = $entitiesState.get($entityid))
579 rajveer 197
            <tr style="border: 1px">
198
                <td>$velocityCount</td>
199
                <td><a href="/content/entity/$entityid/edit">$entityid</a></td>
1152 rajveer 200
                <td>$action.getCategoryName($entityState.getCategoryID())</td>
201
                <td>$entityState.getBrand()</td>
2605 rajveer 202
                <td>$entityState.getModelName()</td>
1152 rajveer 203
                <td>$entityState.getModelNumber()</td>
4129 mandeep.dh 204
				<td>
205
                    <a class="details-from-catalog" entityId="$entityid" href="#">
206
                        see items
207
                    </a>
208
                </td>
1051 rajveer 209
				<td>$entityState.getStatus()</td>
210
                <td>$entityState.getCreatedBy()</td>
211
				<td>#if($entityState.getAssignedTo())$entityState.getAssignedTo()#end</td>
212
				<td>#if($entityState.getCompletedBy())$entityState.getCompletedBy()#end</td>
579 rajveer 213
            </tr>
214
    #end
215
        </tbody>
216
    </table>
217
 
218
#end	
4755 amit.gupta 219
 
220
 
221
#macro (generateEntities $entitiesState)
222
	 [
223
	 #foreach ( $entityid in $entitiesState.keySet() )
224
			#set($entityState = $entitiesState.get($entityid))
225
            [$velocityCount,
226
            $entityid,
227
            "$action.getCategoryName($entityState.getCategoryID())",
5180 amit.gupta 228
            "$action.getJavascriptSafe($entityState.getBrand())",
229
            "$action.getJavascriptSafe($entityState.getModelName())",
230
            "$action.getJavascriptSafe($entityState.getModelNumber())",
4755 amit.gupta 231
			$entityid,
232
			"$entityState.getStatus()",
6877 amit.gupta 233
            "#if($entityState.getMerkedReadyOn())$action.getFormattedDate($entityState.getMerkedReadyOn())#end",
4755 amit.gupta 234
			"#if($entityState.getAssignedTo())$entityState.getAssignedTo()#end",
235
			"#if($entityState.getCompletedBy())$entityState.getCompletedBy()#end",
236
			$entityid],
237
	 #end
238
	 0]
239
#end