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 ( $marker );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }

    foreach my $arg ( qw( marker ) )
    {
        HTML::Mason::Exception::Params->throw
            ( error => "no value sent for required parameter '$arg'" )
                unless exists $pos{$arg};
    }
#line 29 "/home/production/cxgn/sgn/mason/markers/attributions.mas"
    $marker = $_[ $pos{'marker'} ];
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 1 "/home/production/cxgn/sgn/mason/markers/attributions.mas"
$m->print( '
' );
#line 27 "/home/production/cxgn/sgn/mason/markers/attributions.mas"
$m->print( '
' );
#line 31 "/home/production/cxgn/sgn/mason/markers/attributions.mas"
$m->print( '
' );
#line 32 "/home/production/cxgn/sgn/mason/markers/attributions.mas"


my $marker_id = $marker->marker_id();

my $att = CXGN::Metadata::Attribution->new("sgn","markers",$marker_id);

my $db_name = 'sgn';
my $table_name = 'markers';
my $row_id = $marker_id;

my @a = $att -> get_attributions();

my $html = "";
foreach my $a (@a) { 
  if ($a->{role}) { $html .= "<h4>$a->{role}</h4>"; }
  if ($a->{person}->get_last_name()) { $html .= "<b>Name:</b> ".$a->{person}->get_first_name()." ".$a->{person}->get_last_name()."<br />"; }
  if ($a->{organization}) { $html .= "<b>Organization:</b> ".$a->{organization}." <br />"; }
  if ($a->{project}) { $html .= "<b>Project:</b> ".$a->{project}." <br /><br />"; }
}

if($html) {
  $html =  CXGN::Page::FormattingHelpers::blue_section_html("Marker Submitted By", $html);
}
else {
  return'';
}


#line 61 "/home/production/cxgn/sgn/mason/markers/attributions.mas"
$m->print( '
' );
#line 62 "/home/production/cxgn/sgn/mason/markers/attributions.mas"
$m->print(  $html  );
#line 62 "/home/production/cxgn/sgn/mason/markers/attributions.mas"
$m->print( '
' );
;return;
},
'declared_args' => {
  '$marker' => { default => undef }
},
'load_time' => 1763079527,

)
;