Very start of plugin hooks and openstreetmap pluginification
[mediagoblin.git] / mediagoblin / templates / mediagoblin / base.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 <!doctype html>
19 <html>
20 <head>
21 <meta charset="utf-8">
22 <meta name="viewport" content="width=device-width, initial-scale=1.0">
23 <title>{% block title %}{{ app_config['html_title'] }}{% endblock %}</title>
24 <link rel="stylesheet" type="text/css"
25 href="{{ request.staticdirect('/css/extlib/reset.css') }}"/>
26 <link rel="stylesheet" type="text/css"
27 href="{{ request.staticdirect('/css/base.css') }}"/>
28 <link rel="shortcut icon"
29 href="{{ request.staticdirect('/images/goblin.ico') }}" />
30 <script src="{{ request.staticdirect('/js/extlib/jquery.js') }}"></script>
31 <script type="text/javascript"
32 src="{{ request.staticdirect('/js/header_dropdown.js') }}"></script>
33
34 <!--[if lt IE 9]>
35 <script src="{{ request.staticdirect('/js/extlib/html5shiv.js') }}"></script>
36 <![endif]-->
37
38 {% include "mediagoblin/extra_head.html" %}
39
40 {% block mediagoblin_head %}
41 {% endblock mediagoblin_head %}
42 </head>
43 <body>
44 {% block mediagoblin_body %}
45 {% block mediagoblin_header %}
46 <header>
47 {%- include "mediagoblin/bits/logo.html" -%}
48 {% block mediagoblin_header_title %}{% endblock %}
49 <div class="header_right">
50 {% if request.user %}
51 {% if request.user and request.user.status == 'active' %}
52 <div class="button_action header_dropdown_down">&#9660;</div>
53 <div class="button_action header_dropdown_up">&#9650;</div>
54 {% elif request.user and request.user.status == "needs_email_verification" %}
55 {# the following link should only appear when verification is needed #}
56 <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
57 user=request.user.username) }}"
58 class="button_action_highlight">
59 {% trans %}Verify your email!{% endtrans %}</a>
60 or <a href="{{ request.urlgen('mediagoblin.auth.logout') }}">{% trans %}log out{% endtrans %}</a>
61 {% endif %}
62 {% else %}
63 <a href="{{ request.urlgen('mediagoblin.auth.login') }}?next={{
64 request.base_url|urlencode }}">
65 {% trans %}Log in{% endtrans %}</a>
66 {% endif %}
67 </div>
68 <div class="clear"></div>
69 {% if request.user and request.user.status == 'active' %}
70 <div class="header_dropdown">
71 <p>
72 <span class="dropdown_title">
73 {% trans user_url=request.urlgen('mediagoblin.user_pages.user_home',
74 user=request.user.username),
75 user_name=request.user.username -%}
76 <a href="{{ user_url }}">{{ user_name }}</a>'s account
77 {%- endtrans %}
78 </span>
79 (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">{% trans %}log out{% endtrans %}</a>)
80 </p>
81 <ul>
82 <li><a class="button_action" href="{{ request.urlgen('mediagoblin.submit.start') }}">
83 {%- trans %}Add media{% endtrans -%}
84 </a></li>
85 <li><a class="button_action" href="{{ request.urlgen('mediagoblin.submit.collection') }}">
86 {%- trans %}Create new collection{% endtrans -%}
87 </a></li>
88 <li><a href="{{ request.urlgen('mediagoblin.edit.account') }}">
89 {%- trans %}Change account settings{% endtrans -%}
90 </a></li>
91 <li><a href="{{ request.urlgen('mediagoblin.user_pages.processing_panel',
92 user=request.user.username) }}">
93 {%- trans %}Media processing panel{% endtrans -%}
94 </a></li>
95 {% if request.user.is_admin %}
96 <li>Admin:
97 <ul>
98 <li><a href="{{ request.urlgen('mediagoblin.admin.panel') }}">
99 {%- trans %}Media processing panel{% endtrans -%}
100 </a></li>
101 </ul>
102 </li>
103 {% endif %}
104 </ul>
105 </div>
106 {% endif %}
107 </header>
108 {% endblock %}
109 <div class="container">
110 <div class="mediagoblin_content">
111 {% include "mediagoblin/utils/messages.html" %}
112 {% block mediagoblin_content %}
113 {% endblock mediagoblin_content %}
114 </div>
115 {% block mediagoblin_footer %}
116 <footer>
117 {% trans -%}
118 Powered by <a href="http://mediagoblin.org">MediaGoblin</a>, a <a href="http://gnu.org/">GNU</a> project.
119 {%- endtrans %}
120 {% trans source_link=app_config['source_link'] -%}
121 Released under the <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPL</a>. <a href="{{ source_link }}">Source code</a> available.
122 {%- endtrans %}
123 </footer>
124 {% endblock mediagoblin_footer %}
125 {% endblock mediagoblin_body %}
126 </div>
127 </body>
128 </html>