socialforge/app/views/users/_homework_repository.html.erb

39 lines
1.6 KiB
Plaintext

<script type="text/javascript">
function show_homework_detail(url){
$.get(
url,
{
},
function (data) {
}
);
}
</script>
<div class="h450">
<% homeworks.each do |homework| %>
<ul class="subject-list-row">
<li class="subject-list-name fl hidden">
<label onclick="show_homework_detail('<%=show_homework_detail_user_path(@user,:homework=>homework.id,:is_import => 0) %>')">
<input type="radio" name="checkMenu" class="mr5" style="vertical-align:middle;" value="<%= homework.id%>"/>
<span title="<%= homework.name%>"><%= homework.name%></span>
</label>
</li>
<li class="subject-list-from fl hidden"><span title="<%=homework.course.name %>(<%=current_time_and_term(homework.course) %>)"><%=homework.course.name %>(<%=current_time_and_term_short(homework.course) %>)</span></li>
<li class="subject-list-type fl">
<% case homework.homework_type %>
<% when 1 %>
普通
<% when 2 %>
编程
<% when 3 %>
分组
<% end %>
</li>
<li class="subject-list-publisher fl hidden"><%= homework.user.show_name %></li>
<li class="subject-list-count fl" id="subject_count_homework_<%=homework.id %>"><%= homework.quotes %></li>
<li class="fl subject-list-date"><%=format_date homework.publish_time %></li>
</ul>
<% end %>
</div>