diff options
Diffstat (limited to 'mediagoblin/templates')
23 files changed, 91 insertions, 82 deletions
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index ddc38b3e..778cc3f9 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -27,6 +27,9 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> + {% if app_config['no_referrer'] -%} + <meta name="referrer" content="no-referrer"> + {%- endif %} <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <title>{% block title %}{{ app_config['html_title'] }}{% endblock %}</title> <link rel="stylesheet" type="text/css" diff --git a/mediagoblin/templates/mediagoblin/edit/attachments.html b/mediagoblin/templates/mediagoblin/edit/attachments.html index d1e33c47..84c9a02c 100644 --- a/mediagoblin/templates/mediagoblin/edit/attachments.html +++ b/mediagoblin/templates/mediagoblin/edit/attachments.html @@ -27,7 +27,7 @@ {% block mediagoblin_content %} <form action="{{ request.urlgen('mediagoblin.edit.attachments', - user= media.get_uploader.username, + user= media.get_actor.username, media_id=media.id) }}" method="POST" enctype="multipart/form-data"> <div class="form_box"> diff --git a/mediagoblin/templates/mediagoblin/edit/edit.html b/mediagoblin/templates/mediagoblin/edit/edit.html index 9a040095..5f2ba3c5 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit.html +++ b/mediagoblin/templates/mediagoblin/edit/edit.html @@ -28,7 +28,7 @@ {% block mediagoblin_content %} <form action="{{ request.urlgen('mediagoblin.edit.edit_media', - user= media.get_uploader.username, + user= media.get_actor.username, media_id=media.id) }}" method="POST" enctype="multipart/form-data"> <div class="form_box_xl edit_box"> diff --git a/mediagoblin/templates/mediagoblin/edit/edit_collection.html b/mediagoblin/templates/mediagoblin/edit/edit_collection.html index 5cf5bae8..f150b306 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit_collection.html +++ b/mediagoblin/templates/mediagoblin/edit/edit_collection.html @@ -22,7 +22,7 @@ {% block mediagoblin_content %} <form action="{{ request.urlgen('mediagoblin.edit.edit_collection', - user= collection.get_creator.username, + user= collection.get_actor.username, collection= collection.slug) }}" method="POST" enctype="multipart/form-data"> <div class="form_box_xl edit_box"> @@ -36,4 +36,4 @@ </div> </form> -{% endblock %} +{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/fragments/header_notifications.html b/mediagoblin/templates/mediagoblin/fragments/header_notifications.html index 55759a39..99c5abba 100644 --- a/mediagoblin/templates/mediagoblin/fragments/header_notifications.html +++ b/mediagoblin/templates/mediagoblin/fragments/header_notifications.html @@ -4,9 +4,9 @@ <h3>{% trans %}New comments{% endtrans %}</h3> <ul> {% for notification in notifications %} - {% set comment = notification.subject %} - {% set comment_author = comment.get_author %} - {% set media = comment.get_entry %} + {% set comment = notification.obj() %} + {% set comment_author = comment.get_actor %} + {% set media = comment.get_reply_to() %} <li class="comment_wrapper"> <div class="comment_author"> <img src="{{ request.staticdirect('/images/icon_comment.png') }}" /> @@ -17,7 +17,7 @@ </a> <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment', comment=comment.id, - user=media.get_uploader.username, + user=media.get_actor.username, media=media.slug_or_id) }}#comment" class="comment_whenlink"> <span title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'> @@ -36,7 +36,7 @@ </li> {% endfor %} </ul> - <a href="{{ request.urlgen('mediagoblin.notifications.mark_all_comment_notifications_seen') }}?next={{ + <a href="{{ request.urlgen('mediagoblin.notifications.mark_all_comment_notifications_seen') }}?next={{ request.base_url|urlencode }}" id="mark_all_comments_seen"> {% trans %}Mark all read{% endtrans %} </a> diff --git a/mediagoblin/templates/mediagoblin/moderation/media_panel.html b/mediagoblin/templates/mediagoblin/moderation/media_panel.html index 9b77f638..888e4feb 100644 --- a/mediagoblin/templates/mediagoblin/moderation/media_panel.html +++ b/mediagoblin/templates/mediagoblin/moderation/media_panel.html @@ -44,7 +44,7 @@ {% for media_entry in processing_entries %} <tr> <td>{{ media_entry.id }}</td> - <td>{{ media_entry.get_uploader.username }}</td> + <td>{{ media_entry.get_actor.username }}</td> <td>{{ media_entry.title }}</td> <td>{{ media_entry.created.strftime("%F %R") }}</td> {% if media_entry.transcoding_progress %} @@ -74,7 +74,7 @@ {% for media_entry in failed_entries %} <tr> <td>{{ media_entry.id }}</td> - <td>{{ media_entry.get_uploader.username }}</td> + <td>{{ media_entry.get_actor.username }}</td> <td>{{ media_entry.title }}</td> <td>{{ media_entry.created.strftime("%F %R") }}</td> {% if media_entry.get_fail_exception() %} @@ -103,7 +103,7 @@ {% for media_entry in processed_entries %} <tr> <td>{{ media_entry.id }}</td> - <td>{{ media_entry.get_uploader.username }}</td> + <td>{{ media_entry.get_actor.username }}</td> <td><a href="{{ media_entry.url_for_self(request.urlgen) }}">{{ media_entry.title }}</a></td> <td><span title='{{ media_entry.created.strftime("%F %R") }}'>{{ timesince(media_entry.created) }}</span></td> </tr> diff --git a/mediagoblin/templates/mediagoblin/moderation/report.html b/mediagoblin/templates/mediagoblin/moderation/report.html index 496610ad..abbd4a0c 100644 --- a/mediagoblin/templates/mediagoblin/moderation/report.html +++ b/mediagoblin/templates/mediagoblin/moderation/report.html @@ -33,25 +33,26 @@ {% trans %}Return to Reports Panel{% endtrans %}</a> </div> <h2>{% trans %}Report{% endtrans %} #{{ report.id }}</h2> - {% if report.is_comment_report() and report.comment %} + {% if report.is_comment_report() and report.object_id %} {% trans %}Reported comment{% endtrans %}: - {% set comment = report.comment %} - {% set reported_user = comment.get_author %} + {% set comment = report.obj() %} + {% set target = report.obj().get_reply_to() %} + {% set reported_user = comment.get_actor %} <div id="comment-{{ comment.id }}" class="comment_wrapper"> <div class="comment_author"> <img src="{{ request.staticdirect('/images/icon_comment.png') }}" /> <a href="{{ request.urlgen('mediagoblin.moderation.users_detail', - user=comment.get_author.username) }}" + user=comment.get_actor.username) }}" class="comment_authorlink"> {{- reported_user.username -}} </a> <a href="{{ request.urlgen( 'mediagoblin.user_pages.media_home.view_comment', comment=comment.id, - user=comment.get_media_entry.get_uploader.username, - media=comment.get_media_entry.slug_or_id) }}#comment" + user=target.get_actor.username, + media=target.slug_or_id) }}#comment" class="comment_whenlink"> <span title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'> {%- trans formatted_time=timesince(comment.created) -%} @@ -65,16 +66,16 @@ {% endautoescape %} </div> </div> - {% elif report.is_media_entry_report() and report.media_entry %} + {% elif report.is_media_entry_report() and report.object_id %} - {% set media_entry = report.media_entry %} + {% set media_entry = report.obj() %} <div class="three columns media_thumbnail"> <a href="{{ request.urlgen('mediagoblin.user_pages.media_home', - user=media_entry.get_uploader.username, + user=media_entry.get_actor.username, media=media_entry.slug_or_id) }}"> <img src="{{ media_entry.thumb_url}}"/></a> <a href="{{ request.urlgen('mediagoblin.user_pages.media_home', - user=media_entry.get_uploader.username, + user=media_entry.get_actor.username, media=media_entry.slug_or_id) }}" class=thumb_entry_title> {{ media_entry.title }}</a> </div> @@ -127,8 +128,8 @@ {{ report.report_content }} </div> </div> - {% if not report.is_archived_report() and - not (report.reported_user.has_privilege('admin') and + {% if not report.is_archived_report() and + not (report.reported_user.has_privilege('admin') and not request.user.has_privilege('admin')) %} <input type=button class="button_action" value="{% trans %}Resolve{% endtrans %}" id=open_resolution_form /> <form action="" method="POST" id=resolution_form> diff --git a/mediagoblin/templates/mediagoblin/moderation/report_panel.html b/mediagoblin/templates/mediagoblin/moderation/report_panel.html index 39ca90f5..c82cd412 100644 --- a/mediagoblin/templates/mediagoblin/moderation/report_panel.html +++ b/mediagoblin/templates/mediagoblin/moderation/report_panel.html @@ -81,7 +81,7 @@ curr_page !=p %} </tr> {% for report in report_list %} <tr> - {% if report.discriminator == "comment_report" %} + {% if report.is_comment_report %} <td> <img src="{{ request.staticdirect( @@ -97,7 +97,7 @@ curr_page !=p %} {% endtrans %} </a> </td> - {% elif report.discriminator == "media_report" %} + {% elif report.is_media_entry_report %} <td> <img src="{{ request.staticdirect( diff --git a/mediagoblin/templates/mediagoblin/moderation/user.html b/mediagoblin/templates/mediagoblin/moderation/user.html index 594f845d..1e48bf84 100644 --- a/mediagoblin/templates/mediagoblin/moderation/user.html +++ b/mediagoblin/templates/mediagoblin/moderation/user.html @@ -125,9 +125,9 @@ </a> </td> <td> - {% if report.discriminator == "comment_report" %} + {% if report.is_comment_report() %} <a>{%- trans %}Reported Comment{% endtrans -%}</a> - {% elif report.discriminator == "media_report" %} + {% elif report.is_media_entry_report() %} <a>{%- trans %}Reported Media Entry{% endtrans -%}</a> {% endif %} </td> diff --git a/mediagoblin/templates/mediagoblin/user_pages/blog_media.html b/mediagoblin/templates/mediagoblin/user_pages/blog_media.html index c6eedee0..ece47fe1 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/blog_media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/blog_media.html @@ -70,8 +70,8 @@ {% if request.user and (media.uploader == request.user.id or request.user.has_privilege('admin')) %} - {% set edit_url = request.urlgen('mediagoblin.media_types.blog.blogpost.edit', - blog_slug=media.media_manager.get_blog_by_blogpost().slug, + {% set edit_url = request.urlgen('mediagoblin.media_types.blog.blogpost.edit', + blog_slug=media.media_manager.get_blog_by_blogpost().slug, user=request.user.username, blog_post_slug=media.slug) %} <a class="button_action" href="{{ edit_url }}">{% trans %}Edit{% endtrans %}</a> {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete', @@ -107,7 +107,7 @@ {% endif %} <ul style="list-style:none"> {% for comment in comments %} - {% set comment_author = comment.get_author %} + {% set comment_author = comment.get_actor %} <li id="comment-{{ comment.id }}" {%- if pagination.active_id == comment.id %} class="comment_wrapper comment_active"> @@ -148,7 +148,7 @@ <div class="media_sidebar"> <h3>{% trans %}Added{% endtrans %}</h3> <p><span title="{{ media.created.strftime("%I:%M%p %Y-%m-%d") }}"> - {%- trans formatted_time=timesince(media.created) -%} + {%- trans formatted_time=timesince(media.created) -%} {{ formatted_time }} ago {%- endtrans -%} </span></p> diff --git a/mediagoblin/templates/mediagoblin/user_pages/collection.html b/mediagoblin/templates/mediagoblin/user_pages/collection.html index 0f712c01..71ba4451 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/collection.html +++ b/mediagoblin/templates/mediagoblin/user_pages/collection.html @@ -44,14 +44,14 @@ {{ collection_title }} by <a href="{{ user_url }}">{{ username }}</a> {%- endtrans %} </h1> - {% if request.user and (collection.creator == request.user.id or + {% if request.user and (collection.actor == request.user.id or request.user.has_privilege('admin')) %} {% set edit_url = request.urlgen('mediagoblin.edit.edit_collection', - user=collection.get_creator.username, + user=collection.get_actor.username, collection=collection.slug) %} <a class="button_action" href="{{ edit_url }}">{% trans %}Edit{% endtrans %}</a> {% set delete_url = request.urlgen('mediagoblin.user_pages.collection_confirm_delete', - user=collection.get_creator.username, + user=collection.get_actor.username, collection=collection.slug) %} <a class="button_action" href="{{ delete_url }}">{% trans %}Delete{% endtrans %}</a> {% endif %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/collection_confirm_delete.html b/mediagoblin/templates/mediagoblin/user_pages/collection_confirm_delete.html index 8cfe4b29..08278349 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/collection_confirm_delete.html +++ b/mediagoblin/templates/mediagoblin/user_pages/collection_confirm_delete.html @@ -30,7 +30,7 @@ {% block mediagoblin_content %} <form action="{{ request.urlgen('mediagoblin.user_pages.collection_confirm_delete', - user=collection.get_creator.username, + user=collection.get_actor.username, collection=collection.slug) }}" method="POST" enctype="multipart/form-data"> <div class="form_box"> @@ -39,9 +39,9 @@ Really delete collection: {{ title }}? {%- endtrans %} </h1> - + <br /> - + <p class="delete_checkbox_box"> {{ form.confirm }} {{ wtforms_util.render_label(form.confirm) }} @@ -58,4 +58,4 @@ </div> </div> </form> -{% endblock %} +{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/collection_item_confirm_remove.html b/mediagoblin/templates/mediagoblin/user_pages/collection_item_confirm_remove.html index 84d3eb4c..d7ff4950 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/collection_item_confirm_remove.html +++ b/mediagoblin/templates/mediagoblin/user_pages/collection_item_confirm_remove.html @@ -20,7 +20,7 @@ {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} {% block title %} - {%- trans media_title=collection_item.get_media_entry.title, + {%- trans media_title=collection_item.get_object().title, collection_title=collection_item.in_collection.title -%} Remove {{ media_title }} from {{ collection_title }} {%- endtrans %} — {{ super() }} @@ -30,20 +30,20 @@ {% block mediagoblin_content %} <form action="{{ request.urlgen('mediagoblin.user_pages.collection_item_confirm_remove', - user=collection_item.in_collection.get_creator.username, + user=collection_item.in_collection.get_actor.username, collection=collection_item.in_collection.slug, collection_item=collection_item.id) }}" method="POST" enctype="multipart/form-data"> <div class="form_box"> <h1> - {%- trans media_title=collection_item.get_media_entry.title, + {%- trans media_title=collection_item.get_object().title, collection_title=collection_item.in_collection.title -%} Really remove {{ media_title }} from {{ collection_title }}? {%- endtrans %} </h1> <div style="text-align: center;" > - <img src="{{ collection_item.get_media_entry.thumb_url }}" /> + <img src="{{ collection_item.get_object().thumb_url }}" /> </div> <br /> @@ -64,4 +64,4 @@ </div> </div> </form> -{% endblock %} +{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 16ddd62c..1a35414f 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -38,8 +38,8 @@ <p class="eleven columns context"> {%- trans user_url=request.urlgen( 'mediagoblin.user_pages.user_home', - user=media.get_uploader.username), - username=media.get_uploader.username -%} + user=media.get_actor.username), + username=media.get_actor.username -%} ❖ Browsing media by <a href="{{user_url}}">{{username}}</a> {%- endtrans -%} </p> @@ -76,15 +76,15 @@ {{ media.title }} </h2> {% if request.user and - (media.uploader == request.user.id or + (media.actor == request.user.id or request.user.has_privilege('admin')) %} <div class="pull-right" style="padding-top:20px;"> {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', - user= media.get_uploader.username, + user= media.get_actor.username, media_id=media.id) %} <a class="button_action" href="{{ edit_url }}">{% trans %}Edit{% endtrans %}</a> {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete', - user= media.get_uploader.username, + user= media.get_actor.username, media_id=media.id) %} <a class="button_action button_warning" href="{{ delete_url }}">{% trans %}Delete{% endtrans %}</a> </div> @@ -93,7 +93,7 @@ <p>{{ media.description_html }}</p> {% endautoescape %} </div> - {% if comments and request.user and request.user.has_privilege('commenter') %} + {% if request.user and request.user.has_privilege('commenter') %} <div class="media_comments"> {% if app_config['allow_comments'] %} <a @@ -109,7 +109,7 @@ {% endif %} {% if request.user %} <form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment', - user= media.get_uploader.username, + user= media.get_actor.username, media_id=media.id) }}" method="POST" id="form_comment"> {{ wtforms_util.render_divs(comment_form) }} <div class="form_submit_buttons"> @@ -123,7 +123,7 @@ {% endif %} <ul style="list-style:none"> {% for comment in comments %} - {% set comment_author = comment.get_author %} + {% set comment_author = comment.get_actor %} <li id="comment-{{ comment.id }}" {%- if pagination.active_id == comment.id %} class="comment_wrapper comment_active"> @@ -140,7 +140,7 @@ </a> <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment', comment=comment.id, - user=media.get_uploader.username, + user=media.get_actor.username, media=media.slug_or_id) }}#comment" class="comment_whenlink"> <span title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'> @@ -157,7 +157,7 @@ <div> {% if app_config.allow_reporting %} <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.report_comment', - user=media.get_uploader.username, + user=media.get_actor.username, media=media.slug_or_id, comment=comment.id) }}"> {% trans %}Report{% endtrans %}</a> @@ -215,14 +215,14 @@ {%- endif %} {%- if app_config['allow_attachments'] and request.user - and (media.uploader == request.user.id + and (media.actor == request.user.id or request.user.has_privilege('admin')) %} {%- if not media.attachment_files|count %} <h3>{% trans %}Attachments{% endtrans %}</h3> {%- endif %} <p> <a href="{{ request.urlgen('mediagoblin.edit.attachments', - user=media.get_uploader.username, + user=media.get_actor.username, media_id=media.id) }}"> {%- trans %}Add attachment{% endtrans -%} </a> diff --git a/mediagoblin/templates/mediagoblin/user_pages/media_collect.html b/mediagoblin/templates/mediagoblin/user_pages/media_collect.html index b4c9671c..ba7424d1 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media_collect.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media_collect.html @@ -32,7 +32,7 @@ {% block mediagoblin_content %} <form action="{{ request.urlgen('mediagoblin.user_pages.media_collect', - user=media.get_uploader.username, + user=media.get_actor.username, media_id=media.id) }}" method="POST" enctype="multipart/form-data"> <div class="form_box"> @@ -70,4 +70,4 @@ </div> </div> </form> -{% endblock %} +{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html b/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html index c948ccec..243edff5 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html @@ -22,7 +22,7 @@ {% block mediagoblin_content %} <form action="{{ request.urlgen('mediagoblin.user_pages.media_confirm_delete', - user=media.get_uploader.username, + user=media.get_actor.username, media_id=media.id) }}" method="POST" enctype="multipart/form-data"> <div class="form_box"> @@ -51,4 +51,4 @@ </div> </div> </form> -{% endblock %} +{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/report.html b/mediagoblin/templates/mediagoblin/user_pages/report.html index 6f25b996..09502fcf 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/report.html +++ b/mediagoblin/templates/mediagoblin/user_pages/report.html @@ -22,14 +22,14 @@ <form action="" method=POST > {% if comment is defined %} <h3>{% trans %}Reporting this Comment{% endtrans %}</h3> - {%- set comment_author = comment.get_author %} + {%- set comment_author = comment.get_actor %} {%- set comment_author_url = request.urlgen( 'mediagoblin.user_pages.user_home', user=comment_author.username) %} {%- set comment_url = request.urlgen( 'mediagoblin.user_pages.media_home.view_comment', comment=comment.id, - user=media.get_uploader.username, + user=media.get_actor.username, media=media.slug_or_id) %} <div id="comment-{{ comment.id }}" class="comment_wrapper"> @@ -60,17 +60,17 @@ <h3>{% trans %}Reporting this Media Entry{% endtrans %}</h3> <div class="media_thumbnail"> <a href="{{ request.urlgen('mediagoblin.user_pages.media_home', - user=media.get_uploader.username, + user=media.get_actor.username, media=media.slug_or_id) }}"> <img src="{{ media.thumb_url }}"/></a> <a href="{{ request.urlgen('mediagoblin.user_pages.media_home', - user=media.get_uploader.username, + user=media.get_actor.username, media=media.slug_or_id) }}" class=thumb_entry_title>{{ media.title }}</a> </div> <div class=clear></div> - {%- trans user_url = request.urlgen('mediagoblin.user_pages.user_home', user=media.get_uploader.username), - username = media.get_uploader.username %} + {%- trans user_url = request.urlgen('mediagoblin.user_pages.user_home', user=media.get_actor.username), + username = media.get_actor.username %} ❖ Published by <a href="{{ user_url }}" class="comment_authorlink">{{ username }}</a> {% endtrans %} diff --git a/mediagoblin/templates/mediagoblin/utils/collection_gallery.html b/mediagoblin/templates/mediagoblin/utils/collection_gallery.html index 64b30815..86680cb6 100644 --- a/mediagoblin/templates/mediagoblin/utils/collection_gallery.html +++ b/mediagoblin/templates/mediagoblin/utils/collection_gallery.html @@ -25,24 +25,24 @@ {%- if loop.first %} thumb_row_first {%- elif loop.last %} thumb_row_last{% endif %}"> {% for item in row %} - {% set media_entry = item.get_media_entry %} - {% set entry_url = media_entry.url_for_self(request.urlgen) %} + {% set obj = item.get_object() %} + {% set obj_url = obj.url_for_self(request.urlgen) %} <div class="three columns media_thumbnail thumb_entry {%- if loop.first %} thumb_entry_first {%- elif loop.last %} thumb_entry_last{% endif %}"> - <a href="{{ entry_url }}"> - <img src="{{ media_entry.thumb_url }}" /> + <a href="{{ obj_url }}"> + <img src="{{ obj.thumb_url }}" /> </a> {% if item.note %} - <a href="{{ entry_url }}">{{ item.note }}</a> + <a href="{{ obj_url }}">{{ item.note }}</a> {% endif %} {% if request.user and - (item.in_collection.creator == request.user.id or + (item.in_collection.actor == request.user.id or request.user.has_privilege('admin')) %} {%- set remove_url=request.urlgen( 'mediagoblin.user_pages.collection_item_confirm_remove', - user=item.in_collection.get_creator.username, + user=item.in_collection.get_actor.username, collection=item.in_collection.slug, collection_item=item.id) -%} <a href="{{ remove_url }}" class="remove"> diff --git a/mediagoblin/templates/mediagoblin/utils/collections.html b/mediagoblin/templates/mediagoblin/utils/collections.html index 69738e26..5e209d60 100644 --- a/mediagoblin/templates/mediagoblin/utils/collections.html +++ b/mediagoblin/templates/mediagoblin/utils/collections.html @@ -26,15 +26,15 @@ {%- endif %} <a href="{{ collection.url_for_self(request.urlgen) }}"> {{- collection.title }} ( - {{- collection.get_creator.username -}} + {{- collection.get_actor.username -}} )</a> {%- endfor %} </p> {%- endif %} {%- if request.user %} <p> - <a type="submit" href="{{ request.urlgen('mediagoblin.user_pages.media_collect', - user=media.get_uploader.username, + <a type="submit" href="{{ request.urlgen('mediagoblin.user_pages.media_collect', + user=media.get_actor.username, media_id=media.id) }}" class="button_action"> {% trans %}Add to a collection{% endtrans %} diff --git a/mediagoblin/templates/mediagoblin/utils/comment-subscription.html b/mediagoblin/templates/mediagoblin/utils/comment-subscription.html index 5c50c801..54663f05 100644 --- a/mediagoblin/templates/mediagoblin/utils/comment-subscription.html +++ b/mediagoblin/templates/mediagoblin/utils/comment-subscription.html @@ -19,13 +19,13 @@ {% set subscription = get_comment_subscription(request.user.id, media.id) %} {% if not subscription or not subscription.notify %} <a type="submit" href="{{ request.urlgen('mediagoblin.notifications.subscribe_comments', - user=media.get_uploader.username, + user=media.get_actor.username, media=media.slug_or_id)}}" class="button_action">{% trans %}Subscribe to comments{% endtrans %} </a> {% else %} <a type="submit" href="{{ request.urlgen('mediagoblin.notifications.silence_comments', - user=media.get_uploader.username, + user=media.get_actor.username, media=media.slug_or_id)}}" class="button_action">{% trans %}Silence comments{% endtrans %} </a> diff --git a/mediagoblin/templates/mediagoblin/utils/object_gallery.html b/mediagoblin/templates/mediagoblin/utils/object_gallery.html index 1b4a15ed..1f05eed2 100644 --- a/mediagoblin/templates/mediagoblin/utils/object_gallery.html +++ b/mediagoblin/templates/mediagoblin/utils/object_gallery.html @@ -72,5 +72,10 @@ {%- endtrans -%} </i> </p> + <p> + <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.start') }}"> + {%- trans %}Add media{% endtrans -%} + </a> + </p> {% endif %} {% endmacro %} diff --git a/mediagoblin/templates/mediagoblin/utils/report.html b/mediagoblin/templates/mediagoblin/utils/report.html index 3829de97..8da2be7d 100644 --- a/mediagoblin/templates/mediagoblin/utils/report.html +++ b/mediagoblin/templates/mediagoblin/utils/report.html @@ -19,7 +19,7 @@ {% block report_content -%} <p> <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.report_media', - user=media.get_uploader.username, + user=media.get_actor.username, media=media.slug_or_id) }}" class="button_action" id="button_reportmedia" title="Report media"> {% trans %}Report media{% endtrans %} diff --git a/mediagoblin/templates/mediagoblin/utils/tags.html b/mediagoblin/templates/mediagoblin/utils/tags.html index bb4bd1a5..5fc5dd8f 100644 --- a/mediagoblin/templates/mediagoblin/utils/tags.html +++ b/mediagoblin/templates/mediagoblin/utils/tags.html @@ -28,17 +28,17 @@ <a href="{{ request.urlgen( 'mediagoblin.user_pages.user_tag_gallery', tag=tag['slug'], - user=media.get_uploader.username) }}">{{ tag['name'] }}</a> + user=media.get_actor.username) }}">{{ tag['name'] }}</a> {% elif loop.revindex == 2 %} <a href="{{ request.urlgen( 'mediagoblin.user_pages.user_tag_gallery', tag=tag['slug'], - user=media.get_uploader.username) }}">{{ tag['name'] }}</a> + user=media.get_actor.username) }}">{{ tag['name'] }}</a> {% else %} <a href="{{ request.urlgen( 'mediagoblin.user_pages.user_tag_gallery', tag=tag['slug'], - user=media.get_uploader.username) }}">{{ tag['name'] }}</a> + user=media.get_actor.username) }}">{{ tag['name'] }}</a> · {% endif %} {% endfor %} |