app/views/embed/spectrum.html.erb
<%= render partial: "embed/modal", locals: { datum: @spectrum, type: :spectrum } %>
<div id="graphing" class="swb-graphing embed">
<div class="swb-spectrum-img-container">
<img class="spectrum" src="<%= @spectrum.photo.url(:large) %>" />
</div>
<div id="graph"><i class="fa fa-spinner fa-spin"></i></div>
<script type="text/javascript">
var graph;
jQuery(document).ready(function($) {
graph = new SpectralWorkbench.Graph({
spectrum_id: <%= @spectrum.id %>,
embed: true,
calibrated: <%= @spectrum.calibrated %>,
sample_row: <%= @spectrum.sample_row %>
});
})
</script>
<%= render :partial => "graph/header", :locals => {:type => :spectrum, :datum => @spectrum } %>
<div class="toolbar toolbar-bottom">
<%= render :partial => 'graph/tools', :locals => { type: :spectrum, datum: @spectrum } %>
</div>
</div>