seedlot upload with accession synonyms. seedlot upload works to update existing seedlots
[sgn.git] / lib / SGN / Controller / BreedersToolbox / GraphicalFiltering.pm
blob2d3ad256318e5ec7a5025bc0bbda763bb0114ea5
1 use strict;
3 package SGN::Controller::BreedersToolbox::GraphicalFiltering;
5 use Moose;
6 use URI::FromHash 'uri';
7 use Data::Dumper;
10 BEGIN { extends 'Catalyst::Controller'; }
12 sub graphical_filtering :Path('/tools/graphicalfiltering') {
13 my $self =shift;
14 my $c = shift;
15 if (! $c->user) {
16 $c->res->redirect(uri( path => '/solpeople/login.pl', query => { goto_url => $c->req->uri->path_query } ) );
17 return;
19 my $trial_list_id = $c->request->param('trial_list_id');
20 my $plot_list_id = $c->request->param('plot_list_id');
21 my $trial_ids = $c->request->parameters->{'trial_id'};
22 my $ajaxRequestString = "";
24 if (defined $trial_list_id){
25 $ajaxRequestString = "/ajax/plot/common_traits_by/trial_list?trial_list_id=".$trial_list_id;
27 elsif (defined $plot_list_id){
28 $ajaxRequestString = "/ajax/plot/common_traits_by/plot_list?plot_list_id=".$plot_list_id;
30 elsif (defined $trial_ids){
31 $ajaxRequestString = "/ajax/plot/common_traits_by/trials?";
32 foreach my $trial_id (@$trial_ids){
33 $ajaxRequestString .= "trial_id=".$trial_id."&";
36 print STDERR $ajaxRequestString;
37 $c->stash->{ajaxRequestString} = $ajaxRequestString;
39 $c->assets->include('/static/css/tools/GraphicalFiltering.css');
40 $c->stash->{template} = '/tools/graphicalfiltering/index.mas';