package SGN::View::Mason::Commands;
use strict;
use vars qw($m $c);
HTML::Mason::Component::FileBased->new(
'code' => sub {
use utf8; local $SGN::View::Mason::Commands::m = $HTML::Mason::Commands::m;
HTML::Mason::Exception::Params->throw
    ( error =>
      "Odd number of parameters passed to component expecting name/value pairs"
    ) if @_ % 2;
my ( $files, $allow_delete );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }
#line 6 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
     $files = exists $pos{'files'} ? $_[ $pos{'files'} ] :  [];
#line 7 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
     $allow_delete = exists $pos{'allow_delete'} ? $_[ $pos{'allow_delete'} ] :  0;
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 1 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print( '
' );
#line 4 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print( '
' );
#line 9 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print( '
' );
#line 10 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
 if (scalar(@$files)>0) {
$m->print( '<table class="table table-bordered files_datatables" alt="">
<thead>
  <tr><th>Filename</th><th>Date Uploaded</th><th>Options</th></tr>
</thead>
<tbody>
' );
#line 16 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
 foreach my $f (@$files) { 
$m->print( '  <tr>
    <td>' );
#line 18 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print(  $f->{basename}  );
#line 18 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print( '</td>
    <td>' );
#line 19 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print(  $f->{create_date}  );
#line 19 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print( '</td>
    <td>
' );
#line 21 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
 if ($allow_delete){
$m->print( '    <button class="btn btn-default btn-sm" name="delete_pheno_file_link" data-file_id="' );
#line 22 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print(  $f->{file_id}  );
#line 22 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print( '" >Delete</button> | 
' );
#line 23 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
 }
$m->print( '    <a href="/breeders/phenotyping/view/' );
#line 24 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print(  $f->{file_id}  );
#line 24 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print( '">View</a> | <a href="/breeders/phenotyping/download/' );
#line 24 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print(  $f->{file_id}  );
#line 24 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
$m->print( '">Download</a></td>
  </tr>
' );
#line 26 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
 }
$m->print( '</tbody>
</table>
' );
#line 29 "/home/production/cxgn/sgn/mason/breeders_toolbox/file_list.mas"
 }
$m->print( '
<script>

jQuery(document).ready(function() {

    jQuery(\'.files_datatables\').DataTable();

});

</script>
' );
;return;
},
'declared_args' => {
  '$allow_delete' => { default => ' 0' },
  '$files' => { default => ' []' }
},
'load_time' => 1763600869,

)
;