Merge branch 'master' of git+ssh://maxious.lambdacomplex.org/git/ckanext-datagovau
[ckanext-datagovau.git] / ckanext / datagovau / templates / home / snippets / stats.html
blob:a/ckanext/datagovau/templates/home/snippets/stats.html -> blob:b/ckanext/datagovau/templates/home/snippets/stats.html
--- a/ckanext/datagovau/templates/home/snippets/stats.html
+++ b/ckanext/datagovau/templates/home/snippets/stats.html
@@ -1,16 +1,46 @@
 
-<div class="hero-secondary-inner">
-<script type="text/javascript" src="http://www.google.com/jsapi">
+{% set stats = h.get_site_statistics() %}
+
+<div class="box stats">
+  <div class="inner">
+    <h3>{{ _('{0} statistics').format(g.site_title) }}</h3>
+    <ul>
+      <li>
+        <a href="{{ h.url_for(controller='package', action='search') }}">
+          <b>{{ h.SI_number_span(stats.dataset_count) }}</b>
+          {{ _('dataset') if stats.dataset_count == 1 else _('datasets') }}
+        </a>
+      </li>
+      <li>
+        <a href="{{ h.url_for(controller='organization', action='index') }}">
+          <b>{{ h.SI_number_span(stats.organization_count) }}</b>
+          {{ _('organisation') if stats.organization_count == 1 else _('organisations') }}
+        </a>
+      </li>
+      <li>
+        <a href="{{ h.url_for(controller='group', action='index') }}">
+          <b>{{ h.SI_number_span(stats.group_count) }}</b>
+          {{ _('group') if stats.group_count == 1 else _('groups') }}
+        </a>
+      </li>
+      <!--<li>
+        <a href="{{ h.url_for(controller='related', action='dashboard') }}">
+          <b>{{ h.SI_number_span(stats.related_count) }}</b>
+          {{ _('related item') if stats.related_count == 1 else _('related items') }}
+        </a>
+      </li>-->
+    </ul>
+  </div>
+</div>
+
+          <div id="feeddiv">
+</div>
+
+<script type="text/javascript" src="//www.google.com/jsapi">
 </script>
 <script type="text/javascript">
 google.load("feeds", "1") //Load Google Ajax Feed API (version 1)
 </script>
-
-          <div id="feeddiv">
-</div>
-</div>
-
-
 
 <script type="text/javascript">
 
@@ -46,25 +76,3 @@
 
 </script>
 
-{% set tags = h.get_facet_items_dict('tags', limit=3) %}
-{% set placeholder = _('eg. Gold Prices') %}
-
-<div class="module module-search module-narrow module-shallow box">
-  <form class="module-content search-form" method="get" action="{% url_for controller='package', action='search' %}">
-    <h3 class="heading">{{ _("Search Your Data") }}</h3>
-    <div class="search-input control-group search-giant">
-      <input type="text" class="search" name="q" value="" autocomplete="off" placeholder="{{ placeholder }}" />
-      <button type="submit">
-        <i class="icon-search"></i>
-        <span>{{ _('Search') }}</span>
-      </button>
-    </div>
-  </form>
-  <div class="tags">
-    <h3>{{ _('Popular Tags') }}</h3>
-    {% for tag in tags %}
-      <a class="tag" href="{% url_for controller='package', action='search', tags=tag.name %}">{{ h.truncate(tag.display_name, 22) }}</a>
-    {% endfor %}
-  </div>
-</div>
-