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

43 lines
1.1 KiB
Plaintext

<style type="text/css">
.courses_list{
font-size: 18px;
font-weight: 800;
margin: 40px 10px;
}
.homeworks{
font-size: 16px;
font-weight: 500;
margin: 5px 40px 20px;
}
.attach_item{
font-size: 14px;
font-weight: 400;
margin: auto 60px;
}
</style>
<% @courses.each do |course| %>
<div class="courses_list">
<%= course.name %>
<% course.homeworks.each do |homework| %>
<% homeworks_attach_path = [] %>
<div class="homeworks">
<%= link_to homework.name, respond_path(homework) %>(<%=homework.homeworks.count %>)<%#Bid%>
<div class="attach_item">
<%= link_to "package", zipdown_assort_path(obj_class: homework.class, obj_id: homework.id) %><br/>
<% homework.homeworks.each do |homeattach|%><%#homework.class == Bid %>
<% homeattach.attachments.each do |attach|%>
<%= link_to_attachment attach, author: true, :download => true %> (<%=attach.author%>)
<br/>
<% homeworks_attach_path << attach.storage_path %>
<% end %>
<% end %>
</div>
<%# 所有作业的文件列表%>
<!-- (<%=homeworks_attach_path.count%>):<%= homeworks_attach_path.to_json %> -->
</div>
<% end %>
</div>
<hr/>
<% end %>