Commit 4b52ebb1 authored by Oliver Feldt's avatar Oliver Feldt
Browse files

Refactored Mark-Up

parent 9b1d4eee
@import bootstrap
body
padding-top: 50px
padding-top: 70px
.modal-header.info
border-radius: 6px 6px 0px 0px
......
......@@ -116,38 +116,30 @@ html lang="en"
span.icon-bar
span.icon-bar
a.navbar-brand href="#"
| CCC:ROC - Radio Checkout
#navbar.collapse.navbar-collapse
ul.nav.navbar-nav
li.active
form#search_form.navbar-form
| Radio Checkout
#navbar.navbar-collapse.collapse
form#search_form.navbar-form.navbar-left
.form-group
input#radio_id.form-control.col-xs-12 name="radio_id" tabindex="1" placeholder="Radio ID"
input#radio_id.form-control name="radio_id" tabindex="1" placeholder="Radio ID"
.container
.row
.col-xs-10.col-xs-offset-1
h1 Radio List
.row
.col-xs-10.col-xs-offset-1
.row
.col-xs-10.col-xs-offset-1
table#radios.table.table-striped.table-hover
thead
th Radio ID
th Previous Angel
th Current Angel
th Last Scanned
th Last Checked Out
tbody
- @radios.each do |radio|
- previous_checkout = radio.checkouts.first(:checked_in_at.not => nil, order: [ :checked_out_at.desc])
- current_checkout = radio.checkouts.first(checked_in_at: nil, order: [ :checked_out_at.desc ])
tr data-id=radio.id data-name=radio.name data-last_scanned_at=radio.last_scanned_at data-angel=(current_checkout.angel if current_checkout) class=(current_checkout && !current_checkout.checked_in_at ? "info" : "success") data-checked_out_at=(current_checkout.checked_out_at if current_checkout)
td.col-xs-2= radio.name
td.col-xs-2= previous_angel= previous_checkout.angel if previous_checkout
td.col-xs-2.current_angel= current_checkout.angel if current_checkout
td.col-xs-3.last_scanned_at
td.col-xs-3.checked_out_at
h1 Radio List
table#radios.table.table-striped.table-hover.table-responsive
thead
th Radio ID
th Previous Angel
th Current Angel
th Last Scanned
th Last Checked Out
tbody
- @radios.each do |radio|
- previous_checkout = radio.checkouts.first(:checked_in_at.not => nil, order: [ :checked_out_at.desc])
- current_checkout = radio.checkouts.first(checked_in_at: nil, order: [ :checked_out_at.desc ])
tr data-id=radio.id data-name=radio.name data-last_scanned_at=radio.last_scanned_at data-angel=(current_checkout.angel if current_checkout) class=(current_checkout && !current_checkout.checked_in_at ? "info" : "success") data-checked_out_at=(current_checkout.checked_out_at if current_checkout)
td.col-xs-2= radio.name
td.col-xs-2= previous_angel= previous_checkout.angel if previous_checkout
td.col-xs-2.current_angel= current_checkout.angel if current_checkout
td.col-xs-3.last_scanned_at
td.col-xs-3.checked_out_at
script src="javascripts/jquery.min.js"
script src="javascripts/moment.min.js"
script src="javascripts/handlebars-v2.0.0.js"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment