Bug 17146: Fix CSRF in picture-upload.pl
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / files.tt
1 [% USE KohaDates %]
2 [% USE AuthorisedValues %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Files for [% INCLUDE 'patron-title.inc' %]</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 </head>
7 <body id="pat_files" class="pat">
8 [% INCLUDE 'header.inc' %]
9 [% INCLUDE 'patron-search.inc' %]
10
11 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Files for [% INCLUDE 'patron-title.inc' %]</div>
12
13 <div id="doc3" class="yui-t2">
14     <div id="bd">
15         <div id="yui-main">
16             <div class="yui-b">
17                 [% INCLUDE 'members-toolbar.inc' %]
18
19                 <h1>Files</h1>
20
21                 [% IF errors %]
22                     <div class="dialog alert">
23                         [% IF errors.empty_upload %]The file you are attempting to upload has no contents.[% END %]
24                         [% IF errors.no_file %]You did not select a file to upload.[% END %]
25                     </div>
26                 [% END %]
27
28                 [% IF ( files ) %]
29                 <table>
30                     <thead>
31                         <tr>
32                             <th>Name</th>
33                             <th>Type</th>
34                             <th>Description</th>
35                             <th>Uploaded</th>
36                             [% IF CAN_user_borrowers %]<th>&nbsp;</th>[% END %]
37                         </tr>
38                     </thead>
39
40                     <tbody>
41                         [% FOREACH f IN files %]
42                             <tr>
43                                  <td><a href="?borrowernumber=[% borrowernumber %]&amp;op=download&amp;file_id=[% f.file_id %]">[% f.file_name %]</a></td>
44                                  <td>[% f.file_type %]</td>
45                                  <td>[% f.file_description %]</td>
46                                  <td>[% f.date_uploaded | $KohaDates %]</td>
47                                  [% IF CAN_user_borrowers %]<td><a href="?borrowernumber=[% borrowernumber %]&amp;op=delete&amp;file_id=[% f.file_id %]">Delete</a></td>[% END %]
48                             </tr>
49                         [% END %]
50                     </tbody>
51                 </table>
52                 [% ELSE %]
53                 <div class="dialog message">
54                     <p>This patron has no files attached.</p>
55                 </div>
56                 [% END %]
57
58                 <form method="post" action="/cgi-bin/koha/members/files.pl" enctype="multipart/form-data">
59                     <fieldset class="rows">
60                         <legend>Upload New File</legend>
61                         <ol>
62                         <li><input type="hidden" name="op" value="upload" />
63                         <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
64                         <input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
65
66                         <label for="description">Description:</label>
67                         <input name="description" id="description" type="text" /></li>
68
69                         <li><label for="uploadfile">File:</label><input name="uploadfile" type="file" id="uploadfile" /></li>
70
71                         </ol>
72                         <fieldset class="action"><input name="upload" type="submit" id="upload" value="Upload File" /></fieldset>
73                     </fieldset>
74                 </form>
75
76             </div>
77         </div>
78
79         <div class="yui-b">
80             [% INCLUDE 'circ-menu.inc' %]
81         </div>
82     </div>
83 [% INCLUDE 'intranet-bottom.inc' %]