Created a template for viewing all blogs by a user.
authorAditi Mittal <aditi.iitr@gmail.com>
Thu, 5 Sep 2013 15:50:29 +0000 (21:20 +0530)
committerAditi Mittal <aditi.iitr@gmail.com>
Thu, 5 Sep 2013 15:50:29 +0000 (21:20 +0530)
mediagoblin/media_types/blog/templates/mediagoblin/blog/list_of_blogs.html [new file with mode: 0644]

diff --git a/mediagoblin/media_types/blog/templates/mediagoblin/blog/list_of_blogs.html b/mediagoblin/media_types/blog/templates/mediagoblin/blog/list_of_blogs.html
new file mode 100644 (file)
index 0000000..a362c7a
--- /dev/null
@@ -0,0 +1,64 @@
+{#
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
+#
+# 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 <http://www.gnu.org/licenses/>.
+#}
+
+{% extends "mediagoblin/base.html" %}
+
+
+{% block mediagoblin_head%}
+<style type = "text/css">
+    td > a { text-decoration:none; font-weight: bold; }
+</style>
+{% endblock %}
+
+{% block mediagoblin_content %}
+<table>
+       {% for blog in blogs %}
+       {% set my_blog_url = request.urlgen('mediagoblin.media_types.blog.blog-dashboard', 
+                                      blog_slug=blog.slug, user=request.user.username) %}
+    {% set others_blog_url = request.urlgen('mediagoblin.media_types.blog.blog_post_listing', 
+                                      blog_slug=blog.slug, user=url_user) %}
+     {% if request.user.username == url_user%}                                    
+               <tr><a href="{{ my_blog_url }}">{{ blog.title }}</a></tr>
+        {% else %}
+               <tr><a href="{{ others_blog_url }}">{{ blog.title }}</a></tr>
+       {% endif %}
+       <br>
+       {% endfor %}
+</table>
+{% endblock mediagoblin_content %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+