From ae85ed0f971147ce7cee9ce02b498f909d21ce79 Mon Sep 17 00:00:00 2001 From: Bernhard Keller Date: Wed, 18 May 2011 17:32:49 +0200 Subject: added Pagination class, usage description in Pagination,__call__ added pagination.html, object_gallery.html as templates --- mediagoblin/templates/mediagoblin/root.html | 2 +- .../templates/mediagoblin/user_pages/user.html | 11 ++---- .../mediagoblin/utils/object_gallery.html | 36 +++++++++++++++++++ .../templates/mediagoblin/utils/pagination.html | 41 ++++++++++++++++++++++ 4 files changed, 81 insertions(+), 9 deletions(-) create mode 100644 mediagoblin/templates/mediagoblin/utils/object_gallery.html create mode 100644 mediagoblin/templates/mediagoblin/utils/pagination.html (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html index e2b2730a..a93a7c75 100644 --- a/mediagoblin/templates/mediagoblin/root.html +++ b/mediagoblin/templates/mediagoblin/root.html @@ -53,4 +53,4 @@ -{% endblock %} +{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index 5c8692fc..48516679 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -23,14 +23,9 @@ {#- Should we outsource such a media 'gallery' view to it's own file? It could be useful for the home page and other views too -#} {% else %} {# This *should* not occur as the view makes sure we pass in a user. #} diff --git a/mediagoblin/templates/mediagoblin/utils/object_gallery.html b/mediagoblin/templates/mediagoblin/utils/object_gallery.html new file mode 100644 index 00000000..6e59c380 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/utils/object_gallery.html @@ -0,0 +1,36 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011 Free Software Foundation, Inc +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + + +
+ {% if media_entries %} +
    + {% for entry in media_entries %} +
  • + + +
  • + {% endfor %} +
+ + {% import 'mediagoblin/utils/pagination.html' as paginationmacro %} + {{ paginationmacro.render_pagination(pagination) }} + {% endif %} +
diff --git a/mediagoblin/templates/mediagoblin/utils/pagination.html b/mediagoblin/templates/mediagoblin/utils/pagination.html new file mode 100644 index 00000000..80b4b820 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/utils/pagination.html @@ -0,0 +1,41 @@ +{# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011 Free Software Foundation, Inc +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + + +{% macro render_pagination(pagination) %} + +{# only display if {{pagination}} is defined #} + +{% if pagination %} + +{% endif %} +{% endmacro %} -- cgit v1.2.3