From 60ac3f29a5ff45e73981f97a488d7f0513525cb5 Mon Sep 17 00:00:00 2001 From: summerscope Date: Fri, 5 Sep 2014 16:38:05 +1000 Subject: [PATCH] Producers page WIP --- app/views/producers/_fat.html.haml | 42 +++++++++++++++++++-------- app/views/producers/_skinny.html.haml | 3 +- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/app/views/producers/_fat.html.haml b/app/views/producers/_fat.html.haml index 4cbcc431fe..22e7dc4589 100644 --- a/app/views/producers/_fat.html.haml +++ b/app/views/producers/_fat.html.haml @@ -1,12 +1,12 @@ .row.active_table_row{"ng-show" => "open()", "ng-click" => "toggle()", "ng-class" => "{'open' : !ofn-i_032-closed-sign()}"} + .columns.small-12.medium-4.large-4.fat - %div{"ng-if" => "producer.supplied_taxons"} - %label Shop for - %p.trans-sentence - %span.fat-taxons{"ng-repeat" => "taxon in producer.supplied_taxons"} - %render-svg{path: "{{taxon.icon}}"} - {{taxon.name}} - %div.show-for-medium-up{"ng-if" => "producer.supplied_taxons.length==0"} + / No long description available because it spits out HTML formatting producer.long_description + %div{"bo-if" => "producer.long_description"} + %label About us + %p.text-small + {{ producer.long_description }} + %div.show-for-medium-up{"bo-if" => "!producer.description"}   .columns.small-12.medium-3.large-3.fat @@ -16,13 +16,31 @@   .columns.small-12.medium-5.large-5.fat - %div{"bo-if" => "producer.description"} - %label About us - %p.text-small - {{ producer.description }} - %div.show-for-medium-up{"bo-if" => "!producer.description"} + %div{"ng-if" => "producer.supplied_taxons"} + %label Shop for + %p.trans-sentence + %span.fat-taxons{"ng-repeat" => "taxon in producer.supplied_taxons"} + %render-svg{path: "{{taxon.icon}}"} + {{taxon.name}} + %div.show-for-medium-up{"ng-if" => "producer.supplied_taxons.length==0"}   + %div{"ng-if" => "producer.email || producer.website || producer.phone"} + %label Contact + %p{"ng-if" => "producer.phone"} + {{ enterprise.phone }} + + %p.word-wrap{"ng-if" => "producer.email"} + %a{"ng-href" => "{{producer.email | stripUrl}}", target: "_blank", mailto: true} + %span.email + {{ producer.email | stripUrl }} + + %p.word-wrap{"ng-if" => "producer.website"} + %a{"ng-href" => "http://{{producer.website | stripUrl}}", target: "_blank" } + {{ producer.website | stripUrl }} + + + .row.active_table_row{"ng-show" => "open()", "bo-if" => "producer.hubs"} .columns.small-12 .row diff --git a/app/views/producers/_skinny.html.haml b/app/views/producers/_skinny.html.haml index e1f26f0304..beded1a14b 100644 --- a/app/views/producers/_skinny.html.haml +++ b/app/views/producers/_skinny.html.haml @@ -1,6 +1,7 @@ .row.active_table_row{"ng-click" => "toggle()", "ng-class" => "{'closed' : !open()}"} .columns.small-12.medium-4.large-4.skinny-head - %i.ofn-i_036-producers + / This needs logic to show profile only icon when available %i.ofn-i_060-producer-reversed + %i.ofn-i_059-producer %strong {{ producer.name }} .columns.small-6.medium-3.large-3 {{ producer.address.city }}