2 # GNU MediaGoblin -- federated, autonomous media hosting
3 # Copyright (C)
2011,
2012 MediaGoblin contributors. See AUTHORS.
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.
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.
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
/>.
21 {% block mediagoblin_html_tag %}
22 {% endblock mediagoblin_html_tag %}
28 <meta charset=
"utf-8">
29 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0">
30 {% if app_config['no_referrer'] -%}
31 <meta name=
"referrer" content=
"no-referrer">
33 <meta http-equiv=
"X-UA-Compatible" content=
"IE=Edge">
34 <title>{% block title %}{{ app_config['html_title'] }}{% endblock %}
</title>
35 <link rel=
"stylesheet" type=
"text/css"
36 href=
"{{ request.staticdirect('/css/extlib/reset.css') }}"/>
37 <link rel=
"stylesheet" type=
"text/css"
38 href=
"{{ request.staticdirect('/css/extlib/skeleton.css') }}"/>
39 <link rel=
"stylesheet" type=
"text/css"
40 href=
"{{ request.staticdirect('/css/base.css') }}"/>
41 <link rel=
"shortcut icon"
42 href=
"{{ request.staticdirect('/images/goblin.ico') }}" />
43 <script type=
"text/javascript"
44 src=
"{{ request.staticdirect('/js/extlib/jquery.js') }}"></script>
45 <script type=
"text/javascript"
46 src=
"{{ request.staticdirect('/js/header_dropdown.js') }}"></script>
47 <script type=
"text/javascript"
48 src=
"{{ request.staticdirect('/js/notifications.js') }}"></script>
50 var mark_all_comments_seen_url =
"{{ request.urlgen('mediagoblin.notifications.mark_all_comment_notifications_seen') }}"
53 {# For clarification, the difference between the extra_head.html template
54 # and the head template hook is that the former should be used by
55 # themes and the latter should be used by plugins.
56 # The reason is that only one thing can override extra_head.html...
57 # but multiple plugins can hook into the template hook.
59 {% include
"mediagoblin/extra_head.html" %}
60 {% template_hook(
"head") %}
62 {% block mediagoblin_head %}
63 {% endblock mediagoblin_head %}
66 {% include 'mediagoblin/bits/body_start.html' %}
67 {% block mediagoblin_body %}
69 {% block mediagoblin_header %}
70 <div class=
"container">
72 <div class=
"row foot">
73 <div class=
"header_left">
74 {%- include
"mediagoblin/bits/logo.html" -%}
75 {% template_hook(
"header_left") %}
76 {% block mediagoblin_header_title %}{% endblock %}
78 <div class=
"header_right">
79 {% template_hook(
"header_extra") %}
80 {%- if request.user %}
81 {% if request.user and
82 request.user.has_privilege('active') and
83 not request.user.is_banned() %}
85 {% set notification_count = get_notification_count(request.user.id) %}
86 {% if notification_count %}
87 <a href=
"javascript:;"
88 class=
"notification-gem button_action button_info"
89 title=
"Notifications">
90 {{ notification_count }}
</a>
92 <a href=
"javascript:;"
93 class=
"button_action header_dropdown_down"
94 aria-controls=
"header_dropdown">▼</a>
95 <a href=
"javascript:;"
96 class=
"button_action header_dropdown_up"
97 aria-controls=
"header_dropdown">▲</a>
98 {% elif request.user and not request.user.has_privilege('active') %}
99 {# the following link should only appear when verification is needed #}
100 <a href=
"{{ request.urlgen('mediagoblin.user_pages.user_home',
101 user=request.user.username) }}"
102 class=
"button_action_highlight">
103 {% trans %}Verify your email!{% endtrans %}
</a>
104 or
<a id=
"logout" href=
105 {% if persona is not defined %}
106 "{{ request.urlgen('mediagoblin.auth.logout') }}"
110 >{% trans %}log out{% endtrans %}
</a>
111 {% elif request.user and request.user.is_banned() %}
113 {% if persona is not defined %}
114 "{{ request.urlgen('mediagoblin.auth.logout') }}"
118 >{% trans %}log out{% endtrans %}
</a>
122 {% if persona_auth is defined %}
123 "javascript:;" id=
"persona_login"
125 "{{ request.urlgen('mediagoblin.auth.login') }}"
128 {%- trans %}Log in{% endtrans -%}
132 <div class=
"clear"></div>
133 {% if request.user and request.user.has_privilege('active') %}
134 <div id=
"header_dropdown">
136 <span class=
"dropdown_title">
137 {% trans user_url=request.urlgen('mediagoblin.user_pages.user_home',
138 user=request.user.username),
139 user_name=request.user.username -%}
140 <a href=
"{{ user_url }}">{{ user_name }}
</a>'s account
144 <a href=
"{{ request.urlgen('mediagoblin.edit.account') }}">{%- trans %}Change account settings{% endtrans -%}
</a>
146 <a href=
"{{ request.urlgen('mediagoblin.user_pages.processing_panel',
147 user=request.user.username) }}">
148 {%- trans %}Media processing panel{% endtrans -%}
151 {% template_hook(
"blog_dashboard_home") %}
153 {% if persona is not defined %}
154 "{{ request.urlgen('mediagoblin.auth.logout') }}"
158 >{% trans %}Log out{% endtrans %}
</a>
160 <a class=
"button_action" href=
"{{ request.urlgen('mediagoblin.submit.start') }}">
161 {%- trans %}Add media{% endtrans -%}
163 <a class=
"button_action" href=
"{{ request.urlgen('mediagoblin.submit.collection') }}">
164 {%- trans %}Create new collection{% endtrans -%}
166 {% template_hook(
"header_dropdown_buttons") %}
167 {% if request.user.has_privilege('moderator') %}
169 <span class=
"dropdown_title">{% trans %}Moderation powers:{% endtrans %}
</span>
170 <a href=
"{{ request.urlgen('mediagoblin.moderation.media_panel') }}">
171 {%- trans %}Media processing panel{% endtrans -%}
174 <a href=
"{{ request.urlgen('mediagoblin.moderation.users') }}">
175 {%- trans %}User management panel{% endtrans -%}
178 <a href=
"{{ request.urlgen('mediagoblin.moderation.reports') }}">
179 {%- trans %}Report management panel{% endtrans -%}
181 {% template_hook(
"moderation_powers") %}
184 {% include 'mediagoblin/fragments/header_notifications.html' %}
187 </div><!-- end row -->
191 <div class=
"container">
192 {% include 'mediagoblin/bits/above_content.html' %}
193 <div class=
"mediagoblin_content">
194 {% include
"mediagoblin/utils/messages.html" %}
195 {% block mediagoblin_content %}
196 {% endblock mediagoblin_content %}
197 {% if csrf_token is defined %}
198 {% template_hook(
"persona_form") %}
203 <div class=
"container">
204 {%- include
"mediagoblin/bits/base_footer.html" %}
206 {%- endblock mediagoblin_body %}
207 {% include 'mediagoblin/bits/body_end.html' %}