app/views/spectrums/show/_compare.html.erb
<div class="modal hide fade" id="comparemodal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<b>Search and compare your spectrum to others. Be aware that your device is not amplitude calibrated by default (<a href="http://publiclab.org/wiki/spectral-workbench-usage#Amplitude+calibration">Learn more</a>).</b>
</div>
<div class="modal-body">
<form method="get" id="compareForm" action="javascript:void(0);" class="form-search">
<input placeholder="Search spectra" class='search-query input-medium' id='searchinput' type='text' name='q' value=''/>
<button class="btn btn-primary" type='submit'><i class="fa fa-search fa-white"></i></button>
</form>
<script>
var spectra = [<%= @spectrum.id %>]
</script>
<div id="result">
<%= render :partial => "spectrums/show/compare_search" %>
</div>
</div>
<div class="modal-footer">
<a data-dismiss="modal" class="btn" href="javascript:void();">Cancel</a>
</div>
</div>