graphical filtering of accession search
[sgn.git] / mason / brapiclient / seasons.mas
blobeb1e6e5d443a82921210a30acb16074bf90b1d70
1 <%args>
2 </%args>
4 <h4>Seasons</h4>
6 <div id="brapi_seasons_div">
7 <button class="btn btn-primary" id="brapi_home_show_seasons">Show Seasons</button>
9 </div>
11 <script>
13 jQuery(document).ready(function() {
15 jQuery("#brapi_home_show_seasons").click(function() {
16     jQuery.ajax( {
17       'url': jQuery('#brapi_home_url_select').val()+'/brapi/v1/seasons',
18       'method': 'GET',
19       'success': function(response) {
20         console.log(response);
21         brapi_create_paginated_table(response.result.data, response.metadata.pagination, 'brapi_seasons_div', jQuery('#brapi_home_url_select').val()+'/brapi/v1/seasons', undefined);
22       },
23       error: function(response) {
24         alert('An error occurred getting seasons');
25       }
26     });
27 });
29 });
31 </script>