| 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>
|
| 242 |
naveen |
8 |
<script type="text/javascript" src="jquery/jquery-1.4.2.js"></script>
|
|
|
9 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.core.js"></script>
|
|
|
10 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.widget.js"></script>
|
|
|
11 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.position.js"></script>
|
|
|
12 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.autocomplete.js"></script>
|
|
|
13 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.dialog.js"></script>
|
|
|
14 |
<script type="text/javascript" src="jquery/validation/jquery.validate.js"></script>
|
|
|
15 |
|
|
|
16 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.mouse.js"></script>
|
|
|
17 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.draggable.js"></script>
|
|
|
18 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.ui.resizable.js"></script>
|
|
|
19 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.effects.core.js"></script>
|
|
|
20 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.effects.blind.js"></script>
|
|
|
21 |
<script type="text/javascript" src="jquery/jqueryui/ui/jquery.effects.drop.js"></script>
|
| 516 |
rajveer |
22 |
<script type="text/javascript" src="jquery/jquery.chained.js"></script>
|
| 242 |
naveen |
23 |
|
|
|
24 |
<script>
|
|
|
25 |
// increase the default animation speed to exaggerate the effect
|
|
|
26 |
jQuery.fx.speeds._default = 1000;
|
|
|
27 |
$(function() {
|
|
|
28 |
$('#dialog').dialog({
|
|
|
29 |
autoOpen: false,
|
|
|
30 |
show: 'blind',
|
|
|
31 |
hide: 'drop',
|
|
|
32 |
width: 470,
|
|
|
33 |
height: 430
|
|
|
34 |
});
|
|
|
35 |
|
|
|
36 |
$('.opener').click(function() {
|
|
|
37 |
var entityid = $(this).attr('id');
|
|
|
38 |
$('#dialog-iframe').attr('src', 'media?entityID=' + entityid);
|
|
|
39 |
$('#dialog').attr('title', 'All Media - ' + entityid);
|
|
|
40 |
$('#dialog').dialog('open');
|
|
|
41 |
return false;
|
|
|
42 |
});
|
|
|
43 |
});
|
|
|
44 |
</script>
|
| 516 |
rajveer |
45 |
|
|
|
46 |
<script type="text/javascript">
|
|
|
47 |
$(document).ready(function(){
|
|
|
48 |
$("#category").chained("#basecategory");
|
|
|
49 |
});
|
|
|
50 |
</script>
|
|
|
51 |
|
| 198 |
naveen |
52 |
<link type="text/css" href="jquery/jqueryui/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
|
| 162 |
naveen |
53 |
<style type="text/css">
|
| 212 |
naveen |
54 |
|
|
|
55 |
* { font-family: Verdana; font-size: 96%; }
|
|
|
56 |
label { width: 10em; float: left; }
|
|
|
57 |
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
|
|
|
58 |
p { clear: both; }
|
|
|
59 |
.submit { margin-left: 12em; }
|
|
|
60 |
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
|
|
|
61 |
|
| 162 |
naveen |
62 |
table {
|
|
|
63 |
border-width: 1px 1px 1px 1px;
|
|
|
64 |
border-spacing: 2px;
|
|
|
65 |
border-style: outset outset outset outset;
|
|
|
66 |
border-color: gray gray gray gray;
|
|
|
67 |
border-collapse: separate;
|
|
|
68 |
background-color: white;
|
|
|
69 |
}
|
|
|
70 |
th {
|
|
|
71 |
border-width: 1px 1px 1px 1px;
|
|
|
72 |
padding: 1px 1px 1px 1px;
|
|
|
73 |
border-style: inset inset inset inset;
|
|
|
74 |
border-color: gray gray gray gray;
|
|
|
75 |
background-color: white;
|
|
|
76 |
-moz-border-radius: 0px 0px 0px 0px;
|
|
|
77 |
}
|
|
|
78 |
td {
|
|
|
79 |
border-width: 1px 1px 1px 1px;
|
|
|
80 |
padding: 1px 1px 1px 1px;
|
|
|
81 |
border-style: inset inset inset inset;
|
|
|
82 |
border-color: gray gray gray gray;
|
|
|
83 |
background-color: white;
|
|
|
84 |
-moz-border-radius: 0px 0px 0px 0px;
|
|
|
85 |
}
|
| 242 |
naveen |
86 |
div.dialog {
|
|
|
87 |
padding:12px;
|
|
|
88 |
font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif";
|
|
|
89 |
}
|
| 162 |
naveen |
90 |
</style>
|
| 242 |
naveen |
91 |
|
| 162 |
naveen |
92 |
</head>
|
|
|
93 |
<body>
|
| 208 |
naveen |
94 |
<div>
|
| 162 |
naveen |
95 |
<h1>Entities</h1>
|
| 242 |
naveen |
96 |
|
|
|
97 |
#sactionmessage()
|
|
|
98 |
|
| 162 |
naveen |
99 |
<a href="/content/entity/new">Create New</a>
|
|
|
100 |
<p></p>
|
| 250 |
naveen |
101 |
#set ( $entities = $action.getEntities() )
|
|
|
102 |
#set ( $incompleteentities = $action.getIncompleteEntities() )
|
| 516 |
rajveer |
103 |
#set ( $catEntities = $action.getEntitiesByCategory())
|
| 250 |
naveen |
104 |
<!-- Incomplete -->
|
|
|
105 |
<h3>Incomplete</h3>
|
|
|
106 |
|
|
|
107 |
<div>
|
| 516 |
rajveer |
108 |
#drawEntities($incompleteentities 1)
|
| 250 |
naveen |
109 |
</div>
|
|
|
110 |
<p/>
|
|
|
111 |
<!-- Completes -->
|
|
|
112 |
<h3>Complete</h3>
|
|
|
113 |
|
| 516 |
rajveer |
114 |
$action.getCategoriesString()
|
|
|
115 |
|
| 250 |
naveen |
116 |
<div>
|
| 516 |
rajveer |
117 |
#foreach( $catid in $catEntities.keySet())
|
|
|
118 |
#set ( $entities = $catEntities.get($catid))
|
|
|
119 |
#drawEntities($entities $catid)
|
|
|
120 |
#end
|
|
|
121 |
|
| 250 |
naveen |
122 |
</div>
|
|
|
123 |
</div>
|
|
|
124 |
|
|
|
125 |
<div id="dialog" title="">
|
|
|
126 |
<iframe src="" id="dialog-iframe" width="430px" height="360px">
|
|
|
127 |
</iframe>
|
|
|
128 |
</div>
|
|
|
129 |
</body>
|
|
|
130 |
</html>
|
|
|
131 |
|
| 516 |
rajveer |
132 |
#macro (drawEntities $entities $catid)
|
|
|
133 |
<!-- style= "display: none; z-index: 1000; outline: 0px none; position: relative;" -->
|
|
|
134 |
<table id="$catid";>
|
| 162 |
naveen |
135 |
<thead>
|
|
|
136 |
<tr style="border: 1px">
|
|
|
137 |
<th>#</th>
|
|
|
138 |
<th>Entity ID</th>
|
|
|
139 |
<th>Category</th>
|
|
|
140 |
<th>Brand</th>
|
|
|
141 |
<th>Model Number</th>
|
|
|
142 |
<th>Model Name</th>
|
| 242 |
naveen |
143 |
<th></th>
|
| 455 |
rajveer |
144 |
<!--<th></th>-->
|
| 242 |
naveen |
145 |
<th></th>
|
| 162 |
naveen |
146 |
</tr>
|
|
|
147 |
</thead>
|
|
|
148 |
<tbody>
|
|
|
149 |
#foreach ( $entity in $entities )
|
|
|
150 |
<tr style="border: 1px">
|
|
|
151 |
<td>$velocityCount</td>
|
|
|
152 |
#set ( $entityid = $entity.getID() )
|
|
|
153 |
<td><a href="/content/entity/$entityid/edit">$entityid</a></td>
|
| 242 |
naveen |
154 |
<td>$action.getCategoryName($entity.getCategoryID())</td>
|
| 162 |
naveen |
155 |
<td>$entity.getBrand()</td>
|
|
|
156 |
<td>$entity.getModelNumber()</td>
|
|
|
157 |
<td>$entity.getModelName()</td>
|
| 242 |
naveen |
158 |
<td><a href="/content/entity/$entityid" target="_blank">View</a></td>
|
| 455 |
rajveer |
159 |
<!-- <td><a href="" id="$entityid" class="opener">Media</a></td> -->
|
| 242 |
naveen |
160 |
<td><a href="/content/entity/$entityid?_method=delete">Delete</a></td>
|
| 162 |
naveen |
161 |
</tr>
|
|
|
162 |
#end
|
|
|
163 |
</tbody>
|
|
|
164 |
</table>
|
| 250 |
naveen |
165 |
#end
|