Merge pull request #177 from Skud/contact

added contact link to footer
This commit is contained in:
Cesy
2013-04-30 00:25:57 -07:00
6 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
class AboutController < ApplicationController
end

View File

@@ -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'

View File

@@ -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')

View File

@@ -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

View File

@@ -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

View File

@@ -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')