1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | <html xmlns="http://www.w3.org/1999/xhtml" xmlns:i18n="http://genshi.edgewall.org/i18n" xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="" > <select name="month" py:def="month_selector(current_month, months, day)"> <option value='' py:attrs="{'selected': 'selected' if not current_month else None}">All months</option> <py:for each="i, (val,desc) in enumerate(months)"> <option value='${val}' py:attrs="{'selected': 'selected' if current_month == val else None}">${desc}<py:if test="i == 0 and day"> (up to ${day})</py:if></option> </py:for> </select> <table py:def="social_table(items, with_source=False)" class="table table-condensed table-bordered table-striped"> <tr> <th>Name</th> <th py:if="with_source">Source</th> <th>Visits</th> </tr> <py:for each="name, url, source, count in items"> <tr> <td><a href="${url}">${name}</a></td> <td py:if="with_source">${source}</td> <td>${count}</td> </tr> </py:for> </table> <table py:def="stat_table(items, title='Views')" class="table table-condensed table-bordered table-striped"> <tr> <th>Name</th> <th>% ${title}</th> </tr> <py:for each="name, value in items"> <tr> <td>${name}</td> <td>${value}</td> </tr> </py:for> </table> <table py:def="downloads_table(items)" class="table table-condensed table-bordered table-striped"> <tr> <th>Dataset and resource</th> <th>Downloads</th> </tr> <py:for each="resource, value in items"> <tr> <td> <strong>${resource.resource_group.package.title}</strong><br/> ${h.link_to((resource.name or resource.description).strip() or "No name", h.url_for(controller='package', action='resource_read', id=resource.resource_group.package.name, resource_id=resource.id))}<br/> </td> <td>${value}</td> </tr> </py:for> </table> <div py:def="usage_nav(active_name)" id="minornavigation"> <div id="minornavigation-bg-left"> <div id="minornavigation-bg-right"> <ul class="nav nav-pills"> <li py:attrs="{'class': 'active' if active_name=='Site-wide' else None}"><a py:attrs="{'class': 'active' if active_name=='Site-wide' else None}" href="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='index')}"><img src="/images/icons/page_white.png" height="16px" width="16px" alt="None" class="inline-icon "/> Site-wide</a></li> <li py:attrs="{'class': 'active' if active_name=='Publishers' else None}"> <a py:attrs="{'class': 'active' if active_name=='Publishers' else None}" href="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='publishers')}"><img src="/images/icons/page_white.png" height="16px" width="16px" alt="None" class="inline-icon "/> Publishers</a> </li> <li py:attrs="{'class': 'active' if active_name=='Datasets' else None}"> <a py:attrs="{'class': 'active' if active_name=='Datasets' else None}" href="${h.url_for(controller='ckanext.ga_report.controller:GaDatasetReport',action='read')}"><img src="/images/icons/page_white.png" height="16px" width="16px" alt="None" class="inline-icon "/> Datasets</a> </li> <li py:attrs="{'class': 'active' if active_name=='Downloads' else None}"> <a py:attrs="{'class': 'active' if active_name=='Downloads' else None}" href="${h.url_for(controller='ckanext.ga_report.controller:GaReport',action='downloads')}"><img src="/images/icons/page_white.png" height="16px" width="16px" alt="None" class="inline-icon "/> Downloads</a> </li> </ul> </div> </div> </div> </html> |