--- a/ckanext/ga_report/templates/ga_report/publisher/index.html +++ b/ckanext/ga_report/templates/ga_report/publisher/index.html @@ -27,13 +27,9 @@ <form class="form-inline" action="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='publishers')}" method="get"> <div class="controls"> - <select name="month"> - <option value='' py:attrs="{'selected': 'selected' if not c.month else None}">All months</option> - <py:for each="val,desc in c.months"> - <option value='${val}' py:attrs="{'selected': 'selected' if c.month == val else None}">${desc}</option> - </py:for> - </select> + ${month_selector(c.month, c.months, c.day)} + <input class="btn button btn-primary" type='submit' value="Update"/> </div> </form> @@ -41,14 +37,13 @@ <table class="table table-condensed table-bordered table-striped"> <tr> <th>Publisher</th> -<!-- <th>Dataset Visits</th>--> <th>Dataset Views</th> </tr> <py:for each="publisher, views, visits in c.top_publishers"> <tr> - <td>${h.link_to(publisher.title, h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport', action='read_publisher', id=publisher.name))} + <td> + ${h.link_to(publisher.title, h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport', action='read_publisher', id=publisher.name) + (("?month=" + c.month) if c.month else ''))} </td> -<!-- <td>${visits}</td> --> <td>${views}</td> </tr> </py:for>