|
|
|
@ -2,12 +2,7 @@
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
<% content_for :top_field do%>
|
|
|
|
|
<div style="margin: 10px 5%;">
|
|
|
|
|
<%= form_tag( search_stores_path, method: 'post') do %>
|
|
|
|
|
<%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字', :value => params[:name] , :class => 'blueinputbar', :required => true %>
|
|
|
|
|
<%= submit_tag l(:label_search), :class => "enterprise"%>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<%= render 'search_bar' %>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% @searched_attach.each do |result| %>
|
|
|
|
@ -19,7 +14,7 @@
|
|
|
|
|
<div class="cb">
|
|
|
|
|
<span style=""><%= result.filename %></span>
|
|
|
|
|
<span style="margin-left: 4px;">
|
|
|
|
|
<%= link_to_attachment result, {:text => image_tag("/images/button/dl.png", width: "70px", alt: l(:button_download), :class => 'download_icon')}%>
|
|
|
|
|
<%= link_to_attachment result, {:download => true, :text => image_tag("/images/button/dl.png", width: "70px", alt: l(:button_download), :class => 'download_icon')}%>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<%= result.description %>
|
|
|
|
@ -27,7 +22,7 @@
|
|
|
|
|
<span class="gray blue-color">
|
|
|
|
|
下载:<%= result.downloads%>|
|
|
|
|
|
大小:<%= number_to_human_size(result.filesize) %>|
|
|
|
|
|
共享者:<a class="gray" ><%= link_to result.author, user_path(result.author), target: "_blank"%></a>|
|
|
|
|
|
共享者:<a class="gray" ><%= link_to result.author, user_path(result.author), target: "_blank" unless result.author.blank? %></a>|
|
|
|
|
|
上传时间:<%= format_time(result.created_on) %>
|
|
|
|
|
</span>
|
|
|
|
|
<div style="display: none"></div>
|
|
|
|
@ -64,7 +59,24 @@
|
|
|
|
|
return this.each(function() {
|
|
|
|
|
innerHighlight(this, pat.toUpperCase());
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
function validate_required(field,alerttxt)
|
|
|
|
|
{
|
|
|
|
|
with (field)
|
|
|
|
|
{
|
|
|
|
|
if (value==null||value=="")
|
|
|
|
|
{alert(alerttxt);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}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$(document).ready(function($) {
|
|
|
|
|
$('.cb span').highlight('<%=params[:name]%>');
|
|
|
|
|
|
|
|
|
|