commit
2d701b7d03
@ -0,0 +1,89 @@
|
||||
<h3>
|
||||
<%=l(:label_apply_homework)%>
|
||||
</h3>
|
||||
|
||||
<div class="autoscroll">
|
||||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30px;">
|
||||
序号
|
||||
</th>
|
||||
<th style="width: 120px;">
|
||||
作业名称
|
||||
</th>
|
||||
<th style="width: 120px;">
|
||||
课程名称
|
||||
</th>
|
||||
<th style="width: 50px;">
|
||||
作者
|
||||
</th>
|
||||
<th style="width: 50px;">
|
||||
申请者
|
||||
</th>
|
||||
<th style="width: 50px;">
|
||||
申请状态
|
||||
</th>
|
||||
<th style="width: 70px;">
|
||||
申请日期
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%@count=@page*30 %>
|
||||
<% for homework in @homework do %>
|
||||
<% unless homework.nil? %>
|
||||
<% @count+=1 %>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<%=@count %>
|
||||
</td>
|
||||
<% c_h = HomeworkCommon.find homework.homework_common_id %>
|
||||
<% if c_h %>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=c_h.name%>'>
|
||||
<%=link_to(c_h.try(:name), student_work_index_path(:homework => c_h.id))%>
|
||||
</td>
|
||||
<% if c_h.course %>
|
||||
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<%=c_h.course.name%>'>
|
||||
<%= link_to(c_h.course.name, course_path(c_h.course.id)) %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if c_h.try(:user).try(:realname) == ' '%><%= c_h.try(:user)%><% else %><%=c_h.try(:user).try(:realname) %><% end %>'>
|
||||
<% if c_h.try(:user).try(:realname) == ' '%>
|
||||
<%= link_to(c_h.try(:user), user_path(c_h.user_id)) %>
|
||||
<% else %>
|
||||
<%= link_to(c_h.try(:user).try(:realname), user_path(c_h.user_id)) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td align="center" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="name" title='<% if homework.try(:user).try(:realname) == ' '%><%= homework.try(:user)%><% else %><%=homework.try(:user).try(:realname) %><% end %>'>
|
||||
<% if homework.try(:user).try(:realname) == ' '%>
|
||||
<%= link_to(homework.try(:user), user_path(homework.user_id)) %>
|
||||
<% else %>
|
||||
<%= link_to(homework.try(:user).try(:realname), user_path(homework.user_id)) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<% if homework.status == 1 %>
|
||||
等待回复
|
||||
<% elsif homework.status == 2 %>
|
||||
已通过
|
||||
<% else %>
|
||||
已拒绝
|
||||
<% end %>
|
||||
</td>
|
||||
<td align="center">
|
||||
<%=format_date( homework.created_at ) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_apply_homework)) -%>
|
@ -1,5 +1,14 @@
|
||||
<%= form_for('', :remote => true, :method => :post,:url => add_score_reply_student_work_index_path(:score_id => score.id)) do |f|%>
|
||||
<%= f.text_area 'message', :class => 'ping_text', :placeholder => l(:text_caracters_maximum,:count=>250),:maxlength => 250 %>
|
||||
<input type="hidden" value="<%= is_last%>" name="is_last">
|
||||
<a href="javascript:void(0);" class="fr blue_n_btn" onclick="$('#add_score_reply_<%= score.id%>').find('form').submit();">回复</a>
|
||||
<% end%>
|
||||
<a href="javascript:void(0);" class="fr blue_n_btn" onclick="add_score_Reply_submit('<%=score.id %>');">回复</a>
|
||||
<script type="text/javascript">
|
||||
var first_click = true;
|
||||
function add_score_Reply_submit(id){
|
||||
if(first_click) {
|
||||
first_click = false;
|
||||
$('#add_score_reply_'+id).find('form').submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<% end%>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue