personal-volunteer/modules/personal_volunteer/index_search1.html.erb

63 lines
2.1 KiB
Plaintext

<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>
<div class="search-widget personal-volunteer-services">
<h3>{{widget-title}}</h3>
<form action="{{url}}" method="get">
<label for="selectbox">{{select_text}}</label>
<select class="selectbox" name="selectbox" data-level="0" data-list="choice">
<option value={{choice_value}} data-selected='{{choice_select}}' >
{{choice_show}}</option>
</select>
<label for="keywords">{{search_text}}</label>
<input name="keywords" id="keywords" placeholder="Keywords" type="text" value="{{search_value}}" title="keywords">
<button>Go</button>
<a id="filter" style="" href="{{url}}">Clear</a>
</form>
</div>
<table class="table table-hover table-striped projects-index volunteer-services-index dt-responsive nowrap">
<caption><h3>{{widget-title}}</h3></caption>
<thead>
<tr>
<th class="col-md-1">{{year}}</th>
<th class="col-md-2">{{volunteer_name}}</th>
<th class="col-md-1">{{volunteer_organizer}}</th>
<th class="col-md-2 min-tablet">{{volunteer_area}}</th>
<th class="col-md-2 min-tablet-l" date-format="%Y-%m-%d">{{volunteer_start_date}}</th>
<th class="col-md-2 min-tablet-l" date-format="%Y-%m-%d">{{volunteer_end_date}}</th>
<th class="col-md-2 min-tablet-l">{{note}}</th>
</tr>
</thead>
<tbody data-level="0" data-list="volunteer_services">
<tr>
<td>{{year}}</td>
<td><a href="{{link_to_show}}">{{volunteer_name}}</a></td>
<td>{{volunteer_organizer}}</td>
<td>{{volunteer_area}}</td>
<td>{{volunteer_start_date}}</td>
<td>{{volunteer_end_date}}</td>
<td>{{note}}</td>
</tr>
</tbody>
</table>
{{pagination_goes_here}}
<script>
$('table.volunteer-services-index').DataTable({
searching: false,
paging: false,
ordering: false,
info: false
});
</script>