附件的显示
This commit is contained in:
parent
338c224846
commit
e09f795171
|
@ -37,7 +37,7 @@
|
|||
<% if options[:length] %>
|
||||
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%>
|
||||
<% else %>
|
||||
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true -%>
|
||||
<%= link_to_short_attachment attachment, :length=> 58,:class => 'hidden link_file_a fl newsBlue mw400', :download => true -%>
|
||||
<% end %>
|
||||
</span>
|
||||
<%if is_float%>
|
||||
|
|
|
@ -84,8 +84,8 @@
|
|||
<%= @topic.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class=" fl" style="width: 600px">
|
||||
<%= link_to_attachments_course @topic, :author => false %>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -113,8 +113,8 @@
|
|||
<%= @topic.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class=" fl" style="width: 600px">
|
||||
<%= link_to_attachments_course @topic, :author => false %>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -139,8 +139,8 @@
|
|||
<%= @topic.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class=" fl" style="width: 600px">
|
||||
<%= link_to_attachments_course @topic, :author => false %>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -89,8 +89,8 @@
|
|||
<%= @news.description.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class=" fl" style="width: 600px">
|
||||
<%= link_to_attachments_course @news, :author => false %>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @news} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -89,8 +89,8 @@
|
|||
<%= @news.description.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class=" fl" style="width: 600px">
|
||||
<%= link_to_attachments_course @news, :author => false %>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @news} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -29,8 +29,9 @@
|
|||
<%= @document.content.html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class=" fl" style="width: 600px">
|
||||
<%= link_to_attachments_course @document, :author => false %>
|
||||
<div class=" fl">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @document} %>
|
||||
<%#= link_to_attachments_course @document, :author => false %>
|
||||
</div>
|
||||
<!-- <%# if defined?(home_id) %>
|
||||
<div style="float:right;">最后编辑:<%#= User.find() %></div>
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
<%= document.content.html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class=" fl" style="width: 600px">
|
||||
<%= link_to_attachments_course document, :author => false %>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => document} %>
|
||||
</div>
|
||||
<!-- <%# if defined?(home_id) %>
|
||||
<div style="float:right;">最后编辑:<%#= User.find() %></div>
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
<% attachments.each_with_index do |attachment,i| %>
|
||||
<div id="attachment_<%= attachment.id%>">
|
||||
<%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%>
|
||||
<span class="fl">
|
||||
<span title="<%= attachment.filename %>">
|
||||
<%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw360', :download => true -%>
|
||||
</span>
|
||||
</span>
|
||||
<%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) if attachment.id && User.current == attachment.author && status != 2 %>
|
||||
<span class="ml5 fl">(<%= number_to_human_size attachment.filesize %>)</span>
|
||||
<span class="postAttSize">(<%= number_to_human_size attachment.filesize %>)</span>
|
||||
<span class="author" title="<%= attachment.author%>">
|
||||
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>,
|
||||
<%= format_time(attachment.created_on) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end -%>
|
|
@ -166,7 +166,7 @@
|
|||
<div id="homeworkDetailHide" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %>
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @homework} %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mt5">
|
||||
|
|
|
@ -95,6 +95,7 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
|
|||
.mt-2 {margin-top:-2px;}
|
||||
.homeworkInfo {background:#F6F6F6; padding:10px; margin-bottom:10px;}
|
||||
.homeworkDetail {line-height:18px; font-size:12px; color:#484848; overflow:hidden;}
|
||||
.homeworkDetail p,.homeworkDetail div,.homeworkDetail em, .homeworkDetail span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;}
|
||||
.max_h54 {max-height:54px; }
|
||||
.homeworkState {padding:3px 5px; background-color:#28be6c; border-radius:3px; float:left; margin-left:15px; color:#ffffff;}
|
||||
.homeworkClose {padding:3px 5px; background-color:#b2b2b2; border-radius:3px; float:left; margin-left:15px; color:#ffffff;}
|
||||
|
|
|
@ -170,6 +170,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
|||
.h70{ height:70px;}
|
||||
.h150{ height:150px;}
|
||||
.p10 {padding-left:10px; padding-right:10px;}
|
||||
.mw360 {max-width: 360px !important;}
|
||||
.mw400 {max-width: 400px !important;}
|
||||
.mh18 {max-height: 18px;}
|
||||
|
||||
|
|
Loading…
Reference in New Issue