动态显示附件并统一附件样式
This commit is contained in:
parent
c5a10c504e
commit
a0afe6ccbf
|
@ -0,0 +1,19 @@
|
||||||
|
<% if activity.attachments.any? %>
|
||||||
|
<% activity.attachments.each do |attachment| %>
|
||||||
|
<div class="break_word">
|
||||||
|
<span class="fl">
|
||||||
|
<span title="<%= attachment.filename %>" id="attachment_<%=attachment.id %>">
|
||||||
|
<%= link_to_short_attachment attachment,:length=> 58, :class => 'mw400 hidden link_file_a fl newsBlue', :download => true -%>
|
||||||
|
</span>
|
||||||
|
</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>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
|
@ -67,17 +67,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class=" fl" style="width: 600px">
|
<!--<div class=" fl" style="width: 600px">
|
||||||
<% if activity.attachments.any?%>
|
<%# if activity.attachments.any?%>
|
||||||
<% options = {:author => true, :deletable => false } %>
|
<%# options = {:author => true, :deletable => false } %>
|
||||||
<%= render :partial => 'blog_comments/attachments_links', :locals => {:attachments => activity.attachments, :options => options, :is_float => true} %>
|
<%#= render :partial => 'blog_comments/attachments_links', :locals => {:attachments => activity.attachments, :options => options, :is_float => true} %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>-->
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="mt10" style="font-weight:normal;">
|
||||||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
|
</div>
|
||||||
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
|
|
|
@ -101,9 +101,8 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="mt5">
|
<div class="mt10" style="font-weight:normal;">
|
||||||
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => activity.attachments} %>
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
<div class="homepagePostDeadline">
|
<div class="homepagePostDeadline">
|
||||||
|
|
|
@ -43,6 +43,9 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="mt10" style="font-weight:normal;">
|
||||||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
|
</div>
|
||||||
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
|
|
|
@ -31,6 +31,9 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="mt10" style="font-weight:normal;">
|
||||||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,32 +45,7 @@
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="mt10" style="font-weight:normal;">
|
<div class="mt10" style="font-weight:normal;">
|
||||||
<% if activity.attachments.any? %>
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
<% activity.attachments.each do |attachment| %>
|
|
||||||
<div class="break_word">
|
|
||||||
<span class="fl">
|
|
||||||
<span title="<%= attachment.filename %>" id="attachment_">
|
|
||||||
<%= link_to_short_attachment attachment,:length=> 58, :class => 'link_file_a fl newsBlue', :download => true -%>
|
|
||||||
</span>
|
|
||||||
<% if attachment.is_text? %>
|
|
||||||
<%= link_to image_tag('magnifier.png'),
|
|
||||||
:controller => 'attachments',
|
|
||||||
:action => 'show',
|
|
||||||
:id => attachment,
|
|
||||||
:class => 'fl',
|
|
||||||
:filename => attachment.filename %>
|
|
||||||
<% end %>
|
|
||||||
</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>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="mt10" style="font-weight:normal;">
|
||||||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="mt10" style="font-weight:normal;">
|
||||||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -31,6 +31,9 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="mt10" style="font-weight:normal;">
|
||||||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -101,10 +101,8 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="mt5">
|
<div class="mt10" style="font-weight:normal;">
|
||||||
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => activity.attachments} %>
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
<div class="cl">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
<div class="homepagePostDeadline">
|
<div class="homepagePostDeadline">
|
||||||
|
|
|
@ -43,7 +43,9 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="mt10" style="font-weight:normal;">
|
||||||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: none">
|
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: none">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -31,6 +31,9 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="mt10" style="font-weight:normal;">
|
||||||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -57,33 +57,7 @@
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="mt10" style="font-weight:normal;">
|
<div class="mt10" style="font-weight:normal;">
|
||||||
<% if activity.attachments.any? %>
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
<% activity.attachments.each do |attachment| %>
|
|
||||||
<div class="break_word">
|
|
||||||
<span class="fl">
|
|
||||||
<span title="<%= attachment.filename %>" id="attachment_">
|
|
||||||
<%= link_to_short_attachment attachment,:length=> 58, :class => 'link_file_a fl newsBlue', :download => true -%>
|
|
||||||
</span>
|
|
||||||
<% if attachment.is_text? %>
|
|
||||||
<%= link_to image_tag('magnifier.png'),
|
|
||||||
:controller => 'attachments',
|
|
||||||
:action => 'show',
|
|
||||||
:id => attachment,
|
|
||||||
:class => 'fl',
|
|
||||||
:filename => attachment.filename %>
|
|
||||||
<% end %>
|
|
||||||
</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>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -44,7 +44,9 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="mt10" style="font-weight:normal;">
|
||||||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
|
</div>
|
||||||
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: none">
|
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: none">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<div class="mt10" style="font-weight:normal;">
|
||||||
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -104,9 +104,8 @@
|
||||||
<div id="intro_content_show_<%= homework_common.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= homework_common.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= homework_common.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= homework_common.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="mt5">
|
<div class="mt10" style="font-weight:normal;">
|
||||||
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework_common.attachments} %>
|
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => homework_common} %>
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
<div class="homepagePostDeadline">
|
<div class="homepagePostDeadline">
|
||||||
|
|
|
@ -167,6 +167,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.h70{ height:70px;}
|
.h70{ height:70px;}
|
||||||
.h150{ height:150px;}
|
.h150{ height:150px;}
|
||||||
.p10 {padding-left:10px; padding-right:10px;}
|
.p10 {padding-left:10px; padding-right:10px;}
|
||||||
|
.mw400 {max-width: 400px;}
|
||||||
|
|
||||||
/* Font & background Color */
|
/* Font & background Color */
|
||||||
a.b_grey{ background: #F5F5F5;}
|
a.b_grey{ background: #F5F5F5;}
|
||||||
|
|
Loading…
Reference in New Issue