Patching up some regressions with the tabs

This commit is contained in:
Will Marshall
2014-06-20 11:33:30 +10:00
parent b0d88c071a
commit 17521516b4
9 changed files with 10 additions and 31 deletions

View File

@@ -0,0 +1,2 @@
Darkswarm.controller "AboutUsCtrl", ($scope, CurrentHub) ->
$scope.CurrentHub = CurrentHub

View File

@@ -1,5 +1,2 @@
Darkswarm.factory 'CurrentHub', ($location, $filter, currentHub) ->
new class CurrentHub
constructor: ->
@[k] = v for k, v of currentHub
Darkswarm.factory 'CurrentHub', ($location, $filter, currentHub, Enterprises) ->
Enterprises.enterprises_by_id[currentHub.id]

View File

@@ -1,6 +1,4 @@
#hubs.hubs{"ng-controller" => "HubsCtrl"}
= inject_enterprises
.row
.small-12.columns.text-center
%h1 Ready to shop?

View File

@@ -1,8 +1,2 @@
object current_distributor
attributes :name, :id
if current_distributor
child suppliers: :producers do
extends "json/producer"
end
end
attributes :id

View File

@@ -25,6 +25,7 @@
= inject_json "currentOrder", "current_order"
= inject_json "user", "current_user"
= inject_json "railsFlash", "flash"
= inject_enterprises
.off-canvas-wrap{offcanvas: true}
.inner-wrap

View File

@@ -1,5 +1,3 @@
= inject_enterprises
.map-container{"fill-vertical" => true}
%map{"ng-controller" => "MapCtrl"}
%google-map{options: "map.additional_options", center: "map.center", zoom: "map.zoom", styles: "map.styles", draggable: "true"}

View File

@@ -1,6 +1,4 @@
.producers{"ng-controller" => "ProducersCtrl"}
= inject_enterprises
.row
.small-12.columns.text-center.pad-top
%h1 Producers

View File

@@ -1,9 +1,7 @@
%products.small-12.columns{"ng-controller" => "ProductsCtrl", "ng-show" => "order_cycle.order_cycle_id != null",
"infinite-scroll" => "incrementLimit()", "infinite-scroll-distance" => "1"}
= inject_enterprises
= form_for :order, :url => populate_orders_path, html: {:class => "custom"} do
.row
.small-6.columns
%input#search.text{"ng-model" => "query",

View File

@@ -1,16 +1,9 @@
.content#about
.content#about{"ng-controller" => "AboutUsCtrl", bindonce: true}
.row
.small-12.large-6.columns
%img.hero-img-small{"ng-src" => "{{current_distributor.promo_image}}"}
%p.small-text= current_distributor.long_description.andand.html_safe
%img.hero-img-small{"bo-src" => "CurrentHub.promo_image"}
%p.small-text{"bo-html" => "CurrentHub.long_description"}
.small-12.large-3.columns
 
.small-12.large-3.columns
%img{"bo-src" => "current_distributor.logo", "bo-if" => "current_distributor.logo"}
-#- if current_distributor.promo_image.exists?
-#.small-12.large-3.columns
-#%img.about.right{src: current_distributor.promo_image.url(:large)}
%img{"bo-src" => "CurrentHub.logo", "bo-if" => "CurrentHub.logo"}