check if stock_dbxref exists before transferring new as it might violate a unique...
[sgn.git] / mason / breeders_toolbox / file_list.mas
bloba979529541d0ff4fe8f49f0c0661bb7d4215ab1c
2 <%doc>
3 </%doc>
5 <%args>
6 $files => []
7 $allow_delete => 0
8 </%args>
10 % if (scalar(@$files)>0) {
11 <table class="table table-bordered files_datatables" alt="">
12 <thead>
13   <tr><th>Filename</th><th>Date Uploaded</th><th>Options</th></tr>
14 </thead>
15 <tbody>
16 % foreach my $f (@$files) { 
17   <tr>
18     <td><% $f->{basename} %></td>
19     <td><% $f->{create_date} %></td>
20     <td>
21 % if ($allow_delete){
22     <button class="btn btn-default btn-sm" name="delete_pheno_file_link" data-file_id="<% $f->{file_id} %>" >Delete</button> | 
23 % }
24     <a href="/breeders/phenotyping/view/<% $f->{file_id} %>">View</a> | <a href="/breeders/phenotyping/download/<% $f->{file_id} %>">Download</a></td>
25   </tr>
26 % }
27 </tbody>
28 </table>
29 % }
31 <script>
33 jQuery(document).ready(function() {
35     jQuery('.files_datatables').DataTable();
37 });
39 </script>