Subversion Repositories SmartDukaan

Rev

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