Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: xocs/refresh_teesside
base: 350b92251b
...
head fork: xocs/refresh_teesside
compare: e08d753171
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
27 app/controllers/events_controller.rb
@@ -2,8 +2,31 @@ class EventsController < ApplicationController
def index
@event = Event.first
@atten = @event.attendence
- @drinks = @event.drinks
-
+ @drinks = @event.drinks
+ end
+
+ def facebook
+ redirect_to "https://www.facebook.com/refreshteesside"
+ end
+
+ def google
+ redirect_to "http://groups.google.com/group/refresh-teesside"
+ end
+
+ def linkedin
+ redirect_to "http://www.linkedin.com/e/vgh/780867/"
+ end
+
+ def twitter
+ redirect_to "https://twitter.com/#!/refreshteesside"
+ end
+
+ def lastfm
+ redirect_to "http://www.last.fm/group/Refresh+Teesside"
+ end
+
+ def flickr
+ redirect_to "http://www.flickr.com/groups/refreshteesside/"
end
end
View
13 app/views/layouts/_analytics.html.erb
@@ -0,0 +1,13 @@
+<script type="text/javascript">
+
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-28352951-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+
+</script>
View
13 app/views/layouts/application.html.haml
@@ -3,6 +3,7 @@
%head
%title Refresh Teesside
= stylesheet_link_tag 'application'
+ =render :partial => 'layouts/analytics'
%body
.header
@@ -18,15 +19,15 @@
%h2.figure= @drinks
.vert-divider
%nav.social
- =link_to image_tag("group.png", :title => "Forum"), "http://groups.google.com/group/refresh-teesside", :target => "_blank"
- =link_to image_tag("twitter.png", :title => "Twitter"), "https://twitter.com/#!/refreshteesside", :target => "_blank"
- =link_to image_tag("fb.png", :title => "Facebook"), "https://www.facebook.com/refreshteesside", :target => "_blank"
+ =link_to image_tag("group.png", :title => "Forum"), google_path, :target => "_blank"
+ =link_to image_tag("twitter.png", :title => "Twitter"), twitter_path, :target => "_blank"
+ =link_to image_tag("fb.png", :title => "Facebook"), facebook_path, :target => "_blank"
.main
.container
= yield
.bottom
.container
%nav
- %li.group= link_to"Refresh Forum", "http://groups.google.com/group/refresh-teesside", :target => "_blank"
- %li.twitter= link_to "Follow Refresh", "https://twitter.com/#!/refreshteesside", :target => "_blank"
- %li.fb= link_to "Facebook Group", "https://twitter.com/#!/refreshteesside", :target => "_blank"
+ %li.group= link_to"Refresh Forum", google_path, :target => "_blank"
+ %li.twitter= link_to "Follow Refresh", twitter_path, :target => "_blank"
+ %li.fb= link_to "Facebook Group", facebook_path, :target => "_blank"
View
2  config/database.yml
@@ -2,6 +2,6 @@ development:
adapter: postgresql
database: refresh_development
username: postgres
- password:
+ password: chris
host: localhost
port: 5432
View
9 config/routes.rb
@@ -55,6 +55,15 @@
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
root :to => 'events#index'
+ match 'facebook' => 'events#facebook'
+ match 'google-group' => 'events#google', :as => "google"
+ match 'linkedin' => 'events#linkedin'
+ match 'twitter' => 'events#twitter'
+ match 'lastfm' => 'events#lastfm'
+ match 'flickr' => 'events#flickr'
+
+
+

No commit comments for this range

Something went wrong with that request. Please try again.