Subversion Repositories SmartDukaan

Rev

Rev 8917 | 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>
<script type="text/javascript" src="/js/jquery-1.4.2.js"></script>
<style>
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: 90%;
}
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;
}
.actionMessage{
        paddding:0px;
}
.actionError{
        padding:0px;
}
</style>
<title>List of Banners</title>
</head>
<body>
<div>
    <h1>Banner List</h1>

    <a href="$request.contextPath/user-image/new">Create New Banner</a>
        <a href="$request.contextPath/user-image/newSideBanner" style="margin: 0px 30px 0px;">Create New Side Banner</a>
        <a href="$request.contextPath/user-image/newCampaign">Create New Campaign</a>
    <div style="color:blue;">
    #sactionmessage()
    </div>
    <div style="color:red;">
    #sactionerror()
    </div>
    <div class="left" style="width: 50%; float: left;">
                #set ($banners = $action.getAllBanners())
                    <table id="bannerTable">
        <thead>
            <tr>
                <th>Banner Name</th>
                                <th>URI Mapped</th>
                                <th>Banner Type</th>
                                <th>Image Map</th>
                <th>Status</th>
                                <th>Banner Type</th>
                                <th colspan="2">Action</th>
            </tr>
        </thead>
        <tbody>
    #foreach ( $banner in $banners )
                #set($uris = $action.getUriMapping($banner.getBannerName(), $banner.getBannerType()))
            <tr>
                <td>$banner.getBannerName()</td>
                                <td>
                                        #set($isActive="False")
                                        #foreach ($uri in $uris)
                                                #if ($uri.isIsActive())
                                                        #set($isActive="True")
                                                #end
                                                $uri.getUri()&nbsp;
                                        #end
                                </td>
                                <td>
                                        $banner.getBannerType()
                                </td>
                                <td>
                                        #if ($banner.isHasMap())
                                                <img style="vertical-align: middle; width: 18px;" src="/images/active.ico">
                                        #else
                                                <img style="vertical-align: middle; width: 18px;" src="/images/inactive.ico">
                                        #end
                                </td>
                                <td>
                                        #if ($isActive=="True")
                                                <img style="vertical-align: middle; width: 18px;" src="/images/active.ico">
                                        #else
                                                <img style="vertical-align: middle; width: 18px;" src="/images/inactive.ico">
                                        #end
                                </td>
                                #if ($banner.getBannerType()=="SIDE_BANNER")
                                        <td><a href="/user-image!editSideBanner?bannerName=$banner.getBannerName()">View/Edit</a></td>
                                #else
                                        <td><a href="/user-image/$banner.getBannerName()/edit?bannerType=$banner.getBannerType()">View/Edit</a></td>
                                #end
                                <td><a href="/user-image!destroy?bannerName=$banner.getBannerName()&bannerType=$banner.getBannerType()"  id="$banner.getBannerName()" class="delete">Delete</a></td>
            </tr>
    #end
        </tbody>
    </table>
        </div>
        <div class="right" style="width: 50%; float: right;">
        #set($campaigns=$action.getAllCampaigns())
        <table id="campaignTable">
        <thead>
            <tr>
                <th>Campaign Name</th>
                                <th>Action</th>
            </tr>
        </thead>
        <tbody>
    #foreach ( $campaign in $campaigns )
                <tr>
                        <td>$campaign</td>
                        <td><a href="/user-image!editNewsletter?newsletterName=$campaign">View/Edit</a></td>
                </tr>
        #end
        </tbody>
        </table>
        </div>
</div>
</body>
</html>