Subversion Repositories SmartDukaan

Rev

Rev 5012 | Rev 5180 | 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>
5074 amit.gupta 89
    <span align="right"> <a href="$request.contextPath/synonym">Synonyms Map</a></span>
2768 mandeep.dh 90
    <p/>
2276 rajveer 91
 
92
	<p/>
93
	<span align="right"> <a href="$request.contextPath/helpdoc">Go to helpdoc</a></span>
94
	<p/>
162 naveen 95
    <h1>Entities</h1>
242 naveen 96
 
1051 rajveer 97
	<div style="color:green;">
242 naveen 98
    #sactionmessage()
1051 rajveer 99
	</div>
100
	<div style="color:red;">
101
	#sactionerror()
102
	</div>
2095 rajveer 103
 
104
	#set($inconsistententities = $action.getInconsistentEntities())
2097 rajveer 105
 
106
	#if($inconsistententities && !$inconsistententities.isEmpty())
107
		<div style="color:red;">
2095 rajveer 108
		Following entities are not yet complete.
109
		<ul>
110
		#foreach($inconsistententity in $inconsistententities)
111
			<li>$inconsistententity</li>
112
		#end
113
		</ul>
114
		Please complete them before 2.45 PM. Otherwise these entities will be removed from www.saholic.com. 
115
	</div>
116
	#end
1152 rajveer 117
    <!--
1051 rajveer 118
    <a href="$request.contextPath/entity/new">Create New</a>
1152 rajveer 119
	-->
162 naveen 120
    <p></p>
1152 rajveer 121
    #set ( $entitiesState = $action.getEntitiesState() )
1051 rajveer 122
	#set ( $users = $action.getAllUserNames() )
250 naveen 123
 
124
    <div>
4755 amit.gupta 125
        <table id="myTable" style="width:100%"></table>
250 naveen 126
    </div>
1051 rajveer 127
</div>
250 naveen 128
 
1051 rajveer 129
<div id="dialog" title="">
130
</div>
579 rajveer 131
 
1051 rajveer 132
<div style="display:none;">
133
<div id="dialog-form" title="Select an user to assign">
134
    <p class="validateTips">All form fields are required.</p> 
135
 	<form> 
136
	<fieldset> 
137
		<label for="user">Username</label> 
138
		<select id="username" name="username">
139
		#foreach($user in $users)
140
			<option value="$user" class="text ui-widget-content ui-corner-all">$user</option>
579 rajveer 141
		#end
1051 rajveer 142
        </select>
579 rajveer 143
 
1051 rajveer 144
	</fieldset> 
145
	</form>
146
</div> 
5012 amit.gupta 147
<div style="display:none;">
148
<div id="dialog-duplicate" title="Enter the entity id.">
149
    <p class="validateTips">Import from existing entity.</p> 
150
 	<form> 
151
	<fieldset> 
152
		<label for="entityId">Existing Entity id</label> 
153
		<input type="text" id="dup-entity" class="required number" name="dup-entity"/>
154
	</fieldset> 
155
	</form>
156
</div> 
250 naveen 157
</div>
4129 mandeep.dh 158
<div id="items">
159
</div>
250 naveen 160
</body>
161
</html>
162
 
1152 rajveer 163
#macro (drawAllEntities $entitiesState)
4755 amit.gupta 164
	    <table id="myTable" style="display:none">
579 rajveer 165
	        <thead>
166
            <tr style="border: 1px">
4755 amit.gupta 167
                <th rowspan="2">#</th>
168
                <th rowspan="2">Entity ID</th>
169
                <th rowspan="2">Category</th>
170
                <th rowspan="2">Brand</th>
171
                <th rowspan="2">Model Name</th>
172
                <th rowspan="2">Model Number</th>
173
                <th rowspan="2">Item details</th>
174
				<th rowspan="2">Current Status</th>
175
				<th rowspan="2">Created By</th>
176
				<th rowspan="2">Assigned To</th>
177
				<th rowspan="2">Completed By</th>
178
                <th rowspan="1" colspan="5">Actions</th>
579 rajveer 179
            </tr>
4755 amit.gupta 180
            <tr style="display:none">
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
                <th rowspan="1" colspan="1"></th>
186
            </tr>
579 rajveer 187
        </thead>
188
        <tbody>
1152 rajveer 189
 
190
 
191
    #foreach ( $entityid in $entitiesState.keySet() )
192
			#set($entityState = $entitiesState.get($entityid))
579 rajveer 193
            <tr style="border: 1px">
194
                <td>$velocityCount</td>
195
                <td><a href="/content/entity/$entityid/edit">$entityid</a></td>
1152 rajveer 196
                <td>$action.getCategoryName($entityState.getCategoryID())</td>
197
                <td>$entityState.getBrand()</td>
2605 rajveer 198
                <td>$entityState.getModelName()</td>
1152 rajveer 199
                <td>$entityState.getModelNumber()</td>
4129 mandeep.dh 200
				<td>
201
                    <a class="details-from-catalog" entityId="$entityid" href="#">
202
                        see items
203
                    </a>
204
                </td>
1051 rajveer 205
				<td>$entityState.getStatus()</td>
206
                <td>$entityState.getCreatedBy()</td>
207
				<td>#if($entityState.getAssignedTo())$entityState.getAssignedTo()#end</td>
208
				<td>#if($entityState.getCompletedBy())$entityState.getCompletedBy()#end</td>
579 rajveer 209
            </tr>
210
    #end
211
        </tbody>
212
    </table>
213
 
214
#end	
4755 amit.gupta 215
 
216
 
217
#macro (generateEntities $entitiesState)
218
	 [
219
	 #foreach ( $entityid in $entitiesState.keySet() )
220
			#set($entityState = $entitiesState.get($entityid))
221
            [$velocityCount,
222
            $entityid,
223
            "$action.getCategoryName($entityState.getCategoryID())",
224
            "$entityState.getBrand()",
225
            "$entityState.getModelName()",
226
            "$entityState.getModelNumber()",
227
			$entityid,
228
			"$entityState.getStatus()",
229
            "$entityState.getCreatedBy()",
230
			"#if($entityState.getAssignedTo())$entityState.getAssignedTo()#end",
231
			"#if($entityState.getCompletedBy())$entityState.getCompletedBy()#end",
232
			$entityid],
233
	 #end
234
	 0]
235
#end