diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 504bfa9569..8653131b5a 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -5,4 +5,8 @@ class GroupsController < BaseController def index @groups = EnterpriseGroup.on_front_page.by_position end + + def show + @group = EnterpriseGroup.find params[:id] + end end diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml new file mode 100644 index 0000000000..1d0cf8b21b --- /dev/null +++ b/app/views/groups/show.html.haml @@ -0,0 +1,42 @@ +%div{style: "padding: 1.5em;"} + %img{"src" => @group.promo_image, style: "display: block"} + %div{style: "margin-bottom: 1em"} + %img{"src" => @group.logo} + %div{style: "display: inline-block; vertical-align: middle"} + %h2{style: "margin-bottom: 0em"}= @group.name + %div= @group.description + + #div{"ng-controller" => "TabsCtrl", style: "clear: both"} + %tabset + %tab{heading: 'Map', + active: "active(\'\')", + select: "select(\'\')"} + %p TODO: show a map of enterprises + %tab{heading: 'About us', + active: "active(\'hi\')", + select: "select(\'hi\')"} + %h3 About us + %p= @group.long_description + %tab{heading: 'Our producers', + active: "active(\'producers\')", + select: "select(\'producers\')"} + %h3 Our producers + %ul + - @group.enterprises.is_primary_producer.each do |enterprise| + %li= link_to enterprise.name, enterprise + %tab{heading: 'Our hubs', + active: "active(\'hubs\')", + select: "select(\'hubs\')"} + %h3 Our producers + %ul + - @group.enterprises.is_distributor.each do |enterprise| + %li= link_to enterprise.name, enterprise + %tab{heading: 'Contact us', + active: "active(\'contact\')", + select: "select(\'contact\')"} + %h3 Contact us + %p TODO: provide contact information + + %p TODO: show the group's contact footer + += render partial: "shared/footer"