</div>
</form>
{% 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 }}">
- <a name="comment" id="comment"></a>
- {% else %}
- <div class="comment_wrapper" id="comment-{{ comment._id }}">
- {% endif %}
- <div class="comment_content">
- {% autoescape False %}
- {{ comment.content_html }}
- {% endautoescape %}
- <img src="{{ request.staticdirect('/images/icon_comment.png') }}" />
- <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
- user = comment_author.username) }}">
- {{ comment_author.username }}
- </a>
- {% trans %}at{% endtrans %}
- <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
- comment = comment._id,
- user = media.get_uploader().username,
- media = media.slug) }}#comment">
- {{ comment.created.strftime("%I:%M%p %Y-%m-%d") }}
- </a>
- </div>
- </div>
- {% endfor %}
- {{ render_pagination(request, pagination,
- request.urlgen('mediagoblin.user_pages.media_home',
- user = media.get_uploader().username,
- media = media._id)) }}
+ {% for comment in comments %}
+ {% set comment_author = comment.get_author %}
+ {% if pagination.active_id == 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 }}">
+ {% endif %}
+ <div class="comment_content">
+ {% autoescape False %}
+ {{ comment.content_html }}
+ {% endautoescape %}
+ <img src="{{ request.staticdirect('/images/icon_comment.png') }}" />
+ <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
+ user = comment_author.username) }}">
+ {{ comment_author.username }}
+ </a>
+ {% trans %}at{% endtrans %}
+ <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
+ comment = comment._id,
+ user = media.get_uploader.username,
+ media = media.slug) }}#comment">
+ {{ comment.created.strftime("%I:%M%p %Y-%m-%d") }}
+ </a>
+ </div>
+ </div>
+ {% endfor %}
+ {{ render_pagination(request, pagination,
+ media.url_for_self(request.urlgen)) }}
{% endif %}
</div>
- <div class="grid_5 omega">
+ <div class="media_sidebar">
{% trans user_url=request.urlgen(
'mediagoblin.user_pages.user_home',
- user=media.get_uploader().username),
- username=media.get_uploader().username -%}
+ user=media.get_uploader.username),
+ username=media.get_uploader.username -%}
<p>❖ Browsing media by <a href="{{ user_url }}">{{ username }}</a></p>
{%- endtrans %}
{% include "mediagoblin/utils/prev_next.html" %}
</h1>
{% if not user.url and not user.bio %}
- {% if request.user._id == user._id %}
+ {% if request.user and (request.user._id == user._id) %}
- <div class="grid_6 alpha empty_space">
+ <div class="profile_sidebar empty_space">
<p>
{% trans %}Here's a spot to tell others about yourself.{% endtrans %}
</p>
class="button_action">
{%- trans %}Edit profile{% endtrans -%}
</a>
- </div>
{% else %}
- <div class="grid_6 alpha empty_space">
+ <div class="profile_sidebar empty_space">
<p>
{% trans -%}
This user hasn't filled in their profile (yet).
{%- endtrans %}
</p>
- </div>
{% endif %}
{% else %}
- <div class="grid_6 alpha">
+ <div class="profile_sidebar">
{% include "mediagoblin/utils/profile.html" %}
- {% if request.user._id == user._id or request.user.is_admin %}
+ {% if request.user and
+ (request.user._id == user._id or request.user.is_admin) %}
<a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{
user.username }}">
{%- trans %}Edit profile{% endtrans -%}