Merge pull request #5248 from solgenomics/topic/batch_update_trials
[sgn.git] / lib / SGN / Controller / solGS / Feedback.pm
bloba927200edd2640bb57de01fb5c9d2ff5316c48f3
2 package SGN::Controller::solGS::Feedback;
4 use Moose;
5 use namespace::autoclean;
7 BEGIN { extends 'Catalyst::Controller' }
10 sub submission_feedback : Path('/solgs/submission/feedback/') Args() {
11 my ( $self, $c ) = @_;
13 my $job_type = $c->req->param('job');
14 my $msg = $self->message_content($c, $job_type);
16 $c->stash->{message} = $msg;
17 $c->stash->{template} = "/generic_message.mas";
21 sub message_content {
22 my ($self, $c, $job_type) = @_;
24 $job_type =~ s/[_|-]/ /g;
25 $job_type = lc($job_type);
27 my $user_id = $c->user()->get_object()->get_sp_person_id();
28 my $profile_link = "<a href=\"/solpeople/profile/$user_id\">your profile page</a>";
30 my $referer = $c->req->referer;
31 my $back_link = "<a href=\"$referer\">[ Go back ]</a>";
33 my $msg = "<p>Your $job_type job is submitted.</p>"
34 . "<p>You will receive an email when it is completed, "
35 . "which may take up to a few hours. If the email is not in your inbox, "
36 . "please check also your spam folder.</p>"
37 . "<p>Alternatively, you can also check the status of the job in $profile_link."
38 . "<p>$back_link</p>";
40 return $msg;