2012-11-28 09:27:23 +00:00
|
|
|
|
2012-12-05 05:46:10 +00:00
|
|
|
|
|
|
|
<div class="wrapper">
|
|
|
|
<div id="toolbar">
|
|
|
|
<div class="filter fn">
|
|
|
|
<span class="label">Price</span>
|
|
|
|
<div class="drop-menu ui">
|
|
|
|
<a href="" class="controller">
|
|
|
|
<span class="option-default">All</span>
|
|
|
|
<span class="arrow down"></span>
|
|
|
|
</a>
|
|
|
|
<ul class="option-list">
|
|
|
|
<li><a class="option-item" href="">All</a></li>
|
|
|
|
<li><a class="option-item" href="">15,000</a></li>
|
|
|
|
<li><a class="option-item" href="">20,000</a></li>
|
|
|
|
<li><a class="option-item" href="">25,000</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-01-06 06:47:44 +00:00
|
|
|
|
2012-12-05 05:46:10 +00:00
|
|
|
<div class="filter fn">
|
|
|
|
<span class="label">Category</span>
|
|
|
|
<div class="drop-menu ui">
|
|
|
|
<a href="" class="controller">
|
|
|
|
<span class="option-default">All</span>
|
|
|
|
<span class="arrow down"></span>
|
|
|
|
</a>
|
|
|
|
<ul class="option-list">
|
|
|
|
<li><a class="option-item" href="">All</a></li>
|
|
|
|
<li><a class="option-item" href="">National Taiwan University</a></li>
|
|
|
|
<li><a class="option-item" href="">Category 1</a></li>
|
|
|
|
<li><a class="option-item" href="">Category 2</a></li>
|
|
|
|
<li><a class="option-item" href="">Category 3</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="filter fn">
|
|
|
|
<span class="label">Sort by</span>
|
|
|
|
<div class="drop-menu ui">
|
|
|
|
<a href="" class="controller">
|
|
|
|
<span class="option-default">Date</span>
|
|
|
|
<span class="arrow down"></span>
|
2012-11-28 09:27:23 +00:00
|
|
|
</a>
|
2012-12-05 05:46:10 +00:00
|
|
|
<ul class="option-list">
|
|
|
|
<li><a class="option-item" href="">Date</a></li>
|
|
|
|
<li><a class="option-item" href="">Popular</a></li>
|
|
|
|
<li><a class="option-item" href="">Recent Upload</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="item-list">
|
|
|
|
<ul class="clearfix">
|
2012-12-06 15:20:27 +00:00
|
|
|
<% @templates.each do |template| %>
|
|
|
|
<li>
|
2014-01-06 06:47:44 +00:00
|
|
|
<a href="<%= admin_template_store_template_path(template["_slugs"][0]) %>">
|
|
|
|
<img src="<%= @store + template['preview']['preview']['thumb']['url'] %>" class="item-thumb" />
|
|
|
|
<span class="item-info">
|
2012-12-06 15:20:27 +00:00
|
|
|
<b class="item-name"><%= template['title'] %></b>
|
|
|
|
<span class="item-price">Free</span>
|
|
|
|
</span>
|
2014-01-06 06:47:44 +00:00
|
|
|
</a>
|
|
|
|
<%= link_to "Download", "javascript:void(0);", "data-url" => template['template']['template']['url'], :class=> 'btn btn-primary download-link' %>
|
2012-12-06 15:20:27 +00:00
|
|
|
</li>
|
|
|
|
<% end %>
|
2014-01-06 06:47:44 +00:00
|
|
|
|
2012-12-05 05:46:10 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
2012-11-28 09:27:23 +00:00
|
|
|
</div>
|
2012-11-28 18:02:37 +00:00
|
|
|
|
2014-01-06 06:47:44 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
(function(){
|
|
|
|
$("a.download-link").on(clickEvent,function(){
|
|
|
|
var el = $(this),
|
|
|
|
downloadurl = $(this).data("url");
|
2012-11-28 18:02:37 +00:00
|
|
|
|
2014-01-06 06:47:44 +00:00
|
|
|
el.removeClass("btn-primary").addClass("btn-info").text("Installing").attr('disabled',"disabled");
|
|
|
|
$.ajax({
|
|
|
|
url : "<%= admin_template_store_download_theme_path %>",
|
|
|
|
data : {"url" : downloadurl},
|
|
|
|
dataType : "json",
|
|
|
|
type : "post",
|
|
|
|
success : function(data){
|
|
|
|
if(data.success){
|
|
|
|
el.removeClass('btn-info').addClass('btn-success').text("Installed");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})()
|
|
|
|
</script>
|