('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)
[plugin_spec]
-max_blog_count = integer(default=1)
+max_blog_count = integer(default=4)
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 %}
{%- 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 %}
{% 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> </td>
<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 %}
'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
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(