--- a/ckanext/ga_report/templates/ga_report/ga_util.html +++ b/ckanext/ga_report/templates/ga_report/ga_util.html @@ -8,8 +8,8 @@ <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 each="(iso_code,string_name) in months"> + <option value='${iso_code}' py:attrs="{'selected': 'selected' if current_month == iso_code else None}">${h.month_option_title(iso_code,months,day)}</option> </py:for> </select> @@ -37,7 +37,6 @@ <script type="text/javascript"> $(function() { var items = $items_json; - if (items.length==0) { return; } CKAN.GA_Reports.render_rickshaw('$id', items, '$mode', '$colorscheme'); }); </script> @@ -81,7 +80,7 @@ <div class="widget-container widget_text"> <h4>Graph Legend</h4> <div id="graph-legend-container"> - <div id="legend_none">(No graph loaded)</div> + <div style="display: none;" id="legend_none">(No graph is loaded)</div> </div> </div> <div class="widget-container widget_text">