diff examples/trac/templates/attachment_view.html @ 60:94154a39c986

Migrate attachment templates to Markup.
author cmlenz
date Wed, 05 Jul 2006 21:32:27 +0000
parents
children 33c2702cf6da
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/examples/trac/templates/attachment_view.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:py="http://purl.org/kid/ns#"
+      xmlns:xi="http://www.w3.org/2001/XInclude">
+  <xi:include href="layout.html"><xi:fallback/></xi:include>
+  <head>
+    <title>${attachment.title}</title>
+  </head>
+
+  <body>
+    <div id="ctxtnav" class="nav"></div>
+
+    <div id="content" class="attachment">
+      <h1>
+        <a href="${attachment.parent_href(req)}">${attachment.parent_id}</a>:
+        ${attachment.filename}
+      </h1>
+      <table id="info" summary="Description"><tbody><tr>
+        <th scope="col">
+          File ${attachment.filename}, ${attachment.size}
+          (added by ${attachment.author},  ${attachment.age} ago)
+        </th></tr><tr>
+        <td class="message">${attachment.description}</td>
+      </tr></tbody></table>
+      <div id="preview">
+        <div py:choose="" py:strip="">
+          <div py:when="preview">${Markup(preview)}</div>
+          <div py:when="max_file_size_reached">
+            <strong>HTML preview not available</strong>, since the file size
+            exceeds ${max_file_size} bytes. You may
+            <a href="${attachment.raw_href}">download the file</a> instead.
+          </div>
+          <div py:otherwise="">
+            <strong>HTML preview not available</strong>. To view the file,
+            <a href="${attachment.raw_href}">download the file</a>.
+          </div>
+        </div>
+      </div>
+      <div class="buttons" py:if="can_delete">
+        <form method="get" action=""><div id="delete">
+          <input type="hidden" name="action" value="delete" />
+          <input type="submit" value="Delete attachment" />
+        </div></form>
+      </div>
+    </div>
+
+  </body>
+</html>
Copyright (C) 2012-2017 Edgewall Software