docs: Document video resolution config.
[mediagoblin.git] / mediagoblin / templates / mediagoblin / user_pages / user.html
CommitLineData
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/>.
51b43180
SS
17#
18
19# This is the main user homepage for active users
9a16e16f
SS
20#}
21{% extends "mediagoblin/base.html" %}
00c39256 22
38bf03c6
CAW
23{% from "mediagoblin/utils/object_gallery.html" import object_gallery %}
24
00c39256
BK
25{% block mediagoblin_head %}
26 <link rel="alternate" type="application/atom+xml"
27 href="{{ request.urlgen(
ae50c14f 28 'mediagoblin.user_pages.atom_feed',
00c39256
BK
29 user=user.username) }}">
30{% endblock mediagoblin_head %}
31
017d6ca3
CAW
32{% block title %}
33 {%- if user -%}
34 {%- trans username=user.username -%}
35 {{ username }}'s profile
36 {%- endtrans %} &mdash; {{ super() }}
37 {%- else -%}
38 {{ super() }}
39 {%- endif -%}
40{% endblock %}
41
42
9a16e16f 43{% block mediagoblin_content -%}
3bb58e6f 44 <div class="six columns">
51b43180
SS
45 <h1>
46 {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
47 </h1>
990d3b69 48
c0434db4 49 {% if not user.url and not user.bio and not user.location %}
51b43180
SS
50 {% if request.user and (request.user.id == user.id) %}
51 <div class="profile_sidebar empty_space">
990d3b69 52 <p>
51b43180 53 {% trans %}Here's a spot to tell others about yourself.{% endtrans %}
990d3b69 54 </p>
51b43180
SS
55 <a href="{{ request.urlgen('mediagoblin.edit.profile',
56 user=user.username) }}" class="button_action">
57 {%- trans %}Edit profile{% endtrans -%}
58 </a>
990d3b69 59 {% else %}
51b43180 60 <div class="profile_sidebar empty_space">
990d3b69 61 <p>
58b79b15 62 {% trans -%}
51b43180 63 This user hasn't filled in their profile (yet).
58b79b15 64 {%- endtrans %}
990d3b69 65 </p>
990d3b69 66 {% endif %}
990d3b69 67 {% else %}
51b43180
SS
68 <div class="profile_sidebar">
69 {% include "mediagoblin/utils/profile.html" %}
70 {% if request.user and
56c4ad89 71 (request.user.id == user.id or request.user.has_privilege('admin')) %}
51b43180
SS
72 <a href="{{ request.urlgen('mediagoblin.edit.profile',
73 user=user.username) }}">
74 {%- trans %}Edit profile{% endtrans -%}
75 </a>
293a7fe4 76 {% endif %}
51b43180
SS
77 {% endif %}
78 <p>
79 <a href="{{ request.urlgen('mediagoblin.user_pages.collection_list',
80 user=user.username) }}">
81 {%- trans %}Browse collections{% endtrans -%}
82 </a>
83 </p>
84 </div>
3bb58e6f 85 </div><!--end six columns-->
51b43180 86 {% if media_entries.count() %}
3bb58e6f 87 <div class="ten columns profile_showcase">
51b43180
SS
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>
49745d51 92 <p>
51b43180
SS
93 <a href="{{ user_gallery_url }}">
94 {% trans username=user.username -%}
95 View all of {{ username }}'s media{% endtrans -%}
49745d51
JS
96 </a>
97 </p>
51b43180
SS
98 {% set feed_url = request.urlgen(
99 'mediagoblin.user_pages.atom_feed',
100 user=user.username) %}
101 {% include "mediagoblin/utils/feed_link.html" %}
7646e695 102 </div>
51b43180
SS
103 {% else %}
104 {% if request.user and (request.user.id == user.id) %}
3bb58e6f 105 <div class="ten columns profile_showcase empty_space">
0ddea95e 106 <p>
51b43180
SS
107 {% trans -%}
108 This is where your media will appear, but you don't seem to have added anything yet.
109 {%- endtrans %}
0ddea95e 110 </p>
51b43180
SS
111 <a class="button_action"
112 href="{{ request.urlgen('mediagoblin.submit.start') }}">
113 {%- trans %}Add media{% endtrans -%}
114 </a>
0ddea95e
CAW
115 </div>
116 {% else %}
3bb58e6f 117 <div class="ten columns profile_showcase empty_space">
51b43180
SS
118 <p>
119 {% trans -%}
120 There doesn't seem to be any media here yet...
121 {%- endtrans %}
122 </p>
123 </div>
0ddea95e 124 {% endif %}
9a16e16f 125 {% endif %}
fcdc976f 126 {% template_hook("user_profile") %}
51b43180 127 <div class="clear"></div>
afa76074 128{% endblock %}