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%; width: 100%;
border-bottom: 5px solid black; border-bottom: 5px solid black;
} }
.log-number{ .bike-specs{
margin-top: 5px; margin-top: 5px;
} }
.desc { .desc {
margin: 10px; margin: 10px;
height: 250px; height: 235px;
border: 2px dotted black; border: 2px dotted black;
} }
} }

3
app/models/bike.rb

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

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

@ -7,7 +7,10 @@
=' ' + bike.name =' ' + bike.name
%br %br
.horizontal-line .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 .row
.col-xs-6 .col-xs-6
.desc .desc
@ -17,3 +20,5 @@
.desc .desc
.strong New Parts: .strong New Parts:
=bike.new_parts =bike.new_parts
.row
.col-xs-6.col-xs-offset-6.small= "Log Number: " + bike.log_number.to_s

Loading…
Cancel
Save