From: Sebastian Spaeth Date: Thu, 12 Dec 2013 15:24:34 +0000 (+0100) Subject: Merge branch 'master' into upstream-master X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a42dda21f96f5124d97011c318f068b92a4222b0;p=mediagoblin.git Merge branch 'master' into upstream-master Conflicts: mediagoblin/templates/mediagoblin/base.html mediagoblin/templates/mediagoblin/user_pages/user.html --- a42dda21f96f5124d97011c318f068b92a4222b0 diff --cc mediagoblin/templates/mediagoblin/base.html index 8c9eaeb2,eb37e25f..df0b94aa --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@@ -140,20 -132,13 +142,21 @@@ {%- trans %}Create new collection{% endtrans -%} + {% template_hook("create_blog_home") %} - {% if request.user.is_admin %} + {% if request.user.has_privilege('admin','moderator') %}

- Admin powers: - + Moderation powers: + {%- trans %}Media processing panel{% endtrans -%} + · + + {%- trans %}User management panel{% endtrans -%} + + · + + {%- trans %}Report management panel{% endtrans -%} +

{% endif %} {% include 'mediagoblin/fragments/header_notifications.html' %} diff --cc mediagoblin/templates/mediagoblin/user_pages/user.html index 37983400,6cb6aa51..d554b7e8 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@@ -41,86 -38,135 +41,91 @@@ {% block mediagoblin_content -%} - {# If no user... #} - {% if not user %} -

{% trans %}Sorry, no such user found.{% endtrans %}

- - {# 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 #} -
-

{% trans %}Email verification needed{% endtrans %}

+

+ {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} +

+ {% if not user.url and not user.bio %} + {% if request.user and (request.user.id == user.id) %} +

- {% trans -%} - Almost done! Your account still needs to be activated. - {%- endtrans %} -

-

- {% trans -%} - An email should arrive in a few moments with instructions on how to do so. - {%- endtrans %} + {% trans %}Here's a spot to tell others about yourself.{% endtrans %}

-

{% trans %}In case it doesn't:{% endtrans %}

- - {% trans %}Resend verification email{% endtrans %} -
+ + {%- trans %}Edit profile{% endtrans -%} + {% else %} - {# if the user is not you, but still needs to verify their email #} -
-

{% trans %}Email verification needed{% endtrans %}

- +

{% trans -%} - Someone has registered an account with this username, but it still has to be activated. - {%- endtrans %} -

- -

- {% trans login_url=request.urlgen('mediagoblin.auth.login') -%} - If you are that person but you've lost your verification email, you can log in and resend it. + This user hasn't filled in their profile (yet). {%- endtrans %}

-
{% endif %} - - {# Active(?) (or at least verified at some point) user, horray! #} {% else %} -

- {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} -

- - {% if not user.url and not user.bio %} - {% if request.user and (request.user.id == user.id) %} -
-

- {% trans %}Here's a spot to tell others about yourself.{% endtrans %} -

- - {%- trans %}Edit profile{% endtrans -%} - - {% else %} -
-

- {% trans -%} - This user hasn't filled in their profile (yet). - {%- endtrans %} -

+
+ {% include "mediagoblin/utils/profile.html" %} + {% if request.user and + (request.user.id == user.id or request.user.has_privilege('admin')) %} + + {%- trans %}Edit profile{% endtrans -%} + {% endif %} - {% else %} -
- {% include "mediagoblin/utils/profile.html" %} - {% if request.user and - (request.user.id == user.id or request.user.is_admin) %} - - {%- trans %}Edit profile{% endtrans -%} - - {% endif %} - {% endif %} + {% endif %} +

+ + {%- trans %}Browse collections{% endtrans -%} + +

+
+ + {% if media_entries.count() %} +
+ {{ object_gallery(request, media_entries, pagination, + pagination_base_url=user_gallery_url, col_number=3) }} + {% include "mediagoblin/utils/object_gallery.html" %} +

- - {%- trans %}Browse collections{% endtrans -%} + + {% trans username=user.username -%} + View all of {{ username }}'s media{% endtrans -%}

+ {% set feed_url = request.urlgen( + 'mediagoblin.user_pages.atom_feed', + user=user.username) %} + {% include "mediagoblin/utils/feed_link.html" %}
- - {% if media_entries.count() %} -
- {{ object_gallery(request, media_entries, pagination, - pagination_base_url=user_gallery_url, col_number=3) }} - {% include "mediagoblin/utils/object_gallery.html" %} -
+ {% else %} + {% if request.user and (request.user.id == user.id) %} +

- - {% trans username=user.username -%} - View all of {{ username }}'s media{% endtrans -%} - + {% trans -%} + This is where your media will appear, but you don't seem to have added anything yet. + {%- endtrans %}

+ + {%- trans %}Add media{% endtrans -%} + + {% set feed_url = request.urlgen( + 'mediagoblin.user_pages.atom_feed', + user=user.username) %} + {% template_hook("user_profile") %} + {% include "mediagoblin/utils/feed_link.html" %}
{% else %} - {% if request.user and (request.user.id == user.id) %} -
-

- {% trans -%} - This is where your media will appear, but you don't seem to have added anything yet. - {%- endtrans %} -

- - {%- trans %}Add media{% endtrans -%} - -
- {% else %} -
-

- {% trans -%} - There doesn't seem to be any media here yet... - {%- endtrans %} -

-
- {% endif %} +
+

+ {% trans -%} + There doesn't seem to be any media here yet... + {%- endtrans %} +

+
{% endif %} -
{% endif %} +
{% endblock %}