教学案例

dev_bj
caishi 5 years ago
parent 374d91449c
commit bc049be767

@ -14,7 +14,7 @@
<% size = judge_Chinese_num attachment.filename %> <% size = judge_Chinese_num attachment.filename %>
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly hidden color-grey fl', :size => size, :style => 'border:none; max-width:980px;white-space: nowrap; text-overflow:ellipsis;font-family: Consolas;', :readonly => 'readonly') %> <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly hidden color-grey fl', :size => size, :style => 'border:none; max-width:980px;white-space: nowrap; text-overflow:ellipsis;font-family: Consolas;', :readonly => 'readonly') %>
<span class="color-grey mr10 fl"><%= number_to_human_size attachment.filesize %></span> <span class="color-grey mr10 fl"><%= number_to_human_size attachment.filesize %></span>
<%= link_to('<i class="fa fa-trash-o mr5"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %> <%= link_to('<i class="iconfont icon-fujian mr5 color-green fl font-14"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload fl mt1') unless attachment.id.nil? %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
<%= hidden_field_tag "attachments[p#{i}][attachment_id]", attachment.id %> <%= hidden_field_tag "attachments[p#{i}][attachment_id]", attachment.id %>
</span> </span>
@ -24,7 +24,7 @@
<label class="panel-form-label fl">&nbsp;</label> <label class="panel-form-label fl">&nbsp;</label>
<i class="iconfont icon-fujian mr5 color-green fl font-14" aria-hidden="true"></i> <i class="iconfont icon-fujian mr5 color-green fl font-14" aria-hidden="true"></i>
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'hidden atta_input readonly color-grey fl', :style => 'border:none; max-width:980px;', :readonly => 'readonly') %> <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'hidden atta_input readonly color-grey fl', :style => 'border:none; max-width:980px;', :readonly => 'readonly') %>
<%= link_to('<i class="fa fa-trash-o mr5"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload fl mt2') unless attachment.id.nil? %> <%= link_to('<i class="iconfont icon-fujian mr5 color-green fl font-14"></i>'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload fl mt1') unless attachment.id.nil? %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span> </span>
<% end %> <% end %>

@ -7,9 +7,11 @@
<% end%> <% end%>
<span title="<%= attachment.filename%>" id = "attachment_"> <span title="<%= attachment.filename%>" id = "attachment_">
<% if options[:length] %> <% if options[:length] %>
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true,:length => options[:length] -%> <i class="iconfont icon-fujian color-green font-14 mr10 fl lineh-20 mt3"></i>
<%= link_to_short_attachment attachment,:download => true,:length => options[:length] -%>
<% else %> <% else %>
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true, :length => 32 -%> <i class="iconfont icon-fujian color-green font-14 mr10 fl lineh-20 mt3"></i>
<%= link_to_short_attachment attachment,:download => true, :length => 32 -%>
<% end %> <% end %>
</span> </span>
<%if is_float%> <%if is_float%>

@ -72,7 +72,7 @@
<div class="break_full_word new_li" id="labraries_editorMd_content" style="box-sizing: border-box"> <div class="break_full_word new_li" id="labraries_editorMd_content" style="box-sizing: border-box">
<textarea style="display:none;"><%= @library.content %></textarea> <textarea style="display:none;"><%= @library.content %></textarea>
</div> </div>
<div class="mt10"> <div class="mt10 pl20">
<%= render partial: 'attachments/links', locals: { attachments: @library.attachments, options: {} } %> <%= render partial: 'attachments/links', locals: { attachments: @library.attachments, options: {} } %>
</div> </div>
</div> </div>

Loading…
Cancel
Save