Subversion Repositories SmartDukaan

Rev

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

<html>
<head>
        <title>Product Notifications</title>
        <style>
body    {       font-size: 12px;        }
fieldset        {       padding: 10px 20px;     }
#container      {       padding: 20px; border: 1px solid;       }
th, td  {       font-size: 12px; padding: 2px 4px;      }
    </style>
</head>
<body>
        <h3>User Requests for Product Notifications</h3>
        
        <form action="" method="POST">
                <fieldset>
                        <legend>Emails submitted to recieve Product Notifications</legend>
                        Download the emails submitted during last 
                        <select name="np">
                                <option value="d">24 hours</option>
                                <option value="w">1 week</option>
                                <option value="f">1 fortnight</option>
                                <option value="m" selected>1 month</option>
                                <option value="3m">3 months</option>
                                <option value="6m">6 months</option>
                                <option value="a">[All Emails]</option>
            </select>&nbsp;&nbsp;&nbsp;
                        <input type="submit" value="Download" />
                </fieldset>
        </form>
        
        <h3>Item wise distribution of product notification requests</h3>
        <div id="container">
                <form action="" method="GET">
                        Duration of notification requests
                        #set($period = $action.getSelectedPeriod())
                        <select name="sp">
                                <option value="d" #if($period == "d") SELECTED #end>24 hours</option>
                                <option value="2d" #if($period == "2d") SELECTED #end>2 days</option>
                                <option value="3d" #if($period == "3d") SELECTED #end>3 days</option>
                                <option value="w" #if($period == "w") SELECTED #end>1 week</option>
                                <option value="f" #if($period == "f") SELECTED #end>1 fortnight</option>
                                <option value="m" #if($period == "m") SELECTED #end>1 month</option>
                                <option value="a" #if($period == "a") SELECTED #end>All Emails</option>
            </select>
                        <input type="submit" value="Show" />
        </form>
                #set($requestCounts = $action.getNotificationRequestCounts())
                #if($requestCounts)
                <table>
                        <tr>
                                <th>Product</th>
                                <th>No. of Notification Requests</th>
                        </tr>
                        #foreach($requestCount in $requestCounts)
                        <tr>
                                <td>$action.getProductNameFromItem($requestCount.getItem())</td>
                                <td align="center">$requestCount.getCount()</td>
                        </tr>
                        #end
                </table>
                #else
                        <p>No statistics can be retrieved. Try again later!</p>
                #end
    </div>
</body>
</html>