aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/base.html2
-rw-r--r--mediagoblin/templates/mediagoblin/listings/tag.html6
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/gallery.html45
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html14
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/user.html17
5 files changed, 51 insertions, 33 deletions
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html
index b4c4dcf3..925386e5 100644
--- a/mediagoblin/templates/mediagoblin/base.html
+++ b/mediagoblin/templates/mediagoblin/base.html
@@ -67,7 +67,7 @@
user= request.user['username']) }}">
{{ request.user['username'] }}</a>
- (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">log out</a>)
+ (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">{% trans %}log out{% endtrans %}</a>)
{% else %}
<a href="{{ request.urlgen('mediagoblin.auth.login') }}">
{% trans %}Log in{% endtrans %}</a>
diff --git a/mediagoblin/templates/mediagoblin/listings/tag.html b/mediagoblin/templates/mediagoblin/listings/tag.html
index 58863015..f797f72f 100644
--- a/mediagoblin/templates/mediagoblin/listings/tag.html
+++ b/mediagoblin/templates/mediagoblin/listings/tag.html
@@ -26,9 +26,13 @@
tag=tag_slug) }}">
{% endblock mediagoblin_head %}
+{% block title %}
+ {% trans %}Media tagged with: {{ tag_name }}{% endtrans %} &mdash; {{ super() }}
+{% endblock %}
+
{% block mediagoblin_content -%}
<h1>
- {% trans %}Media tagged with:{% endtrans %} {{ tag_name }}
+ {% trans %}Media tagged with: {{ tag_name }}{% endtrans %}
</h1>
<div class="container_16 media_gallery">
diff --git a/mediagoblin/templates/mediagoblin/user_pages/gallery.html b/mediagoblin/templates/mediagoblin/user_pages/gallery.html
index df931d9c..b066dd71 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/gallery.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/gallery.html
@@ -26,29 +26,30 @@
user=user.username) }}">
{% endblock mediagoblin_head %}
+{% block title %}
+ {%- trans username=user.username -%}
+ {{ username }}'s media
+ {%- endtrans %} &mdash; {{ super() }}
+{% endblock %}
+
{% block mediagoblin_content -%}
- {% if user %}
- <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>
+ <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 class="container_16 media_gallery">
- {{ object_gallery(request, media_entries, pagination) }}
- </div>
+ <div class="container_16 media_gallery">
+ {{ object_gallery(request, media_entries, pagination) }}
+ </div>
- <div class="grid_16">
- {% set feed_url = request.urlgen(
- 'mediagoblin.user_pages.atom_feed',
- user=user.username) %}
- {% include "mediagoblin/utils/feed_link.html" %}
- </div>
- {% else %}
- {# This *should* not occur as the view makes sure we pass in a user. #}
- <p>{% trans %}Sorry, no such user found.{% endtrans %}<p/>
- {% endif %}
+ <div class="grid_16">
+ {% set feed_url = request.urlgen(
+ 'mediagoblin.user_pages.atom_feed',
+ user=user.username) %}
+ {% include "mediagoblin/utils/feed_link.html" %}
+ </div>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index 17beffb2..4b02b684 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -20,6 +20,8 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
{% from "mediagoblin/utils/pagination.html" import render_pagination %}
+{% block title %}{{ media.title }} &mdash; {{ super() }}{% endblock %}
+
{% block mediagoblin_content %}
{% if media %}
<div class="grid_11 alpha">
@@ -60,17 +62,17 @@
{%- endtrans %}
</p>
<h3></h3>
- {% if request.user %}
+ {% if request.user and comments.count() %}
<p><a href="#comment_form">{% trans %}Post a comment{% endtrans %}</a></p>
{% endif %}
{% if comments %}
{% for comment in comments %}
{% set comment_author = comment.author() %}
{% if pagination.active_id == comment._id %}
- <div class="comment_wrapper comment_active" id="comment-{{ comment['_id'] }}">
+ <div class="comment_wrapper comment_active" id="comment-{{ comment._id }}">
<a name="comment" id="comment"></a>
{% else %}
- <div class="comment_wrapper" id="comment-{{ comment['_id'] }}">
+ <div class="comment_wrapper" id="comment-{{ comment._id }}">
{% endif %}
<div class="comment_content">{% autoescape False %}{{ comment.content_html }}
@@ -81,7 +83,7 @@
{{ comment_author['username'] }}</a>
{% trans %}at{% endtrans %}
<a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
- comment = comment['_id'],
+ comment = comment._id,
user = media.uploader().username,
media = media._id) }}#comment">
{{ comment.created.strftime("%I:%M%p %Y-%m-%d") }}
@@ -112,7 +114,7 @@
<div class="grid_5 omega">
{% include "mediagoblin/utils/prev_next.html" %}
- {% if media['uploader'] == request.user['_id'] or
+ {% if media['uploader'] == request.user._id or
request.user['is_admin'] %}
<h3>{% trans %}Actions{% endtrans %}</h3>
<p>
@@ -149,7 +151,7 @@
{% endif %}
{% if app_config['allow_attachments']
- and (media['uploader'] == request.user['_id']
+ and (media['uploader'] == request.user._id
or request.user['is_admin']) %}
<p>
<a href="{{ request.urlgen('mediagoblin.edit.attachments',
diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html
index 6d938262..d6a9fe1f 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/user.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/user.html
@@ -26,6 +26,17 @@
user=user.username) }}">
{% endblock mediagoblin_head %}
+{% block title %}
+ {%- if user -%}
+ {%- trans username=user.username -%}
+ {{ username }}'s profile
+ {%- endtrans %} &mdash; {{ super() }}
+ {%- else -%}
+ {{ super() }}
+ {%- endif -%}
+{% endblock %}
+
+
{% block mediagoblin_content -%}
{# If no user... #}
{% if not user %}
@@ -79,7 +90,7 @@
</h1>
{% if not user['url'] and not user['bio'] %}
- {% if request.user['_id'] == user['_id'] %}
+ {% if request.user._id == user._id %}
<div class="grid_6 alpha empty_space">
<p>
{% trans %}Here's a spot to tell others about yourself.{% endtrans %}
@@ -102,7 +113,7 @@
{% else %}
<div class="grid_6 alpha">
{% include "mediagoblin/utils/profile.html" %}
- {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %}
+ {% if request.user._id == user._id or request.user['is_admin'] %}
<a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
user.username }}">
{%- trans %}Edit profile{% endtrans -%}
@@ -129,7 +140,7 @@
{% include "mediagoblin/utils/feed_link.html" %}
</div>
{% else %}
- {% if request.user['_id'] == user['_id'] %}
+ {% if request.user._id == user._id %}
<div class="grid_10 omega empty_space">
<p>
{% trans -%}