Mercurial > p > roundup > code
annotate templates/classic/html/file.item.html @ 3696:790363e96852
Sorting/grouping by multiple properties.
- Implement sorting/grouping by multiple properties for the web
interface. I'm now using @sort0/@sortdir0,@sort1/@sortdir1,... and
@group0/@groupdir0,... when generating URLs from a search template.
These are converted to a list internally. When saving URLs (e.g. when
storing queries) I'm using @sort=prop1,prop2,... and @group=... with
optional '-' prepended to individual props.
This means saved URLs are backward compatible with existing trackers
(and yes, this was a design goal).
I need the clumsy version with @sort0,@sort1 etc, because I'm
currently using several selectors and checkboxes (as the classic
template does, too). I don't think there is a way around that in HTML?
- Updated (hopefully all) documentation to reflect the new URL format
and the consequences in the web-interface.
- I've set the number of sort/group properties in the classic template
to two -- this can easily be reverted by changing n_sort to 1.
Richard, would you look over these changes? I've set a tag before and
(will set) after commit, so that it would be easy to merge out.
Don't be too scared about the size of the change, most is documentation,
the guts are in cgi/templating.py and small changes in the classic
template.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Wed, 30 Aug 2006 20:28:26 +0000 |
| parents | c26f2ba69c78 |
| children | a9f6eb633452 |
| 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 |
|
3119
c26f2ba69c78
some bits I missed, and the next release will be beta ;)
Richard Jones <richard@users.sourceforge.net>
parents:
2439
diff
changeset
|
9 <p tal:condition="not:context/is_view_ok" i18n:translate="">You are not |
|
c26f2ba69c78
some bits I missed, and the next release will be beta ;)
Richard Jones <richard@users.sourceforge.net>
parents:
2439
diff
changeset
|
10 allowed to view this page.</p> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
11 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
12 <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
|
13 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
|
14 tal:attributes="action context/designator"> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
15 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
16 <table class="form"> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
17 <tr> |
|
2393
c2908812624a
i18n markup
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
1976
diff
changeset
|
18 <th i18n:translate="">Name</th> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
19 <td tal:content="structure context/name/field"></td> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
20 </tr> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
21 <tr> |
|
2393
c2908812624a
i18n markup
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
1976
diff
changeset
|
22 <th i18n:translate="">Content Type</th> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
23 <td tal:content="structure context/type/field"></td> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
24 </tr> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
25 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
26 <tr> |
|
1829
4e4afbe3cd30
Move '<input type="hidden">' elements into a block.
Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
parents:
1591
diff
changeset
|
27 <td> |
|
4e4afbe3cd30
Move '<input type="hidden">' elements into a block.
Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
parents:
1591
diff
changeset
|
28 |
|
1911
f5c804379c85
fixed ZRoundup - mostly changes to classic template
Richard Jones <richard@users.sourceforge.net>
parents:
1855
diff
changeset
|
29 <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
|
30 <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
|
31 <input type="hidden" name="@multilink" |
|
f5c804379c85
fixed ZRoundup - mostly changes to classic template
Richard Jones <richard@users.sourceforge.net>
parents:
1855
diff
changeset
|
32 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
|
33 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
|
34 </td> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
35 <td tal:content="structure context/submit">submit button here</td> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
36 </tr> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
37 </table> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
38 </form> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
39 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
40 <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
|
41 tal:attributes="href string:file${context/id}/${context/name}" |
|
c2908812624a
i18n markup
Alexander Smishlajev <a1s@users.sourceforge.net>
parents:
1976
diff
changeset
|
42 i18n:translate="">download</a> |
|
1591
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
43 |
|
3119
c26f2ba69c78
some bits I missed, and the next release will be beta ;)
Richard Jones <richard@users.sourceforge.net>
parents:
2439
diff
changeset
|
44 <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
|
45 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
46 </td> |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
47 |
|
21312a7564fd
moving templates around
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
48 </tal:block> |
