Commit aedd4dd5

mo khan <mo@mokhan.ca>
2013-07-01 19:36:44
remove the me_box
1 parent 558ee08
app/controllers/application_controller.rb
@@ -15,7 +15,7 @@ class ApplicationController < ActionController::Base
   end
 
   def load_categories
-    @categories = Rails.cache.fetch("categories") do
+    @categories = Rails.cache.fetch("categories-#{Category.count}") do
       Category.all
     end
   end
app/views/creations/_form.html.erb
@@ -11,13 +11,13 @@
 <%= form_for(@creation, :html => {:multipart => true, :class => "form-horizontal"}) do |f| %>
   <fieldset>
     <div class="control-group">
-      <%= f.label :name, "Creation name", :class => "control-label" %>
+      <%= f.label :name, :class => "control-label" %>
       <div class="controls">
         <%= f.text_field :name, :class => "input-xxlarge" %>
       </div>
     </div>
     <div class="control-group">
-      <%= f.label :watermark, "Brand each image", :class => "control-label" %>
+      <%= f.label :watermark, :class => "control-label" %>
       <div class="controls">
         <%= f.text_field :watermark, :class => "input-xlarge", :maxlength=> 30 %> on CakeSide.com
         <a class="tooltip-item" data-placement="right" rel="tooltip" href="#" data-original-title="Watermark your name or company on each uploaded image" data-animation="true"><i class="icon-question-sign"></i></a>
@@ -27,19 +27,12 @@
       <%= f.label :story, "Description", :class=> "control-label" %>
       <div class="controls">
         <%= f.text_area :story, :class =>"input-xxlarge", :rows => "3" %>
-        <p class="help-block">
-        Tell us the story or description about this creation.
-        </p>
       </div>
     </div>
     <div class="control-group">
-      <label class="control-label">Categories</label>
+      <label class="control-label">Category</label>
       <div class="controls">
         <%= select_tag :category_id, options_from_collection_for_select(@categories, "id", "name") %>
-        <p class="help-block">
-        <strong>Note:</strong> 
-        Help us categorize your creation by checking off one or more from the above list.
-        </p>
       </div>
     </div>
     <div class="control-group">
@@ -48,7 +41,7 @@
       <% if @creation.present? %>
          <input name="creation_tags" type="text" id="tags" value="<% @creation.tags.map(&:name).each { |item| %><%= item %>,<% } %>" class="input-xxlarge" autocomplete="off" />
          <p class="help-block">
-           <strong>Note:</strong> Help people find this creation by adding some keyword tags.
+           <strong>Note:</strong> Adding tags will help people discover your creation.
          </p>
       <% else %>
         <input name="creation_tags" type="text" id="tags" value="" class="input-xxlarge" autocomplete="off" />
@@ -59,7 +52,7 @@
       <div class="controls">
         <label class="checkbox">
           <%= f.check_box :is_restricted, :class =>"input-xxlarge" %>
-          This creation probably should not be shown to kids.
+          This cake is for adults only.
         </label>
       </div>
     </div>
app/views/creations/new.html.erb
@@ -1,10 +1,7 @@
 <% provide(:title, "Share my creation") -%>
 <div class="row">
-  <div class="span3">
-    <%= render "profiles/me_box" %>
-  </div>
-  <div class="span9">
-    <h1>Share a new creation <small>(Step 1 of 2)</small></h1>
+  <div class="span12">
+    <h1>Share creation <small>(Step 1 of 2)</small></h1>
     <hr />
     <%= render 'form' %>
   </div>
app/views/profiles/_me_box.html.erb
@@ -1,18 +0,0 @@
-<div class="thumbnail">
-  <%= avatar_for(@user) %>
-  <div class="caption">
-    <h5><%= @user.name %></h5>
-    <hr>
-    <p><%= @user.city %></p>
-    <% unless @user.website.blank? %>
-      <p><a href="<%= @user.website %>" target="_blank">Website</a></p>
-    <% end %>
-    <% unless @user.twitter.blank? %>
-      <p><a href="https://twitter.com/<%= @user.twitter %>" target="_blank" class="twitter-follow-button" data-show-count="false">Follow @<%= @user.twitter %></a></p>
-      <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
-    <% end %>
-    <% unless @user.facebook.blank? %>
-      <p><a  href="<%= @user.facebook %>" target="_blank"><%= image_tag "f_logo_16x16x32.png", :alt => "Like us on Facebook" %> Like on Facebook</a></p>
-    <% end %>
-  </div>
-</div>
app/views/profiles/show.html.erb
@@ -1,7 +1,24 @@
 <% provide(:title, "#{@user.name}") -%>
 <div class="row">
   <div class="span3">
-    <%= render "me_box" %>
+    <div class="thumbnail">
+      <%= avatar_for(@user) %>
+      <div class="caption">
+        <h5><%= @user.name %></h5>
+        <hr>
+        <p><%= @user.city %></p>
+        <% unless @user.website.blank? %>
+          <p><a href="<%= @user.website %>" target="_blank">Website</a></p>
+        <% end %>
+        <% unless @user.twitter.blank? %>
+          <p><a href="https://twitter.com/<%= @user.twitter %>" target="_blank" class="twitter-follow-button" data-show-count="false">Follow @<%= @user.twitter %></a></p>
+          <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
+        <% end %>
+        <% unless @user.facebook.blank? %>
+          <p><a  href="<%= @user.facebook %>" target="_blank"><%= image_tag "f_logo_16x16x32.png", :alt => "Like us on Facebook" %> Like on Facebook</a></p>
+        <% end %>
+      </div>
+    </div>
   </div>
   <div class="span9">
     <h1><%= @user.name %> <small>A member since <%= @user.created_at.to_s :foomat %>, with <%= @user.creations.length %> creations.</small> </h1>
app/views/tutorials/_form.html.erb
@@ -8,7 +8,7 @@ $(function(){
 </script>
 <% end %>
 <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/flick/jquery-ui.css">
-<div class="span9">
+<div class="span12">
   <%= form_for(@tutorial, :html => {:class => "form-horizontal"}) do |f| %>
     <fieldset>
       <div class="control-group">
app/views/tutorials/new.html.erb
@@ -5,8 +5,5 @@
   </div>
 </div>
 <div class="row">
-  <div class="span3">
-    <%= render "profiles/me_box" %>
-  </div>
   <%= render 'form' %>
 </div>