2015-03-19 17:28:36 +08:00
|
|
|
|
<div class="project_r_h">
|
2015-03-23 14:09:41 +08:00
|
|
|
|
<h2 class="project_h2">
|
|
|
|
|
<%= l(:label_homework)%>
|
|
|
|
|
</h2>
|
2014-10-23 11:30:34 +08:00
|
|
|
|
</div>
|
2015-03-19 17:28:36 +08:00
|
|
|
|
<div class="talk_top">
|
|
|
|
|
<p class="fl">
|
2015-03-23 14:09:41 +08:00
|
|
|
|
<%= l(:label_totle)%><span><%= @obj_count%></span><%= l(:label_homework_count)%>
|
2015-03-19 17:28:36 +08:00
|
|
|
|
</p>
|
|
|
|
|
<%= link_to( l(:label_course_homework_new), new_homework_course_path(@course), :class => 'problem_new_btn fl c_dorange') if @is_teacher %>
|
|
|
|
|
<div class="cl"></div>
|
2014-10-23 11:30:34 +08:00
|
|
|
|
</div>
|
2015-03-19 17:28:36 +08:00
|
|
|
|
<% @bids.each do |bid|%>
|
|
|
|
|
<div class="problem_main">
|
|
|
|
|
<%= link_to(image_tag(url_to_avatar(bid.author), :width => "42", :height => "42"), user_path(bid.author), :class => "problem_pic fl") %>
|
|
|
|
|
<div class="problem_txt fl mt5">
|
|
|
|
|
<%= link_to(bid.author.lastname+bid.author.firstname, user_path(bid.author),:class => 'problem_name fl') %>
|
|
|
|
|
<span class="fl"> <%= l(:label_user_create_project_homework) %>:</span>
|
|
|
|
|
<%= link_to(bid.name, course_for_bid_path(bid), :class => 'problem_tit fl fb c_dblue') %>
|
|
|
|
|
<div class="cl mb5"></div>
|
2015-03-23 14:09:41 +08:00
|
|
|
|
<p class="fl "><%= l(:lebel_homework_commit)%> ( <%= link_to bid.homeworks.count, course_for_bid_path(bid.id), :class => 'c_red'%> )</p>
|
2015-03-20 11:37:56 +08:00
|
|
|
|
<% if @is_teacher%>
|
|
|
|
|
<%= bid_anonymous_comment(bid)%>
|
|
|
|
|
<%= link_to(l(:button_edit),edit_bid_path(:course_id =>@course.id, :bid_id => bid.id), :class => "fr mr10 work_edit") %>
|
2015-03-23 20:30:38 +08:00
|
|
|
|
<% elsif @is_student%>
|
|
|
|
|
<%= student_anonymous_comment bid %>
|
|
|
|
|
<%= student_new_homework bid %>
|
2015-03-20 11:37:56 +08:00
|
|
|
|
<% end %>
|
2015-03-19 17:28:36 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-03-25 14:34:20 +08:00
|
|
|
|
<script>
|
2015-03-25 14:35:23 +08:00
|
|
|
|
$(function(){if($("#bid_description_<%= bid.id%>_content").height()>38){$("#bid_show_more_des_button<%= bid.id%>").show();}});
|
2015-03-25 14:34:20 +08:00
|
|
|
|
</script>
|
|
|
|
|
<div id="bid_description_<%= bid.id%>" class="news_description mt5">
|
|
|
|
|
<div id="bid_description_<%= bid.id%>_content">
|
2015-04-03 11:19:15 +08:00
|
|
|
|
<%= textAreailizable bid, :description %>
|
2015-03-25 14:34:20 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="news_foot c_red" id="bid_show_more_des_button<%= bid.id%>" onclick="bid_show_more_des(<%= bid.id%>);" style="cursor:pointer;display: none;">
|
2015-03-24 09:57:55 +08:00
|
|
|
|
<%= l(:button_more)%>...
|
|
|
|
|
<span class="g-arr-down"></span>
|
2015-03-20 11:37:56 +08:00
|
|
|
|
</div>
|
2015-03-24 09:57:55 +08:00
|
|
|
|
<span class="fl"><%= l(:label_end_time)%>:<%= bid.deadline%></span>
|
|
|
|
|
<% if betweentime(bid.deadline) < 0 %>
|
2015-03-26 19:01:22 +08:00
|
|
|
|
<span class='fr mr10 c_red '>
|
2015-03-24 09:57:55 +08:00
|
|
|
|
<%= l(:label_commit_limit)%>
|
|
|
|
|
</span>
|
|
|
|
|
<% else %>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
window.setInterval(function(){show_bid_dead_line(<%= bid.deadline.year%>,<%= bid.deadline.month%>,<%= bid.deadline.day + 1%>,"bid_deadline_<%= bid.id%>");},1000)
|
|
|
|
|
</script>
|
|
|
|
|
<div id="bid_deadline_<%= bid.id%>">
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
2015-03-19 17:28:36 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2014-10-23 11:30:34 +08:00
|
|
|
|
</div>
|
2015-03-19 17:28:36 +08:00
|
|
|
|
<% end%>
|
2014-10-23 11:30:34 +08:00
|
|
|
|
|
2015-03-20 11:37:56 +08:00
|
|
|
|
<ul class="wlist">
|
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
2015-03-19 17:28:36 +08:00
|
|
|
|
</ul>
|
|
|
|
|
<div class="cl"></div>
|