Subversion Repositories SmartDukaan

Rev

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