This commit is contained in:
yanxd 2014-01-15 16:02:41 +08:00
parent 45f8b15083
commit b825d2b7b5
3 changed files with 166 additions and 10 deletions

View File

@ -96,7 +96,7 @@
<% end -%>
<% container.attachments.each do |file| %>
<tr class="file <%= cycle("odd", "even") %>">
<td class="filename" style="font-size: 13px; max-width: 240px; "><%= link_to_attachment file, :download => true, :title => file.description, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %></td>
<td class="filename" style="font-size: 13px; max-width: 240px; "><%= link_to_attachment file, :download => true, :title => file.filename+"\n"+file.description, :style => "width: 230px; overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" %></td>
<td class="created_on"><%= format_time(file.created_on) %></td>
<td class="filesize"><%= number_to_human_size(file.filesize) %></td>
<td class="downloads"><%= file.downloads %></td>

View File

@ -45,6 +45,7 @@
}
.line_block table thead tr{
/*background-color: #d1d1d1;*/
text-align: center;
}
.line_block table td{
height: 2em;
@ -59,13 +60,59 @@
/*.filename a:after {
content: "...";
}*/
.blueinputbar{
-o-transform-origin: 138px 46.5px;
-o-transition: background 0.2s cubic-bezier(0, 0, 1, 1);
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-webkit-border-radius: 3px;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
-webkit-box-shadow: rgba(0, 0, 0, 0.047) 0px 1px 3px 0px inset, rgba(82, 168, 236, 0.600) 0px 0px 8px 0px;
-webkit-transform-origin: 138px 46.5px;
-webkit-transition: background 0.2s cubic-bezier(0, 0, 1, 1);
-webkit-transition-delay: 0;
-webkit-transition-duration: 0.2s;
-webkit-transition-property: background;
-webkit-transition-timing-function: cubic-bezier(0, 0, 1, 1);
align-content: stretch;
align-items: stretch;
align-self: stretch;
background: #FFFFFF;
border-bottom: 1px solid #56B4EF;
border-left: 1px solid #56B4EF;
border-radius: 3px;
border-right: 1px solid #56B4EF;
border-top: 1px solid #56B4EF;
color: #333333;
justify-content: flex-start;
margin: 0px;
order: 0;
outline: #333333 0px;
overflow-wrap: break-word;
resize: none;
text-shadow: none;
transform-origin: 138px 46.5px;
transition: background 0.2s cubic-bezier(0, 0, 1, 1);
unicode-bidi: embed;
vertical-align: top;
word-wrap: break-word;
}
input.blueinputbar:focus {
box-shadow: rgba(0, 0, 0, 0.047) 0px 1px 3px 0px inset, rgba(82, 168, 236, 0.600) 0px 0px 5px 0px;
border-bottom: 1px solid #56B4EF;
border-left: 1px solid #56B4EF;
border-radius: 3px;
border-right: 1px solid #56B4EF;
border-top: 1px solid #56B4EF;
}
</style>
<% content_for :top_field do%>
<div style="margin: 10px 5%;">
<div style="margin: 10px 5%;vertical-align: bottom;">
<%= form_tag( search_stores_path, method: 'get') do %>
<%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字' %>
<%= submit_tag l(:label_search), class:"whiteButton m3p10 h30"%>
<%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字', :class => 'blueinputbar' %>
<%= submit_tag l(:label_search), class:"whiteButton", style: "padding: 0px 10px;"%>
<% end %>
</div>
<% end %>
@ -79,17 +126,17 @@
<table style="width: 100%">
<thead>
<tr>
<td>文件名</td>
<td>下载次数</td>
<td>下载</td>
<td><%=l(:label_attachment)%></td>
<td><%=l(:field_downloads)%></td>
<td><%=l(:button_download)%></td>
</tr>
</thead>
<tbody>
<% k.each do |c1|%>
<tr class="<%= cycle 'odd', 'even' %>">
<td class="filename" style="width:62%;"><%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %> </td>
<td style="width:19%;"><%= c1.downloads %> </td>
<td class="filename" style="width:19%;"><%= link_to_attachment c1, {:text => "下载"}%></td>
<td style="width:19%; text-align: center;"><%= c1.downloads %> </td>
<td class="filename" style="width:19%; text-align: center;"><%= link_to_attachment c1, {:text => "下载"}%></td>
</tr>
<% end %>
</tbody>

View File

@ -1,7 +1,116 @@
<style type="text/css">
#main *{
/*border: 1px solid #eeeeee;*/
}
#content {
max-width: 100%;
}
#top_field {
max-width: 100%;
margin: 20px auto;
}
.line_block{
display: inline-block;
width: 49%;
margin: 10px auto;
vertical-align: top;
padding: 0px 2%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-box-sizing: border-box;
}
.resource_sum{
height: auto;
}
.line_block p{
margin: 1em 0px auto;
/*background: linear-gradient(#ffffff, #e5e5e5) repeat scroll 0% 0% transparent;*/
border-bottom: 1px solid rgb(226,226,226);
border-top-left-radius : 6px;
border-top-right-radius : 6px;
box-shadow: 0px 1px 0px white, 0px, -1px 0px rgb(245,245,245);
height: 39px;
font-size: 15px;
line-height: 26px;
height: 30px;
font-size: 1.5em;
padding-left: 4%;
border-bottom: 1px solid rgb(21, 165, 200);
}
.resource_sum, .line_blo{
border: 1px solid #eeeeee;
}
.line_block table{
border: 1px solid #eeeeee;
}
.line_block table thead tr{
/*background-color: #d1d1d1;*/
text-align: center;
}
.line_block table td{
height: 2em;
}
.filename {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 247px;
}
/*.filename a:after {
content: "...";
}*/
.blueinputbar{
-o-transform-origin: 138px 46.5px;
-o-transition: background 0.2s cubic-bezier(0, 0, 1, 1);
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-webkit-border-radius: 3px;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
-webkit-box-shadow: rgba(0, 0, 0, 0.047) 0px 1px 3px 0px inset, rgba(82, 168, 236, 0.600) 0px 0px 8px 0px;
-webkit-transform-origin: 138px 46.5px;
-webkit-transition: background 0.2s cubic-bezier(0, 0, 1, 1);
-webkit-transition-delay: 0;
-webkit-transition-duration: 0.2s;
-webkit-transition-property: background;
-webkit-transition-timing-function: cubic-bezier(0, 0, 1, 1);
align-content: stretch;
align-items: stretch;
align-self: stretch;
background: #FFFFFF;
border-bottom: 1px solid #56B4EF;
border-left: 1px solid #56B4EF;
border-radius: 3px;
border-right: 1px solid #56B4EF;
border-top: 1px solid #56B4EF;
color: #333333;
justify-content: flex-start;
margin: 0px;
order: 0;
outline: #333333 0px;
overflow-wrap: break-word;
resize: none;
text-shadow: none;
transform-origin: 138px 46.5px;
transition: background 0.2s cubic-bezier(0, 0, 1, 1);
unicode-bidi: embed;
vertical-align: top;
word-wrap: break-word;
}
input.blueinputbar:focus {
box-shadow: rgba(0, 0, 0, 0.047) 0px 1px 3px 0px inset, rgba(82, 168, 236, 0.600) 0px 0px 5px 0px;
border-bottom: 1px solid #56B4EF;
border-left: 1px solid #56B4EF;
border-radius: 3px;
border-right: 1px solid #56B4EF;
border-top: 1px solid #56B4EF;
}
</style>
<% content_for :top_field do%>
<div style="margin: 10px 5%;">
<%= form_tag( search_stores_path, method: 'get') do %>
<%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字', :value => params[:name] %>
<%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字', :value => params[:name] , :class => 'blueinputbar'%>
<%= submit_tag l(:label_search), class:"whiteButton m3p10 h30"%>
<% end %>
</div>