diff --git a/app/serializers/api/enterprise_serializer.rb b/app/serializers/api/enterprise_serializer.rb index 77627efffe..4b818f6d17 100644 --- a/app/serializers/api/enterprise_serializer.rb +++ b/app/serializers/api/enterprise_serializer.rb @@ -34,7 +34,7 @@ class Api::UncachedEnterpriseSerializer < ActiveModel::Serializer # TODO: Remove this when flags on enterprises are switched over def has_shopfront - object.type != 'profile' + object.is_distributor && object.type != 'profile' end # Map svg icons. @@ -63,7 +63,7 @@ class Api::UncachedEnterpriseSerializer < ActiveModel::Serializer icon_fonts[object.enterprise_category] end - # Choose producser page icon font - yes, sadly its got to be different. + # Choose producer page icon font - yes, sadly its got to be different. # This duplicates some code but covers the producer page edge case where # producer-hub has a producer icon without needing to duplicate the category logic in angular. def producer_icon_font diff --git a/app/views/home/_skinny.html.haml b/app/views/home/_skinny.html.haml index 292ece80a0..051a2af274 100644 --- a/app/views/home/_skinny.html.haml +++ b/app/views/home/_skinny.html.haml @@ -1,8 +1,7 @@ -.row.active_table_row{"ng-click" => "toggle()", "ng-class" => "{'closed' : !open()}", bindonce: true} +.row.active_table_row{"ng-click" => "toggle()", "ng-class" => "{'closed' : !open(), 'has_shopfront' : producer.has_shopfront}", bindonce: true} .columns.small-12.medium-6.large-5.skinny-head %a.hub{"bo-href" => "hub.path", "ng-class" => "{primary: hub.active, secondary: !hub.active}", "ofn-empties-cart" => "hub"} - %i{'ng-class'=> "hub.icon_font" } - / %i.ofn-i_063-hub + %i{ng: {class: "hub.icon_font" }} %span.margin-top.hub-name-listing {{ hub.name | truncate:40}} .columns.small-4.medium-2.large-2 %span.margin-top {{ hub.address.city }} diff --git a/app/views/producers/_skinny.html.haml b/app/views/producers/_skinny.html.haml index a5d6b790fc..2f3326f7a0 100644 --- a/app/views/producers/_skinny.html.haml +++ b/app/views/producers/_skinny.html.haml @@ -1,9 +1,11 @@ -.row.active_table_row{"ng-click" => "toggle()", "ng-class" => "{'closed' : !open()}"} +.row.active_table_row{"ng-click" => "toggle()", "ng-class" => "{'closed' : !open(), 'has_shopfront' : producer.has_shopfront}"} .columns.small-12.medium-4.large-4.skinny-head / This needs logic to show profile only icon when available %i.ofn-i_060-producer-reversed - %i.ofn-i_059-producer + %i{ng: {class: "producer.producer_icon_font"}} %span.margin-top - %strong {{ producer.name }} + %strong + %a{"bo-if" => "producer.has_shopfront" } {{ producer.path }} + .columns.small-6.medium-3.large-3 %span.margin-top {{ producer.address.city }} .columns.small-4.medium-3.large-4