No clue, but it makes it better

This commit is contained in:
2015-03-01 20:32:44 +01:00
parent 119ee7ddc8
commit 1d5a319d4e
8 changed files with 16 additions and 2 deletions
@@ -28,7 +28,7 @@ if list.sorted_orders
view mark-order-cancelled order=order
if showTotal
.list-orders-total.total
= t 'total'
= t 'general.total'
span.currency= currency list.total
else
p
@@ -1,7 +1,7 @@
module Suppliers
class SvgElementsController < Suppliers::ApplicationController
def index
@svg_elements = SvgElement.all
@svg_elements = SvgElement.active
render json: @svg_elements, each_serializer: Suppliers::SvgElementSerializer
end
end
+5
View File
@@ -3,5 +3,10 @@ class SvgElement
include ActiveModel::SerializerSupport
include SvgElementDefaults
property :snap_code
property :active, type: :boolean, default: true
has_many :section_elements
def self.active
all.select(&:active)
end
end
@@ -5,6 +5,9 @@
= f.row :name
.form-label= f.label :name
.form-field= f.text_field :name
= f.row :active
.form-label= f.label :active
.form-field= f.check_box :active
= f.row :dpm
.small-3.columns= f.label :dpm
.small-3.columns= f.number_field :dpm