Commit 9b615a9f

mo k <m@mokhan.ca>
2011-11-25 08:11:35
add facebook like link, and follow mocheen on twitter link, just for fun.
1 parent 1e629e2
Changed files (4)
app/views/creations/show.html.erb
@@ -23,7 +23,10 @@
 <div class="clear"></div>
 
 <div class="grid_9">
-  <p> submitted on: <%= @creation.created_at %>
+  <div class="fright">
+    <iframe src="http://www.facebook.com/plugins/like.php?href=<%= request.url %>" scrolling="no" frameborder="0" style="border:none; width:350px; height:30px"></iframe>
+  </div>
+  <p> submitted on: <%= @creation.created_at.to_s :foomat %>
     <% @creation.categories.each do |category| %>
       <a href="/categories/<%= category.slug %>"><%= category.name %></a>
     <% end %> 
app/views/profiles/show.html.erb
@@ -8,7 +8,7 @@
 
 <div class="grid_9 alpha omega">
     <h1><%= @profile.name %></h1>
-    <p><em>A member since <%= @profile.created_at %>, with <%= @profile.creations.length %> creations.</em></p>
+    <p><em>A member since <%= @profile.created_at.to_s :foomat %>, with <%= @profile.creations.length %> creations.</em></p>
 </div>
 <div class="clear"></div>
 <%= render "shared/creation_thumbs" %>
app/views/shared/_their_profile_sidebar.html.erb
@@ -4,3 +4,8 @@
   <p><%= @profile.name %></p>
 </div><!-- /.summary -->
 
+<% if @profile.email.eql? "mo.khan@gmail.com" %>
+<a href="https://twitter.com/mocheen" class="twitter-follow-button" data-show-count="false">Follow @mocheen</a>
+<script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
+<% end %>
+
config/environment.rb
@@ -4,4 +4,4 @@ require File.expand_path('../application', __FILE__)
 # Initialize the rails application
 Cake::Application.initialize!
 Date::DATE_FORMATS[:foomat] = "%d/%m/%Y"
-Time::DATE_FORMATS[:foomat] = "%B %d %Y"
+Time::DATE_FORMATS[:foomat] = "%B. %d, %Y"