Skip to content

Commit 6d5523e

Browse files
author
Richard Jones
committed
more useful file listing
1 parent 6bdca32 commit 6d5523e

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

templates/classic/html/issue.item.html

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,40 @@
9898
changed <b>${context/activity}</b>.">activity info
9999
</p>
100100

101+
<table class="files" tal:condition="context/files">
102+
<tr><th colspan="4" class="header">Files</th></tr>
103+
<tr><th>File name</th><th>Uploaded</th><th>Type</th><th>Edit</th></tr>
104+
<tr tal:repeat="file context/files">
105+
<td>
106+
<a tal:attributes="href string:file${file/id}/${file/name}"
107+
tal:content="file/name">dld link</a>
108+
</td>
109+
<td>
110+
<span tal:content="file/creator">creator's name</span>,
111+
<span tal:content="file/creation">creation date</span>
112+
</td>
113+
<td tal:content="file/type" />
114+
<td><a tal:condition="file/is_edit_ok"
115+
tal:attributes="href string:file${file/id}">edit</a>
116+
</td>
117+
</tr>
118+
</table>
119+
101120
<table class="messages" tal:condition="context/messages">
102121
<tr><th colspan="4" class="header">Messages</th></tr>
103122
<tal:block tal:repeat="msg context/messages/reverse">
104123
<tr>
105124
<th><a tal:attributes="href string:msg${msg/id}"
106-
tal:content="string:msg${msg/id}"></a></th>
125+
tal:content="string:msg${msg/id} (view)"></a></th>
107126
<th tal:content="string:Author: ${msg/author}">author</th>
108127
<th tal:content="string:Date: ${msg/date}">date</th>
109128
<th>
110-
<a tal:condition="context/is_edit_ok"
111-
tal:attributes="href string:issue${context/id}?@remove@messages=${msg/id}&@action=edit">remove</a>
129+
<form style="padding:0" tal:condition="context/is_edit_ok"
130+
tal:attributes="action string:issue${context/id}">
131+
<input type="hidden" name="@remove@messages" tal:attributes="value msg/id">
132+
<input type="hidden" name="@action" value="edit">
133+
<input type="submit" value="remove">
134+
</form>
112135
</th>
113136
</tr>
114137
<tr>
@@ -119,21 +142,6 @@
119142
</tal:block>
120143
</table>
121144

122-
<table class="files" tal:condition="context/files">
123-
<tr><th colspan="2" class="header">Files</th></tr>
124-
<tr><th>File name</th><th>Uploaded</th></tr>
125-
<tr tal:repeat="file context/files">
126-
<td>
127-
<a tal:attributes="href string:file${file/id}/${file/name}"
128-
tal:content="file/name">dld link</a>
129-
</td>
130-
<td>
131-
<span tal:content="file/creator">creator's name</span>,
132-
<span tal:content="file/creation">creation date</span>
133-
</td>
134-
</tr>
135-
</table>
136-
137145
<tal:block tal:condition="context/id" tal:replace="structure context/history" />
138146

139147
</td>

0 commit comments

Comments
 (0)