AsiaV2b/modules/personal_college_project/index_search1.html.erb

77 lines
2.1 KiB
Plaintext
Raw Normal View History

2021-04-19 03:12:17 +00:00
<script type="text/javascript">
$( ".selectbox" ).ready(function() {
var option_len = $(".search-widget option").length
for (var i=0;i<option_len;i++){
if($(".search-widget option").eq(i).data('selected')=="selected"){
$(".search-widget option").eq(i).attr('selected','selected')
}
}
});
</script>
<h3>{{widget-title}}</h3>
<div class="search-widget">
<form action="{{url}}" method="get">
<input type="hidden" name="authenticity_token" value="{{csrf_value}}">
{{select_text}}
<select class="selectbox" name="selectbox" data-level="0" data-list="choice">
<option value={{choice_value}} data-selected='{{choice_select}}' >
{{choice_show}}</option>
</select>
{{search_text}}
<input name="keywords" placeholder="Keywords" type="text" value="{{search_value}}">
<button>Go</button>
<a id="filter" style="" href="{{url}}">Clear</a>
</form>
</div>
2021-09-17 04:49:08 +00:00
<table class="table table-hover table-striped projects-index college_projects-index dt-responsive">
2021-04-19 03:12:17 +00:00
<caption><h3>{{widget-title}}</h3></caption>
<thead>
<tr>
<th class="col-md-1">{{th-year}}</th>
<th class="col-md-1">{{th-project_name}}</th>
<th class="col-md-1">{{th-advising_professor}}</th>
<th class="col-md-1">{{th-department}}</th>
<th class="col-md-1">{{th-student_name}}</th>
<th class="col-md-1">{{th-member_profile}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="college_projects">
<tr>
<td>{{year}}</td>
<td>{{project_name}}</td>
<td>{{advising_professor}}</td>
<td>{{department}}</td>
<td>{{student_name}}</td>
<td>{{member_profile}}</td>
</tr>
</tbody>
</table>
{{pagination_goes_here}}
<script>
2021-09-03 03:45:44 +00:00
$('table.college_projects-index').each(function(){
if($(this).find('thead').length!=0 && $(this).find('td').length!=0 && !$(this).hasClass('dataTable')){
$(this).DataTable({
searching: false,
paging: false,
ordering: false,
info: false,
autoWidth: false
});
}
});;
2021-04-19 03:12:17 +00:00
</script>