socialforge/app/views/student_work/_show.html.erb

93 lines
3.8 KiB
Plaintext
Raw Normal View History

<div class="show_hwork_arrow"></div>
<div class="show_hwork">
<ul>
<li >
<span class="tit_fb">上交时间:</span>
<%=format_time @work.created_at %>
</li>
<!--<li >-->
<!--<span class="tit_fb"> 参与人员:</span>-->
<!--程梦雯&nbsp;&nbsp;王强-->
<!--</li>-->
<% if @work.project%>
<li >
<span class="tit_fb"> 关联项目:</span>
<%= link_to( @work.project.name, project_path(@work.project.id), :class => "c_blue02" )%>
</li>
<% end%>
<li >
<span class="tit_fb ">内容:</span>
<p class="show_hwork_p">
<%= @work.description%>
</p>
<div class="cl"></div>
</li>
<li >
<span class="tit_fb"> 附件:</span>
<% if @work.attachments.empty?%>
<span style="color: #999999">尚未提交附件</span>
<% else%>
<%= render :partial => 'work_attachments', :locals => {:attachments => @work.attachments} %>
<% end%>
</li>
<div class="cl"></div>
<div id="add_student_score">
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
</div>
</ul>
<% unless @work.student_works_scores.empty?%>
<div class="ping_box">
<%@work.student_works_scores.each do |score|%>
<ul class="ping_box_ul ping_line">
<%= link_to image_tag(url_to_avatar(score.user), :width => "34", :height => "34"), user_path(score.user),:class => "ping_pic fl" %>
<div class="ping_box_tit">
<%= link_to score.user.show_name, user_path(score.user), :title => score.user.show_name, :class => "c_blue fl" %>
<span class="ml5 fl"><%= student_work_score_role score%></span>
<span class="ml20 fl">评分:</span>
<a href="javascript:void(0);" class="c_orange fl" ><%= score.score%>分</a>
<a href="javascript:void(0);" class="fr c_purple mr5" >回复</a>
<span class=" fr c_grey mr20">
<%=format_time score.created_at %>
</span>
<div class="cl mb5"></div>
<p class="break_word">
<%= score.comment%>
</p>
<%form_for "", add_score_reply_student_work_path(@work)%>
<textarea class="ping_text undis"></textarea>
<a href="javascript:void(0);" class="fr blue_n_btn undis" >回复</a>
<% score.journals_for_messages.each do |jour|%>
<div class="ping_back mt10">
<%= link_to image_tag(url_to_avatar(jour.user), :width => "32", :height => "32"), user_path(jour.user),:class => "st_img fl" %>
<div class="ping_back_tit">
<a href="javascript:void(0);" class="c_blue fl" >
<%= link_to jour.user.show_name, user_path(jour.user), :title => jour.user.show_name, :class => "c_blue fl" %>
</a>
<% if jour.user==User.current || User.current.admin? %>
<%= link_to(l(:label_bid_respond_delete), destroy_score_reply_student_work_index_path(:jour_id => jour.id),
:remote => true, :confirm => l(:text_are_you_sure), :title => l(:button_delete), :class => "fr c_purple") %>
<% end %>
<span class=" fr c_grey mr10">
<%=jour score.created_at %>
</span>
<div class="cl mb5"></div>
<p class="break_word">
<%= jour.comment%>
</p>
</div><!---ping_box_tit end--->
<div class="cl"></div>
</div><!---ping_back end--->
<% end%>
</div>
<div class="cl"></div>
</ul>
<% end%>
</div><!---ping_box end--->
<%end%>
<a href="javascript:void(0);" class="fr c_blue mt5 mb5" onclick="$('#about_hwork_<%= @work.id%>').html('');">收起</a>
<div class="cl"></div>
</div><!---show_hwork end--->