Replace edit blogpost url from default media_edit url to blogpost edit url.
authorAditi <aditi.iitr@gmail.com>
Fri, 9 Aug 2013 09:15:06 +0000 (14:45 +0530)
committerAditi <aditi.iitr@gmail.com>
Fri, 9 Aug 2013 09:15:06 +0000 (14:45 +0530)
mediagoblin/templates/mediagoblin/user_pages/blog_media.html

index 978bf944c59f4fc78ac42d2bd0061a738678529e..25dd47836005d0d094d1cfd4cd238f685796dc20 100644 (file)
@@ -70,9 +70,9 @@
         {% 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,