Subversion Repositories SmartDukaan

Rev

Rev 8590 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!DOCTYPE html PUBLIC 
    "-//W3C//DTD XHTML 1.1 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style type="text/css">   
* { font-family: Verdana; font-size: 96%; }
label { width: 10em; float: left; }
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
p { clear: both; }
.submit { margin-left: 12em; }
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
ul { padding-left: 13px;}

table {
    border-width: 1px 1px 1px 1px;
    border-spacing: 2px;
    border-style: outset outset outset outset;
    border-color: gray gray gray gray;
    border-collapse: separate;
    background-color: white;
        margin-top: 10px;
        width: 22%;
}
th {
    border-width: 1px 1px 1px 1px;
    padding: 1px 1px 1px 1px;
    border-style: inset inset inset inset;
    border-color: gray gray gray gray;
    background-color: white;
    -moz-border-radius: 0px 0px 0px 0px;
        text-align: center;
}
td {
    border-width: 1px 1px 1px 1px;
    padding: 1px 1px 1px 1px;
    border-style: inset inset inset inset;
    border-color: gray gray gray gray;
    background-color: white;
    -moz-border-radius: 0px 0px 0px 0px;
        text-align: center;
}
</style>
<title>List of Banners</title>
</head>
<body>
<div>
    <h1>Banner List</h1>

    <a href="$request.contextPath/user-image/new">Create New Banner</a>
    <div style="color:blue;">
    #sactionmessage()
    </div>
    <div style="color:red;">
    #sactionerror()
    </div>
    
    #drawAllBanners($action.getAllBanners())
</div>

</body>
</html>

#macro (drawAllBanners $banners)
    <table id="myTable">
        <thead>
            <tr style="border: 1px">
                <th>#</th>
                <th>Banner Name</th>
                <th colspan="2">Action</th>
            </tr>
        </thead>
        <tbody>
    #foreach ( $bannerName in $banners )
            <tr style="border: 1px">
                <td>$velocityCount</td>
                <td><a href="/user-image/$bannerName/edit">$bannerName</a></td>
                <td>
                                        #set($bannerstatus = $action.getUpdates("$bannerName"))
                                        #if ($bannerstatus.isIsActive())
                                                <img style="vertical-align: middle; width: 11px; height: 11px;" src="/images/greendot.gif">
                                        #else
                                                <img style="vertical-align: middle; width: 11px; height: 11px;" src="/images/reddot.gif">
                                        #end
                                        <a href="/user-image/${bannerName}?_method=delete"  id="$bannerName" class="delete">Delete</a>
                                </td>
            </tr>
    #end
        </tbody>
    </table>

#end