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
/>.
19 # This is the main user homepage for active users
21 {% extends
"mediagoblin/base.html" %}
23 {% from
"mediagoblin/utils/object_gallery.html" import object_gallery %}
25 {% block mediagoblin_head %}
26 <link rel=
"alternate" type=
"application/atom+xml"
27 href=
"{{ request.urlgen(
28 'mediagoblin.user_pages.atom_feed',
29 user=user.username) }}">
30 {% endblock mediagoblin_head %}
34 {%- trans username=user.username -%}
35 {{ username }}'s profile
36 {%- endtrans %}
— {{ super() }}
43 {% block mediagoblin_content -%}
44 <div class=
"six columns">
46 {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
49 {% if not user.url and not user.bio and not user.location %}
50 {% if request.user and (request.user.id == user.id) %}
51 <div class=
"profile_sidebar empty_space">
53 {% trans %}Here's a spot to tell others about yourself.{% endtrans %}
55 <a href=
"{{ request.urlgen('mediagoblin.edit.profile',
56 user=user.username) }}" class=
"button_action">
57 {%- trans %}Edit profile{% endtrans -%}
60 <div class=
"profile_sidebar empty_space">
63 This user hasn't filled in their profile (yet).
68 <div class=
"profile_sidebar">
69 {% include
"mediagoblin/utils/profile.html" %}
70 {% if request.user and
71 (request.user.id == user.id or request.user.has_privilege('admin')) %}
72 <a href=
"{{ request.urlgen('mediagoblin.edit.profile',
73 user=user.username) }}">
74 {%- trans %}Edit profile{% endtrans -%}
79 <a href=
"{{ request.urlgen('mediagoblin.user_pages.collection_list',
80 user=user.username) }}">
81 {%- trans %}Browse collections{% endtrans -%}
85 </div><!--end six columns-->
86 {% if media_entries.count() %}
87 <div class=
"ten columns profile_showcase">
88 {{ object_gallery(request, media_entries, pagination,
89 pagination_base_url=user_gallery_url, col_number=
3) }}
90 {% include
"mediagoblin/utils/object_gallery.html" %}
91 <div class=
"clear"></div>
93 <a href=
"{{ user_gallery_url }}">
94 {% trans username=user.username -%}
95 View all of {{ username }}'s media{% endtrans -%}
98 {% set feed_url = request.urlgen(
99 'mediagoblin.user_pages.atom_feed',
100 user=user.username) %}
101 {% include
"mediagoblin/utils/feed_link.html" %}
104 {% if request.user and (request.user.id == user.id) %}
105 <div class=
"ten columns profile_showcase empty_space">
108 This is where your media will appear, but you don't seem to have added anything yet.
111 <a class=
"button_action"
112 href=
"{{ request.urlgen('mediagoblin.submit.start') }}">
113 {%- trans %}Add media{% endtrans -%}
117 <div class=
"ten columns profile_showcase empty_space">
120 There doesn't seem to be any media here yet...
126 {% template_hook(
"user_profile") %}
127 <div class=
"clear"></div>