<% if subjects.present? %> <% subjects.each do |subject| %> <% end %> <% else %> <%= render 'admins/shared/no_data_for_table' %> <% end %>
名称 阶段数 实训数 技术体系 等级体系 封面 创建者 单位 开课人数 <%= sort_tag('创建时间', name: 'created_at', path: admins_subjects_path) %> 状态 操作
<%= link_to(subject.name, subject_path(subject), target: '_blank') %> 首页 金课 <%= subject.stages_count %> <%= subject.shixuns_count %> <%= display_text subject.repertoire&.name %> <%= display_text subject.subject_level_system&.name %> <% image_exists = Util::FileManage.exists?(subject) %> <%= image_tag(image_exists ? Util::FileManage.source_disk_file_url(subject) : '', height: 40, class: "w-100 preview-image subject-image-#{subject.id}", style: image_exists ? '' : 'display:none') %> <%= javascript_void_link image_exists ? '重新上传' : '上传图片', class: 'action upload-image-action', data: { source_id: subject.id, source_type: 'Subject', toggle: 'modal', target: '.admin-upload-file-modal' } %> <%= subject.user.real_name %> <%= subject.user.school_name %> <%= subject.student_count %> <%= subject.created_at&.strftime('%Y-%m-%d %H:%M') %> <%= display_subject_status(subject) %> <%= link_to('编辑', edit_admins_subject_path(subject), remote: true, class: 'edit-action') %> <%= javascript_void_link('隐藏', class: 'hide-action', data: { id: subject.id }, style: subject.hidden? ? 'display:none' : '') %> <%= javascript_void_link('取消隐藏', class: 'active-action', data: { id: subject.id }, style: subject.hidden? ? '' : 'display:none') %>
<%= javascript_void_link('更多', class: 'action dropdown-toggle', 'data-toggle': 'dropdown', 'aria-haspopup': true, 'aria-expanded': false) %>
<%= render partial: 'admins/shared/paginate', locals: { objects: subjects } %> <%= render partial: 'admins/shared/modal/upload_file_modal', locals: { title: '上传图片', accept: 'image/*' } %>