Redirect to designs after buying template

Randomise buy counts
This commit is contained in:
chris 2012-12-07 09:07:49 +08:00
parent a48690d4bf
commit c74ead8318
3 changed files with 6 additions and 5 deletions

View File

@ -18,6 +18,7 @@ class Admin::PurchasesController < ApplicationController
unzip_design(temp_file, zip_name)
temp_file.close
temp_file.unlink
redirect_to admin_designs_url
end
def download

View File

@ -25,7 +25,7 @@
<h2 class="item-name">Module Name</h2>
<a id="download" href="">free download</a>
<ul class="item-extra-info">
<li><span class="title">downloads</span><span class="count"><%= Random.rand(20000) %></span></li>
<li><span class="title">downloads</span><span class="count"><%= Random.new.rand(10..100) %></span></li>
</ul>
<h3>who use it?</h3>
<ul class="user-list">

View File

@ -25,8 +25,8 @@
<h2 class="item-name"><%= @template['title'] %></h2>
<%= link_to 'free download', buy_template_admin_purchase_path(@template['id']), :id => "download" %>
<ul class="item-extra-info">
<li><span class="title">views</span><span class="count">15,241</span></li>
<li><span class="title">color</span><span class="color-tag green"></span></li>
<li><span class="title">views</span><span class="count"><%= Random.new.rand(10..100) %></span></li>
<!-- <li><span class="title">color</span><span class="color-tag green"></span></li> -->
</ul>
</div>
</div>
@ -56,8 +56,8 @@
<h2 class="item-name">Template Name</h2>
<a id="download" href="">free download</a>
<ul class="item-extra-info">
<li><span class="title">views</span><span class="count">15,241</span></li>
<li><span class="title">color</span><span class="color-tag green"></span></li>
<li><span class="title">views</span><span class="count"><%= Random.new.rand(10..100) %></span></li>
<!-- <li><span class="title">color</span><span class="color-tag green"></span></li> -->
</ul>
</div>
</div>