Skip to content

Instantly share code, notes, and snippets.

@ddpdevang
Last active August 29, 2015 14:19
Show Gist options
  • Save ddpdevang/a63372bb01b7318a059a to your computer and use it in GitHub Desktop.
Save ddpdevang/a63372bb01b7318a059a to your computer and use it in GitHub Desktop.
app/views/invoices/index.html.erb
<p id="notice"></p>
<div class="page-header">
<h1>Invoices</h1>
</div>
<div class="wice-grid-container" data-grid-name="grid" id="grid"><div id="grid_title"></div><table class="table-striped table-bordered table wice-grid"><thead><tr class="wice-grid-title-row"><th class=""><a href="?grid%5Border%5D=due_on&amp;grid%5Border_direction%5D=asc">Due Date</a></th><th class=""><a href="?grid%5Border%5D=Status&amp;grid%5Border_direction%5D=asc">Status</a></th><th class="">Amount</th><th class=""><a href="?grid%5Border%5D=cutoff_on&amp;grid%5Border_direction%5D=asc">Cutoff</a></th><th class="">Show</th><th class="">Edit</th><th class="">Destroy</th><th class="">PDF</th><th class="">Send</th><th></th></tr><tr class="wg-filter-row" id="grid_filter_row" ><th class=""><div class="date-filter"><span id="grid_f_due_on_fr_date_placeholder"><input type="hidden" name="grid[f][due_on][fr]" id="grid_f_due_on_fr" value="" data-locale="en" data-date-format="yy-mm-dd" data-button-image="/assets/icons/grid/calendar_view_month.png" data-button-text="From" class="check-for-datepicker" data-the-other-datepicker-id-to="grid_f_due_on_to" data-date-year-range="2005:2020" /> <a id="grid_f_due_on_fr_date_view" class="date-label" title="Click to delete" data-dom-id="grid_f_due_on_fr" href="#"></a></span><br/><span id="grid_f_due_on_to_date_placeholder"><input type="hidden" name="grid[f][due_on][to]" id="grid_f_due_on_to" value="" data-locale="en" data-date-format="yy-mm-dd" data-button-image="/assets/icons/grid/calendar_view_month.png" data-button-text="To" class="check-for-datepicker" data-the-other-datepicker-id-from="grid_f_due_on_fr" data-date-year-range="2005:2020" /> <a id="grid_f_due_on_to_date_view" class="date-label" title="Click to delete" data-dom-id="grid_f_due_on_to" href="#"></a></span></div></th><th class=""><input type="text" name="grid[f][Status][eq]" id="grid_f_Status_eq" size="3" class="range-start form-control input-sm" /></th><th class=""></th><th class=""><div class="date-filter"><span id="grid_f_cutoff_on_fr_date_placeholder"><input type="hidden" name="grid[f][cutoff_on][fr]" id="grid_f_cutoff_on_fr" value="" data-locale="en" data-date-format="yy-mm-dd" data-button-image="/assets/icons/grid/calendar_view_month.png" data-button-text="From" class="check-for-datepicker" data-the-other-datepicker-id-to="grid_f_cutoff_on_to" data-date-year-range="2005:2020" /> <a id="grid_f_cutoff_on_fr_date_view" class="date-label" title="Click to delete" data-dom-id="grid_f_cutoff_on_fr" href="#"></a></span><br/><span id="grid_f_cutoff_on_to_date_placeholder"><input type="hidden" name="grid[f][cutoff_on][to]" id="grid_f_cutoff_on_to" value="" data-locale="en" data-date-format="yy-mm-dd" data-button-image="/assets/icons/grid/calendar_view_month.png" data-button-text="To" class="check-for-datepicker" data-the-other-datepicker-id-from="grid_f_cutoff_on_fr" data-date-year-range="2005:2020" /> <a id="grid_f_cutoff_on_to_date_view" class="date-label" title="Click to delete" data-dom-id="grid_f_cutoff_on_to" href="#"></a></span></div></th><th class=""></th><th class=""></th><th class=""></th><th class=""></th><th class=""></th><th class="filter_icons"><div title="Filter" id="grid_submit_grid_icon" class="submit clickable"></div> <div title="Reset" id="grid_reset_grid_icon" class="reset clickable"></div></th></tr></thead><tfoot><tr><td colspan="10">
<div class="pagination">
<ul class="pagination">
<li class="active"><a href="/invoices?grid%5Bpage%5D=">1</a></li>
<li ><a rel="next" href="/invoices?grid%5Bpage%5D=2">2</a></li>
<li ><a href="/invoices?grid%5Bpage%5D=3">3</a></li>
<li ><a href="/invoices?grid%5Bpage%5D=4">4</a></li>
<li ><a href="/invoices?grid%5Bpage%5D=5">5</a></li>
<li class="disabled"><a href="#">...</a></li>
<li ><a href="/invoices?grid%5Bpage%5D=604">604</a></li>
<li ><a href="/invoices?grid%5Bpage%5D=605">605</a></li>
<li><a rel="next" href="/invoices?grid%5Bpage%5D=2">»</a></li>
</ul>
</div>
<div class="pagination_status">1-20 / 12082 <a href="#" title="Show all records" class="wg-show-all-link" data-grid-state="[[&quot;grid[order_direction]&quot;,&quot;&quot;],[&quot;grid[pp]&quot;,12082]]" data-confim-message="Are you sure you want to display all records?">show all</a></div></td></tr></tfoot><tbody><tr class="odd"><td>2015-02-24</td><td>Paid</td><td>£90.00</td><td>2015-02-24</td><td><a href="/invoices/23486">Show</a></td><td><a href="/invoices/23486/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/23486">Destroy</a></td><td></td><td></td><td></td></tr><tr class="even"><td>2015-02-26</td><td>Paid</td><td>£55.86</td><td>2015-02-26</td><td><a href="/invoices/23489">Show</a></td><td><a href="/invoices/23489/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/23489">Destroy</a></td><td></td><td></td><td></td></tr><tr class="odd"><td>2015-02-27</td><td>Paid</td><td>£360.00</td><td>2015-02-27</td><td><a href="/invoices/23492">Show</a></td><td><a href="/invoices/23492/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/23492">Destroy</a></td><td></td><td></td><td></td></tr><tr class="even"><td>2015-03-01</td><td></td><td>£52.25</td><td>2015-03-01</td><td><a href="/invoices/23494">Show</a></td><td><a href="/invoices/23494/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/23494">Destroy</a></td><td></td><td></td><td></td></tr><tr class="odd"><td>2012-10-26</td><td>Paid</td><td>£57.00</td><td>2012-10-26</td><td><a href="/invoices/20067">Show</a></td><td><a href="/invoices/20067/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/20067">Destroy</a></td><td></td><td></td><td></td></tr><tr class="even"><td>2012-11-21</td><td>Paid</td><td>£166.32</td><td>2012-11-21</td><td><a href="/invoices/20216">Show</a></td><td><a href="/invoices/20216/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/20216">Destroy</a></td><td></td><td></td><td></td></tr><tr class="odd"><td>2012-11-21</td><td>Paid</td><td>£166.32</td><td>2012-11-21</td><td><a href="/invoices/20317">Show</a></td><td><a href="/invoices/20317/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/20317">Destroy</a></td><td></td><td></td><td></td></tr><tr class="even"><td>2012-11-21</td><td>Paid</td><td>£166.32</td><td>2012-11-21</td><td><a href="/invoices/20418">Show</a></td><td><a href="/invoices/20418/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/20418">Destroy</a></td><td></td><td></td><td></td></tr><tr class="odd"><td>2012-11-21</td><td>Paid</td><td>£166.32</td><td>2012-11-21</td><td><a href="/invoices/20519">Show</a></td><td><a href="/invoices/20519/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/20519">Destroy</a></td><td></td><td></td><td></td></tr><tr class="even"><td>2012-11-21</td><td>Paid</td><td>£166.32</td><td>2012-11-21</td><td><a href="/invoices/20620">Show</a></td><td><a href="/invoices/20620/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/20620">Destroy</a></td><td></td><td></td><td></td></tr><tr class="odd"><td>2012-11-22</td><td>Paid</td><td>£166.32</td><td>2012-11-22</td><td><a href="/invoices/20721">Show</a></td><td><a href="/invoices/20721/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/20721">Destroy</a></td><td></td><td></td><td></td></tr><tr class="even"><td>2012-11-22</td><td>Paid</td><td>£166.32</td><td>2012-11-22</td><td><a href="/invoices/20822">Show</a></td><td><a href="/invoices/20822/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/20822">Destroy</a></td><td></td><td></td><td></td></tr><tr class="odd"><td>2012-11-22</td><td>Paid</td><td>£166.32</td><td>2012-11-22</td><td><a href="/invoices/20923">Show</a></td><td><a href="/invoices/20923/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/20923">Destroy</a></td><td></td><td></td><td></td></tr><tr class="even"><td>2012-11-22</td><td>Paid</td><td>£166.32</td><td>2012-11-22</td><td><a href="/invoices/21024">Show</a></td><td><a href="/invoices/21024/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/21024">Destroy</a></td><td></td><td></td><td></td></tr><tr class="odd"><td>2012-11-22</td><td>Paid</td><td>£166.32</td><td>2012-11-22</td><td><a href="/invoices/21125">Show</a></td><td><a href="/invoices/21125/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/21125">Destroy</a></td><td></td><td></td><td></td></tr><tr class="even"><td>2012-11-26</td><td>Paid</td><td>£57.00</td><td>2012-11-26</td><td><a href="/invoices/21226">Show</a></td><td><a href="/invoices/21226/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/21226">Destroy</a></td><td></td><td></td><td></td></tr><tr class="odd"><td>2012-03-10</td><td>Paid</td><td>£17.71</td><td>2012-03-01</td><td><a href="/invoices/19638">Show</a></td><td><a href="/invoices/19638/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/19638">Destroy</a></td><td></td><td></td><td></td></tr><tr class="even"><td>2012-03-10</td><td>Paid</td><td>£98.71</td><td>2012-03-01</td><td><a href="/invoices/19639">Show</a></td><td><a href="/invoices/19639/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/19639">Destroy</a></td><td></td><td></td><td></td></tr><tr class="odd"><td>2012-03-10</td><td>Paid</td><td>£21.60</td><td>2012-03-01</td><td><a href="/invoices/19640">Show</a></td><td><a href="/invoices/19640/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/19640">Destroy</a></td><td></td><td></td><td></td></tr><tr class="even"><td>2012-03-10</td><td>Paid</td><td>£15.83</td><td>2012-03-01</td><td><a href="/invoices/19643">Show</a></td><td><a href="/invoices/19643/edit">Edit</a></td><td><a confirm="Are you sure?" href="/invoices/19643">Destroy</a></td><td></td><td></td><td></td></tr></tbody></table><div data-processor-initializer-arguments="[&quot;http://192.168.1.10:4000/invoices&quot;,&quot;http://192.168.1.10:4000/invoices&quot;,&quot;http://192.168.1.10:4000/invoices?grid%5Bexport%5D=csv&quot;,&quot;grid%5Bq%5D=&quot;,&quot;grid%5Bfoc%5D=&quot;,&quot;development&quot;]" data-filter-declarations="[{&quot;filterName&quot;:&quot;Due Date&quot;,&quot;detached&quot;:&quot;false&quot;,&quot;declaration&quot;:{&quot;templates&quot;:[&quot;grid%5Bf%5D%5Bdue_on%5D%5Bfr%5D=&quot;,&quot;grid%5Bf%5D%5Bdue_on%5D%5Bto%5D=&quot;],&quot;ids&quot;:[&quot;grid_f_due_on_fr&quot;,&quot;grid_f_due_on_to&quot;]}},{&quot;filterName&quot;:&quot;Status&quot;,&quot;detached&quot;:&quot;false&quot;,&quot;declaration&quot;:{&quot;templates&quot;:[&quot;grid%5Bf%5D%5BStatus%5D%5Beq%5D=&quot;],&quot;ids&quot;:[&quot;grid_f_Status_eq&quot;]}},{&quot;filterName&quot;:&quot;Cutoff&quot;,&quot;detached&quot;:&quot;false&quot;,&quot;declaration&quot;:{&quot;templates&quot;:[&quot;grid%5Bf%5D%5Bcutoff_on%5D%5Bfr%5D=&quot;,&quot;grid%5Bf%5D%5Bcutoff_on%5D%5Bto%5D=&quot;],&quot;ids&quot;:[&quot;grid_f_cutoff_on_fr&quot;,&quot;grid_f_cutoff_on_to&quot;]}}]" class="wg-data"></div></div><script>
//<![CDATA[
$(document).ready(function(){
if (typeof(WiceGridProcessor) == "undefined"){
alert("wice_grid.js not loaded, WiceGrid cannot proceed!\n" +
"Make sure that you have loaded wice_grid.js.\n" +
"Add line\n//= require wice_grid.js\n" +
"to app/assets/javascripts/application.js")
}
})
//]]>
</script>
<br>
<a href="/invoices/new">New Invoice</a>
<script src="wice_grid.js">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment