socialforge/app/views/test/courselist.html.erb

47 lines
1.6 KiB
Plaintext
Raw Normal View History

2014-05-26 11:27:10 +08:00
<div class="alert alert-danger">
2014-07-09 15:20:00 +08:00
<strong>Warning!</strong> you can stop.
2014-05-26 11:27:10 +08:00
</div>
<div class="page-header">
<div class="jumbotron">
2016-07-01 11:11:53 +08:00
<h1>班级作业列表</h1>
2014-05-26 11:27:10 +08:00
<p class="lead">测试页面提供</p>
</div>
<% @courses.each do |course| %>
<div class="courses_list row">
<div class="col-md-12">
<div class="page-header">
<h3> <%= course.name %> </h3>
</div>
2014-04-14 17:36:23 +08:00
2014-05-26 11:27:10 +08:00
<% course.homeworks.each do |homework| %>
<% homeworks_attach_path = [] %>
<div class="homeworks panel panel-default ">
<div class="homeworks panel-heading">
<div class="panel-title">
<%= link_to homework.name, course_for_bid_path(homework) %>(<%=homework.homeworks.count %>)<%#Bid%>
2014-07-09 15:20:00 +08:00
<%#= link_to "打包下载", zipdown_assort_path(obj_class: homework.class, obj_id: homework.id), :class => "btn btn-primary btn-sm" %><br/>
2014-05-26 11:27:10 +08:00
</div>
</div>
<div class="attach_item panel-body ">
<div class="col-md-offset-1">
<% homework.homeworks.each do |homeattach|%><%#homework.class == Bid %>
<% homeattach.attachments.each do |attach|%>
2014-07-09 15:20:00 +08:00
<%= attach.filename %>
<%#= link_to_attachment attach, author: true, :download => true %> (<%=attach.author%>)
2014-05-26 11:27:10 +08:00
<br/>
<% homeworks_attach_path << attach.storage_path %>
<% end %>
<% end %>
</div>
</div>
<%# 所有作业的文件列表%>
2014-07-09 15:20:00 +08:00
<!-- (<%#=homeworks_attach_path.count%>):<%#= homeworks_attach_path.to_json %> -->
2014-05-26 11:27:10 +08:00
</div>
<% end %>
2014-04-14 17:36:23 +08:00
</div>
</div>
2014-05-26 11:27:10 +08:00
<hr/>
2014-04-14 17:36:23 +08:00
<% end %>
</div>
2014-07-09 15:20:00 +08:00
<div class="pagination"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %></div>