From 291ae7983326117af6960222c0a31e0f7be11992 Mon Sep 17 00:00:00 2001 From: Aditi Mittal Date: Sun, 15 Sep 2013 14:24:44 +0530 Subject: [PATCH] Add buton to create a blog. --- .../mediagoblin/blog/list_of_blogs.html | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) 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 6a86135f..f3c4efa5 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 @@ -26,33 +26,33 @@ {% endblock %} {% block mediagoblin_content %} - - {% if blogs%} + + {% if blogs %} +
{% for blog in blogs %} - {% set others_blog_url = request.urlgen('mediagoblin.media_types.blog.blog_post_listing', + {% 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%} + {% 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) %} + {% else %} + {% set my_blog_url = request.urlgen('mediagoblin.media_types.blog.blog-dashboard', + blog_slug=blog.slug, user=request.user.username) %} {{ blog.title }} {% endif %}
+
{% endfor %} {% else %} -

No blog has been created yet.

- {% endif %} - -{% endblock mediagoblin_content %} - - - - - - - - + {% 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 %} +

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

+ {% endif %} + {% endif %} +{% endblock mediagoblin_content %} -- 2.25.1