outline url
This commit is contained in:
parent
efef1d943f
commit
b7a6bc3614
|
@ -71,7 +71,7 @@ class BlogCommentsController < ApplicationController
|
|||
else#如果是回复被删,
|
||||
if params[:course_id] #如果带了course_id过来了,那么这是要跳到课程大纲去的
|
||||
@article.delete
|
||||
redirect_to show_course_outline_course_path(:id=>params[:course_id])
|
||||
redirect_to syllabus_course_path(:id=>params[:course_id])
|
||||
else
|
||||
root = @article.root
|
||||
@article.delete
|
||||
|
@ -131,7 +131,7 @@ class BlogCommentsController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html {
|
||||
if params[:course_id] #如果呆了course_id过来了,那么这是要跳到课程大纲去的
|
||||
redirect_to show_course_outline_course_path(:id=>params[:course_id])
|
||||
redirect_to syllabus_course_path(:id=>params[:course_id])
|
||||
else
|
||||
redirect_to user_blog_blog_comment_path(:user_id=>@article.author_id,:blog_id=>@article.blog_id,:id=>@article)
|
||||
end
|
||||
|
|
|
@ -740,7 +740,7 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
|
||||
#显示课程大纲
|
||||
def show_course_outline
|
||||
def syllabus
|
||||
@article = BlogComment.find(@course.outline)
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'base_courses'}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
hideModal();
|
||||
<%if @course.tea_id == User.current.id && @course.outline == 0 %>
|
||||
<% else %>
|
||||
$("#course_outline_bar").html('<a href="<%=show_course_outline_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>')
|
||||
$("#course_outline_bar").html('<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>')
|
||||
<%end %>
|
||||
<%if @is_in_show_outline_page && @is_in_show_outline_page == 'Y'%>
|
||||
window.location.href='<%=show_course_outline_course_path(@course) %>';
|
||||
window.location.href='<%=syllabus_course_path(@course) %>';
|
||||
<% end %>
|
||||
|
|
|
@ -89,11 +89,11 @@
|
|||
<%if User.current && @course.tea_id == User.current.id && (@course.outline == 0 || BlogComment.where(:id=>@course.outline).count == 0) %>
|
||||
<a href="javascript:void(0);" title="设置课程大纲" onclick="course_outline('<%= @course.id%>')" class="mr5 syllabusSetting fl"> </a>
|
||||
<% elsif User.current && @course.tea_id == User.current.id && @course.outline != 0 && BlogComment.where(:id=>@course.outline).count != 0%>
|
||||
<a href="<%=show_course_outline_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<% elsif User.current && @course.tea_id != User.current.id && !@course.is_public? && User.current.member_of_course?(@course) && @course.outline != 0%>
|
||||
<a href="<%=show_course_outline_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<% elsif User.current && @course.tea_id != User.current.id && @course.is_public? && @course.outline != 0%>
|
||||
<a href="<%=show_course_outline_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||
<%else%>
|
||||
<%end %>
|
||||
</span>
|
||||
|
|
|
@ -792,7 +792,7 @@ RedmineApp::Application.routes.draw do
|
|||
get 'course_outline'
|
||||
post 'search_course_outline'
|
||||
post 'set_course_outline'
|
||||
get 'show_course_outline'
|
||||
get 'syllabus'
|
||||
end
|
||||
collection do
|
||||
match 'join_private_courses', :via => [:get, :post]
|
||||
|
|
Loading…
Reference in New Issue