forked from jacknudt/trustieforge
logo
This commit is contained in:
parent
52cffd3864
commit
bacddf00d9
|
@ -10,11 +10,11 @@ class StoresController < ApplicationController
|
|||
# 按文件名搜索
|
||||
result = Attachment.where("attachments.container_type IS NOT NULL AND filename LIKE '%" + name + "%' ").
|
||||
reorder("created_on DESC")
|
||||
result = result.to_a
|
||||
# result = result.to_a
|
||||
result.map { |res|
|
||||
if(res.container.nil? ||
|
||||
(res.container.class.to_s.eql?("Project") && res.container.is_public == false) ||
|
||||
(res.container.class.to_s.eql?("HomeworkAttach") && res.container.bid.reward_type == 3) ||
|
||||
(res.container.class.to_s=="Project" && res.container.is_public == false) ||
|
||||
(res.container.class.to_s=="HomeworkAttach" && res.container.bid.reward_type == 3) ||
|
||||
false
|
||||
)
|
||||
result.delete(res)
|
||||
|
|
|
@ -1,21 +1,5 @@
|
|||
<style type='text/css'>
|
||||
.highlight {
|
||||
background-color: #fff34d;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-moz-box-shadow: 0px 1px 4px rgba(0,0,0,0.7);
|
||||
-webkit-box-shadow: 0px 1px 4px rgba(0,0,0,0.7);
|
||||
box-shadow: 0px 1px 4px rgba(0,0,0,0.7);
|
||||
}
|
||||
.highlight {
|
||||
padding: 1px 4px;
|
||||
margin: 0 -4px;
|
||||
filter: alpha(opacity=70);
|
||||
-moz-opacity: 0.7;
|
||||
-webkit-opacity: 0.7;
|
||||
opacity: 0.7;
|
||||
}
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<% content_for :top_field do%>
|
||||
<div style="margin: 10px 5%;">
|
||||
|
@ -33,16 +17,19 @@
|
|||
<tr>
|
||||
<td class="r1">
|
||||
<div class="cb">
|
||||
<span style="color: #c03; font-size: 14px;"><%= result.filename %></span>
|
||||
<span style="margin-left: 4px;"><%= link_to_attachment result, {:text => image_tag("/images/button/download.png", width: "22px", alt: "l(:button_download)", :class => 'download_icon')}%></span>
|
||||
<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')}%>
|
||||
</span>
|
||||
</div>
|
||||
<%= result.description %>
|
||||
<div class="c9">所属分类:<%=result_come_from result%>
|
||||
上传时间:<%= format_time(result.created_on) %>
|
||||
</div>
|
||||
<span class="gray">下载:<%= result.downloads%>
|
||||
| 大小:<%= number_to_human_size(result.filesize) %>
|
||||
| 共享者:<a class="gray" ><%= link_to result.author%></a></span>
|
||||
<div class="c9"> 所属分类:<%=result_come_from result%> </div>
|
||||
<span class="gray">
|
||||
下载:<%= result.downloads%>|
|
||||
大小:<%= number_to_human_size(result.filesize) %>|
|
||||
共享者:<a class="gray" ><%= link_to result.author%></a>|
|
||||
上传时间:<%= format_time(result.created_on) %>
|
||||
</span>
|
||||
<div style="display: none"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -14,13 +14,23 @@
|
|||
.clear_both{
|
||||
clear: both;
|
||||
}
|
||||
.btn_download{
|
||||
display: inline-block;
|
||||
background: url('images/button/download.png') no-repeat transparent;
|
||||
}
|
||||
.btn_download a{
|
||||
background: url('images/button/download.png') no-repeat transparent;
|
||||
.highlight {
|
||||
background-color: #fff34d;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.7);
|
||||
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.7);
|
||||
box-shadow: 0px 1px 2px rgba(0,0,0,0.7);
|
||||
color: #cc0033;
|
||||
/*padding: 1px 3px;*/
|
||||
/*margin: 0 -4px;*/
|
||||
filter: alpha(opacity=70);
|
||||
-moz-opacity: 0.7;
|
||||
-webkit-opacity: 0.7;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
* {
|
||||
font-family: Helvetica, Tahoma, Arial, "Microsoft YaHei", "微软雅黑", SimSun, "宋体", STXihei, "华文细黑", Heiti, "黑体", sans-serif;
|
||||
}
|
||||
|
@ -369,7 +379,7 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked{
|
|||
}
|
||||
/* stores 资源库
|
||||
*******************************************************************************/
|
||||
.line_block{
|
||||
.line_block {
|
||||
display: inline-block;
|
||||
width: 49%;
|
||||
margin: 10px auto;
|
||||
|
@ -378,94 +388,103 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked{
|
|||
-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;
|
||||
}
|
||||
#top_field {
|
||||
max-width: 100%;
|
||||
margin: 20px auto;
|
||||
}
|
||||
/*.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-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;
|
||||
}
|
||||
}
|
||||
.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;
|
||||
}
|
||||
#top_field {
|
||||
max-width: 100%;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.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-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;
|
||||
}
|
||||
.r1 {
|
||||
font-size:13px;
|
||||
line-height: 1.7em;
|
||||
overflow-wrap: break-word;
|
||||
padding-bottom: 20px;
|
||||
padding-left: 20px;
|
||||
/*width: 50em;*/
|
||||
}
|
||||
.r1 .cb {
|
||||
font-size: 16px;
|
||||
color: #3333cc;
|
||||
}
|
Loading…
Reference in New Issue