diff options
Diffstat (limited to 'mediagoblin/templates')
4 files changed, 219 insertions, 121 deletions
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index 13cfb47b..16a0d4f6 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -62,138 +62,142 @@ <body> {% include 'mediagoblin/bits/body_start.html' %} {% block mediagoblin_body %} - {% block mediagoblin_header %} - <div class="container"> - <header> - <div class="row foot"> - <div class="header_left"> - {%- include "mediagoblin/bits/logo.html" -%} - {% block mediagoblin_header_title %}{% endblock %} - </div> - <div class="header_right"> - {%- if request.user %} - {% if request.user and - request.user.has_privilege('active') and - not request.user.is_banned() %} + <div id="wrap"> + {% block mediagoblin_header %} + <div class="container"> + <header> + <div class="row foot"> + <div class="header_left"> + {%- include "mediagoblin/bits/logo.html" -%} + {% block mediagoblin_header_title %}{% endblock %} + </div> + <div class="header_right"> + {%- if request.user %} + {% if request.user and + request.user.has_privilege('active') and + not request.user.is_banned() %} - {% set notification_count = get_notification_count(request.user.id) %} - {% if notification_count %} + {% set notification_count = get_notification_count(request.user.id) %} + {% if notification_count %} + <a href="javascript:;" + class="notification-gem button_action button_info" + title="Notifications"> + {{ notification_count }}</a> + {% endif %} <a href="javascript:;" - class="notification-gem button_action button_info" - title="Notifications"> - {{ notification_count }}</a> + class="button_action header_dropdown_down" + aria-controls="header_dropdown">▼</a> + <a href="javascript:;" + class="button_action header_dropdown_up" + aria-controls="header_dropdown">▲</a> + {% elif request.user and not request.user.has_privilege('active') %} + {# the following link should only appear when verification is needed #} + <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', + user=request.user.username) }}" + class="button_action_highlight"> + {% trans %}Verify your email!{% endtrans %}</a> + or <a id="logout" href= + {% if persona is not defined %} + "{{ request.urlgen('mediagoblin.auth.logout') }}" + {% else %} + "javascript:;" + {% endif %} + >{% trans %}log out{% endtrans %}</a> + {% elif request.user and request.user.is_banned() %} + <a id="logout" href= + {% if persona is not defined %} + "{{ request.urlgen('mediagoblin.auth.logout') }}" + {% else %} + "javascript:;" + {% endif %} + >{% trans %}log out{% endtrans %}</a> + {% endif %} + {%- elif auth %} + <a href= + {% if persona_auth is defined %} + "javascript:;" id="persona_login" + {% else %} + "{{ request.urlgen('mediagoblin.auth.login') }}" {% endif %} - <a href="javascript:;" - class="button_action header_dropdown_down" - aria-controls="header_dropdown">▼</a> - <a href="javascript:;" - class="button_action header_dropdown_up" - aria-controls="header_dropdown">▲</a> - {% elif request.user and not request.user.has_privilege('active') %} - {# the following link should only appear when verification is needed #} - <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', - user=request.user.username) }}" - class="button_action_highlight"> - {% trans %}Verify your email!{% endtrans %}</a> - or <a id="logout" href= - {% if persona is not defined %} - "{{ request.urlgen('mediagoblin.auth.logout') }}" - {% else %} - "javascript:;" - {% endif %} - >{% trans %}log out{% endtrans %}</a> - {% elif request.user and request.user.is_banned() %} - <a id="logout" href= - {% if persona is not defined %} - "{{ request.urlgen('mediagoblin.auth.logout') }}" - {% else %} - "javascript:;" - {% endif %} - >{% trans %}log out{% endtrans %}</a> - {% endif %} - {%- elif auth %} - <a href= - {% if persona_auth is defined %} - "javascript:;" id="persona_login" - {% else %} - "{{ request.urlgen('mediagoblin.auth.login') }}" - {% endif %} - > - {%- trans %}Log in{% endtrans -%} - </a> - {%- endif %} - </div> - <div class="clear"></div> - {% if request.user and request.user.has_privilege('active') %} - <div id="header_dropdown"> - <p> - <span class="dropdown_title"> - {% trans user_url=request.urlgen('mediagoblin.user_pages.user_home', - user=request.user.username), - user_name=request.user.username -%} - <a href="{{ user_url }}">{{ user_name }}</a>'s account - {%- endtrans %} - </span> - · - <a href="{{ request.urlgen('mediagoblin.edit.account') }}">{%- trans %}Change account settings{% endtrans -%}</a> - · - <a href="{{ request.urlgen('mediagoblin.user_pages.processing_panel', - user=request.user.username) }}"> - {%- trans %}Media processing panel{% endtrans -%} + > + {%- trans %}Log in{% endtrans -%} </a> - · - {% template_hook("blog_dashboard_home") %} - <a id="logout" href= - {% if persona is not defined %} - "{{ request.urlgen('mediagoblin.auth.logout') }}" - {% else %} - "javascript:;" - {% endif %} - >{% trans %}Log out{% endtrans %}</a> - </p> - <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.start') }}"> - {%- trans %}Add media{% endtrans -%} - </a> - <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.collection') }}"> - {%- trans %}Create new collection{% endtrans -%} - </a> - {% template_hook("header_dropdown_buttons") %} - {% if request.user.has_privilege('moderator') %} + {%- endif %} + </div> + <div class="clear"></div> + {% if request.user and request.user.has_privilege('active') %} + <div id="header_dropdown"> <p> - <span class="dropdown_title">{% trans %}Moderation powers:{% endtrans %}</span> - <a href="{{ request.urlgen('mediagoblin.moderation.media_panel') }}"> - {%- trans %}Media processing panel{% endtrans -%} - </a> + <span class="dropdown_title"> + {% trans user_url=request.urlgen('mediagoblin.user_pages.user_home', + user=request.user.username), + user_name=request.user.username -%} + <a href="{{ user_url }}">{{ user_name }}</a>'s account + {%- endtrans %} + </span> · - <a href="{{ request.urlgen('mediagoblin.moderation.users') }}"> - {%- trans %}User management panel{% endtrans -%} - </a> + <a href="{{ request.urlgen('mediagoblin.edit.account') }}">{%- trans %}Change account settings{% endtrans -%}</a> · - <a href="{{ request.urlgen('mediagoblin.moderation.reports') }}"> - {%- trans %}Report management panel{% endtrans -%} + <a href="{{ request.urlgen('mediagoblin.user_pages.processing_panel', + user=request.user.username) }}"> + {%- trans %}Media processing panel{% endtrans -%} </a> - {% template_hook("moderation_powers") %} + · + {% template_hook("blog_dashboard_home") %} + <a id="logout" href= + {% if persona is not defined %} + "{{ request.urlgen('mediagoblin.auth.logout') }}" + {% else %} + "javascript:;" + {% endif %} + >{% trans %}Log out{% endtrans %}</a> </p> - {% endif %} - {% include 'mediagoblin/fragments/header_notifications.html' %} - </div> + <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.start') }}"> + {%- trans %}Add media{% endtrans -%} + </a> + <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.collection') }}"> + {%- trans %}Create new collection{% endtrans -%} + </a> + {% template_hook("header_dropdown_buttons") %} + {% if request.user.has_privilege('moderator') %} + <p> + <span class="dropdown_title">{% trans %}Moderation powers:{% endtrans %}</span> + <a href="{{ request.urlgen('mediagoblin.moderation.media_panel') }}"> + {%- trans %}Media processing panel{% endtrans -%} + </a> + · + <a href="{{ request.urlgen('mediagoblin.moderation.users') }}"> + {%- trans %}User management panel{% endtrans -%} + </a> + · + <a href="{{ request.urlgen('mediagoblin.moderation.reports') }}"> + {%- trans %}Report management panel{% endtrans -%} + </a> + {% template_hook("moderation_powers") %} + </p> + {% endif %} + {% include 'mediagoblin/fragments/header_notifications.html' %} + </div> + {% endif %} + </div><!-- end row --> + </header> + </div> + {% endblock %} + <div class="container"> + {% include 'mediagoblin/bits/above_content.html' %} + <div class="mediagoblin_content"> + {% include "mediagoblin/utils/messages.html" %} + {% block mediagoblin_content %} + {% endblock mediagoblin_content %} + {% if csrf_token is defined %} + {% template_hook("persona_form") %} {% endif %} - </div><!-- end row --> - </header> - </div> - {% endblock %} - <div class="container"> - {% include 'mediagoblin/bits/above_content.html' %} - <div class="mediagoblin_content"> - {% include "mediagoblin/utils/messages.html" %} - {% block mediagoblin_content %} - {% endblock mediagoblin_content %} - {% if csrf_token is defined %} - {% template_hook("persona_form") %} - {% endif %} + </div> </div> - {%- include "mediagoblin/bits/base_footer.html" %} </div> + <div class="container"> + {%- include "mediagoblin/bits/base_footer.html" %} + </div> {%- endblock mediagoblin_body %} {% include 'mediagoblin/bits/body_end.html' %} </body> diff --git a/mediagoblin/templates/mediagoblin/edit/deauthorize_applications.html b/mediagoblin/templates/mediagoblin/edit/deauthorize_applications.html new file mode 100644 index 00000000..f3b83e4e --- /dev/null +++ b/mediagoblin/templates/mediagoblin/edit/deauthorize_applications.html @@ -0,0 +1,69 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#} +{%- extends "mediagoblin/base.html" %} + +{% block title -%} + {% trans -%} + Deauthorize applications + {%- endtrans %} — {{ super() }} +{%- endblock %} + +{% block mediagoblin_content %} + <h2>{% trans -%}Deauthorize Applications{%- endtrans %}</h2> + <p>{% trans -%} + These applications can access your GNU MediaGoblin account. Deauthorizing the + application will prevent the application from accessing your account. + {%- endtrans %} + </p> + + <form method="POST" action="{{ request.urlgen('mediagoblin.edit.deauthorize_applications') }}"> + {{ csrf_token }} + {% if not applications %} + <em>{% trans -%}There are no applications authorized.{%- endtrans %}</em> + {% endif %} + {% for application, access in applications %} + <div class="application"> + <div class="application-button"> + <button class="button_action" name="application" value="{{ access.token }}">Deauthorize</button> + </div> + {% if application.get_client.logo_url %} + <img class="application-icon" src="{{ application.get_client.logo_url }}"> + {% else %} + <img class="application-icon" src="{{ request.staticdirect('/images/small-gavroche.png') }}"> + {% endif %} + <div class="application-content"> + <strong>{{ application.get_client.application_name }}</strong> + <p class="application-data"> + <small> + {% trans -%}Type:{%- endtrans %} + + {{ application.get_client.application_type }}</small> + <br /> + <small> + {% trans -%}Authorized:{%- endtrans %} + + {%- trans formatted_time=timesince(access.created) -%} + {{ formatted_time }} ago + {%- endtrans -%} + </small> + </p> + </div> + </div> + {% endfor %} + </form> +{% endblock %}
\ No newline at end of file diff --git a/mediagoblin/templates/mediagoblin/edit/edit_account.html b/mediagoblin/templates/mediagoblin/edit/edit_account.html index 574fe459..14a66482 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit_account.html +++ b/mediagoblin/templates/mediagoblin/edit/edit_account.html @@ -53,7 +53,10 @@ <a href="{{ request.urlgen('mediagoblin.edit.delete_account') }}"> {%- trans %}Delete my account{% endtrans -%} </a> - · + <br /> + <a href="{{ request.urlgen('mediagoblin.edit.deauthorize_applications') }}"> + {%- trans %}Deauthorize applications{% endtrans -%} + </a> {% template_hook("edit_link") %} <a href="{{ request.urlgen('mediagoblin.edit.email') }}"> {% trans %}Email{% endtrans %} diff --git a/mediagoblin/templates/mediagoblin/federation/host-meta.xml b/mediagoblin/templates/mediagoblin/federation/host-meta.xml new file mode 100644 index 00000000..7970a0d2 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/federation/host-meta.xml @@ -0,0 +1,22 @@ +{# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2014 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +-#} +<?xml version='1.0' encoding='UTF-8'?> +<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'> + {% for link in links %} + <Link rel="{{ link.rel }}" href="{{ link.href }}" /> + {% endfor %} +</XRD>
\ No newline at end of file |