Merge pull request #5205 from solgenomics/topic/generic_trial_upload
[sgn.git] / mason / search / datasets.mas
blobb11dcdaee34edae5486d0d263a06c7909a3ee5f5
2 <%args>
3 $location_id => 'not_provided'
4 </%args>
6 <& /util/import_javascript.mas, classes => [ 'jquery', 'jquery.dataTables' ] &>
8 <& /page/page_title.mas, title => "Dataset Search -<a class='btn btn-link' href=/help/datasets>Help <span class='glyphicon glyphicon-question-sign'></a>" &>
10 <div class="well well-sm">
11     <div class="panel panel-default">
12         <div class="panel-body">
13             <table id="dataset_search_results" width="100%" class="table table-hover table-striped">
14             <&| /util/user.mas:logged_in &>
15               <thead>
16                 <tr>
17                   <th>Dataset name</th>
18                   <th>Description</th>
19               </tr>
20               </thead>
21             </&>
22             <&| /util/user.mas:logged_out &>
23               <tr>
24                 <td><button class="btn btn-xs btn-primary" name="site_login_button">Log In</button> to see Datasets.</td>
25               </tr>
26             </&>
27             </table>
28         </div>
29     </div>
30 </div>
32 <script>
34 jQuery(document).ready(function () {
36    var trial_table = jQuery('#dataset_search_results').DataTable( {
37        'ajax': '/ajax/dataset/by_user_html',
38        "scrollX": true
39    });
41    jQuery('#dataset_search_results').on( 'draw.dt', function () {
42      var name_links = trial_table.column( 0, {page:'current'} ).data();
43      var names = [];
44    });
46 });
48 </script>