From cdc9882873a9b64ef7c5d1390cafc8bb33ce05c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aitor=20Mag=C3=A1n?= Date: Mon, 7 Jul 2014 17:54:27 +0200 Subject: [PATCH] Add templates --- .../templates/user/dashboard.html | 49 +++++++++++++++++++ .../templates/user/dashboard_adquired.html | 21 ++++++++ 2 files changed, 70 insertions(+) create mode 100644 ckanext/privatedatasets/templates/user/dashboard.html create mode 100644 ckanext/privatedatasets/templates/user/dashboard_adquired.html diff --git a/ckanext/privatedatasets/templates/user/dashboard.html b/ckanext/privatedatasets/templates/user/dashboard.html new file mode 100644 index 0000000..6d84711 --- /dev/null +++ b/ckanext/privatedatasets/templates/user/dashboard.html @@ -0,0 +1,49 @@ +{% extends "user/edit_base.html" %} + +{% set user = c.userobj %} + +{% block breadcrumb_content %} +
  • {{ _('Dashboard') }}
  • +{% endblock %} + +{% block secondary %}{% endblock %} + +{% block primary %} +
    + {% block page_header %} + + {% endblock %} +
    + {% if self.page_primary_action() | trim %} +
    + {% block page_primary_action %}{% endblock %} +
    + {% endif %} + {% block primary_content_inner %} +
    + {% snippet 'user/snippets/followee_dropdown.html', context=c.dashboard_activity_stream_context, followees=c.followee_list %} +

    + {% block page_heading %} + {{ _('News feed') }} + {% endblock %} + {{ _("Activity from items that I'm following") }} +

    + {% block activity_stream %} + {{ c.dashboard_activity_stream }} + {% endblock %} +
    + {% endblock %} +
    +
    +{% endblock %} \ No newline at end of file diff --git a/ckanext/privatedatasets/templates/user/dashboard_adquired.html b/ckanext/privatedatasets/templates/user/dashboard_adquired.html new file mode 100644 index 0000000..f562ca6 --- /dev/null +++ b/ckanext/privatedatasets/templates/user/dashboard_adquired.html @@ -0,0 +1,21 @@ +{% extends "user/dashboard.html" %} + +{% block dashboard_activity_stream_context %}{% endblock %} + +{% block page_primary_action %} + {% link_for _('Adquire Dataset'), controller='package', action='new', class_="btn btn-primary", icon="shopping-cart" %} +{% endblock %} + +{% block primary_content_inner %} +

    {{ _('Adquired Datasets') }}

    + {% if c.user_dict.adquired_datasets %} + {% snippet 'snippets/package_list.html', packages=c.user_dict.adquired_datasets %} + {% else %} +

    + {{ _('You haven\'t adquired any datasets.') }} + {% if h.check_access('package_create') %} + {% link_for _('Adquire one now?'), controller='package', action='search' %} + {% endif %} +

    + {% endif %} +{% endblock %} \ No newline at end of file