Commit | Line | Data |
---|---|---|
76c9ea6b WKG |
1 | {# |
2 | # GNU MediaGoblin -- federated, autonomous media hosting | |
cf29e8a8 | 3 | # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. |
76c9ea6b WKG |
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/>. | |
9a5b2da5 CAW |
17 | -#} |
18 | <!doctype html> | |
a80ebf3b AL |
19 | <html |
20 | {% block mediagoblin_html_tag %} | |
21 | {% endblock mediagoblin_html_tag %} | |
22 | > | |
a0598d5c | 23 | <head> |
5fa35884 | 24 | <meta charset="utf-8"> |
e58f2599 | 25 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
4f8f0a4e | 26 | <meta http-equiv="X-UA-Compatible" content="IE=Edge"> |
78801685 | 27 | <title>{% block title %}{{ app_config['html_title'] }}{% endblock %}</title> |
1344821d | 28 | <link rel="stylesheet" type="text/css" |
1dc7f28d | 29 | href="{{ request.staticdirect('/css/extlib/reset.css') }}"/> |
8ac897c3 CAW |
30 | <link rel="stylesheet" type="text/css" |
31 | href="{{ request.staticdirect('/css/base.css') }}"/> | |
7a8ad818 CAW |
32 | <link rel="shortcut icon" |
33 | href="{{ request.staticdirect('/images/goblin.ico') }}" /> | |
742bfa7a E |
34 | <script type="text/javascript" |
35 | src="{{ request.staticdirect('/js/extlib/jquery.js') }}"></script> | |
3c912132 CAW |
36 | <script type="text/javascript" |
37 | src="{{ request.staticdirect('/js/header_dropdown.js') }}"></script> | |
2d7b6bde JW |
38 | <script type="text/javascript" |
39 | src="{{ request.staticdirect('/js/notifications.js') }}"></script> | |
3c912132 | 40 | |
f6d1d28d | 41 | {# For clarification, the difference between the extra_head.html template |
cac17c15 | 42 | # and the head template hook is that the former should be used by |
f6d1d28d CAW |
43 | # themes and the latter should be used by plugins. |
44 | # The reason is that only one thing can override extra_head.html... | |
45 | # but multiple plugins can hook into the template hook. | |
46 | #} | |
667d1fc8 | 47 | {% include "mediagoblin/extra_head.html" %} |
cac17c15 | 48 | {% template_hook("head") %} |
0416b866 | 49 | |
4f8f0a4e RE |
50 | {% if persona is defined %} |
51 | {% template_hook("persona_head") %} | |
52 | {% endif %} | |
53 | ||
00c39256 BK |
54 | {% block mediagoblin_head %} |
55 | {% endblock mediagoblin_head %} | |
a0598d5c | 56 | </head> |
a0598d5c | 57 | <body> |
8ca51d32 | 58 | {% include 'mediagoblin/bits/body_start.html' %} |
a0598d5c CAW |
59 | {% block mediagoblin_body %} |
60 | {% block mediagoblin_header %} | |
afcb0855 | 61 | <header> |
17dcc3ae | 62 | {%- include "mediagoblin/bits/logo.html" -%} |
afcb0855 JS |
63 | {% block mediagoblin_header_title %}{% endblock %} |
64 | <div class="header_right"> | |
155438cd | 65 | {%- if request.user %} |
29497982 | 66 | {% if request.user and request.user.status == 'active' %} |
2d7b6bde | 67 | |
0c7fa755 JW |
68 | {% set notification_count = request.notifications.get_notification_count(request.user.id) %} |
69 | {% if notification_count %} | |
2d7b6bde | 70 | <a href="#notifications" class="notification-gem button_action" title="Notifications"> |
0c7fa755 JW |
71 | {{ notification_count }}</a> |
72 | {% endif %} | |
2369feb5 JS |
73 | <div class="button_action header_dropdown_down">▼</div> |
74 | <div class="button_action header_dropdown_up">▲</div> | |
29497982 | 75 | {% elif request.user and request.user.status == "needs_email_verification" %} |
afcb0855 | 76 | {# the following link should only appear when verification is needed #} |
7b6836a3 | 77 | <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', |
29497982 | 78 | user=request.user.username) }}" |
afcb0855 | 79 | class="button_action_highlight"> |
29497982 | 80 | {% trans %}Verify your email!{% endtrans %}</a> |
4f8f0a4e RE |
81 | or <a id="logout" href= |
82 | {% if persona is not defined %} | |
83 | "{{ request.urlgen('mediagoblin.auth.logout') }}" | |
84 | {% else %} | |
85 | "javascript:;" | |
86 | {% endif %} | |
87 | >{% trans %}log out{% endtrans %}</a> | |
681e1371 | 88 | {% endif %} |
744f1c83 | 89 | {%- elif auth %} |
4f8f0a4e RE |
90 | <a href= |
91 | {% if persona_auth is defined %} | |
92 | "javascript:;" id="persona_login" | |
93 | {% else %} | |
94 | "{{ request.urlgen('mediagoblin.auth.login') }}" | |
95 | {% endif %} | |
96 | > | |
155438cd E |
97 | {%- trans %}Log in{% endtrans -%} |
98 | </a> | |
99 | {%- endif %} | |
afcb0855 | 100 | </div> |
d297d8e8 | 101 | <div class="clear"></div> |
a7d079ac | 102 | {% if request.user and request.user.status == 'active' %} |
2369feb5 | 103 | <div class="header_dropdown"> |
d1d53560 CAW |
104 | <p> |
105 | <span class="dropdown_title"> | |
106 | {% trans user_url=request.urlgen('mediagoblin.user_pages.user_home', | |
107 | user=request.user.username), | |
108 | user_name=request.user.username -%} | |
109 | <a href="{{ user_url }}">{{ user_name }}</a>'s account | |
110 | {%- endtrans %} | |
a5b9a066 JS |
111 | </span> |
112 | · | |
113 | <a href="{{ request.urlgen('mediagoblin.edit.account') }}">{%- trans %}Change account settings{% endtrans -%}</a> | |
114 | · | |
115 | <a href="{{ request.urlgen('mediagoblin.user_pages.processing_panel', | |
fe253e31 | 116 | user=request.user.username) }}"> |
a5b9a066 JS |
117 | {%- trans %}Media processing panel{% endtrans -%} |
118 | </a> | |
119 | · | |
4f8f0a4e RE |
120 | <a id="logout" href= |
121 | {% if persona is not defined %} | |
122 | "{{ request.urlgen('mediagoblin.auth.logout') }}" | |
123 | {% else %} | |
124 | "javascript:;" | |
125 | {% endif %} | |
126 | >{% trans %}Log out{% endtrans %}</a> | |
d1d53560 | 127 | </p> |
a5b9a066 | 128 | <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.start') }}"> |
5a42915b | 129 | {%- trans %}Add media{% endtrans -%} |
fe253e31 | 130 | </a> |
a5b9a066 | 131 | <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.collection') }}"> |
5a42915b | 132 | {%- trans %}Create new collection{% endtrans -%} |
fe253e31 | 133 | </a> |
5a42915b | 134 | {% if request.user.is_admin %} |
a5b9a066 JS |
135 | <p> |
136 | <span class="dropdown_title">Admin powers:</span> | |
137 | <a href="{{ request.urlgen('mediagoblin.admin.panel') }}"> | |
138 | {%- trans %}Media processing panel{% endtrans -%} | |
139 | </a> | |
140 | </p> | |
5a42915b | 141 | {% endif %} |
2d7b6bde | 142 | {% include 'mediagoblin/fragments/header_notifications.html' %} |
5a42915b JS |
143 | </div> |
144 | {% endif %} | |
afcb0855 | 145 | </header> |
a0598d5c | 146 | {% endblock %} |
155438cd | 147 | <div class="container"> |
8ca51d32 | 148 | {% include 'mediagoblin/bits/above_content.html' %} |
155438cd | 149 | <div class="mediagoblin_content"> |
741d5a37 | 150 | {% include "mediagoblin/utils/messages.html" %} |
f7bcfaff JS |
151 | {% block mediagoblin_content %} |
152 | {% endblock mediagoblin_content %} | |
4f8f0a4e RE |
153 | {% if persona is defined and csrf_token is defined %} |
154 | {% template_hook("persona_form") %} | |
155 | {% endif %} | |
155438cd | 156 | </div> |
19968583 | 157 | {%- include "mediagoblin/bits/base_footer.html" %} |
155438cd E |
158 | </div> |
159 | {%- endblock mediagoblin_body %} | |
8ca51d32 | 160 | {% include 'mediagoblin/bits/body_end.html' %} |
a0598d5c CAW |
161 | </body> |
162 | </html> |