From: Aditi Mittal Date: Wed, 18 Sep 2013 15:34:16 +0000 (+0530) Subject: Add view button and create blog button on blogs dashboard. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=52042905e26e5effd67fb6772c4d0e2151b14ca2;p=mediagoblin.git Add view button and create blog button on blogs dashboard. --- 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 index f3c4efa5..3785e1c3 100644 --- a/mediagoblin/media_types/blog/templates/mediagoblin/blog/list_of_blogs.html +++ b/mediagoblin/media_types/blog/templates/mediagoblin/blog/list_of_blogs.html @@ -21,38 +21,47 @@ {% block mediagoblin_head%} {% endblock %} {% block mediagoblin_content %} - +{% set blog_create_url = request.urlgen('mediagoblin.media_types.blog.create', + user=request.user.username) %} {% if blogs %} - - {% for blog in blogs %} - {% set others_blog_url = request.urlgen('mediagoblin.media_types.blog.blog_post_listing', - blog_slug=blog.slug, user=user.username) %} - {% if not request.user or request.user.username != user.username%} - {{ blog.title }} - {% else %} - {% set my_blog_url = request.urlgen('mediagoblin.media_types.blog.blog-dashboard', - blog_slug=blog.slug, user=request.user.username) %} - {{ blog.title }} - {% endif %} -
+

My Blogs

+
+ {% for blog in blogs %} + {% set others_blog_url = request.urlgen('mediagoblin.media_types.blog.blog_post_listing', + blog_slug=blog.slug, user=user.username) %} + {% set my_blog_url = request.urlgen('mediagoblin.media_types.blog.blog-dashboard', + blog_slug=blog.slug, user=request.user.username) %} + + {% if not request.user or request.user.username != user.username%} + + {% else %} + + {% endif %} + + + + {% endfor %}
{{ blog.title }}{{ blog.title }}              {% trans %}View{% endtrans %}
- {% endfor %} {% else %} {% if request.user and request.user.username==user.username %}

You have not created any blog yet.

- {% set blog_create_url = request.urlgen('mediagoblin.media_types.blog.create', - user=request.user.username) %} - {% trans %}Create a Blog{% endtrans %} - {% else %} + {% else %}

No blog has been created by {{ user.username }}yet.

{% endif %} {% endif %} +
+
+
+ {% if blogs.__len__() {% trans %}Create a Blog{% endtrans %} + {% endif %} {% endblock mediagoblin_content %}