aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-08-10 19:53:37 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-08-10 19:53:37 -0500
commit852d5bb2387706c11925fa0c2abe4a1f34708f16 (patch)
treedf5e6a3108d2ba007112b558ff65bbfabd88020c /mediagoblin/templates
parent6b9ee0ca13b99ee20f9d0c680a950c6a7494a5a0 (diff)
parent6d794f268bb1f5d3cc56c5f0dc902571d48ebeac (diff)
downloadmediagoblin-852d5bb2387706c11925fa0c2abe4a1f34708f16.tar.lz
mediagoblin-852d5bb2387706c11925fa0c2abe4a1f34708f16.tar.xz
mediagoblin-852d5bb2387706c11925fa0c2abe4a1f34708f16.zip
Merge branch 'master' into processing
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/auth/login.html15
-rw-r--r--mediagoblin/templates/mediagoblin/auth/register.html5
-rw-r--r--mediagoblin/templates/mediagoblin/auth/resent_verification_email.html2
-rw-r--r--mediagoblin/templates/mediagoblin/auth/verification_email.txt10
-rw-r--r--mediagoblin/templates/mediagoblin/base.html66
-rw-r--r--mediagoblin/templates/mediagoblin/edit/edit.html6
-rw-r--r--mediagoblin/templates/mediagoblin/edit/edit_profile.html8
-rw-r--r--mediagoblin/templates/mediagoblin/listings/tag.html (renamed from mediagoblin/templates/mediagoblin/auth/verification_needed.html)30
-rw-r--r--mediagoblin/templates/mediagoblin/root.html16
-rw-r--r--mediagoblin/templates/mediagoblin/submit/start.html5
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/gallery.html22
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html42
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/user.html95
-rw-r--r--mediagoblin/templates/mediagoblin/utils/object_gallery.html7
-rw-r--r--mediagoblin/templates/mediagoblin/utils/tags.html (renamed from mediagoblin/templates/mediagoblin/auth/register_success.html)16
-rw-r--r--mediagoblin/templates/mediagoblin/utils/wtforms.html10
16 files changed, 242 insertions, 113 deletions
diff --git a/mediagoblin/templates/mediagoblin/auth/login.html b/mediagoblin/templates/mediagoblin/auth/login.html
index e25783ea..5750feb0 100644
--- a/mediagoblin/templates/mediagoblin/auth/login.html
+++ b/mediagoblin/templates/mediagoblin/auth/login.html
@@ -23,20 +23,27 @@
<form action="{{ request.urlgen('mediagoblin.auth.login') }}"
method="POST" enctype="multipart/form-data">
<div class="grid_6 prefix_1 suffix_1 form_box">
- <h1>Log in</h1>
+ <h1>{% trans %}Log in{% endtrans %}</h1>
{% if login_failed %}
- <div class="form_field_error">Login failed!</div>
+ <div class="form_field_error">
+ {% trans %}Login failed!{% endtrans %}
+ </div>
{% endif %}
{{ wtforms_util.render_divs(login_form) }}
<div class="form_submit_buttons">
- <input type="submit" value="submit" class="button"/>
+ <input type="submit" value="{% trans %}Submit{% endtrans %}" class="button"/>
</div>
{% if next %}
<input type="hidden" name="next" value="{{ next }}" class="button"
style="display: none;"/>
{% endif %}
{% if allow_registration %}
- <p>Don't have an account yet?<br /><a href="{{ request.urlgen('mediagoblin.auth.register') }}">Create one here!</a></p>
+ <p>
+ {% trans %}Don't have an account yet?{% endtrans %}
+ <br />
+ <a href="{{ request.urlgen('mediagoblin.auth.register') }}">
+ {%- trans %}Create one here!{% endtrans %}</a>
+ </p>
{% endif %}
</div>
</form>
diff --git a/mediagoblin/templates/mediagoblin/auth/register.html b/mediagoblin/templates/mediagoblin/auth/register.html
index f77b3782..623cbdfd 100644
--- a/mediagoblin/templates/mediagoblin/auth/register.html
+++ b/mediagoblin/templates/mediagoblin/auth/register.html
@@ -24,10 +24,11 @@
<form action="{{ request.urlgen('mediagoblin.auth.register') }}"
method="POST" enctype="multipart/form-data">
<div class="grid_6 prefix_1 suffix_1 form_box">
- <h1>Create an account!</h1>
+ <h1>{% trans %}Create an account!{% endtrans %}</h1>
{{ wtforms_util.render_divs(register_form) }}
<div class="form_submit_buttons">
- <input type="submit" value="submit" class="button" />
+ <input type="submit" value="{% trans %}Submit{% endtrans %}"
+ class="button" />
</div>
</div>
</form>
diff --git a/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html b/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html
index da3a9e99..8fd80ee9 100644
--- a/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html
+++ b/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html
@@ -19,6 +19,6 @@
{% block mediagoblin_content %}
<p>
- Resent your verification email.
+ {% trans %}Resent your verification email.{% endtrans %}
</p>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/auth/verification_email.txt b/mediagoblin/templates/mediagoblin/auth/verification_email.txt
index 7863374d..32053101 100644
--- a/mediagoblin/templates/mediagoblin/auth/verification_email.txt
+++ b/mediagoblin/templates/mediagoblin/auth/verification_email.txt
@@ -14,9 +14,13 @@
#
# 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/>.
-#}
+-#}
+
+{% trans username=username, verification_url=verification_url|safe -%}
Hi {{ username }},
-to activate your GNU MediaGoblin account, open the following URL in your web browser
+to activate your GNU MediaGoblin account, open the following URL in
+your web browser:
-{{ verification_url|safe }}
+{{ verification_url }}
+{%- endtrans %}
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html
index 12f188de..986e0995 100644
--- a/mediagoblin/templates/mediagoblin/base.html
+++ b/mediagoblin/templates/mediagoblin/base.html
@@ -19,13 +19,13 @@
<html>
<head>
<meta charset="utf-8">
- <title>{% block title %}GNU MediaGoblin{% endblock title %}</title>
+ <title>{% block title %}{% trans %}GNU MediaGoblin{% endtrans %}{% endblock title %}</title>
<link rel="stylesheet" type="text/css"
- href="{{ request.staticdirect('/css/contrib/reset.css') }}"/>
+ href="{{ request.staticdirect('/css/extlib/reset.css') }}"/>
<link rel="stylesheet" type="text/css"
- href="{{ request.staticdirect('/css/contrib/text.css') }}"/>
+ href="{{ request.staticdirect('/css/extlib/text.css') }}"/>
<link rel="stylesheet" type="text/css"
- href="{{ request.staticdirect('/css/contrib/960_16_col.css') }}"/>
+ href="{{ request.staticdirect('/css/extlib/960_16_col.css') }}"/>
<link rel="stylesheet" type="text/css"
href="{{ request.staticdirect('/css/base.css') }}"/>
{% block mediagoblin_head %}
@@ -36,27 +36,41 @@
{% block mediagoblin_body %}
<div class="mediagoblin_body">
{% block mediagoblin_header %}
- <div class="mediagoblin_header">
- <div class="container_16">
- <div class="grid_16">
- {% block mediagoblin_logo %}
- <a class="mediagoblin_logo" href="{{ request.urlgen('index') }}"><img src="{{ request.staticdirect('/images/logo.png') }}" alt="Mediagoblin logo" /></a>
- {% endblock %}
+ <div class="container_16">
+ <div class="grid_16 mediagoblin_header">
+ {% block mediagoblin_logo %}
+ <a class="mediagoblin_logo"
+ href="{{ request.urlgen('index') }}">
+ <img src="{{ request.staticdirect('/images/logo.png') }}"
+ alt="{% trans %}Mediagoblin logo{% endtrans %}" />
+ </a>
+ {% endblock %}
+ {% if request.user and request.user['status'] == 'active' %}
+ <a class="header_submit"
+ href="{{ request.urlgen('mediagoblin.submit.start') }}">
+ {% trans %}Submit media{% endtrans %}
+ </a>
+ {% endif %}
+ {% block mediagoblin_header_title %}{% endblock %}
+ <div class="mediagoblin_header_right">
{% if request.user %}
- <a class="header_submit" href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit media</a>
- {% endif %}
- {% block mediagoblin_header_title %}{% endblock %}
- <div class="mediagoblin_header_right">
- {% if request.user %}
+ {# the following link should only appear when verification is needed #}
+ {% if request.user.status == "needs_email_verification" %}
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
- user= request.user['username']) }}">
- {{ request.user['username'] }}</a>'s account
- (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">logout</a>)
- {% else %}
- <a href="{{ request.urlgen('mediagoblin.auth.login') }}">
- Login</a>
+ user=request.user['username']) }}"
+ class="header_submit">
+ {% trans %}verify your email!{% endtrans %}</a>
{% endif %}
- </div>
+
+ <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
+ user= request.user['username']) }}">
+ {{ request.user['username'] }}</a>
+
+ (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">logout</a>)
+ {% else %}
+ <a href="{{ request.urlgen('mediagoblin.auth.login') }}">
+ {% trans %}Login{% endtrans %}</a>
+ {% endif %}
</div>
</div>
</div>
@@ -69,11 +83,11 @@
</div>
</div>
{% block mediagoblin_footer %}
- <div class="mediagoblin_footer">
- <div class="container_16">
- <div class="grid_16">
+ <div class="container_16">
+ <div class="grid_16 mediagoblin_footer">
+ {% trans -%}
Powered by <a href="http://mediagoblin.org">MediaGoblin</a>, a <a href="http://gnu.org/">GNU project</a>
- </div>
+ {%- endtrans %}
</div>
</div>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/edit/edit.html b/mediagoblin/templates/mediagoblin/edit/edit.html
index d19034cb..3dc170c8 100644
--- a/mediagoblin/templates/mediagoblin/edit/edit.html
+++ b/mediagoblin/templates/mediagoblin/edit/edit.html
@@ -26,15 +26,15 @@
media= media._id) }}"
method="POST" enctype="multipart/form-data">
<div class="grid_8 prefix_1 suffix_1 edit_box form_box">
- <h1>Editing {{ media.title }}</h1>
+ <h1>{% trans media_title=media.title %}Editing {{ media_title }}{% endtrans %}</h1>
<div style="text-align: center;" >
<img src="{{ request.app.public_store.file_url(
media['media_files']['thumb']) }}" />
</div>
{{ wtforms_util.render_divs(form) }}
<div class="form_submit_buttons">
- <a href="{{ media.url_for_self(request.urlgen) }}">Cancel</a>
- <input type="submit" value="Save changes" class="button" />
+ <a href="{{ media.url_for_self(request.urlgen) }}">{% trans %}Cancel{% endtrans %}</a>
+ <input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button" />
</div>
</div>
</form>
diff --git a/mediagoblin/templates/mediagoblin/edit/edit_profile.html b/mediagoblin/templates/mediagoblin/edit/edit_profile.html
index a11b86d7..534e5f20 100644
--- a/mediagoblin/templates/mediagoblin/edit/edit_profile.html
+++ b/mediagoblin/templates/mediagoblin/edit/edit_profile.html
@@ -25,10 +25,14 @@
user['username'] }}"
method="POST" enctype="multipart/form-data">
<div class="grid_8 prefix_1 suffix_1 edit_box form_box">
- <h1>Editing {{ user['username'] }}'s profile</h1>
+ <h1>
+ {%- trans username=user['username'] -%}
+ Editing {{ username }}'s profile
+ {%- endtrans %}
+ </h1>
{{ wtforms_util.render_divs(form) }}
<div class="form_submit_buttons">
- <input type="submit" value="submit" class="button" />
+ <input type="submit" value="{% trans %}Submit{% endtrans %}" class="button" />
</div>
</div>
</form>
diff --git a/mediagoblin/templates/mediagoblin/auth/verification_needed.html b/mediagoblin/templates/mediagoblin/listings/tag.html
index 4104da19..a013797f 100644
--- a/mediagoblin/templates/mediagoblin/auth/verification_needed.html
+++ b/mediagoblin/templates/mediagoblin/listings/tag.html
@@ -17,13 +17,27 @@
#}
{% extends "mediagoblin/base.html" %}
-{% block mediagoblin_content %}
- <p>
- Verfication needed!<br />
- Please check your email to verify your account.
- </p>
+{% block mediagoblin_head %}
+ <link rel="alternate" type="application/atom+xml"
+ href="{{ request.urlgen(
+ 'mediagoblin.listings.tag_atom_feed',
+ tag=tag_slug) }}">
+{% endblock mediagoblin_head %}
- <p>
- Still haven't received an email? <a href="{{ request.urlgen('mediagoblin.auth.resend_verification') }}">Click here to resend it.</a>
- </p>
+{% block mediagoblin_content -%}
+ <h1>
+ {% trans %}Media tagged with:{% endtrans %} {{ tag_name }}
+ </h1>
+
+ <div class="container_16 media_gallery">
+ {% include "mediagoblin/utils/object_gallery.html" %}
+ </div>
+
+ <div class="grid_16">
+ <a href="{{ request.urlgen(
+ 'mediagoblin.listings.tag_atom_feed',
+ tag=tag_slug) }}">
+ {%- trans %}atom feed{% endtrans -%}
+ </a>
+ </div>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html
index bae033c4..a4e19984 100644
--- a/mediagoblin/templates/mediagoblin/root.html
+++ b/mediagoblin/templates/mediagoblin/root.html
@@ -22,22 +22,26 @@
{% if request.user %}
<p>
- <a href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit an item</a>
+ <a href="{{ request.urlgen('mediagoblin.submit.start') }}">
+ {%- trans %}Submit an item{% endtrans -%}
+ </a>
</p>
{% else %}
<p>
- If you have an account, you can
- <a href="{{ request.urlgen('mediagoblin.auth.login') }}">Login</a>.
+ {% trans login_url=request.urlgen('mediagoblin.auth.login') -%}
+ If you have an account, you can <a href="{{ login_url }}">Login</a>.
+ {%- endtrans %}
</p>
{% if allow_registration %}
<p>
- If you don't have an account, please
- <a href="{{ request.urlgen('mediagoblin.auth.register') }}">Register</a>.
+ {% trans register_url=request.urlgen('mediagoblin.auth.register') -%}
+ If you don't have an account, please <a href="{{ register_url }}">Register</a>.
+ {%- endtrans %}
</p>
{% endif %}
{% endif %}
{# temporarily, an "image gallery" that isn't one really ;) #}
- {% include "mediagoblin/utils/object_gallery.html" %}
+ {% include "mediagoblin/utils/object_gallery.html" %}
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/submit/start.html b/mediagoblin/templates/mediagoblin/submit/start.html
index 50c86afe..eb34c2e2 100644
--- a/mediagoblin/templates/mediagoblin/submit/start.html
+++ b/mediagoblin/templates/mediagoblin/submit/start.html
@@ -23,12 +23,13 @@
<form action="{{ request.urlgen('mediagoblin.submit.start') }}"
method="POST" enctype="multipart/form-data">
<div class="grid_8 prefix_1 suffix_1 form_box">
- <h1>Submit yer media</h1>
+ <h1>{% trans %}Submit yer media{% endtrans %}</h1>
{{ wtforms_util.render_field_div(submit_form.file) }}
{{ wtforms_util.render_field_div(submit_form.title) }}
{{ wtforms_util.render_textarea_div(submit_form.description) }}
+ {{ wtforms_util.render_field_div(submit_form.tags) }}
<div class="form_submit_buttons">
- <input type="submit" value="Submit" class="button" />
+ <input type="submit" value="{% trans %}Submit{% endtrans %}" class="button" />
</div>
</div>
</form>
diff --git a/mediagoblin/templates/mediagoblin/user_pages/gallery.html b/mediagoblin/templates/mediagoblin/user_pages/gallery.html
index a434ff15..a66a547e 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/gallery.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/gallery.html
@@ -27,21 +27,27 @@
{% block mediagoblin_content -%}
{% if user %}
<h1>
- <a href="{{ request.urlgen(
- 'mediagoblin.user_pages.user_home',
- user=user.username) }}">{{ user.username }}</a>'s media</h1>
+ {%- trans username=user.username,
+ user_url=request.urlgen(
+ 'mediagoblin.user_pages.user_home',
+ user=user.username) -%}
+ <a href="{{ user_url }}">{{ username }}</a>'s media
+ {%- endtrans %}
+ </h1>
</div>
<div class="container_16 media_gallery">
{% include "mediagoblin/utils/object_gallery.html" %}
</div>
<div class="grid_16">
-
- <a href={{ request.urlgen(
- 'mediagoblin.user_pages.atom_feed',
- user=user.username) }}> atom feed</a>
+ <a href="{{ request.urlgen(
+ 'mediagoblin.user_pages.atom_feed',
+ user=user.username) }}">
+ {%- trans %}atom feed{% endtrans -%}
+ </a>
+ </div>
{% else %}
{# This *should* not occur as the view makes sure we pass in a user. #}
- <p>Sorry, no such user found.<p/>
+ <p>{% trans %}Sorry, no such user found.{% endtrans %}<p/>
{% endif %}
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index dc0b6210..afc0d903 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -23,8 +23,11 @@
{% block mediagoblin_content %}
{% if media %}
<div class="grid_11 alpha">
- <img class="media_image" src="{{ request.app.public_store.file_url(
- media.get_display_media(media.media_files)) }}" />
+ <div class="media_image_container">
+ <img class="media_image"
+ src="{{ request.app.public_store.file_url(
+ media.get_display_media(media.media_files)) }}" />
+ </div>
<h2>
{{media.title}}
@@ -35,24 +38,26 @@
{% endautoescape %}
<p>
- &mdash;&nbsp;uploaded on
- {{ "%4d-%02d-%02d"|format(media.created.year,
- media.created.month, media.created.day) }}
- by
- <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
- user= media.uploader().username) }}">
- {{- media.uploader().username }}</a>
+ {% trans date="%4d-%02d-%02d"|format(
+ media.created.year,
+ media.created.month, media.created.day),
+ user_url=request.urlgen(
+ 'mediagoblin.user_pages.user_home',
+ user=media.uploader().username),
+ username=media.uploader().username -%}
+ &mdash;&nbsp;uploaded on {{ date }} by <a href="{{ user_url }}">{{ username }}</a>
+ {%- endtrans %}
</p>
<br />
- <h3>Comments</h3>
+ <h3>{% trans %}Comments{% endtrans %}</h3>
{% if request.user %}
<form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment',
user= media.uploader().username,
media=media._id) }}" method="POST">
{{ wtforms_util.render_field_div(comment_form.comment_content) }}
<div class="form_submit_buttons">
- <input type="submit" value="Post comment!" class="button" />
+ <input type="submit" value="{% trans %}Post comment!{% endtrans %}" class="button" />
</div>
</form>
{% endif %}
@@ -74,7 +79,7 @@
<div class="comment_author">&mdash;
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
user = comment_author['username']) }}">
- {{ comment_author['username'] }}</a> at
+ {{ comment_author['username'] }}</a> {% trans %}at{% endtrans %}
<!--</div>
<div class="comment_datetime">-->
<a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
@@ -97,12 +102,12 @@
media = media._id)) }}
</div>
{% endif %}
+
<div class="grid_5 omega">
{% include "mediagoblin/utils/prev_next.html" %}
- <h3>Sidebar content here!</h3>
- <p>
{% if media['uploader'] == request.user['_id'] or
request.user['is_admin'] %}
+ <h3>Temporary button holder</h3>
<p>
<a href="{{ request.urlgen('mediagoblin.edit.edit_media',
user= media.uploader().username,
@@ -112,12 +117,15 @@
</p>
<p>
<img src="{{ request.staticdirect('/images/icon_delete.png') }}"
- class="media_icon" />delete
+ class="media_icon" />{% trans %}delete{% endtrans %}
</p>
{% endif %}
- </p>
+
+ {% if media.tags %}
+ {% include "mediagoblin/utils/tags.html" %}
+ {% endif %}
</div>
{% else %}
- <p>Sorry, no such media found.<p/>
+ <p>{% trans %}Sorry, no such media found.{% endtrans %}<p/>
{% endif %}
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html
index 9d99ac53..1115fc56 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/user.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/user.html
@@ -25,26 +25,83 @@
{% endblock mediagoblin_head %}
{% block mediagoblin_content -%}
- {% if user %}
- <h1>{{ user.username }}'s profile</h1>
- <div class="grid_6 alpha">
- {% include "mediagoblin/utils/profile.html" %}
- {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %}
+ {# If no user... #}
+ {% if not user %}
+ <p>{% trans %}Sorry, no such user found.{% endtrans %}<p/>
+
+ {# User exists, but needs verification #}
+ {% elif user.status == "needs_email_verification" %}
+ {% if user == request.user %}
+ {# this should only be visible when you are this user #}
+ <div class="grid_6 prefix_1 suffix_1 form_box">
+ <h1>{% trans %}Verification needed{% endtrans %}</h1>
+
+ <p>
+ {% trans -%}
+ Almost done! Your account still needs to be verified.
+ {%- endtrans %}
+ </p>
+ <p>
+ {% trans -%}
+ An email should arrive in a few moments with instructions on how to do so.
+ {%- endtrans %}
+ </p>
+ <p>{% trans %}In case it doesn't:{% endtrans %}</p>
+
+ <a href="{{ request.urlgen('mediagoblin.auth.resend_verification') }}"
+ class="button">{% trans %}Resend verification email{% endtrans %}</a>
+ </div>
+ {% else %}
+ {# if the user is not you, but still needs to verify their email #}
+ <div class="grid_6 prefix_1 suffix_1 form_box">
+ <h1>{% trans %}Verification needed{% endtrans %}</h1>
+
+ <p>
+ {% trans -%}
+ Someone has registered an account with this username, but it still has to be verified.
+ {%- endtrans %}
+ </p>
+
+ <p>
+ {% trans login_url=request.urlgen('mediagoblin.auth.login') -%}
+ If you are that person but you've lost your verification email, you can <a href="{{ login_url }}">log in</a> and resend it.
+ {%- endtrans %}
+ </p>
+ </div>
+ {% endif %}
+
+ {# Active(?) (or at least verified at some point) user, horray! #}
+ {% else %}
+ <h1>
+ {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
+ </h1>
+
+ <div class="grid_6 alpha">
+ {% include "mediagoblin/utils/profile.html" %}
+ {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %}
<a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
- user.username }}">Edit profile</a>
- {% endif %}
- </div>
- <div class="grid_10 omega">
- {% set pagination_base_url = user_gallery_url %}
- {% include "mediagoblin/utils/object_gallery.html" %}
- <div class="clear"></div>
- <p><a href="{{ user_gallery_url }}">View all of {{ user.username }}'s media</a></p>
- <a href={{ request.urlgen(
- 'mediagoblin.user_pages.atom_feed',
- user=user.username) }}>atom feed</a>
- {% else %}
- {# This *should* not occur as the view makes sure we pass in a user. #}
- <p>Sorry, no such user found.<p/>
+ user.username }}">
+ {%- trans %}Edit profile{% endtrans -%}
+ </a>
+ {% endif %}
+ </div>
+
+ <div class="grid_10 omega">
+ {% set pagination_base_url = user_gallery_url %}
+ {% include "mediagoblin/utils/object_gallery.html" %}
+ <div class="clear"></div>
+ <p>
+ <a href="{{ user_gallery_url }}">
+ {% trans username=user.username -%}
+ View all of {{ username }}'s media{% endtrans -%}
+ </a>
+ </p>
+ <a href="{{ request.urlgen( 'mediagoblin.user_pages.atom_feed',
+ user=user.username) }}">
+ {%- trans %}atom feed{% endtrans -%}
+ </a>
</div>
+
+ <div class="clear"></div>
{% endif %}
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/utils/object_gallery.html b/mediagoblin/templates/mediagoblin/utils/object_gallery.html
index 2c7a7129..03b85b17 100644
--- a/mediagoblin/templates/mediagoblin/utils/object_gallery.html
+++ b/mediagoblin/templates/mediagoblin/utils/object_gallery.html
@@ -19,7 +19,7 @@
{% from "mediagoblin/utils/pagination.html" import render_pagination %}
{% block object_gallery_content -%}
- {% if media_entries %}
+ {% if media_entries and media_entries.count() %}
{% for entry in media_entries %}
<div class="media_thumbnail">
<a href="{{ entry.url_for_self(request.urlgen) }}">
@@ -27,11 +27,16 @@
entry['media_files']['thumb']) }}" /></a>
</div>
{% endfor %}
+ <div class="clear"></div>
{% if pagination_base_url %}
{# different url, so set that and don't keep the get params #}
{{ render_pagination(request, pagination, pagination_base_url, False) }}
{% else %}
{{ render_pagination(request, pagination) }}
{% endif %}
+ {% else %}
+ <p>
+ <i>There doesn't seem to be any media here yet...</i>
+ </p>
{% endif %}
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/auth/register_success.html b/mediagoblin/templates/mediagoblin/utils/tags.html
index cd82a0b9..32db6e31 100644
--- a/mediagoblin/templates/mediagoblin/auth/register_success.html
+++ b/mediagoblin/templates/mediagoblin/utils/tags.html
@@ -15,11 +15,15 @@
# 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 mediagoblin_content %}
- <p>
- Register successful! :D <br />
- You should get a confirmation email soon.
- </p>
+{% block tags_content -%}
+ <h3>Tags</h3>
+ <ul class="mediaentry_tags">
+ {% for tag in media.tags %}
+ <li class="tag">
+ <a href="{{ request.urlgen(
+ 'mediagoblin.listings.tags_listing',
+ tag=tag['slug']) }}">{{ tag['name'] }}</li>
+ {% endfor %}
+ </ul>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/utils/wtforms.html b/mediagoblin/templates/mediagoblin/utils/wtforms.html
index 1d2f8619..e3d8e137 100644
--- a/mediagoblin/templates/mediagoblin/utils/wtforms.html
+++ b/mediagoblin/templates/mediagoblin/utils/wtforms.html
@@ -19,9 +19,9 @@
{# Generically render a field #}
{% macro render_field_div(field) %}
<div class="form_field_box">
- <div class="form_field_label">{{ field.label }}</div>
+ <div class="form_field_label">{{ _(field.label.text) }}</div>
{% if field.description -%}
- <div class="form_field_description">{{ field.description }}</div>
+ <div class="form_field_description">{{ _(field.description) }}</div>
{%- endif %}
<div class="form_field_input">{{ field }}</div>
{%- if field.errors -%}
@@ -38,9 +38,9 @@
# ... mostly the same thing except it includes rows and cols #}
{% macro render_textarea_div(field, rows=8, cols=20) %}
<div class="form_field_box">
- <div class="form_field_label">{{ field.label }}</div>
+ <div class="form_field_label">{{ _(field.label.text) }}</div>
{% if field.description -%}
- <div class="form_field_description">{{ field.description }}</div>
+ <div class="form_field_description">{{ _(field.description) }}</div>
{%- endif %}
<div class="form_field_input">{{ field(rows=rows, cols=cols) }}</div>
{%- if field.errors -%}
@@ -64,7 +64,7 @@
{% macro render_table(form) -%}
{% for field in form %}
<tr>
- <th>{{field.label}}</th>
+ <th>{{ _(field.label.text) }}</th>
<td>
{{field}}
{% if field.errors %}