some fixes
authorAditi Mittal <aditi.iitr@gmail.com>
Sat, 21 Sep 2013 04:46:13 +0000 (10:16 +0530)
committerAditi Mittal <aditi.iitr@gmail.com>
Sat, 21 Sep 2013 04:46:13 +0000 (10:16 +0530)
mediagoblin/media_types/blog/__init__.py
mediagoblin/media_types/blog/config_spec.ini
mediagoblin/media_types/blog/templates/mediagoblin/blog/blog_admin_dashboard.html
mediagoblin/media_types/blog/templates/mediagoblin/blog/blog_post_listing.html
mediagoblin/media_types/blog/templates/mediagoblin/blog/list_of_blogs.html
mediagoblin/media_types/blog/views.py

index 0f87591bec0b6d22b9fe7bec28ae6af54242be72..8a61c6e0ed7d176087e1138c6e3e20ba14b8e7b6 100644 (file)
@@ -81,10 +81,7 @@ def setup_plugin():
         ('mediagoblin.media_types.blog.blog_about',
         '/u/<string:user>/b/<string:blog_slug>/about/',
         'mediagoblin.media_types.blog.views:blog_about_view'
-        )
-        
-        
-        ]
+        )]
 
 
     pluginapi.register_routes(routes)
index e0a6844ebf37e7067568ac717e316703d7b42158..77038f4782fcb0b50c28bbcfd10d3d5e229233be 100644 (file)
@@ -1,2 +1,2 @@
 [plugin_spec]
-max_blog_count = integer(default=1)
+max_blog_count = integer(default=4)
index c364d8ad1c40e5948e8d8b6ee1b40d861121840b..1316083b1f9a30c871c4e5b359c09aee0cd301dd 100644 (file)
@@ -99,7 +99,7 @@
                                               blog_slug=blog_slug, user=user.username) %}
       <br/>
       <br/>
-      <a href="{{ blogpost_listing_url}}">{% trans %}<em> Go to blog post list view </em>{% endtrans %}</a>
+      <a href="{{ blogpost_listing_url}}">{% trans %}<em> Go to list view </em>{% endtrans %}</a>
     {% else %}
         {% trans %} No blog post yet. {% endtrans %}
     {% endif %}
index a728398572358e117daf21df573e2bf1472944b8..3ec84006b09ec2b93eb8977ae5fbb9541b007dff 100644 (file)
@@ -36,7 +36,7 @@
 {%- endblock %}
 
 {% block mediagoblin_content %}
-    <div class="b_list_owner"> <h1><font color="black"> {{ blog_owner }} 's Blog</font></h1></div>
+    <div class="b_list_owner"> <h1><font color="black"> {{ blog.title }} <font size="2">by {{ blog_owner }}</font> </font></h1></div>
     <div>
         {% for post in blog_posts %}
             <div class="b_listing_title"><a href="{{ post.url_for_self(request.urlgen) }}">
             </br>
         {% endfor %}
     </div>
+    <br/>
+    <br/>
+    {% set blog_about_url = request.urlgen('mediagoblin.media_types.blog.blog_about', 
+                                      blog_slug=blog.slug, user=blog_owner) %}
+    <a style="text-decoration:underline" href="{{ blog_about_url}}">About Blog</a>
+    <br/>
     {{ render_pagination(request, pagination) }}
 {% endblock %}
index 3785e1c36aff99625f4f0228b0fc570574a39374..f19a922555dd23cab6f176de009c60dcf779475c 100644 (file)
 {% endblock %}
 
 {% block mediagoblin_content %}
-{% set blog_create_url = request.urlgen('mediagoblin.media_types.blog.create',
-              user=request.user.username) %}
     {% if blogs %}
         <h2>My Blogs</h2>
         <table id="blogs_list">
             {% 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) %}
+                
                 <tr>
                      {% if not request.user or request.user.username != user.username%}
                             <td><a href="{{ others_blog_url }}">{{ blog.title }}</a></td>
                      {% else %}
+                       {% set my_blog_url = request.urlgen('mediagoblin.media_types.blog.blog-dashboard',
+                       blog_slug=blog.slug, user=request.user.username) %}
                             <td><a href="{{ my_blog_url }}">{{ blog.title }}</a></td>
                      {% endif %}
                      <td>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</td>
@@ -60,6 +59,9 @@
     <br/>
     <br/>
     {% if blogs.__len__() <max_blog_count and request.user and request.user.username==user.username %}
+        {% set blog_create_url = request.urlgen('mediagoblin.media_types.blog.create',
+              user=request.user.username) %}
+
         <a class="button_action" href="{{ blog_create_url }}">{% trans %}Create a Blog{% endtrans %}</a>
     {% endif %}
 
index 85e4416c16b0ab3d14a72f3db9e057d357fd4ca2..aefbe52ad8e18111d6d3e24a6e5b8d195ea9c324 100644 (file)
@@ -270,7 +270,8 @@ def blog_post_listing(request, page):
         'mediagoblin/blog/blog_post_listing.html',
         {'blog_posts': blog_posts_on_a_page,
          'pagination': pagination,
-         'blog_owner': blog_owner
+         'blog_owner': blog_owner,
+         'blog':blog
         })
 
 @require_active_login
@@ -346,7 +347,6 @@ def blog_about_view(request):
     if not user or not blog:
         return render_404(request)
     
-    
     else:
         blog_posts_processed = blog.get_all_blog_posts(u'processed').count()
         return render_to_response(