| 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 | {% block mediagoblin_html_tag %} |
| 21 | {% endblock mediagoblin_html_tag %} |
| 22 | > |
| 23 | <head> |
| 24 | <meta charset="utf-8"> |
| 25 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 26 | <title>{% block title %}{{ app_config['html_title'] }}{% endblock %}</title> |
| 27 | <link rel="stylesheet" type="text/css" |
| 28 | href="{{ request.staticdirect('/css/extlib/reset.css') }}"/> |
| 29 | <link rel="stylesheet" type="text/css" |
| 30 | href="{{ request.staticdirect('/css/base.css') }}"/> |
| 31 | <link rel="shortcut icon" |
| 32 | href="{{ request.staticdirect('/images/goblin.ico') }}" /> |
| 33 | <script type="text/javascript" |
| 34 | src="{{ request.staticdirect('/js/extlib/jquery.js') }}"></script> |
| 35 | <script type="text/javascript" |
| 36 | src="{{ request.staticdirect('/js/header_dropdown.js') }}"></script> |
| 37 | |
| 38 | {# For clarification, the difference between the extra_head.html template |
| 39 | # and the head template hook is that the former should be used by |
| 40 | # themes and the latter should be used by plugins. |
| 41 | # The reason is that only one thing can override extra_head.html... |
| 42 | # but multiple plugins can hook into the template hook. |
| 43 | #} |
| 44 | {% include "mediagoblin/extra_head.html" %} |
| 45 | {% template_hook("head") %} |
| 46 | |
| 47 | {% block mediagoblin_head %} |
| 48 | {% endblock mediagoblin_head %} |
| 49 | </head> |
| 50 | <body> |
| 51 | {% include 'mediagoblin/bits/body_start.html' %} |
| 52 | {% block mediagoblin_body %} |
| 53 | {% block mediagoblin_header %} |
| 54 | <header> |
| 55 | {%- include "mediagoblin/bits/logo.html" -%} |
| 56 | {% block mediagoblin_header_title %}{% endblock %} |
| 57 | <div class="header_right"> |
| 58 | {%- if request.user %} |
| 59 | {% if request.user and request.user.status == 'active' %} |
| 60 | <div class="button_action header_dropdown_down">▼</div> |
| 61 | <div class="button_action header_dropdown_up">▲</div> |
| 62 | {% elif request.user and request.user.status == "needs_email_verification" %} |
| 63 | {# the following link should only appear when verification is needed #} |
| 64 | <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', |
| 65 | user=request.user.username) }}" |
| 66 | class="button_action_highlight"> |
| 67 | {% trans %}Verify your email!{% endtrans %}</a> |
| 68 | or <a href="{{ request.urlgen('mediagoblin.auth.logout') }}">{% trans %}log out{% endtrans %}</a> |
| 69 | {% endif %} |
| 70 | {%- else %} |
| 71 | <a href="{{ request.urlgen('mediagoblin.auth.login') }}?next={{ |
| 72 | request.base_url|urlencode }}"> |
| 73 | {%- trans %}Log in{% endtrans -%} |
| 74 | </a> |
| 75 | {%- endif %} |
| 76 | </div> |
| 77 | <div class="clear"></div> |
| 78 | {% if request.user and request.user.status == 'active' %} |
| 79 | <div class="header_dropdown"> |
| 80 | <p> |
| 81 | <span class="dropdown_title"> |
| 82 | {% trans user_url=request.urlgen('mediagoblin.user_pages.user_home', |
| 83 | user=request.user.username), |
| 84 | user_name=request.user.username -%} |
| 85 | <a href="{{ user_url }}">{{ user_name }}</a>'s account |
| 86 | {%- endtrans %} |
| 87 | </span> |
| 88 | · |
| 89 | <a href="{{ request.urlgen('mediagoblin.edit.account') }}">{%- trans %}Change account settings{% endtrans -%}</a> |
| 90 | · |
| 91 | <a href="{{ request.urlgen('mediagoblin.user_pages.processing_panel', |
| 92 | user=request.user.username) }}"> |
| 93 | {%- trans %}Media processing panel{% endtrans -%} |
| 94 | </a> |
| 95 | · |
| 96 | <a href="{{ request.urlgen('mediagoblin.auth.logout') }}">{% trans %}Log out{% endtrans %}</a> |
| 97 | </p> |
| 98 | <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.start') }}"> |
| 99 | {%- trans %}Add media{% endtrans -%} |
| 100 | </a> |
| 101 | <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.collection') }}"> |
| 102 | {%- trans %}Create new collection{% endtrans -%} |
| 103 | </a> |
| 104 | {% if request.user.is_admin %} |
| 105 | <p> |
| 106 | <span class="dropdown_title">Admin powers:</span> |
| 107 | <a href="{{ request.urlgen('mediagoblin.admin.panel') }}"> |
| 108 | {%- trans %}Media processing panel{% endtrans -%} |
| 109 | </a> |
| 110 | </p> |
| 111 | {% endif %} |
| 112 | </div> |
| 113 | {% endif %} |
| 114 | </header> |
| 115 | {% endblock %} |
| 116 | <div class="container"> |
| 117 | {% include 'mediagoblin/bits/above_content.html' %} |
| 118 | <div class="mediagoblin_content"> |
| 119 | {% include "mediagoblin/utils/messages.html" %} |
| 120 | {% block mediagoblin_content %} |
| 121 | {% endblock mediagoblin_content %} |
| 122 | </div> |
| 123 | {%- block mediagoblin_footer %} |
| 124 | <footer> |
| 125 | {% trans -%} |
| 126 | Powered by <a href="http://mediagoblin.org/" title='Version {{ version }}'>MediaGoblin</a>, a <a href="http://gnu.org/">GNU</a> project. |
| 127 | {%- endtrans %} |
| 128 | {% trans source_link=app_config['source_link'] -%} |
| 129 | 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. |
| 130 | {%- endtrans %} |
| 131 | </footer> |
| 132 | {%- endblock mediagoblin_footer %} |
| 133 | </div> |
| 134 | {%- endblock mediagoblin_body %} |
| 135 | {% include 'mediagoblin/bits/body_end.html' %} |
| 136 | </body> |
| 137 | </html> |