Subversion Repositories SmartDukaan

Rev

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