Add full price breakdown

This commit is contained in:
Rohan Mitchell
2014-07-30 15:11:59 +10:00
parent fc95e088df
commit 9fa0413e8e
2 changed files with 28 additions and 2 deletions

View File

@@ -8,4 +8,7 @@ Darkswarm.directive 'priceBreakdownPopup', ->
restrict: 'EA'
replace: true
templateUrl: 'price_breakdown.html'
scope: true
scope: false
link: (scope, elem, attrs) ->
scope.expanded = false unless scope.expanded?

View File

@@ -1,4 +1,27 @@
.joyride-tip-guide{"ng-class" => "{ in: tt_isOpen, fade: tt_animation }"}
%span.joyride-nub.bottom
.joyride-content-wrapper
%price-percentage{percentage: 'variant.basePricePercentage'}
.collapsed{"ng-show" => "!expanded"}
%price-percentage{percentage: 'variant.basePricePercentage'}
%a{"ng-click" => "expanded = !expanded"} Full price breakdown
.expanded{"ng-show" => "expanded"}
%ul
%li
Cost
%span {{ variant.base_price | currency }}
%li
Admin fee
%span {{ variant.fees.admin | currency }}
%li
Sales fee
%span {{ variant.fees.sales | currency }}
%li
Packing fee
%span {{ variant.fees.packing | currency }}
%li
Transport fee
%span {{ variant.fees.transport | currency }}
%a{"ng-click" => "expanded = !expanded"} Price graph
\= {{ variant.price | currency }}