具体班级页里的班级动态,不需要显示班级名称,直接显示栏目名称就可、具体作业的详情页,也不需要显示班级名称

This commit is contained in:
cxt 2016-12-06 10:00:18 +08:00
parent 88c8c4144b
commit 9e9f1d44a1
10 changed files with 20 additions and 17 deletions

View File

@ -1,8 +1,8 @@
<% if @course %> <% if @course %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); $("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/course_news_post_reply', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
<% elsif @project %> <% elsif @project %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
<% else %> <% else %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>"); $("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'organizations/course_news_post_reply', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
<% end %> <% end %>
sd_create_editor_from_data('<%= @user_activity_id%>',"","100%", "UserActivity"); sd_create_editor_from_data('<%= @user_activity_id%>',"","100%", "UserActivity");

View File

@ -62,17 +62,17 @@
<% when 'HomeworkCommon' %> <% when 'HomeworkCommon' %>
<%= render :partial => 'users/course_homework', :locals => {:activity => act, :user_activity_id => activity.id, :hw_status => 2} %> <%= render :partial => 'users/course_homework', :locals => {:activity => act, :user_activity_id => activity.id, :hw_status => 2} %>
<% when 'News' %> <% when 'News' %>
<%= render :partial => 'users/course_news', :locals => {:activity => act, :user_activity_id => activity.id} %> <%= render :partial => 'users/course_news', :locals => {:activity => act, :user_activity_id => activity.id, :is_course => 1} %>
<% when 'Message' %> <% when 'Message' %>
<%= render :partial => 'users/course_message', :locals => {:activity => act, :user_activity_id => activity.id,:is_course=>1,:is_board=>0} %> <%= render :partial => 'users/course_message', :locals => {:activity => act, :user_activity_id => activity.id,:is_course=>1,:is_board=>0} %>
<% when 'Poll' %> <% when 'Poll' %>
<%= render :partial => 'users/course_poll', :locals => {:activity => act, :user_activity_id => activity.id} %> <%= render :partial => 'users/course_poll', :locals => {:activity => act, :user_activity_id => activity.id, :is_course => 1} %>
<% when 'JournalsForMessage' %> <% when 'JournalsForMessage' %>
<%= render :partial => 'users/course_journalsformessage', :locals => {:activity => act, :user_activity_id => activity.id} %> <%= render :partial => 'users/course_journalsformessage', :locals => {:activity => act, :user_activity_id => activity.id, :is_course => 1} %>
<% when 'Attachment' %> <% when 'Attachment' %>
<%= render :partial => 'users/course_attachment', :locals => {:activity => act, :user_activity_id => activity.id} %> <%= render :partial => 'users/course_attachment', :locals => {:activity => act, :user_activity_id => activity.id} %>
<% when 'Course' %> <% when 'Course' %>
<%= render :partial => 'users/course_create', :locals => {:activity => act, :user_activity_id => activity.id} %> <%= render :partial => 'users/course_create', :locals => {:activity => act, :user_activity_id => activity.id, :is_course => 1} %>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>

View File

@ -4,8 +4,6 @@
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4"> <div class="homepagePostTo break_word mt-4">
<%= link_to homework.user.show_name, user_activities_path(homework.user_id), :class => "newsBlue mr15"%> <%= link_to homework.user.show_name, user_activities_path(homework.user_id), :class => "newsBlue mr15"%>
TO
<%= link_to homework.course.name, course_path(homework.course_id), :class => "newsBlue"%>
</div> </div>
<div class="homepagePostTitle hidden fl m_w505"> <div class="homepagePostTitle hidden fl m_w505">
<% index = get_hw_index(homework, is_teacher) %> <% index = get_hw_index(homework, is_teacher) %>

View File

@ -12,7 +12,7 @@
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> <% end %>
TO TO
<%= link_to activity.course.name.to_s+" | 班级资源", course_files_path(activity.course), :class => "newsBlue" %> <%= link_to "班级资源", course_files_path(activity.course), :class => "newsBlue ml15" %>
</div> </div>
<div class="homepagePostTitle break_word" > <div class="homepagePostTitle break_word" >
<%= link_to activity.filename, course_files_path(activity.course), :class => "postGrey" %> <%= link_to activity.filename, course_files_path(activity.course), :class => "postGrey" %>

View File

@ -12,7 +12,8 @@
<%= link_to activity.try(:teacher).try(:realname), user_path(activity.teacher), :class => "newsBlue mr15" %> <%= link_to activity.try(:teacher).try(:realname), user_path(activity.teacher), :class => "newsBlue mr15" %>
<% end %> <% end %>
TO TO
<%= link_to activity.name.to_s+" | 班级", course_path(activity.id,:host=>Setting.host_course), :class => "newsBlue" %> <% str = defined?(is_course) && is_course == 1 ? "班级" : "#{activity.name.to_s} | 班级" %>
<%= link_to str, course_path(activity.id,:host=>Setting.host_course), :class => "newsBlue ml15" %>
</div> </div>
<div class="homepagePostTitle break_word" > <div class="homepagePostTitle break_word" >
<%= link_to activity.name, course_path(activity.id,:host=>Setting.host_course), :class => "postGrey" %> <%= link_to activity.name, course_path(activity.id,:host=>Setting.host_course), :class => "postGrey" %>

View File

@ -9,10 +9,10 @@
<div class="homepagePostTo break_word"> <div class="homepagePostTo break_word">
<%= link_to activity.user.show_name, user_path(activity.user,:host=>Setting.host_user), :class => "newsBlue mr15" %> <%= link_to activity.user.show_name, user_path(activity.user,:host=>Setting.host_user), :class => "newsBlue mr15" %>
TO <!--+"(课程名称)" --> TO <!--+"(课程名称)" -->
<% if hw_status == 3 || hw_status == 5 %> <% if hw_status == 3 || hw_status == 2 %>
<%= link_to activity.course.name, course_path(activity.course_id), :class => "newsBlue"%> <%= link_to "班级作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
<% else %> <% else %>
<%= link_to activity.course.name.to_s+" | 班级作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue"%> <%= link_to activity.course.name.to_s+" | 班级作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
<% end %> <% end %>
</div> </div>
<div class="homepagePostTitle hidden fl m_w505"> <!--+"(作业名称)"--> <div class="homepagePostTitle hidden fl m_w505"> <!--+"(作业名称)"-->

View File

@ -9,7 +9,8 @@
<%= link_to activity.user.show_name, user_path(activity.user), :class => "newsBlue mr15" %> <%= link_to activity.user.show_name, user_path(activity.user), :class => "newsBlue mr15" %>
TO TO
<% course=Course.find(activity.jour_id) %> <% course=Course.find(activity.jour_id) %>
<%= link_to course.name.to_s+" | 班级留言", course_feedback_path(course), :class => "newsBlue" %> <% str = defined?(is_course) && is_course == 1 ? "班级留言" : "#{course.name.to_s} | 班级留言" %>
<%= link_to str, course_feedback_path(course), :class => "newsBlue ml15" %>
</div> </div>
<!--<div class="homepagePostTitle break_word list_style upload_img"> <!--<div class="homepagePostTitle break_word list_style upload_img">
<%# if activity.parent %> <%# if activity.parent %>

View File

@ -8,7 +8,8 @@
<div class="homepagePostTo break_word"> <div class="homepagePostTo break_word">
<%= link_to activity.author.show_name, user_path(activity.author, :host=>Setting.host_user), :class => "newsBlue mr15" %> <%= link_to activity.author.show_name, user_path(activity.author, :host=>Setting.host_user), :class => "newsBlue mr15" %>
TO TO
<%= link_to activity.course.name.to_s+" | #{activity.board.parent.nil? ? '班级讨论区' : activity.board.name}", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue mr5"%> <% str = is_course == 1 ? "#{activity.board.parent.nil? ? '班级讨论区' : activity.board.name}" : activity.course.name.to_s+" | #{activity.board.parent.nil? ? '班级讨论区' : activity.board.name}" %>
<%= link_to str, course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15"%>
</div> </div>
<div class="homepagePostTitle hidden m_w530 fl"> <div class="homepagePostTitle hidden m_w530 fl">
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"--> <% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->

View File

@ -8,7 +8,8 @@
<div class="homepagePostTo break_word"> <div class="homepagePostTo break_word">
<%= link_to activity.author.show_name, user_path(activity.author), :class => "newsBlue mr15" %> <%= link_to activity.author.show_name, user_path(activity.author), :class => "newsBlue mr15" %>
TO <!--+"(课程名称)"--> TO <!--+"(课程名称)"-->
<%= link_to activity.course.name.to_s+" | 班级通知", course_news_index_path(activity.course), :class => "newsBlue" %> <% str = defined?(is_course) && is_course == 1 ? "班级通知" : "#{activity.course.name.to_s} | 班级通知" %>
<%= link_to str, course_news_index_path(activity.course), :class => "newsBlue ml15" %>
</div> </div>
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"--> <div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %> <%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>

View File

@ -17,7 +17,8 @@
<% end %> <% end %>
TO TO
<% course = Course.find(activity.polls_group_id) %> <% course = Course.find(activity.polls_group_id) %>
<%= link_to course.name.to_s+" | 问卷", poll_index_path(:polls_type => "Course", :polls_group_id => activity.polls_group_id), :class => "newsBlue" %> <% str = defined?(is_course) && is_course == 1 ? "班级问卷" : "#{course.name.to_s} | 班级问卷" %>
<%= link_to str, poll_index_path(:polls_type => "Course", :polls_group_id => activity.polls_group_id), :class => "newsBlue ml15" %>
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>--> <!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
</div> </div>
<div class="homepagePostTitle break_word" > <div class="homepagePostTitle break_word" >