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

114 lines
5.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% reply_allow = JournalsForMessage.create_by_user? User.current %>
<script type="text/javascript" language="javascript">
//<!CDATA[
function g(o){return document.getElementById(o);}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=3;i<=5;i++){g('ping_tb_'+i).className='ping_normaltab';g('tbc_0'+i).className='ping_undis';}g('tbc_0'+n).className='ping_dis';g('ping_tb_'+n).className='ping_hovertab';
}
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
//]]>
</script>
<%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%>
<div id="popbox">
<div class="ping_con">
<h2><%= @homework.name %></h2>
<ul>
<li><%= l(:label_create_person) %><span class="c_grey"><%= link_to @homework.user, user_path(@homework.user)%></span></li>
<li style=" margin-left:130px;"><%= l(:label_activity_time) %><span class="c_grey" ><%=format_time @homework.created_at %></span></li>
</ul>
<div class="cl"></div>
<% if @homework.users.count > 0 %>
<div><%= l(:label_participation_person) %>
<% @homework.users.each do |homework_user| %>
<span class="c_grey"><%= link_to homework_user, user_path(homework_user)%></span>
<% if @homework.users.count > 1 && homework_user != @homework.users.last %>
、&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<% end %>
<% end %>
</div>
<% end %>
<p>
<% if @homework.description != nil && @homework.description != "" %>
<%= @homework.description %>
<% else %>
<div style="font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 10px;padding-left: 10px ">
<strong><%= l(:label_homework_without_description) %></strong>
</div>
<% end %>
</p>
<p style=" border-bottom:none; color:#333; margin-top:8px;"><strong><%= l(:label_attachment) %>
</strong>
<span>
<% if @is_evaluation || is_teacher%>
<% options = {:author => true } %>
<%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %>
<% else %>
<%= l(:label_cant_download) %>
<% end %>
</span>
</p>
<div class="ping_star">
<% if @is_comprehensive_evaluation == 3 %>
<%= l(:label_work_rating) %>
<%= render :partial => 'show_score', locals: {:stars => @totle_score} %>
<% elsif @is_comprehensive_evaluation == 2 %>
<%= l(:label_work_rating) %>
<% if @has_evaluation || !can_anonymous_comments %>
<%= render :partial => 'show_score', locals: {:stars => @totle_score} %>
<% else %>
<%= rating_for @homework, dimension: :quality, class: 'rateable div_inline' %>
<% end %>
<% elsif @is_comprehensive_evaluation == 1%>
<%= l(:label_work_rating) %>
<%= rating_for @homework, dimension: :quality, class: 'rateable div_inline' %>
<% end %>
</div>
<div class="cl"></div>
<%= render :partial => 'addjour', :locals => {:homework_attach => @homework, :sta => 0, :is_comprehensive_evaluation => @is_comprehensive_evaluation} %>
<!-- <textarea id="ta_msg_content" name="content" placeholder="最多250个字"></textarea>
<a href="#" class="ping_sub">提交评论</a> -->
<div class="cl"></div>
</div><!---ping_con end--->
<div class="ping_list">
<div id="ping_tb_" class="ping_tb_">
<ul>
<li id="ping_tb_4" class="ping_normaltab" onmouseover="i:HoverLi(4);">
<%= l(:label_teacher_comments) %><span class="c_red"><%= @comprehensive_evaluation.nil? ? 0 : @comprehensive_evaluation.count %></span></li>
<li id="ping_tb_5" class="ping_normaltab" onmouseover="i:HoverLi(5);">
<%= l(:label_anonymous_comments) %><span class="c_red"><%= @anonymous_comments.nil? ? 0 : @anonymous_comments.count %></span></li>
<li id="ping_tb_3" class="ping_hovertab" onmouseover="x:HoverLi(3);">
<%= l(:label_responses) %><span class="c_red"><%= @jours.nil? ? 0 : @jours.count %></span></li>
</ul>
</div>
<div class="cl"></div>
<div class="ping_ctt">
<div class="ping_dis" id="tbc_03">
<% @jours.each do |jour| %>
<%= render :partial => 'homework_attach/jour',:locals => {:jour => jour} %>
<% end %>
</div><!--全部评论end-->
<div class="ping_undis" id="tbc_04">
<% @comprehensive_evaluation.nil? || @comprehensive_evaluation.count == 0 || @comprehensive_evaluation.each do |jour| %>
<%= render :partial => 'homework_attach/jour',:locals => {:jour => jour} %>
<% end %>
</div>
<div class="ping_undis" id="tbc_05">
<%= @anonymous_comments.nil? || @anonymous_comments.each do |jour| %>
<%= render :partial => 'homework_attach/jour',:locals => {:jour => jour} %>
<% end %>
</div>
</div>
</div>
</div><!---ping_list end--->
</div>