diff --git a/app/controllers/stores_controller.rb b/app/controllers/stores_controller.rb
index dde7d9e2d..7e93b012d 100644
--- a/app/controllers/stores_controller.rb
+++ b/app/controllers/stores_controller.rb
@@ -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)
diff --git a/app/views/stores/search.html.erb b/app/views/stores/search.html.erb
index 90828a003..7372cc451 100644
--- a/app/views/stores/search.html.erb
+++ b/app/views/stores/search.html.erb
@@ -1,21 +1,5 @@
-
<% content_for :top_field do%>
@@ -33,16 +17,19 @@
- <%= result.filename %>
- <%= link_to_attachment result, {:text => image_tag("/images/button/download.png", width: "22px", alt: "l(:button_download)", :class => 'download_icon')}%>
+ <%= result.filename %>
+
+ <%= link_to_attachment result, {:text => image_tag("/images/button/dl.png", width: "70px", alt: l(:button_download), :class => 'download_icon')}%>
+
<%= result.description %>
- 所属分类:<%=result_come_from result%>
- 上传时间:<%= format_time(result.created_on) %>
-
- 下载:<%= result.downloads%>
- | 大小:<%= number_to_human_size(result.filesize) %>
- | 共享者:<%= link_to result.author%>
+ 所属分类:<%=result_come_from result%>
+
+ 下载:<%= result.downloads%>|
+ 大小:<%= number_to_human_size(result.filesize) %>|
+ 共享者:<%= link_to result.author%>|
+ 上传时间:<%= format_time(result.created_on) %>
+
|
diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css
index fb4511d47..83e2cd9e5 100644
--- a/public/stylesheets/nyan.css
+++ b/public/stylesheets/nyan.css
@@ -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;
- }
\ No newline at end of file
+}
+.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;
+}
\ No newline at end of file