Bug 32061: Remove spans from page titles for adding/editing Z39.50/SRU servers
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / files.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% USE AuthorisedValues %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Files for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
11
12 <body id="pat_files" class="pat">
13 [% WRAPPER 'header.inc' %]
14     [% INCLUDE 'patron-search-header.inc' %]
15 [% END %]
16
17 [% WRAPPER 'sub-header.inc' %]
18 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
19     <ol>
20         <li>
21             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22         </li>
23         <li>
24             <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
25         </li>
26         <li>
27             <a href="#" aria-current="page">
28                 Files for [% INCLUDE 'patron-title.inc' %]
29             </a>
30         </li>
31     </ol>
32 </nav>
33 [% END %]
34
35 <div class="main container-fluid">
36     <div class="row">
37         <div class="col-sm-10 col-sm-push-2">
38             <main>
39
40                 [% INCLUDE 'members-toolbar.inc' %]
41
42                 <h1>Files</h1>
43
44                 [% IF errors %]
45                     <div class="dialog alert">
46                         [% IF errors.empty_upload %]The file you are attempting to upload has no contents.[% END %]
47                         [% IF errors.no_file %]You did not select a file to upload.[% END %]
48                     </div>
49                 [% END %]
50
51                 [% IF ( files ) %]
52                     <div class="page-section">
53                         <table>
54                             <thead>
55                                 <tr>
56                                     <th>Name</th>
57                                     <th>Type</th>
58                                     <th>Description</th>
59                                     <th>Uploaded</th>
60                                     [% IF CAN_user_borrowers_edit_borrowers %]<th>&nbsp;</th>[% END %]
61                                 </tr>
62                             </thead>
63
64                             <tbody>
65                                 [% FOREACH f IN files %]
66                                     <tr>
67                                         <td><a href="?borrowernumber=[% patron.borrowernumber | uri %]&amp;op=download&amp;file_id=[% f.file_id | uri %]">[% f.file_name | html %]</a></td>
68                                         <td>[% f.file_type | html %]</td>
69                                         <td>[% f.file_description | html %]</td>
70                                         <td>[% f.date_uploaded | $KohaDates %]</td>
71                                         [% IF CAN_user_borrowers_edit_borrowers %]<td><a class="btn btn-default btn-xs confirmdelete" href="?borrowernumber=[% patron.borrowernumber | html %]&amp;op=delete&amp;file_id=[% f.file_id | html %]"><i class="fa fa-trash"></i> Delete</a></td>[% END %]
72                                     </tr>
73                                 [% END %]
74                             </tbody>
75                         </table>
76                     </div>
77                 [% ELSE %]
78                 <div class="dialog message">
79                     <p>This patron has no files attached.</p>
80                 </div>
81                 [% END %]
82
83                 <form method="post" action="/cgi-bin/koha/members/files.pl" enctype="multipart/form-data">
84                     <fieldset class="rows">
85                         <legend>Upload new file</legend>
86                         <ol>
87                         <li><input type="hidden" name="op" value="upload" />
88                         <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
89                         <input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
90
91                         <label for="description">Description:</label>
92                         <input name="description" id="description" type="text" /></li>
93
94                         <li><label for="uploadfile">File:</label><input name="uploadfile" type="file" id="uploadfile" /></li>
95
96                         </ol>
97                         <fieldset class="action"><input name="upload" type="submit" id="upload" class="btn btn-primary" value="Upload file" /></fieldset>
98                     </fieldset>
99                 </form>
100
101             </main>
102         </div> <!-- /.col-sm-10.col-sm-push-2 -->
103
104         <div class="col-sm-2 col-sm-pull-10">
105             <aside>
106                 [% INCLUDE 'circ-menu.inc' %]
107             </aside>
108         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
109      </div> <!-- /.row -->
110
111 [% MACRO jsinclude BLOCK %]
112     [% INCLUDE 'str/members-menu.inc' %]
113     [% Asset.js("js/members-menu.js") | $raw %]
114     <script>
115         $(document).ready(function(){
116             $(".confirmdelete").on("click", function(){
117                 $(this).parents('tr').addClass("warn");
118                 if(confirm(_("Are you sure you want to delete this file?"))){
119                     return true;
120                 } else {
121                     $(this).parents('tr').removeClass("warn");
122                     return false;
123                 }
124             });
125     });
126     </script>
127 [% END %]
128
129 [% INCLUDE 'intranet-bottom.inc' %]