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 + "%' ").
|
result = Attachment.where("attachments.container_type IS NOT NULL AND filename LIKE '%" + name + "%' ").
|
||||||
reorder("created_on DESC")
|
reorder("created_on DESC")
|
||||||
result = result.to_a
|
# result = result.to_a
|
||||||
result.map { |res|
|
result.map { |res|
|
||||||
if(res.container.nil? ||
|
if(res.container.nil? ||
|
||||||
(res.container.class.to_s.eql?("Project") && res.container.is_public == false) ||
|
(res.container.class.to_s=="Project" && res.container.is_public == false) ||
|
||||||
(res.container.class.to_s.eql?("HomeworkAttach") && res.container.bid.reward_type == 3) ||
|
(res.container.class.to_s=="HomeworkAttach" && res.container.bid.reward_type == 3) ||
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
result.delete(res)
|
result.delete(res)
|
||||||
|
|
|
@ -1,21 +1,5 @@
|
||||||
<style type='text/css'>
|
<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>
|
</style>
|
||||||
<% content_for :top_field do%>
|
<% content_for :top_field do%>
|
||||||
<div style="margin: 10px 5%;">
|
<div style="margin: 10px 5%;">
|
||||||
|
@ -33,16 +17,19 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="r1">
|
<td class="r1">
|
||||||
<div class="cb">
|
<div class="cb">
|
||||||
<span style="color: #c03; font-size: 14px;"><%= result.filename %></span>
|
<span style=""><%= 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="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>
|
</div>
|
||||||
<%= result.description %>
|
<%= result.description %>
|
||||||
<div class="c9">所属分类:<%=result_come_from result%>
|
<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) %>
|
上传时间:<%= format_time(result.created_on) %>
|
||||||
</div>
|
</span>
|
||||||
<span class="gray">下载:<%= result.downloads%>
|
|
||||||
| 大小:<%= number_to_human_size(result.filesize) %>
|
|
||||||
| 共享者:<a class="gray" ><%= link_to result.author%></a></span>
|
|
||||||
<div style="display: none"></div>
|
<div style="display: none"></div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -14,13 +14,23 @@
|
||||||
.clear_both{
|
.clear_both{
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
.btn_download{
|
.highlight {
|
||||||
display: inline-block;
|
background-color: #fff34d;
|
||||||
background: url('images/button/download.png') no-repeat transparent;
|
-moz-border-radius: 3px;
|
||||||
}
|
-webkit-border-radius: 3px;
|
||||||
.btn_download a{
|
border-radius: 3px;
|
||||||
background: url('images/button/download.png') no-repeat transparent;
|
-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;
|
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 资源库
|
/* stores 资源库
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
.line_block{
|
.line_block {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 49%;
|
width: 49%;
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
|
@ -378,11 +388,11 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked{
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
-box-sizing: border-box;
|
-box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.resource_sum{
|
.resource_sum{
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
.line_block p{
|
.line_block p{
|
||||||
margin: 1em 0px auto;
|
margin: 1em 0px auto;
|
||||||
/*background: linear-gradient(#ffffff, #e5e5e5) repeat scroll 0% 0% transparent;*/
|
/*background: linear-gradient(#ffffff, #e5e5e5) repeat scroll 0% 0% transparent;*/
|
||||||
border-bottom: 1px solid rgb(226,226,226);
|
border-bottom: 1px solid rgb(226,226,226);
|
||||||
|
@ -396,35 +406,32 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked{
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
padding-left: 4%;
|
padding-left: 4%;
|
||||||
border-bottom: 1px solid rgb(21, 165, 200);
|
border-bottom: 1px solid rgb(21, 165, 200);
|
||||||
}
|
}
|
||||||
.resource_sum, .line_blo{
|
.resource_sum, .line_blo{
|
||||||
border: 1px solid #eeeeee;
|
border: 1px solid #eeeeee;
|
||||||
}
|
}
|
||||||
.line_block table{
|
.line_block table{
|
||||||
border: 1px solid #eeeeee;
|
border: 1px solid #eeeeee;
|
||||||
}
|
}
|
||||||
.line_block table thead tr{
|
.line_block table thead tr{
|
||||||
/*background-color: #d1d1d1;*/
|
/*background-color: #d1d1d1;*/
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.line_block table td{
|
.line_block table td{
|
||||||
height: 2em;
|
height: 2em;
|
||||||
}
|
}
|
||||||
.filename {
|
.filename {
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
max-width: 247px;
|
max-width: 247px;
|
||||||
}
|
}
|
||||||
#top_field {
|
#top_field {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
}
|
}
|
||||||
/*.filename a:after {
|
.blueinputbar{
|
||||||
content: "...";
|
|
||||||
}*/
|
|
||||||
.blueinputbar{
|
|
||||||
-o-transform-origin: 138px 46.5px;
|
-o-transform-origin: 138px 46.5px;
|
||||||
-o-transition: background 0.2s cubic-bezier(0, 0, 1, 1);
|
-o-transition: background 0.2s cubic-bezier(0, 0, 1, 1);
|
||||||
-webkit-border-bottom-left-radius: 3px;
|
-webkit-border-bottom-left-radius: 3px;
|
||||||
|
@ -460,12 +467,24 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked{
|
||||||
unicode-bidi: embed;
|
unicode-bidi: embed;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
input.blueinputbar:focus {
|
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;
|
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-bottom: 1px solid #56B4EF;
|
||||||
border-left: 1px solid #56B4EF;
|
border-left: 1px solid #56B4EF;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border-right: 1px solid #56B4EF;
|
border-right: 1px solid #56B4EF;
|
||||||
border-top: 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