diff options
author | 2010-08-08 17:42:44 +0300 | |
---|---|---|
committer | 2010-08-08 17:42:44 +0300 | |
commit | 54fa061e06cb77ade8bce9614f6db527ebc541e1 (patch) | |
tree | aea35837dfb52e07392784116e9b4358139aeac0 | |
parent | Remove unused import 'time' (diff) | |
download | gsoc2010-grumpy-54fa061e06cb77ade8bce9614f6db527ebc541e1.tar.gz gsoc2010-grumpy-54fa061e06cb77ade8bce9614f6db527ebc541e1.tar.bz2 gsoc2010-grumpy-54fa061e06cb77ade8bce9614f6db527ebc541e1.zip |
Show also favorite packages on dashboard
-rw-r--r-- | grumpy/templates/account.html | 2 | ||||
-rw-r--r-- | grumpy/templates/dashboard.html | 20 |
2 files changed, 20 insertions, 2 deletions
diff --git a/grumpy/templates/account.html b/grumpy/templates/account.html index f5b8224..8436437 100644 --- a/grumpy/templates/account.html +++ b/grumpy/templates/account.html @@ -1,6 +1,6 @@ {% extends "layout.html" %} {% block title %}Your Account{% endblock %} -{% block script %} +{% block script -%} {{ importer.load_js('jquery.min') }} {{ importer.load_js('jquery-ui.min') }} <script type="text/javascript"> diff --git a/grumpy/templates/dashboard.html b/grumpy/templates/dashboard.html index 49d539f..65e2860 100644 --- a/grumpy/templates/dashboard.html +++ b/grumpy/templates/dashboard.html @@ -5,9 +5,18 @@ {{ importer.load_js('jquery.dataTables.min') }} <script type="text/javascript"> $(document).ready(function() { - $('#owned_pkgs').dataTable(); + $('#owned_pkgs').dataTable({ + 'bJQueryUI': true, + 'sPaginationType': "full_numbers" + }); + $('#favorites').dataTable({ + 'bJQueryUI': true, + 'sPaginationType': "full_numbers" + }); } ); </script> +{{ importer.load_css('datatable') }} +{{ importer.load_css('ui-lightness/jquery-ui') }} {% endblock %} {% block body %} <h2>Hi, {{ g.user.email.split('@')[0] }}</h2> @@ -26,4 +35,13 @@ $(document).ready(function() { {% else %} You are not listed as maintainer of any packages {% endif %} +<h3>Favorite packages</h3> +<table id="favorites"> +<thead> + <tr><th>Package</th></tr> +</thead> +{% for pkg in g.user.favorites %} +<tr><td>{{ pkg.key | e }}</td></tr> +{% endfor %} +</table> {% endblock %} |