%
admin_or_self = admin_or_business? || @library.user_id == User.current.id
%>
<%= link_to '教学案例', libraries_path, class: 'color-grey-9' %> >
详情
<%= @library.title %>
<%= show_library_tags(@library) %>
<% if admin_or_self %>
<% if @library.pending? %>
草稿
<% elsif @library.processing? %>
审核中
<% elsif @library.refused? %>
未通过
<% end %>
<% end %>
<%= link_to('返回', libraries_path, class: 'fr color-grey-9 mt5') %>
<% if admin_or_self && !@library.published? && @library_applies.size > 0 %>
私有化原因
(请按照提示修改,并在完成编辑后重新提交)
<% end %>
<%= link_to image_tag(url_to_avatar(@library.user), width: 50, height: 50, class: 'radius mr15 mt3'), user_path(@library.user) %>
<%= @library.user.show_real_name %>
<% if admin_or_business? || @library.user_id == User.current.id && @library.pending? %>
<%= link_to '删除', 'javascript:void(0);', data: { id: @library.id },
class: 'white-btn edu-blueline-btn fr ml20 delete-btn' %>
<% end %>
<% if admin_or_self %>
<%= link_to '编辑', edit_library_path(id: @library.id), class: 'white-btn edu-blueline-btn fr' %>
<% end %>
<%= @library.user.school_name %>
<%= @library.user.identity %>
编码:<%= @library.uuid %>
<% if @library.published? %>
发布时间:<%= @library.published_at.strftime('%Y-%m-%d %H:%M') %>
<% else %>
上传时间:<%= @library.created_at.strftime('%Y-%m-%d %H:%M') %>
<% end %>
<%= render partial: 'attachments/links', locals: { attachments: @library.attachments, options: {} } %>