Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
0d2101bc30
|
@ -1,92 +1,99 @@
|
||||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
||||||
<% teacher_num = searchTeacherAndAssistant(@course).count %>
|
<% teacher_num = searchTeacherAndAssistant(@course).count %>
|
||||||
<% student_num = studentCount(@course) %>
|
<% student_num = studentCount(@course) %>
|
||||||
<% course_file_num = visable_attachemnts_incourse(@course).count%>
|
<% course_file_num = visable_attachemnts_incourse(@course).count%>
|
||||||
<div class="pr_info_logo fl mr10 mb5">
|
<div class="pr_info_logo fl mr10 mb5">
|
||||||
<!--<a href="#"><img src="images/courses/pic_courses.jpg" width="60" height="60" alt="logo" /></a>-->
|
<% if @course.id == 370 %>
|
||||||
<%= image_tag(url_to_avatar(@course), :width => "60", :height => "60") %>
|
<img src="/images/course/boutique.png" width="50" height="auto" alt="精品" class="boutiqueP" />
|
||||||
</div>
|
<% end %>
|
||||||
<div class="pr_info_id fl mb5 f14"><%= @course.is_public == 0 ? "私有课程" : "公开课程" %></div>
|
<!--<a href="#"><img src="images/courses/pic_courses.jpg" width="60" height="60" alt="logo" /></a>-->
|
||||||
<div class="pr_info_id fl f14">
|
<%= image_tag(url_to_avatar(@course), :width => "60", :height => "60") %>
|
||||||
ID:<%= @course.id%>
|
</div>
|
||||||
</div>
|
<div class="pr_info_id fl mb5 f14"><%= @course.is_public == 0 ? "私有课程" : "公开课程" %>
|
||||||
<!--<div class="pr_info_id fl mb5 f14">
|
<% if @course.id == 370 %>
|
||||||
ID:<%#= @course.id%>
|
<img src="/images/course/medal.png" alt="精品课程" style="vertical-align:bottom;" class="ml5" />
|
||||||
</div>
|
<% end %>
|
||||||
<div class="pr_info_join fl">
|
</div>
|
||||||
<%# if is_teacher%>
|
<div class="pr_info_id fl f14">
|
||||||
<%#= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, {:controller => 'courses', :action => 'settings', :id => @course}, :class => "pr_join_a" %>
|
ID:<%= @course.id%>
|
||||||
<%#= set_course_time @course%>
|
</div>
|
||||||
<%#= link_to "<span class='pr_copy'></span>#{l(:button_copy)}".html_safe, copy_course_course_path(@course.id), :class => "pr_join_a" %>
|
<!--<div class="pr_info_id fl mb5 f14">
|
||||||
<%# else%>
|
ID:<%#= @course.id%>
|
||||||
<div id="join_in_course_header"><%#= join_in_course_header(@course, User.current) %></div>
|
</div>
|
||||||
<%# end%>
|
<div class="pr_info_join fl">
|
||||||
</div>-->
|
<%# if is_teacher%>
|
||||||
<div class="cl"></div>
|
<%#= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, {:controller => 'courses', :action => 'settings', :id => @course}, :class => "pr_join_a" %>
|
||||||
|
<%#= set_course_time @course%>
|
||||||
<!--<div >-->
|
<%#= link_to "<span class='pr_copy'></span>#{l(:button_copy)}".html_safe, copy_course_course_path(@course.id), :class => "pr_join_a" %>
|
||||||
<!--<a class="pr_info_name fl c_dark fb break_word" href="http://<%#= Setting.host_course%>/courses/<%#= @course.id%>" target="_blank">-->
|
<%# else%>
|
||||||
<!--<%#= @course.name %>-->
|
<div id="join_in_course_header"><%#= join_in_course_header(@course, User.current) %></div>
|
||||||
<!--</a>-->
|
<%# end%>
|
||||||
<!--<%# if @course.is_public == 0%>-->
|
</div>-->
|
||||||
<!--<span class="img_private ">-->
|
<div class="cl"></div>
|
||||||
<!--<%#= l(:field_is_private)%>-->
|
|
||||||
<!--</span>-->
|
<!--<div >-->
|
||||||
<!--<%# end %>-->
|
<!--<a class="pr_info_name fl c_dark fb break_word" href="http://<%#= Setting.host_course%>/courses/<%#= @course.id%>" target="_blank">-->
|
||||||
<!--<%#if @course.tea_id == User.current.id && @course.outline == 0 %>-->
|
<!--<%#= @course.name %>-->
|
||||||
<!--<span>-->
|
<!--</a>-->
|
||||||
<!--<a href="javascript:void(0)" onclick="course_outline('<%#= @course.id%>');">设置大纲</a>-->
|
<!--<%# if @course.is_public == 0%>-->
|
||||||
<!--</span>-->
|
<!--<span class="img_private ">-->
|
||||||
<!--<%# else%>-->
|
<!--<%#= l(:field_is_private)%>-->
|
||||||
<!--<span>-->
|
<!--</span>-->
|
||||||
<!--<a href="javascript:void(0)" onclick="course_outline('<%#= @course.id%>');">设置大纲</a>-->
|
<!--<%# end %>-->
|
||||||
<!--</span>-->
|
<!--<%#if @course.tea_id == User.current.id && @course.outline == 0 %>-->
|
||||||
<!--<%# end %>-->
|
<!--<span>-->
|
||||||
<!--</div>-->
|
<!--<a href="javascript:void(0)" onclick="course_outline('<%#= @course.id%>');">设置大纲</a>-->
|
||||||
<div >
|
<!--</span>-->
|
||||||
<a class="pr_info_name fl c_dark fb break_word" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank"></a>
|
<!--<%# else%>-->
|
||||||
<div>
|
<!--<span>-->
|
||||||
<a class="pr_info_name c_dark fb break_word fl" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank">
|
<!--<a href="javascript:void(0)" onclick="course_outline('<%#= @course.id%>');">设置大纲</a>-->
|
||||||
<%= @course.name %>
|
<!--</span>-->
|
||||||
</a>
|
<!--<%# end %>-->
|
||||||
<%# if @course.is_public == 0%>
|
<!--</div>-->
|
||||||
<!--<span class="img_private "></span>-->
|
<div >
|
||||||
<!--<span class="img_private mr5 fl">
|
<a class="pr_info_name fl c_dark fb break_word" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank"></a>
|
||||||
<%#= l(:field_is_private)%>
|
<div>
|
||||||
</span>-->
|
<a class="pr_info_name c_dark fb break_word fl" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank">
|
||||||
<%# end %>
|
<%= @course.name %>
|
||||||
<span id="course_outline_bar">
|
</a>
|
||||||
<%if User.current && @course.tea_id == User.current.id && (@course.outline == 0 || BlogComment.where(:id=>@course.outline).count == 0) %>
|
<%# if @course.is_public == 0%>
|
||||||
<a href="javascript:void(0);" title="设置课程大纲" onclick="course_outline('<%= @course.id%>')" class="mr5 syllabusSetting fl"> </a>
|
<!--<span class="img_private "></span>-->
|
||||||
<% elsif User.current && @course.tea_id == User.current.id && @course.outline != 0 && BlogComment.where(:id=>@course.outline).count != 0%>
|
<!--<span class="img_private mr5 fl">
|
||||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
<%#= l(:field_is_private)%>
|
||||||
<% elsif User.current && @course.tea_id != User.current.id && !@course.is_public? && User.current.member_of_course?(@course) && @course.outline != 0%>
|
</span>-->
|
||||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
<%# end %>
|
||||||
<% elsif User.current && @course.tea_id != User.current.id && @course.is_public? && @course.outline != 0%>
|
<span id="course_outline_bar">
|
||||||
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
<%if User.current && @course.tea_id == User.current.id && (@course.outline == 0 || BlogComment.where(:id=>@course.outline).count == 0) %>
|
||||||
<%else%>
|
<a href="javascript:void(0);" title="设置课程大纲" onclick="course_outline('<%= @course.id%>')" class="mr5 syllabusSetting fl"> </a>
|
||||||
<%end %>
|
<% elsif User.current && @course.tea_id == User.current.id && @course.outline != 0 && BlogComment.where(:id=>@course.outline).count != 0%>
|
||||||
</span>
|
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||||
</div>
|
<% elsif User.current && @course.tea_id != User.current.id && !@course.is_public? && User.current.member_of_course?(@course) && @course.outline != 0%>
|
||||||
</div>
|
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||||
<div class="cl"></div>
|
<% elsif User.current && @course.tea_id != User.current.id && @course.is_public? && @course.outline != 0%>
|
||||||
<div class="pr_info_foot ">
|
<a href="<%=syllabus_course_path(@course) %>" title="课程大纲" class="mr5 syllabusIcon fl"> </a>
|
||||||
<%= l(:label_account_identity_teacher)%>(<%= course_teacher_link teacher_num %>)
|
<%else%>
|
||||||
<span>| </span>
|
<%end %>
|
||||||
<%= l(:label_account_identity_student)%>(<%= course_student_link student_num %>)
|
</span>
|
||||||
<span>| </span>
|
</div>
|
||||||
<%= l(:project_module_attachments)%>(<%= link_to course_file_num, course_files_path(@course), :class => 'info_foot_num c_blue',:id=>'courses_files_count_info' %>)</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% if is_teacher %>
|
<div class="pr_info_foot ">
|
||||||
<div class="homepagePostSetting mt5 mr5">
|
<%= l(:label_account_identity_teacher)%>(<%= course_teacher_link teacher_num %>)
|
||||||
<ul>
|
<span>| </span>
|
||||||
<li class="homepagePostSettingIcon">
|
<%= l(:label_account_identity_student)%>(<%= course_student_link student_num %>)
|
||||||
<ul class="homepagePostSettiongText boxShadow">
|
<span>| </span>
|
||||||
<li><%= link_to "课程配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %></li>
|
<%= l(:project_module_attachments)%>(<%= link_to course_file_num, course_files_path(@course), :class => 'info_foot_num c_blue',:id=>'courses_files_count_info' %>)</div>
|
||||||
<li><%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %></li>
|
<div class="cl"></div>
|
||||||
<li><%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %></li>
|
<% if is_teacher %>
|
||||||
</ul>
|
<div class="homepagePostSetting mt5 mr5">
|
||||||
</li>
|
<ul>
|
||||||
</ul>
|
<li class="homepagePostSettingIcon">
|
||||||
</div>
|
<ul class="homepagePostSettiongText boxShadow">
|
||||||
<% end %>
|
<li><%= link_to "课程配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %></li>
|
||||||
|
<li><%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %></li>
|
||||||
|
<li><%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
class AddLastTermToCourse < ActiveRecord::Migration
|
|
||||||
def change
|
|
||||||
add_column :courses, :end_time, :integer
|
|
||||||
add_column :courses, :end_term, :string
|
|
||||||
|
|
||||||
count = Course.all.count / 30 + 2
|
|
||||||
transaction do
|
|
||||||
for i in 1 ... count do
|
|
||||||
Course.page(i).per(30).each do |course|
|
|
||||||
course.end_time = course.time
|
|
||||||
course.end_term = course.term
|
|
||||||
course.save
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
2016
db/schema.rb
2016
db/schema.rb
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -1255,3 +1255,4 @@ div.disable_link {background-color: #c1c1c1 !important;}
|
||||||
.boxShadow {box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
|
.boxShadow {box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||||
|
|
||||||
.fn {font-weight:normal}
|
.fn {font-weight:normal}
|
||||||
|
.boutiqueP {position:absolute; left:0px; top:0px;}
|
||||||
|
|
Loading…
Reference in New Issue