d3fce41e60
no functional change here, but familiar Rails users will see view files in the locations they expect. this also slightly simplifies controller code there is one attendant change in the wiki at `rails_3/A1-SQL-Injection-Interpolation.md` that I'm happy to make after the PR is merged.
67 lines
1.8 KiB
Plaintext
67 lines
1.8 KiB
Plaintext
<div class="dashboard-wrapper">
|
|
<div class="main-container">
|
|
<div class="row-fluid">
|
|
<div class="span12"> <!--begin span12 -->
|
|
<div class="widget">
|
|
<div class="widget-header">
|
|
<div class="title">
|
|
<span class="fs1" aria-hidden="true" data-icon=""></span> Current Statistics
|
|
</div>
|
|
<!-- Begin Title Buttons-->
|
|
<div class="tools pull-right">
|
|
<div class="btn-group">
|
|
<a id="change_to_bar_graph" class="btn btn-small">
|
|
<span data-icon=""></span>
|
|
</a>
|
|
<a id="change_to_pie_charts" class="btn btn-small">
|
|
<span data-icon=""></span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<!-- End Title Buttons-->
|
|
</div>
|
|
<div id="charts_body" class="widget-body">
|
|
<%#= render partial: "dashboard_stats" %>
|
|
</div>
|
|
<div class="clearfix">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<center><b>Need help using this portal? Check out the <a href="doc?doc=README_FOR_APP">Readme</a></b></center>
|
|
</div> <!-- end span12 -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
function makeActive(){
|
|
$('li[id="home"]').addClass('active');
|
|
};
|
|
|
|
$("#change_to_bar_graph").click(function(event) {
|
|
event.preventDefault();
|
|
$("#charts_body").empty()
|
|
$("#charts_body").load(<%= sanitize change_graph_dashboard_index_path(:graph => "bar_graph").inspect %>);
|
|
|
|
})
|
|
|
|
$("#change_to_pie_charts").click(function(event) {
|
|
event.preventDefault();
|
|
$("#charts_body").empty()
|
|
$("#charts_body").load(<%= sanitize change_graph_dashboard_index_path(:graph => "pie_charts").inspect %>);
|
|
})
|
|
|
|
$(document).ready(
|
|
makeActive,
|
|
$("#charts_body").load(<%= sanitize change_graph_dashboard_index_path(:graph => "pie_charts").inspect %>)
|
|
);
|
|
</script>
|
|
|
|
|
|
|
|
|