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

51 lines
1.7 KiB
Plaintext
Raw Normal View History

2014-01-11 09:08:15 +08:00
<% content_for :top_field do%>
2014-01-15 16:02:41 +08:00
<div style="margin: 10px 5%;vertical-align: bottom;">
<%= form_tag( search_stores_path, method: 'post') do %>
2014-01-16 09:47:50 +08:00
<%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字', :class => 'blueinputbar', :required => true %>
2014-01-15 20:38:58 +08:00
<%= submit_tag l(:label_search), :class => "enterprise"%>
2014-01-11 09:08:15 +08:00
<% end %>
</div>
<% 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-01-11 09:08:15 +08:00
<table style="width: 100%">
<thead>
<tr>
2014-01-15 16:02:41 +08:00
<td><%=l(:label_attachment)%></td>
<td><%=l(:field_downloads)%></td>
<td><%=l(:button_download)%></td>
2014-01-11 09:08:15 +08:00
</tr>
</thead>
<tbody>
2014-01-13 21:32:34 +08:00
<% k.each do |c1|%>
2014-01-11 09:08:15 +08:00
<tr class="<%= cycle 'odd', 'even' %>">
2014-01-14 15:01:11 +08:00
<td class="filename" style="width:62%;"><%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %> </td>
2014-01-15 16:02:41 +08:00
<td style="width:19%; text-align: center;"><%= c1.downloads %> </td>
2014-01-15 17:28:53 +08:00
<td class="filename download_icon" style="width:19%; text-align: center;">
2014-01-17 09:10:15 +08:00
<%= link_to_attachment c1, {:text => image_tag("/images/button/download.png", width: "22px", alt: l(:button_download)) }%>
2014-01-15 17:28:53 +08:00
</td>
2014-01-11 09:08:15 +08:00
</tr>
<% end %>
</tbody>
</table>
</div>
<% reset_cycle; end %>
</div>
2014-01-15 17:28:53 +08:00
<script type='text/javascript'>
$(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>