~ubuntu-branches/ubuntu/jaunty/trac/jaunty

« back to all changes in this revision

Viewing changes to templates/attachment.cs

  • Committer: Bazaar Package Importer
  • Author(s): Luis Matos
  • Date: 2008-07-13 23:46:20 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20080713234620-13ynpdpkbaymfg1z
Tags: 0.11-2
* Re-added python-setup-tools to build dependences. Closes: #490320 #468705
* New upstream release Closes: 489727
* Added sugestion for other vcs support available: git bazaar mercurial 
* Added spamfilter plugin to sugests
* Moved packaging from python-support to python-central
* Added an entry to the NEWS about the cgi Closes: #490275
* Updated 10_remove_trac_suffix_from_title patch to be used in 0.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?cs include "header.cs" ?>
2
 
<?cs include "macros.cs" ?>
3
 
 
4
 
<div id="ctxtnav" class="nav"></div>
5
 
 
6
 
<div id="content" class="attachment">
7
 
 
8
 
<?cs if:attachment.mode == 'new' ?>
9
 
 <h1>Add Attachment to <a href="<?cs var:attachment.parent.href?>"><?cs
10
 
   var:attachment.parent.name ?></a></h1>
11
 
 <form id="attachment" method="post" enctype="multipart/form-data" action="">
12
 
  <div class="field">
13
 
   <label>File:<br /><input type="file" name="attachment" /></label>
14
 
  </div>
15
 
  <fieldset>
16
 
   <legend>Attachment Info</legend>
17
 
   <?cs if:trac.authname == "anonymous" ?>
18
 
    <div class="field">
19
 
     <label>Your email or username:<br />
20
 
     <input type="text" name="author" size="30" value="<?cs
21
 
       var:attachment.author?>" /></label>
22
 
    </div>
23
 
   <?cs /if ?>
24
 
   <div class="field">
25
 
    <label>Description of the file (optional):<br />
26
 
    <input type="text" name="description" size="60" /></label>
27
 
   </div>
28
 
   <br />
29
 
   <div class="options">
30
 
    <label><input type="checkbox" name="replace" />
31
 
    Replace existing attachment of the same name</label>
32
 
   </div>
33
 
   <br />
34
 
  </fieldset>
35
 
  <div class="buttons">
36
 
   <input type="hidden" name="action" value="new" />
37
 
   <input type="hidden" name="type" value="<?cs var:attachment.parent.type ?>" />
38
 
   <input type="hidden" name="id" value="<?cs var:attachment.parent.id ?>" />
39
 
   <input type="submit" value="Add attachment" />
40
 
   <input type="submit" name="cancel" value="Cancel" />
41
 
  </div>
42
 
 </form>
43
 
<?cs elif:attachment.mode == 'delete' ?>
44
 
 <h1><a href="<?cs var:attachment.parent.href ?>"><?cs
45
 
   var:attachment.parent.name ?></a>: <?cs var:attachment.filename ?></h1>
46
 
 <p><strong>Are you sure you want to delete this attachment?</strong><br />
47
 
 This is an irreversible operation.</p>
48
 
 <div class="buttons">
49
 
  <form method="post" action=""><div id="delete">
50
 
   <input type="hidden" name="action" value="delete" />
51
 
   <input type="submit" name="cancel" value="Cancel" />
52
 
   <input type="submit" value="Delete attachment" />
53
 
  </div></form>
54
 
 </div>
55
 
<?cs elif:attachment.mode == 'list' ?>
56
 
 <h1><a href="<?cs var:attachment.parent.href ?>"><?cs
57
 
   var:attachment.parent.name ?></a></h1><?cs
58
 
  call:list_of_attachments(attachment.list, attachment.attach_href) ?>
59
 
<?cs else ?>
60
 
 <h1><a href="<?cs var:attachment.parent.href ?>"><?cs
61
 
   var:attachment.parent.name ?></a>: <?cs var:attachment.filename ?></h1>
62
 
 <table id="info" summary="Description"><tbody><tr>
63
 
   <th scope="col">
64
 
    File <?cs var:attachment.filename ?>, <?cs var:attachment.size ?> 
65
 
    (added by <?cs var:attachment.author ?>,  <?cs var:attachment.age ?> ago)
66
 
   </th></tr><tr>
67
 
   <td class="message"><?cs var:attachment.description ?></td>
68
 
  </tr>
69
 
 </tbody></table>
70
 
 <div id="preview"><?cs
71
 
  if:attachment.preview ?>
72
 
   <?cs var:attachment.preview ?><?cs
73
 
  elif:attachment.max_file_size_reached ?>
74
 
   <strong>HTML preview not available</strong>, since the file size exceeds
75
 
   <?cs var:attachment.max_file_size  ?> bytes. You may <a href="<?cs
76
 
     var:attachment.raw_href ?>">download the file</a> instead.<?cs
77
 
  else ?>
78
 
   <strong>HTML preview not available</strong>. To view the file,
79
 
   <a href="<?cs var:attachment.raw_href ?>">download the file</a>.<?cs
80
 
  /if ?>
81
 
 </div>
82
 
 <?cs if:attachment.can_delete ?><div class="buttons">
83
 
  <form method="get" action=""><div id="delete">
84
 
   <input type="hidden" name="action" value="delete" />
85
 
   <input type="submit" value="Delete attachment" />
86
 
  </div></form>
87
 
 </div><?cs /if ?>
88
 
<?cs /if ?>
89
 
 
90
 
</div>
91
 
<?cs include "footer.cs"?>