Browse Source

Louis | Improve label formatting

master
Loos 10 years ago
parent
commit
8bdda37f4c
  1. 4
      app/assets/stylesheets/print_select.css.scss
  2. 3
      app/models/bike.rb
  3. 7
      app/views/bikes/print_labels.html.haml

4
app/assets/stylesheets/print_select.css.scss

@ -11,12 +11,12 @@
width: 100%;
border-bottom: 5px solid black;
}
.log-number{
.bike-specs{
margin-top: 5px;
}
.desc {
margin: 10px;
height: 250px;
height: 235px;
border: 2px dotted black;
}
}

3
app/models/bike.rb

@ -7,6 +7,7 @@ class Bike < ActiveRecord::Base
validates :serial_number, presence: true
def name
[self.seat_tube_size.to_s, self.brand, self.model] * ' '
self.brand + ' ' + self.model
end
end

7
app/views/bikes/print_labels.html.haml

@ -7,7 +7,10 @@
=' ' + bike.name
%br
.horizontal-line
.log-number= 'Log Number: ' + bike.log_number.to_s
.bike-specs
= "Top Tube Size: " + bike.top_tube_size.to_s
%br
= "Seat Tube Size: " + bike.seat_tube_size.to_s
.row
.col-xs-6
.desc
@ -17,3 +20,5 @@
.desc
.strong New Parts:
=bike.new_parts
.row
.col-xs-6.col-xs-offset-6.small= "Log Number: " + bike.log_number.to_s

Loading…
Cancel
Save