Commit | Line | Data |
---|---|---|
9a16e16f SS |
1 | {# |
2 | # GNU MediaGoblin -- federated, autonomous media hosting | |
cf29e8a8 | 3 | # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. |
9a16e16f SS |
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 | {% extends "mediagoblin/base.html" %} | |
00c39256 | 19 | |
38bf03c6 CAW |
20 | {% from "mediagoblin/utils/object_gallery.html" import object_gallery %} |
21 | ||
00c39256 BK |
22 | {% block mediagoblin_head %} |
23 | <link rel="alternate" type="application/atom+xml" | |
24 | href="{{ request.urlgen( | |
ae50c14f | 25 | 'mediagoblin.user_pages.atom_feed', |
00c39256 BK |
26 | user=user.username) }}"> |
27 | {% endblock mediagoblin_head %} | |
28 | ||
017d6ca3 CAW |
29 | {% block title %} |
30 | {%- if user -%} | |
31 | {%- trans username=user.username -%} | |
32 | {{ username }}'s profile | |
33 | {%- endtrans %} — {{ super() }} | |
34 | {%- else -%} | |
35 | {{ super() }} | |
36 | {%- endif -%} | |
37 | {% endblock %} | |
38 | ||
39 | ||
9a16e16f | 40 | {% block mediagoblin_content -%} |
990d3b69 CAW |
41 | {# If no user... #} |
42 | {% if not user %} | |
2b28f95b | 43 | <p>{% trans %}Sorry, no such user found.{% endtrans %}</p> |
990d3b69 CAW |
44 | |
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 #} | |
3ea6a305 | 49 | <div class="form_box"> |
9cecbe4e | 50 | <h1>{% trans %}Email verification needed{% endtrans %}</h1> |
990d3b69 | 51 | |
990d3b69 | 52 | <p> |
58b79b15 | 53 | {% trans -%} |
fb91ef0f | 54 | Almost done! Your account still needs to be activated. |
58b79b15 CAW |
55 | {%- endtrans %} |
56 | </p> | |
57 | <p> | |
58 | {% trans -%} | |
59 | An email should arrive in a few moments with instructions on how to do so. | |
60 | {%- endtrans %} | |
990d3b69 | 61 | </p> |
8f4c9b81 | 62 | <p>{% trans %}In case it doesn't:{% endtrans %}</p> |
990d3b69 | 63 | |
3880c8f3 | 64 | <a href="{{ request.urlgen('mediagoblin.auth.resend_verification') }}" |
c6c08a2f | 65 | class="button_action_highlight">{% trans %}Resend verification email{% endtrans %}</a> |
990d3b69 CAW |
66 | </div> |
67 | {% else %} | |
68 | {# if the user is not you, but still needs to verify their email #} | |
3ea6a305 | 69 | <div class="form_box"> |
9cecbe4e | 70 | <h1>{% trans %}Email verification needed{% endtrans %}</h1> |
990d3b69 CAW |
71 | |
72 | <p> | |
58b79b15 | 73 | {% trans -%} |
fb91ef0f | 74 | Someone has registered an account with this username, but it still has to be activated. |
58b79b15 | 75 | {%- endtrans %} |
990d3b69 CAW |
76 | </p> |
77 | ||
78 | <p> | |
58b79b15 CAW |
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. | |
81 | {%- endtrans %} | |
990d3b69 CAW |
82 | </p> |
83 | </div> | |
84 | {% endif %} | |
85 | ||
86 | {# Active(?) (or at least verified at some point) user, horray! #} | |
87 | {% else %} | |
58b79b15 CAW |
88 | <h1> |
89 | {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} | |
90 | </h1> | |
990d3b69 | 91 | |
a24e5133 | 92 | {% if not user.url and not user.bio %} |
5c2b8486 | 93 | {% if request.user and (request.user.id == user.id) %} |
3ea6a305 | 94 | <div class="profile_sidebar empty_space"> |
293a7fe4 CAW |
95 | <p> |
96 | {% trans %}Here's a spot to tell others about yourself.{% endtrans %} | |
97 | </p> | |
abc4da29 SS |
98 | <a href="{{ request.urlgen('mediagoblin.edit.profile', |
99 | user=user.username) }}" class="button_action"> | |
293a7fe4 CAW |
100 | {%- trans %}Edit profile{% endtrans -%} |
101 | </a> | |
293a7fe4 | 102 | {% else %} |
3ea6a305 | 103 | <div class="profile_sidebar empty_space"> |
293a7fe4 CAW |
104 | <p> |
105 | {% trans -%} | |
106 | This user hasn't filled in their profile (yet). | |
107 | {%- endtrans %} | |
108 | </p> | |
293a7fe4 | 109 | {% endif %} |
3617ff4a | 110 | {% else %} |
3ea6a305 | 111 | <div class="profile_sidebar"> |
3617ff4a | 112 | {% include "mediagoblin/utils/profile.html" %} |
f1cdd278 | 113 | {% if request.user and |
5c2b8486 | 114 | (request.user.id == user.id or request.user.is_admin) %} |
abc4da29 SS |
115 | <a href="{{ request.urlgen('mediagoblin.edit.profile', |
116 | user=user.username) }}"> | |
3617ff4a CAW |
117 | {%- trans %}Edit profile{% endtrans -%} |
118 | </a> | |
119 | {% endif %} | |
34b4090c | 120 | {% endif %} |
49745d51 JS |
121 | <p> |
122 | <a href="{{ request.urlgen('mediagoblin.user_pages.collection_list', | |
123 | user=user.username) }}"> | |
124 | {%- trans %}Browse collections{% endtrans -%} | |
125 | </a> | |
126 | </p> | |
7646e695 | 127 | </div> |
990d3b69 | 128 | |
0ddea95e | 129 | {% if media_entries.count() %} |
3ea6a305 | 130 | <div class="profile_showcase"> |
0ddea95e | 131 | {{ object_gallery(request, media_entries, pagination, |
8ba4380f | 132 | pagination_base_url=user_gallery_url, col_number=3) }} |
0ddea95e CAW |
133 | {% include "mediagoblin/utils/object_gallery.html" %} |
134 | <div class="clear"></div> | |
135 | <p> | |
136 | <a href="{{ user_gallery_url }}"> | |
137 | {% trans username=user.username -%} | |
138 | View all of {{ username }}'s media{% endtrans -%} | |
139 | </a> | |
140 | </p> | |
141 | {% set feed_url = request.urlgen( | |
142 | 'mediagoblin.user_pages.atom_feed', | |
143 | user=user.username) %} | |
5b21ecf9 | 144 | {% include "mediagoblin/utils/feed_link.html" %} |
0ddea95e CAW |
145 | </div> |
146 | {% else %} | |
5c2b8486 | 147 | {% if request.user and (request.user.id == user.id) %} |
3ea6a305 | 148 | <div class="profile_showcase empty_space"> |
0ddea95e CAW |
149 | <p> |
150 | {% trans -%} | |
151 | This is where your media will appear, but you don't seem to have added anything yet. | |
152 | {%- endtrans %} | |
153 | </p> | |
13423daa | 154 | <a class="button_action" |
0ddea95e CAW |
155 | href="{{ request.urlgen('mediagoblin.submit.start') }}"> |
156 | {%- trans %}Add media{% endtrans -%} | |
157 | </a> | |
158 | </div> | |
159 | {% else %} | |
3ea6a305 | 160 | <div class="profile_showcase empty_space"> |
0ddea95e CAW |
161 | <p> |
162 | {% trans -%} | |
163 | There doesn't seem to be any media here yet... | |
164 | {%- endtrans %} | |
165 | </p> | |
166 | </div> | |
167 | {% endif %} | |
168 | {% endif %} | |
b1f11df0 | 169 | <div class="clear"></div> |
9a16e16f | 170 | {% endif %} |
afa76074 | 171 | {% endblock %} |