Mercurial > p > roundup > code
annotate templates/classic/html/file.item.html @ 3898:dd00c917fc40
per-tracker 404 templating
Currently if CGI can't map a name it raises NotFound which gets
propagated up to roundup-server which generates a plain vanilla 404
page.
This changes it so that the CGI client tries to handle NotFound itself
by rendering the appropriate template: classname.404.html (or
_generic.404.html if no class specific one is found). If the URL can't
be mapped to a DB class then we just reraise NotFound and let the
upper layer take care of it.
Also, add some basic templates for it. They aren't pretty but no worse
than what you got before and provide a jumping off point for further
customization.
This should fix [SF#403287].
| author | Justus Pendleton <jpend@users.sourceforge.net> |
|---|---|
| date | Wed, 12 Sep 2007 01:15:07 +0000 |
| parents | a9f6eb633452 |
| children |
| rev | line source |
|---|---|
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
1 <tal:block metal:use-macro="templates/page/macros/icing"> |
|
2439
3551fbf8cf29
tracker name added to the page title
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2393
diff
changeset
|
2 <title metal:fill-slot="head_title" i18n:translate="">File display - <span |
|
3551fbf8cf29
tracker name added to the page title
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
2393
diff
changeset
|
3 i18n:name="tracker" tal:replace="config/TRACKER_NAME" /></title> |
|
2393
c2908812624a
i18n markup
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
1976
diff
changeset
|
4 <span metal:fill-slot="body_title" tal:omit-tag="python:1" |
|
c2908812624a
i18n markup
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
1976
diff
changeset
|
5 i18n:translate="">File display</span> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
6 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
7 <td class="content" metal:fill-slot="content"> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
8 |
|
3742
a9f6eb633452
nicer "permission required" messages (patch [SF#1558183])
Richard Jones <richard@users.sourceforge.net>
parents:
3119
diff
changeset
|
9 <p tal:condition="python:not (context.is_view_ok() |
|
a9f6eb633452
nicer "permission required" messages (patch [SF#1558183])
Richard Jones <richard@users.sourceforge.net>
parents:
3119
diff
changeset
|
10 or request.user.hasRole('Anonymous'))" i18n:translate=""> |
|
a9f6eb633452
nicer "permission required" messages (patch [SF#1558183])
Richard Jones <richard@users.sourceforge.net>
parents:
3119
diff
changeset
|
11 You are not allowed to view this page.</p> |
|
a9f6eb633452
nicer "permission required" messages (patch [SF#1558183])
Richard Jones <richard@users.sourceforge.net>
parents:
3119
diff
changeset
|
12 |
|
a9f6eb633452
nicer "permission required" messages (patch [SF#1558183])
Richard Jones <richard@users.sourceforge.net>
parents:
3119
diff
changeset
|
13 <p tal:condition="python:not context.is_view_ok() |
|
a9f6eb633452
nicer "permission required" messages (patch [SF#1558183])
Richard Jones <richard@users.sourceforge.net>
parents:
3119
diff
changeset
|
14 and request.user.hasRole('Anonymous')" i18n:translate=""> |
|
a9f6eb633452
nicer "permission required" messages (patch [SF#1558183])
Richard Jones <richard@users.sourceforge.net>
parents:
3119
diff
changeset
|
15 Please login with your username and password.</p> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
16 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
17 <form method="POST" onSubmit="return submit_once()" |
|
3119
c26f2ba69c78
some bits I missed, and the next release will be beta ;)
Richard Jones <richard@users.sourceforge.net>
parents:
2439
diff
changeset
|
18 enctype="multipart/form-data" tal:condition="context/is_view_ok" |
|
1855
8b840f8626fb
Add "action" attributes to forms.
Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
parents:
1829
diff
changeset
|
19 tal:attributes="action context/designator"> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
20 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
21 <table class="form"> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
22 <tr> |
|
2393
c2908812624a
i18n markup
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
1976
diff
changeset
|
23 <th i18n:translate="">Name</th> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
24 <td tal:content="structure context/name/field"></td> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
25 </tr> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
26 <tr> |
|
2393
c2908812624a
i18n markup
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
1976
diff
changeset
|
27 <th i18n:translate="">Content Type</th> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
28 <td tal:content="structure context/type/field"></td> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
29 </tr> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
30 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
31 <tr> |
|
1829
4e4afbe3cd30
Move '<input type="hidden">' elements into a block.
Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
parents:
1591
diff
changeset
|
32 <td> |
|
4e4afbe3cd30
Move '<input type="hidden">' elements into a block.
Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
parents:
1591
diff
changeset
|
33 |
|
1911
f5c804379c85
fixed ZRoundup - mostly changes to classic template
Richard Jones <richard@users.sourceforge.net>
parents:
1855
diff
changeset
|
34 <input type="hidden" name="@template" value="item"> |
|
f5c804379c85
fixed ZRoundup - mostly changes to classic template
Richard Jones <richard@users.sourceforge.net>
parents:
1855
diff
changeset
|
35 <input type="hidden" name="@required" value="name,type"> |
|
f5c804379c85
fixed ZRoundup - mostly changes to classic template
Richard Jones <richard@users.sourceforge.net>
parents:
1855
diff
changeset
|
36 <input type="hidden" name="@multilink" |
|
f5c804379c85
fixed ZRoundup - mostly changes to classic template
Richard Jones <richard@users.sourceforge.net>
parents:
1855
diff
changeset
|
37 tal:condition="python:request.form.has_key('@multilink')" |
|
f5c804379c85
fixed ZRoundup - mostly changes to classic template
Richard Jones <richard@users.sourceforge.net>
parents:
1855
diff
changeset
|
38 tal:attributes="value request/form/@multilink/value"> |
|
1829
4e4afbe3cd30
Move '<input type="hidden">' elements into a block.
Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
parents:
1591
diff
changeset
|
39 </td> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
40 <td tal:content="structure context/submit">submit button here</td> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
41 </tr> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
42 </table> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
43 </form> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
44 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
45 <a tal:condition="python:context.id and context.is_view_ok()" |
|
2393
c2908812624a
i18n markup
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
1976
diff
changeset
|
46 tal:attributes="href string:file${context/id}/${context/name}" |
|
c2908812624a
i18n markup
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
1976
diff
changeset
|
47 i18n:translate="">download</a> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
48 |
|
3119
c26f2ba69c78
some bits I missed, and the next release will be beta ;)
Richard Jones <richard@users.sourceforge.net>
parents:
2439
diff
changeset
|
49 <tal:block tal:condition="context/id" tal:replace="structure context/history" /> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
50 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
51 </td> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
52 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
53 </tal:block> |
