Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismatthieu committed Nov 8, 2011
1 parent 88f48e9 commit 2e0bca4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/controllers/products_controller.rb
Expand Up @@ -10,7 +10,7 @@ def index
@featured = Product.where("featured = true").first

@products = Product.paginate(:order => 'name',
:per_page => 10,
:per_page => 5,
:page => params[:page])


Expand Down
4 changes: 2 additions & 2 deletions app/views/products/index.html.erb
Expand Up @@ -3,7 +3,7 @@

<tr><td colspan="2"><hr/></td></tr>
<tr><td width="250"><%= link_to image_tag(@featured.logo, :width => "200", :height => "100", :align=>"left"), @featured %></td>
<td><img src="/assets/featured_tag_left.png" align="right"><b><%= @featured.name %></b><br/><%= raw(@featured.description) %><br/><%=link_to "Visit #{@featured.name}'s Site", @featured.website %>
<td><img src="/assets/featured_tag_left.png" align="right"><b><%= @featured.name %></b><br/><%= raw(@featured.description) %><br/><%=link_to "Learn more", @featured %>
<% if @admin %>
<br/>
<%= link_to 'Show', @featured %> |
Expand All @@ -18,7 +18,7 @@
<% @products.each do |product| %>
<% if !product.featured%>
<tr><td colspan="2"><br/></td></tr>
<tr><td width="250"><%= link_to image_tag(product.logo, :width => "200", :height => "100", :align=>"left"), product %></td><td><b><%= product.name %></b><br/><%= raw(product.description) %><br/><%=link_to "Visit #{product.name}'s Site", product.website %>
<tr><td width="250"><%= link_to image_tag(product.logo, :width => "200", :height => "100", :align=>"left"), product %></td><td><b><%= product.name %></b><br/><%= raw(product.description) %><br/><%=link_to "Learn more", product %>
<% if @admin %>
<br/>
<%= link_to 'Show', product %> |
Expand Down
8 changes: 6 additions & 2 deletions app/views/products/show.html.erb
@@ -1,9 +1,13 @@
<p id="notice"><%= notice %></p>
<br/>

<h1><%= @product.name %></h1>

<% if !@product.video.blank? %>
<center><iframe width="640" height="360" src="<%= @product.video.gsub("http://youtu.be/", "http://www.youtube.com/embed/") %>" frameborder="0" allowfullscreen></iframe></center>
<% end %>

<table>
<tr><td width="250"><%= image_tag @product.logo, :width => "200", :height => "100", :align=>"left"%></td><td><b><%= @product.name %></b><br/><%= raw(@product.description) %><br/><%=link_to "Visit #{@product.name}'s Site", @product.website %>
<tr><td width="250"><%= image_tag @product.logo, :width => "200", :height => "100", :align=>"left"%></td><td><br/><%= raw(@product.description) %><br/><%=link_to "Visit #{@product.name}'s Site", @product.website %>
<br/>

<a href="http://twitter.com/share?text=<%= @product.name %>&amp;url=http://tropoappstore.herokuapp.com/apps/<%=@product.id%>" class="twitter-share-button">Tweet</a>
Expand Down

0 comments on commit 2e0bca4

Please sign in to comment.