Add 'Add Blog Post' button on blog dashboard.
[mediagoblin.git] / mediagoblin / templates / mediagoblin / blog / blog_admin_dashboard.html
1 {#
2 # GNU MediaGoblin -- federated, autonomous media hosting
3 # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Affero General Public License for more details.
14 #
15 # You should have received a copy of the GNU Affero General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #}
18
19 {% extends "mediagoblin/base.html" %}
20
21 {% block title -%}
22 {{blog.title}} Dashboard &mdash; {{ super() }}
23 {%- endblock title %}
24
25 {% block mediagoblin_content %}
26 <h1> {{blog.title}} Dashboard </h1>
27 <p>
28 {{blog.description}}
29 </p>
30
31 <a class="button_action" ALIGN="Left" href="{{ request.urlgen('mediagoblin.media_types.blog.blogpost.create', blog_slug=blog.slug, user=request.user.username) }}">
32 {%- trans %}Add Blog Post{% endtrans -%}
33 </a>
34 <h2> Blog Post Entries </h2>
35 {% if blog_post_count!=0 %}
36 <table class="media_panel processing">
37 <tr>
38 <th>ID</th>
39 <th>User</th>
40 <th>Title</th>
41 <th>submitted</th>
42 </tr>
43 {% for blog_post in blog_posts_list %}
44 <tr>
45 <td>{{ blog_post.id }}</td>
46 <td>{{ blog_post.get_uploader.username }}</td>
47 <td><a href="{{ blog_post.url_for_self(request.urlgen) }}">{{ blog_post.title }}</a></td>
48 <td>{{ blog_post.created.strftime("%F %R") }}</td>
49 </tr>
50 {% endfor %}
51 </table>
52 {% else %}
53 {% trans %} No blog post yet. {% endtrans %}
54 {% endif %}
55 {% endblock %}
56
57
58