[423] Handle many more graphing edge-cases.
[ckanext-ga-report.git] / ckanext / ga_report / templates / ga_report / ga_util.html
blob:a/ckanext/ga_report/templates/ga_report/ga_util.html -> blob:b/ckanext/ga_report/templates/ga_report/ga_util.html
--- 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>