Simplify/Robustify the thumbnail URL usage in templates
[mediagoblin.git] / mediagoblin / templates / mediagoblin / user_pages / media_confirm_delete.html
index 0f650ab6ecca6918ec7e01ab89a81290607cac42..a3cf0210c296e498459cabb0640bb2ac65595db4 100644 (file)
@@ -1,6 +1,6 @@
 {#
 # GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011 MediaGoblin contributors.  See AUTHORS.
+# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as published by
 {% block mediagoblin_content %}
 
   <form action="{{ request.urlgen('mediagoblin.user_pages.media_confirm_delete',
-                                 user=media.uploader().username,
-                                 media=media.slug) }}"
+                                 user=media.get_uploader.username,
+                                 media=media._id) }}"
         method="POST" enctype="multipart/form-data">
-    <div class="grid_8 prefix_1 suffix_1 edit_box form_box">
+    <div class="form_box">
       <h1>
-        {%- trans title=media['title'] -%}
+        {%- trans title=media.title -%}
           Really delete {{ title }}?
         {%- endtrans %}
       </h1>
-         
+
       <div style="text-align: center;" >
-        <img src="{{ request.app.public_store.file_url(
-                         media['media_files']['thumb']) }}" />
+        <img src="{{ media.thumb_url }}" />
       </div>
-         
+
       <br />
-         
+
       <p class="delete_checkbox_box">
        {{ form.confirm }}
        <label for="{{ (form.confirm.name) }}">{{ _(form.confirm.label.text) }}</label>
@@ -46,8 +45,8 @@
 
       <div class="form_submit_buttons">
         {# TODO: This isn't a button really... might do unexpected things :) #}
-       <a class="cancel_link" href="{{ media.url_for_self(request.urlgen) }}">{% trans %}Cancel{% endtrans %}</a>
-        <input type="submit" value="{% trans %}Delete Permanently{% endtrans %}" class="button" />
+       <a class="button_action" href="{{ media.url_for_self(request.urlgen) }}">{% trans %}Cancel{% endtrans %}</a>
+        <input type="submit" value="{% trans %}Delete permanently{% endtrans %}" class="button_form" />
        {{ csrf_token }}
       </div>
     </div>