Merge pull request #2754 from solgenomics/topic/fix_homepage_add_accessions_dialog
[sgn.git] / mason / barcode / excel_download.mas
blob58574cb3153709cff565654640b48a2c4598e843
2 <%args>
3 @locations
4 @projects
5 @available_cvterms
6 </%args>
8 <%perl>
9 use DateTime;
10 my $dt = DateTime->from_epoch( epoch=>time );
11 my $date = join "/", ($dt->year, $dt->month, $dt->day);
12 </%perl>
15 <form class="form-horizontal" role="form" method="GET" action="/barcode/excel_download">
16   <div class="form-group form-group-sm">
17     <label class="col-sm-2 control-label">Operator: </label>
18     <div class="col-sm-10">
19       <input type="text" class="form-control" id="operator" name="operator" />
20     </div>
21   </div>
22   <div class="form-group form-group-sm">
23     <label class="col-sm-2 control-label">Date: </label>
24     <div class="col-sm-10">
25       <input type="text" class="form-control" id="date" name="date" value="<% $date %>" placeholder="Format: YYYY/MM/DD"/>
26     </div>
27   </div>
28   <div class="form-group form-group-sm">
29     <label class="col-sm-2 control-label">Location: </label>
30     <div class="col-sm-10">
31       <& /page/html_select.mas, name=>'location', choices=>\@locations &>
32       <br/>[<a href="/breeders/locations">Add New Location</a>]
33     </div>
34   </div>
35   <div class="form-group form-group-sm">
36     <label class="col-sm-2 control-label">Project: </label>
37     <div class="col-sm-10">
38       <& /page/html_select.mas, name=>'project', choices=>\@projects &>
39       <br/>[<a href="/breeders/trials">Add New Project</a>]
40     </div>
41   </div>
42   <div class="form-group form-group-sm">
43     <label class="col-sm-2 control-label">Trait(s): </label>
44     <div class="col-sm-10">
45       <select multiple class="form-control" id="cvterms" name="cvterms" >
46 <%perl>
47 foreach my $t (@available_cvterms) {
48   if ($t =~ /\#/) { next; }
49   my ($cvterm, $version, $priority, $values, $description) = split /\t/, $t;
50   if ($priority) { 
51     print qq { <option value="$cvterm">$description</option> };
52   }
54 </%perl>
55       </select>
56     </div>
57   </div>
58   <div class="form-group form-group-sm">
59     <label class="col-sm-2 control-label">Lines or Plots: </label>
60     <div class="col-sm-10">
61       <textarea class="form-control" name="lines"></textarea>
62     </div>
63   </div>
64   <button style="float:right" type="submit" class="btn btn-info btn-sm" type="submit" value="generate Excel sheet">Generate Excel Sheet</button>
65 </form>
67 <br/>
69 <!--
70 <form method="GET" action="/barcode/excel_download">
71 <table>
73 <tr><td>Operator </td><td><input id="operator" name="operator" /></td></tr>
74 <tr><td>Date </td><td><input id="date" name="date" value="<% $date %>" /> (format: YYYY/MM/DD)</td></tr>
75 <tr><td>Location</td><td>
76     <& /page/html_select.mas, name=>'location', choices=>\@locations &> [<a href="/breeders/home">Add new location</a>]</td></tr> 
77 <tr><td>Project</td><td>
78     <& /page/html_select.mas, name=>'project', choices=>\@projects &> [<a href="/breeders/home">Add new project</a>]</td></tr>
79 </table>
82 <select multiple id="cvterms" name="cvterms" size="15">
83 <%perl>
84 foreach my $t (@available_cvterms) {
85   if ($t =~ /\#/) { next; }
86   my ($cvterm, $version, $priority, $values, $description) = split /\t/, $t;
87   if ($priority) { 
88     print qq { <option value="$cvterm">$description</option> };
89   }
91 </%perl>
92 </select>
93 <br /><br />
94 Lines or plots:<br />
95 <textarea name="lines" cols="20" rows="10">
96 </textarea>
98 <br /><br />
99 <input type="submit" value="generate Excel sheet" />
101 </form>