Added a url_for_self method for generating mediaentry links
[mediagoblin.git] / mediagoblin / templates / mediagoblin / root.html
CommitLineData
87b44d61
WKG
1{#
2# GNU MediaGoblin -- federated, autonomous media hosting
3# Copyright (C) 2011 Free Software Foundation, Inc
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{% extends "mediagoblin/base.html" %}
19
20{% block mediagoblin_content %}
2de317f2 21
881b6e2c 22 <h1>{% trans %}Welcome to GNU MediaGoblin!{% endtrans %}</h1>
87b44d61
WKG
23
24 {% if request.user %}
25 <p>
26 <a href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit an item</a>.
27 </p>
28
29 {% else %}
30 <p>
31 If you have an account, you can
32 <a href="{{ request.urlgen('mediagoblin.auth.login') }}">Login</a>.
33 </p>
34 <p>
35 If you don't have an account, please
36 <a href="{{ request.urlgen('mediagoblin.auth.register') }}">Register</a>.
37 </p>
38
39 {% endif %}
4c1e752a
CAW
40
41 {# temporarily, an "image gallery" that isn't one really ;) #}
42
43 <div>
44 <ul>
45 {% for entry in media_entries %}
46 <li>
6926b23d 47 <a href="{{ entry.url_for_self(request.urlgen) }}">
9a16e16f
SS
48 <img src="{{ request.app.public_store.file_url(
49 entry['media_files']['thumb']) }}" /></a>
4c1e752a
CAW
50 </li>
51 {% endfor %}
52 </ul>
53 </div>
54
ae85ed0f 55{% endblock %}