{% if request.user and
(media.uploader == request.user.id or
request.user.is_admin) %}
- {% set edit_url = request.urlgen('mediagoblin.edit.edit_media',
- user= media.get_uploader.username,
- media_id=media.id) %}
+ {% 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',
user= media.get_uploader.username,