diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb new file mode 100644 index 000000000..f1549add2 --- /dev/null +++ b/app/controllers/about_controller.rb @@ -0,0 +1,2 @@ +class AboutController < ApplicationController +end diff --git a/app/views/about/contact.html.haml b/app/views/about/contact.html.haml new file mode 100644 index 000000000..c4de94d5c --- /dev/null +++ b/app/views/about/contact.html.haml @@ -0,0 +1,17 @@ +-content_for :title, 'Contact' + +%dl + %dt General contact email + %dd= link_to 'info@growstuff.org', 'mailto:info@growstuff.org' +%dl + %dt + Support and accounts enquiries (not covered by the + =succeed ")" do + =link_to 'FAQ', url_for(:controller => '/support') + %dd= link_to 'support@growstuff.org', 'mailto:support@growstuff.org' +%dl + %dt Media/Press enquiries + %dd= link_to 'media@growstuff.org', 'mailto:media@growstuff.org' +%dl + %dt Twitter + %dd= link_to '@Growstuff', 'http:/twitter.com/Growstuff' diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 9ca101d7a..88d130a1e 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -4,6 +4,7 @@ .container %ul.nav %li= link_to "About", "http://wiki.growstuff.org" + %li= link_to "Contact", url_for(:controller => '/about', :action => 'contact') %li= link_to "Terms of Service", url_for(:controller => '/policy', :action => 'tos') %li= link_to "Privacy Policy", url_for(:controller => %'/policy', :action => 'privacy') %li= link_to "Community Guidelines", url_for(:controller => '/policy', :action => 'community') diff --git a/config/routes.rb b/config/routes.rb index 4373efb3b..cf757e9af 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -80,5 +80,7 @@ Growstuff::Application.routes.draw do match '/policy/:action' => 'policy#:action' match '/support' => 'support#index' match '/support/:action' => 'support#:action' + match '/about' => 'about#index' + match '/about/:action' => 'about#:action' end diff --git a/spec/views/about/contact_spec.rb b/spec/views/about/contact_spec.rb new file mode 100644 index 000000000..85d232126 --- /dev/null +++ b/spec/views/about/contact_spec.rb @@ -0,0 +1,12 @@ +require 'spec_helper' + +describe 'about/contact.html.haml', :type => "view" do + before(:each) do + render + end + + it 'should show support faq' do + render + rendered.should contain 'General contact email' + end +end diff --git a/spec/views/layouts/_footer_spec.rb b/spec/views/layouts/_footer_spec.rb index a746f2e70..c3dc3a9b7 100644 --- a/spec/views/layouts/_footer_spec.rb +++ b/spec/views/layouts/_footer_spec.rb @@ -8,6 +8,7 @@ describe 'layouts/_footer.html.haml', :type => "view" do it 'should have links in footer' do rendered.should contain 'About' + rendered.should contain 'Contact' assert_select("a[href=/policy/tos]", 'Terms of Service') assert_select("a[href=/policy/privacy]", 'Privacy Policy') assert_select("a[href=/policy/community]", 'Community Guidelines')