Using Rails' tag helpers instead of bare HTML
This commit is contained in:
parent
5f238d2ec1
commit
869b87bc7b
2 changed files with 9 additions and 1 deletions
|
|
@ -16,5 +16,5 @@ jQuery ->
|
||||||
})
|
})
|
||||||
|
|
||||||
# Submit the form if the user changes the view (grid or list)
|
# Submit the form if the user changes the view (grid or list)
|
||||||
$("input[name='display']").change ->
|
$("input[name='search[display]']").change ->
|
||||||
$(this).parents('form').submit()
|
$(this).parents('form').submit()
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,14 @@
|
||||||
<button type="submit" class="btn btn-default">Submit</button>
|
<button type="submit" class="btn btn-default">Submit</button>
|
||||||
|
|
||||||
<div class="btn-group" data-toggle="buttons">
|
<div class="btn-group" data-toggle="buttons">
|
||||||
|
<%= label('search', 'display', class: 'btn btn-default') do %>
|
||||||
|
<%= radio_button('search', 'display', 'grid') %>
|
||||||
|
<span class="glyphicon glyphicon-th">
|
||||||
|
<% end %>
|
||||||
|
<%= label('search', 'display', class: 'btn btn-default') do %>
|
||||||
|
<%= radio_button('search', 'display', 'list') %>
|
||||||
|
<span class="glyphicon glyphicon-th-list">
|
||||||
|
<% end %>
|
||||||
<label class="btn btn-default active">
|
<label class="btn btn-default active">
|
||||||
<input type="radio" name="display" value="grid"><span class="glyphicon glyphicon-th"></span>
|
<input type="radio" name="display" value="grid"><span class="glyphicon glyphicon-th"></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue