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
/>.
18 {% extends
"mediagoblin/base.html" %}
20 {% from
"mediagoblin/utils/object_gallery.html" import object_gallery %}
22 {% block mediagoblin_head %}
23 <link rel=
"alternate" type=
"application/atom+xml"
24 href=
"{{ request.urlgen(
25 'mediagoblin.user_pages.atom_feed',
26 user=user.username) }}">
27 {% endblock mediagoblin_head %}
31 {%- trans username=user.username -%}
32 {{ username }}'s profile
33 {%- endtrans %}
— {{ super() }}
40 {% block mediagoblin_content -%}
43 <p>{% trans %}Sorry, no such user found.{% endtrans %}
<p/>
45 {# User exists, but needs verification #}
46 {% elif user.status ==
"needs_email_verification" %}
47 {% if user == request.user %}
48 {# this should only be visible when you are this user #}
49 <div class=
"form_box">
50 <h1>{% trans %}Email verification needed{% endtrans %}
</h1>
54 Almost done! Your account still needs to be activated.
59 An email should arrive in a few moments with instructions on how to do so.
62 <p>{% trans %}In case it doesn't:{% endtrans %}
</p>
64 <a href=
"{{ request.urlgen('mediagoblin.auth.resend_verification') }}"
65 class=
"button_action_highlight">{% trans %}Resend verification email{% endtrans %}
</a>
68 {# if the user is not you, but still needs to verify their email #}
69 <div class=
"form_box">
70 <h1>{% trans %}Email verification needed{% endtrans %}
</h1>
74 Someone has registered an account with this username, but it still has to be activated.
79 {% trans login_url=request.urlgen('mediagoblin.auth.login') -%}
80 If you are that person but you've lost your verification email, you can
<a href=
"{{ login_url }}">log in
</a> and resend it.
86 {# Active(?) (or at least verified at some point) user, horray! #}
89 {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
92 {% if not user.url and not user.bio %}
93 {% if request.user and (request.user._id == user._id) %}
94 <div class=
"profile_sidebar empty_space">
96 {% trans %}Here's a spot to tell others about yourself.{% endtrans %}
98 <a href=
"{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
100 class=
"button_action">
101 {%- trans %}Edit profile{% endtrans -%}
104 <div class=
"profile_sidebar empty_space">
107 This user hasn't filled in their profile (yet).
112 <div class=
"profile_sidebar">
113 {% include
"mediagoblin/utils/profile.html" %}
114 {% if request.user and
115 (request.user._id == user._id or request.user.is_admin) %}
116 <a href=
"{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
118 {%- trans %}Edit profile{% endtrans -%}
123 {% if request.user and (request.user._id == user._id) %}
124 <a href=
"{{ request.urlgen('mediagoblin.edit.account') }}">
125 {%- trans %}Change account settings{% endtrans -%}
130 {% if media_entries.count() %}
131 <div class=
"profile_showcase">
132 {{ object_gallery(request, media_entries, pagination,
133 pagination_base_url=user_gallery_url, col_number=
3) }}
134 {% include
"mediagoblin/utils/object_gallery.html" %}
135 <div class=
"clear"></div>
137 <a href=
"{{ user_gallery_url }}">
138 {% trans username=user.username -%}
139 View all of {{ username }}'s media{% endtrans -%}
142 {% set feed_url = request.urlgen(
143 'mediagoblin.user_pages.atom_feed',
144 user=user.username) %}
145 {% include
"mediagoblin/utils/feed_link.html" %}
148 {% if request.user and (request.user._id == user._id) %}
149 <div class=
"profile_showcase empty_space">
152 This is where your media will appear, but you don't seem to have added anything yet.
155 <a class=
"button_action"
156 href=
"{{ request.urlgen('mediagoblin.submit.start') }}">
157 {%- trans %}Add media{% endtrans -%}
161 <div class=
"profile_showcase empty_space">
164 There doesn't seem to be any media here yet...
170 <div class=
"clear"></div>