--- a/ckanext/datagovau/templates/related/dashboard.html +++ b/ckanext/datagovau/templates/related/dashboard.html @@ -1,1 +1,100 @@ +{% extends "page.html" %} +{% set page = c.page %} +{% set item_count = c.page.item_count %} + +{% block subtitle %}{{ _('Government Data Use Cases') }}{% endblock %} + +{% block breadcrumb_content %} + <li>{{ _('Government Data Use Cases') }}</li> +{% endblock %} + +{% block primary_content %} + <article class="module"> + <div class="module-content"> + <h1 class="page-heading"> + {% block page_heading %}{{ _('Government Data Use Cases') }}{% endblock %} + </h1> + + {% block related_items %} + {% if item_count %} + {% trans first=page.first_item, last=page.last_item, item_count=item_count %} + <p>Showing items <strong>{{ first }} - {{ last }}</strong> of <strong>{{ item_count }}</strong> use cases found</p> + {% endtrans %} + {% elif c.filters.type %} + {% trans item_count=item_count %} + <p><strong>{{ item_count }}</strong> use cases found</p> + {% endtrans %} + {% else %} + <p class="empty">{{ _('There have been no use cases submitted yet.') }} + {% endif %} + {% endblock %} + + {% block related_list %} + {% if page.items %} + {% snippet "related/snippets/related_list.html", related_items=page.items %} + {% endif %} + {% endblock %} + </div> + + {% block page_pagination %} + {{ page.pager() }} + {% endblock %} + </article> +{% endblock %} + +{% block secondary_content %} + <section class="module module-narrow module-shallow"> + <h2 class="module-heading">{{ _('What are use cases?') }}</h2> + <div class="module-content"> + {% trans %} + <p>Use Cases are any apps, articles, visualisations or ideas using datasets.</p> + + <p>For example, it could be a custom visualisation, pictograph + or bar chart, an app using all or part of the data or even a news story + that references datasets from this site.</p> + + <p> Send your ideas to <a href="mailto:data.gov@finance.gov.au">data.gov@finance.gov.au</a> with Title; Description; URL; Image URL; and Type: [API|Applications|Idea|News Article|Paper|Post|Visualisation]</p> + {% endtrans %} + </div> + </section> + + <section class="module module-narrow module-shallow"> + <h2 class="module-heading">{{ _('Filter Results') }}</h2> + <form action="" method="get" class="module-content form-inline form-narrow"> + <input type='hidden' name='page' value='1'/> + + <div class="control-group"> + <label for="field-type">{{ _('Filter by type') }}</label> + <select id="field-type" name="type"> + <option value="">{{ _('All') }}</option> + {% for option in c.type_options %} + <option value="{{ option.value }}"{% if c.filters.type == option.value %} selected="selected"{% endif %}>{{ option.text or option.value }}</option> + {% endfor %} + </select> + </div> + + <div class="control-group"> + <label for="field-sort">{{ _('Sort by') }}</label> + <select id="field-sort" name="sort"> + <option value="">{{ _('Default') }}</option> + {% for option in c.sort_options %} + <option value="{{ option.value }}"{% if c.filters.sort == option.value %} selected="selected"{% endif %}>{{ option.text or option.value }}</option> + {% endfor %} + </select> + </div> + + <div class="control-group"> + <label for="field-featured" class="checkbox"> + <input type="checkbox" id="field-featured" name="featured" {% if c.filters.get('featured') == 'on' %} checked="checked"{% endif %}></input> + {{ _('Only show featured items') }} + </label> + </div> + + <div class="form-actions"> + <button class="btn btn-primary">{{ _('Apply') }}</button> + </div> + </form> + </section> +{% endblock %} +