socialforge/app/views/stores/index.html.erb

68 lines
1.9 KiB
Plaintext
Raw Normal View History

2014-01-11 09:08:15 +08:00
<% content_for :top_field do%>
2014-01-17 15:05:50 +08:00
<%= render 'search_bar' %>
2014-01-11 09:08:15 +08:00
<% end %>
<div class="resource_sum">
2014-01-13 21:32:34 +08:00
<% @attach_array.each do |k|%>
2014-01-11 09:08:15 +08:00
<div class="line_block">
2014-01-13 20:46:27 +08:00
<p>
2014-01-14 16:18:48 +08:00
<%= @str_arr.shift %>
2014-01-13 20:46:27 +08:00
</p>
2014-03-14 17:29:45 +08:00
<div class="table1">
<div class='table_row1'>
<div class='table_cell1 filename1' style='text-align: center;'><%=l(:label_attachment)%></div>
<div class='table_cell1 filedown1'><%=l(:field_downloads)%></div>
<div class='table_cell1 downicon1'><%=l(:button_download)%></div>
</div>
</div>
<div class="table1">
<% k.each do |c1|%>
<div class="table_row1 <%= cycle 'odd', 'even' %>">
<div class="filename table_cell1 filename1" >
<%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
</div>
<div class="table_cell1 filedown1">
<%= c1.downloads %>
</div>
<div class="table_cell1 downicon1 filename download_icon" >
<%= link_to_attachment c1, {:download => true, :text => image_tag("/images/button/download.png", width: "22px", alt: l(:button_download)) }%>
</div>
</div>
<% end -%>
</div>
2014-01-11 09:08:15 +08:00
</div>
2014-03-14 17:29:45 +08:00
<% end; reset_cycle %>
2014-01-11 09:08:15 +08:00
</div>
2014-01-15 17:28:53 +08:00
<script type='text/javascript'>
2014-01-17 15:37:57 +08:00
function validate_required(field,alerttxt)
{
with (field)
{
if (value==null||value=="")
{alert(alerttxt);$.find('form').attr("data-submitted",'');return false}
else {return true}
}
}
function validate_form(thisform) {
with (thisform)
{
if (validate_required(name,"name must be filled out!")==false)
{name.focus();return false}
}
}
2014-01-15 17:28:53 +08:00
$(document).ready(function($) {
2014-01-17 09:10:15 +08:00
$('.download_icon').find("a").attr("target", "_blank");
2014-01-15 17:28:53 +08:00
$('.download_icon').each(function(){
$(this).mouseenter(function(event) {
$(this).find('img').attr("src", "/images/button/download_focus.png")
});
$(this).mouseleave(function(event) {
$(this).find('img').attr("src", "/images/button/download.png")
});
});
});
</script>