Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
6a19ac4098
|
@ -81,9 +81,10 @@ class WordsController < ApplicationController
|
||||||
@journal_destroyed = JournalsForMessage.delete_message(params[:object_id])
|
@journal_destroyed = JournalsForMessage.delete_message(params[:object_id])
|
||||||
if @journal_destroyed.jour_type == "Bid"
|
if @journal_destroyed.jour_type == "Bid"
|
||||||
@bid = Bid.find(@journal_destroyed.jour_id)
|
@bid = Bid.find(@journal_destroyed.jour_id)
|
||||||
end
|
|
||||||
if @bid
|
|
||||||
@jours_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count
|
@jours_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count
|
||||||
|
elsif @journal_destroyed.jour_type == "Course"
|
||||||
|
@course = Course.find @journal_destroyed.jour_id
|
||||||
|
@jours_count = @course.journals_for_messages.where('m_parent_id IS NULL').count
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
|
|
|
@ -137,7 +137,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:label_course_feedback), course_feedback_path(@course), :class => "f14 c_blue02" %>
|
<%= link_to l(:label_course_feedback), course_feedback_path(@course), :class => "f14 c_blue02" %>
|
||||||
<%= link_to "(#{course_feedback_count})", course_feedback_path(@course), :class => "subnav_num c_orange" %>
|
<%= link_to "(#{course_feedback_count})", course_feedback_path(@course), :class => "subnav_num c_orange", :id => "course_jour_count"%>
|
||||||
</div>
|
</div>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id), :class => " f14 c_blue02"%>
|
<%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id), :class => " f14 c_blue02"%>
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<% if @journal_destroyed.nil? %>
|
<% if @journal_destroyed.nil? %>
|
||||||
alert('<%=l(:notice_failed_delete)%>');
|
alert('<%=l(:notice_failed_delete)%>');
|
||||||
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
||||||
<% if @jours_count %>
|
<% if @bid && @@jours_count %>
|
||||||
$('#jours_count').html("<%= @jours_count %>");
|
$('#jours_count').html("<%= @jours_count %>");
|
||||||
|
<% elsif @course && @jours_count%>
|
||||||
|
$('#course_jour_count').html("(<%= @jours_count %>)");
|
||||||
<% end %>
|
<% end %>
|
||||||
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
|
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
|
||||||
destroyedItem.fadeOut(600,function(){
|
destroyedItem.fadeOut(600,function(){
|
||||||
|
|
Loading…
Reference in New Issue