Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: appengine/monorail/templates/tracker/issue-attachment-part.ezt

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 [# This template part renders a small table that describes one issue attachment
2 on a issue description or issue comment.
3
4 arg0: Comment sequence number.
5 arg1: AttachmentView.
6 arg2: can_delete_bool? This will be True if the logged in user is allowed
7 to delete the comment.
8 Also used: projectname, issue.local_id, attachment_form_token.
9 ]
10
11
12 [define attachment_visible][end]
13 [if-any arg2][define attachment_visible]Yes[end][end]
14 [if-any arg1.deleted_bool][else][define attachment_visible]Yes[end][end]
15
16 [if-any attachment_visible]
17 <table cellspacing="3" cellpadding="2" border="0">
18 <tr><td width="20">
19 <a href="[arg1.downloadurl]">
20 <img width="16" height="16" src="/static[arg1.iconurl]" border="0">
21 </a>
22 </td>
23
24 <td style="min-width:16em" valign="top">
25 [if-any arg1.deleted_bool]Deleted:[end]
26 <b [if-any arg1.deleted_bool]style="color:#666"[end]>[arg1.filename]</ b>
27 <br>
28
29 [arg1.filesizestr]
30 [if-any arg1.deleted_bool][else]
31 [if-any arg1.url]
32 <a href="[arg1.url]" target="_blank" style="margin-left:.7em">View</ a>
33 [end]
34 <a href="[arg1.downloadurl]" style="margin-left:.7em" download>Downlo ad</a>
35 [end]
36 </td>
37
38 [if-any arg2]
39 <td valign="top">
40 <form action="delAttachment.do" method="post" style="padding-left:1em" >
41 <input type="hidden" name="token" value="[attachment_form_token]">
42 [# TODO(jrobbins): add hidden fields to maintain navigational state, e.g., colspec, q, sort, start, num]
43 <input type="hidden" name="id" value="[issue.local_id]">
44 <input type="hidden" name="sequence_num" value="[arg0]">
45 <input type="hidden" name="aid" value="[arg1.attachment_id]">
46 [if-any arg1.deleted_bool]
47 <input type="submit" name="undelete" value="Undelete" style="font-s ize:92%; width:7em">
48 [else]
49 <input type="submit" name="delete" value="Delete" style="font-size: 92%; width:7em">
50 [end]
51 </form>
52 </td>
53 [end]
54 </tr>
55
56 [if-any arg1.thumbnail_url]
57 [if-any arg1.deleted_bool][else]
58 <tr>
59 <td colspan="3">
60 <a href="[arg1.url]" target="_blank">
61 <img src="[arg1.thumbnail_url]" class="preview">
62 </a>
63 </td>
64 </tr>
65 [end]
66 [end]
67
68
69 </table>
70 [end]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698