From 8bdda37f4c5e43e7326f3fe09e9e78451be08f5a Mon Sep 17 00:00:00 2001 From: Loos Date: Fri, 19 Sep 2014 17:06:44 -0500 Subject: [PATCH] Louis | Improve label formatting --- app/assets/stylesheets/print_select.css.scss | 4 ++-- app/models/bike.rb | 3 ++- app/views/bikes/print_labels.html.haml | 7 ++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/print_select.css.scss b/app/assets/stylesheets/print_select.css.scss index 196287a..6cf30ac 100644 --- a/app/assets/stylesheets/print_select.css.scss +++ b/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; } } diff --git a/app/models/bike.rb b/app/models/bike.rb index a03dd34..454ebe4 100644 --- a/app/models/bike.rb +++ b/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 diff --git a/app/views/bikes/print_labels.html.haml b/app/views/bikes/print_labels.html.haml index d18fdcf..e7857e9 100644 --- a/app/views/bikes/print_labels.html.haml +++ b/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