Conflicts: app/views/layouts/_syllabus_base_info.html.erbdaiao_dev
commit
9ff728f080
@ -0,0 +1,20 @@
|
||||
#coding=utf-8
|
||||
#
|
||||
|
||||
module WechatsHelper
|
||||
def include_wechat_jsfile
|
||||
if Rails.env.production?
|
||||
javascript_include_tag '/javascripts/wechat/build/app.min.js'
|
||||
else
|
||||
wechat_path = File.join(Rails.root, "public", "javascripts", "wechat")
|
||||
srcs = Rails.application.config.wechat_srcs
|
||||
paths = []
|
||||
srcs.each do |src|
|
||||
Dir.glob(wechat_path+ "/#{src}" ) do |path|
|
||||
paths << path[File.join(Rails.root, "public").to_s.size, path.size]
|
||||
end
|
||||
end
|
||||
javascript_include_tag *paths
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,13 @@
|
||||
class Commit < ActiveRecord::Base
|
||||
attr_accessible :comments, :committed_on, :committer, :project_id, :repository_id, :version
|
||||
validates :repository_id, presence: true
|
||||
validates :version, presence: true, uniqueness: {scope: :repository_id}
|
||||
validates :committed_on, presence: true
|
||||
has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy
|
||||
after_create :act_as_forge_activity
|
||||
|
||||
# 项目中提交动态
|
||||
def act_as_forge_activity
|
||||
self.forge_acts << ForgeActivity.new(:user_id => 2, :project_id => self.project_id)
|
||||
end
|
||||
end
|
@ -0,0 +1,20 @@
|
||||
<div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="ReplyToMessageInputContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for @comment, :as => :reply, :url => {:controller => 'comments',:action => 'reply', :id => @comment.id}, :method => 'post', :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="content"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
@ -0,0 +1,10 @@
|
||||
<% if @user_activity_id %>
|
||||
<% if @news.project_id && @news.project_id != -1 %>
|
||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% elsif @news.course_id %>
|
||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% elsif @news.org_subfield_id %>
|
||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% end %>
|
||||
<% end %>
|
||||
sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "<%=@news.class.to_s%>");
|
@ -0,0 +1,8 @@
|
||||
if($("#reply_message_<%= @comment.id%>").length > 0) {
|
||||
$("#reply_message_<%= @comment.id%>").replaceWith("<%= escape_javascript(render :partial => 'comments/simple_ke_reply_form', :locals => {:reply => @comment}) %>");
|
||||
$(function(){
|
||||
sd_create_editor_from_data(<%= @comment.id%>,null,"100%", "<%=@comment.class.to_s%>");
|
||||
});
|
||||
}else if($("#reply_to_message_<%= @comment.id %>").length >0) {
|
||||
$("#reply_to_message_<%= @comment.id%>").replaceWith("<p id='reply_message_<%= @comment.id %>'></p>");
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
<% if @user_activity_id %>
|
||||
<% if @news.project_id && @news.project_id != -1 %>
|
||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% elsif @news.course_id %>
|
||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% elsif @news.org_subfield_id %>
|
||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% end %>
|
||||
<% end %>
|
||||
sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "<%=@news.class.to_s%>");
|
@ -1,47 +1,53 @@
|
||||
<% course_file_num = visable_attachemnts_incourse(@course).count%>
|
||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
||||
<% if show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
|
||||
<li>
|
||||
<a href="<%=course_boards_path(@course) %>">问答区</a>
|
||||
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if show_nav?(@course.homework_commons.count) %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_homework), homework_common_index_path(:course => @course.id), :class => "f12 c_blue02 ml10 fn"%>
|
||||
<%= link_to( "", homework_common_index_path(:course => @course.id,:is_new => 1), :class => 'courseMenuSetting', :title =>"#{l(:label_course_homework_new)}") if is_teacher %>
|
||||
</div>
|
||||
<li>
|
||||
<a href="<%= homework_common_index_path(:course => @course.id) %>">作业</a>
|
||||
<%= link_to( "",homework_common_index_path(:course => @course.id,:is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_course_homework_new)}") if is_teacher %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if show_nav?(@course.news.count) %>
|
||||
<div class="subNav">
|
||||
<%= link_to "通知", course_news_index_path(@course), :class => "f12 c_blue02 ml10 fn" %>
|
||||
<%= link_to( "", new_course_news_path(@course), :class => 'courseMenuSetting', :title =>"#{l(:label_course_news_new)}") if is_teacher %>
|
||||
</div>
|
||||
<li>
|
||||
<a href="<%=course_news_index_path(@course) %>">通知</a>
|
||||
<%= link_to( "",new_course_news_path(@course,:is_new=>1), :class => 'sy_class_add', :title =>"#{l(:label_course_news_new)}") if is_teacher %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if show_nav?(course_file_num) %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_course_file), course_files_path(@course), :class => "f12 c_blue02 ml10 fn" %>
|
||||
<li>
|
||||
<a href="<%=course_files_path(@course) %>">资源库</a>
|
||||
<% if is_teacher || (@course.publish_resource == 1 && User.current.member_of_course?(@course)) %>
|
||||
<!--link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white')-->
|
||||
<a class="courseMenuSetting" title="上传资源" href="javascript:void(0);" onclick="course_files_upload();"> </a>
|
||||
<a class="sy_class_add" title="上传资源" href="javascript:void(0);" onclick="course_files_upload();"> </a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_course_board), course_boards_path(@course), :class => "f12 c_blue02 ml10 fn" %>
|
||||
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'courseMenuSetting', :title =>"#{l(:label_message_new)}") %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if show_nav?(course_feedback_count) %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_course_feedback), course_feedback_path(@course), :class => "f12 c_blue02 ml10 fn" %>
|
||||
<%= link_to "", course_feedback_path(@course), :class => 'courseMenuSetting', :title =>"#{l(:label_course_feedback)}", :id => "course_jour_count"%>
|
||||
</div>
|
||||
<li>
|
||||
<a href="<%=course_feedback_path(@course) %>">留言</a>
|
||||
<%= link_to "", course_feedback_path(@course), :class => 'sy_class_add', :title =>"#{l(:label_course_feedback)}", :id => "course_jour_count"%>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if show_nav?(course_poll_count) %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id), :class => " f12 c_blue02 ml10 fn"%>
|
||||
<%= link_to( "", new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => 'courseMenuSetting', :title =>"#{l(:label_new_poll)}") if is_teacher %>
|
||||
</div>
|
||||
<li>
|
||||
<a href="<%=poll_index_path(:polls_type => "Course", :polls_group_id => @course.id) %>">问卷调查</a>
|
||||
<%= link_to( "", new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => 'sy_class_add', :title =>"#{l(:label_new_poll)}") if is_teacher %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% count = User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status <> 1").count %>
|
||||
<% if show_nav?(count) %>
|
||||
<li>
|
||||
<a href="<%=exercise_index_path(:course_id => @course.id) %>">在线测验</a>
|
||||
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'sy_class_add', :title =>"新建试卷") if is_teacher %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if show_nav?(User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status=2").count) %>
|
||||
<div class="subNav">
|
||||
<%= link_to "在线测验", exercise_index_path(:course_id => @course.id), :class => " f12 c_blue02 ml10 fn"%>
|
||||
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'courseMenuSetting', :title =>"新建试卷") if is_teacher %>
|
||||
</div>
|
||||
<% if show_nav?(0) %>
|
||||
<li>
|
||||
<a href="<%=statistics_course_course_path(@course) %>">统计</a>
|
||||
<!--<a href="javascript:void(0);" class="sy_class_add"></a>-->
|
||||
</li>
|
||||
<% end %>
|
@ -0,0 +1,5 @@
|
||||
<div class="sy_class_r ml10">
|
||||
<div class="icons_tishi"><img src="../../images/sy/icons_smile.png" width="110" height="110" alt="" ></div>
|
||||
<p class="sy_tab_con_p">统计功能即将上线,届时我们一起享受教育大数据的红利吧!</p>
|
||||
<div style="height:400px;"></div>
|
||||
</div><!--sy_class_r end-->
|
@ -1,30 +1,26 @@
|
||||
<div class="ReplyToMessageContainer borderBottomNone " id="reply_to_message_<%= @issue.id%>">
|
||||
<div class="ReplyToMessageContainer borderBottomNone " id="reply_to_message_<%= @jour.id%>">
|
||||
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @jour.id%>">
|
||||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
|
||||
<div class="ReplyToMessageInputContainer mb10">
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= @issue.id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post") do |f|%>
|
||||
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
||||
<!--<div class="cl"></div>-->
|
||||
<input type="hidden" name="quote" value=""/>
|
||||
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
||||
<div nhname='toolbar_container_<%= @issue.id%>' ></div>
|
||||
<div nhname='new_message_<%= @jour.id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="journal_id" value="<%=@jour.id%>"/>
|
||||
<div nhname='toolbar_container_<%= @jour.id%>' ></div>
|
||||
<div class="cl"></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id%>' name="notes"></textarea>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @jour.id%>' name="content"></textarea>
|
||||
<div class="cl"></div>
|
||||
<span nhname='contentmsg_<%= @issue.id%>' class="fl"></span>
|
||||
<a id="new_message_submit_btn_<%= @issue.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<span nhname='contentmsg_<%= @jour.id%>' class="fl"></span>
|
||||
<a id="new_message_submit_btn_<%= @jour.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
|
||||
<div class="cl"></div>
|
||||
|
||||
</div>
|
||||
|
@ -1,3 +1,8 @@
|
||||
<% if @user_activity_id %>
|
||||
$("#div_user_issue_reply_<%=@user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/project_issue_reply', :locals => {:activity => @issue, :user_activity_id => @user_activity_id}) %>");
|
||||
sd_create_editor_from_data(<%= @user_activity_id%>, null, "100%","<%=@issue.class.name%>");
|
||||
<% else %>
|
||||
$("#reply_div_<%= @issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue,:replies_all_i=>0}) %>");
|
||||
$(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)')
|
||||
sd_create_editor_from_data(<%= @issue.id%>, null, "100%","<%=@issue.class.name%>");
|
||||
sd_create_editor_from_data(<%= @issue.id%>, null, "100%","<%=@issue.class.name%>");
|
||||
<% end %>
|
@ -1,9 +1,8 @@
|
||||
if($("#reply_message_<%= @jour.id%>").length > 0) {
|
||||
$("#reply_message_<%= @jour.id%>").replaceWith("<%= escape_javascript(render :partial => 'issues/issue_reply_ke_form') %>");
|
||||
$(function(){
|
||||
$('input[name=quote]').val("<%= raw escape_javascript(@tempContent.html_safe) %>");
|
||||
sd_create_editor_from_data(<%= @issue.id%>, null, "100%", "<%= @issue.class.name %>");
|
||||
sd_create_editor_from_data(<%= @jour.id%>, null, "100%", "<%= @jour.class.name %>");
|
||||
});
|
||||
}else if($("#reply_to_message_<%= @issue.id%>").length >0) {
|
||||
$("#reply_to_message_<%= @issue.id%>").replaceWith("<p id='reply_message_<%= @jour.id%>'></p>");
|
||||
}else if($("#reply_to_message_<%= @jour.id%>").length >0) {
|
||||
$("#reply_to_message_<%= @jour.id%>").replaceWith("<p id='reply_message_<%= @jour.id%>'></p>");
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
||||
<% teacher_num = TeacherAndAssistantCount(@course) %>
|
||||
<% student_num = studentCount(@course) %>
|
||||
<% course_file_num = visable_attachemnts_incourse(@course).count %>
|
||||
<p class="sy_cgrey mb10">
|
||||
<%=link_to @course.syllabus.title, syllabus_path(@course.syllabus_id), :class => 'sy_cgrey' %>
|
||||
>
|
||||
<%=link_to @course.name, course_path(@course), :class => 'sy_cgrey' %>
|
||||
</p>
|
||||
|
||||
<% if is_teacher %>
|
||||
<div class="homepagePostSetting" >
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<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>
|
||||
<li><%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "postOptionLink", :target => "_blank" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div class="sy_class_logo fl">
|
||||
<%= image_tag(url_to_avatar(@course), :width => "110", :height => "110", :alt => "班级logo") %>
|
||||
</div>
|
||||
<div class="sy_class_id fl">
|
||||
<p>邀请码<br /><span class="sy_corange"><%=@course.generate_invite_code %></span></p>
|
||||
</div>
|
||||
<div class="sy_class_info fl ml15">
|
||||
<div class="sy_class_titbox">
|
||||
<h3 class="fl sy_class_title"><%=@course.name %></h3>
|
||||
<span class="icon_si fl mr20"><%=@course.is_public == 0 ? '私有' : '公开' %></span>
|
||||
<p class="sy_cgrey fl mt3">
|
||||
<span class=" mr15">教师:<%= course_teacher_link teacher_num %></span>
|
||||
<span class=" mr15">学生:<%= course_student_link student_num %></span>
|
||||
<span class=" mr15">资源:<%= link_to course_file_num, course_files_path(@course), :class => 'sy_cblue',:id=>'courses_files_count_info' %></span>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<p class="sy_cgrey mb10">
|
||||
<span class=" mr15">主讲老师:<%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cblue') %></span>
|
||||
<span class=" mr15">学时:<span class="sy_cblack"><%= @course.class_period %>学时</span></span>
|
||||
<span class=" mr15">学期:<span class="sy_cblack"><%= current_time_and_term @course %></span></span>
|
||||
<span class=" mr15">单位:<span class="sy_cblack"><%= get_occupation_from_user(@course.teacher).blank? ? '无' : get_occupation_from_user(@course.teacher) %></span></span>
|
||||
</p>
|
||||
<!--<a href="javascript:void(0);" class="sy_btn_orange mr10" > 教师身份</a>-->
|
||||
<% unless is_teacher %>
|
||||
<div id="join_in_course_header"><%= join_in_course_header(@course, User.current) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
@ -1,27 +1,40 @@
|
||||
<ul class="syllabus_leftinfo" id="all_syllabus_attr">
|
||||
<%= form_for('syllabus',:url => update_base_info_syllabus_path(syllabus.id),:remote => true) do |f|%>
|
||||
<li class="fl"><label >创建教师:</label><span><%=syllabus.user.show_name %></span></li>
|
||||
<a href="javascript:void(0);" onclick="update_syllabus_info();" id="submit_edit_info" class="fr">保存</a>
|
||||
<!--<a href="javascript:void(0);" onclick="reset_syllabus_info();" id="submit_reset_info" class="fr mr10">取消</a>-->
|
||||
<%= form_for('syllabus',:url => update_base_info_syllabus_path(syllabus.id),:remote => true) do |f|%>
|
||||
<h3 class="sy_right_title">课程信息
|
||||
<a href="javascript:void(0);" onclick="update_syllabus_info();" id="submit_edit_info" class="sy_cmore fr mr10">保存</a>
|
||||
<div class="cl"></div>
|
||||
<li><label>课程性质:</label>
|
||||
<%= select_tag :syllabus_type,options_for_select(syllabus_type,syllabus.syllabus_type), {:id=>"syllabus_type_input", :class=>"syllabus_select"} %>
|
||||
</h3>
|
||||
<ul class="sy_info mt15" id="all_syllabus_attr">
|
||||
<li><label >创建教师</label><span class="fl ml10 sy_cgrey"><%=syllabus.user.show_name %></span></li>
|
||||
<li><label>课程性质</label>
|
||||
<%= select_tag :syllabus_type,options_for_select(syllabus_type,syllabus.syllabus_type), {:id=>"syllabus_type_input", :class=>"sy_info_select fl"} %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li><label >学分</label>
|
||||
<input id="syllabus_credit_input" style="width: 30px;" class="fl" name="credit" placeholder="5" value="<%=syllabus.credit %>"> 学分
|
||||
<span class="none c_red ml5" id="syllabus_credit_notice">正整数</span>
|
||||
</li>
|
||||
<li><label >学分:</label>
|
||||
<input id="syllabus_credit_input" class="syllabus_input_min fl" name="credit" placeholder="5" value="<%=syllabus.credit %>"> 学分
|
||||
<span class="none c_red ml5" id="syllabus_credit_notice">请输入正整数</span><div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
<li><label>总学时</label>
|
||||
<input id="syllabus_hours_input" style="width: 30px;" class="fl" name="hours" placeholder="50" value="<%=syllabus.hours %>"> 学时
|
||||
<span class="none c_red ml5" id="syllabus_hours_notice">正整数</span>
|
||||
</li>
|
||||
<li><label>总学时:</label><input id="syllabus_hours_input" class="syllabus_input_min fl" name="hours" placeholder="50" value="<%=syllabus.hours %>"> 学时
|
||||
<span class="none c_red ml5" id="syllabus_hours_notice">请输入正整数</span><div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
<li><label>理论学时</label>
|
||||
<input id="syllabus_theory_hours_input" style="width: 30px;" class="fl" name="theory_hours" placeholder="10" value="<%=syllabus.theory_hours %>"> 学时
|
||||
<span class="none c_red ml5" id="syllabus_theory_hours_notice">正整数</span>
|
||||
</li>
|
||||
<li><label>理论学时:</label><input id="syllabus_theory_hours_input" class="syllabus_input_min fl" name="theory_hours" placeholder="10" value="<%=syllabus.theory_hours %>"> 学时
|
||||
<span class="none c_red ml5" id="syllabus_theory_hours_notice">请输入正整数</span><div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
<li><label>实践学时</label>
|
||||
<input id="syllabus_practice_hours_input" style="width: 30px;" class="fl" name="practice_hours" placeholder="5" value="<%=syllabus.practice_hours %>"> 学时
|
||||
<span class="none c_red ml5" id="syllabus_practice_hours_notice">正整数</span>
|
||||
</li>
|
||||
<li><label>实践学时:</label><input id="syllabus_practice_hours_input" class="syllabus_input_min fl" name="practice_hours" placeholder="5" value="<%=syllabus.practice_hours %>"> 学时
|
||||
<span class="none c_red ml5" id="syllabus_practice_hours_notice">请输入正整数</span><div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
<li><label>适用专业</label>
|
||||
<input id="syllabus_applicable_major_input" class="fl" name="applicable_major" placeholder="UI设计" value="<%=syllabus.applicable_major %>">
|
||||
</li>
|
||||
<li><label>选修课程</label>
|
||||
<input id="syllabus_pre_course_input" class="fl" name="pre_course" placeholder="工业设计史" value="<%=syllabus.pre_course %>">
|
||||
</li>
|
||||
<li><label>适用专业:</label><input id="syllabus_applicable_major_input" class="syllabus_input fl" name="applicable_major" placeholder="UI设计" value="<%=syllabus.applicable_major %>"><div class="cl"></div></li>
|
||||
<li><label>选修课程:</label><input id="syllabus_pre_course_input" class="syllabus_input fl" name="pre_course" placeholder="工业设计史" value="<%=syllabus.pre_course %>"><div class="cl"></div></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
@ -1,8 +1,9 @@
|
||||
<% if syllabus.eng_name && !syllabus.eng_name.empty? %>
|
||||
<span><%= syllabus.eng_name %></span>
|
||||
<p style="position:relative; display:inline;"><% if syllabus.eng_name && !syllabus.eng_name.empty? %>
|
||||
<span><%=syllabus.eng_name %></span>
|
||||
<% else%>
|
||||
<span class="fontGrey">课程英文名称</span>
|
||||
<span style="color: #888">课程英文名称</span>
|
||||
<% end %>
|
||||
<% if User.current == syllabus.user || User.current.admin? %>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_ng_name_png", :class => "none", :onclick => "show_edit_eng_name();"%>
|
||||
<% end %>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_ng_name_png", :style => "width:15px; position:absolute; right: -20px; top: 5px;", :class => "none", :onclick => "show_edit_eng_name('#{syllabus.eng_name}');"%>
|
||||
<% end %>
|
||||
</p>
|
@ -0,0 +1,21 @@
|
||||
<h3 class="sy_right_title">教师团队
|
||||
<a href="javascript:void(0);" class="sy_cmore fr mr10 none" >增加教师</a>
|
||||
<div class="cl"></div>
|
||||
</h3>
|
||||
<ul class="sy_teachers_list">
|
||||
<% teacher = syllabus.user %>
|
||||
<%# teachers.each do |teacher| %>
|
||||
<li >
|
||||
<%= link_to image_tag(url_to_avatar(teacher), :width => "60", :height => "60", :class => "sy_teachers_img fl mr15"), user_path(teacher), :target => "_blank", :alt => "用户头像" %>
|
||||
<div class="sy_teachers_txt fl">
|
||||
<%= link_to teacher.show_name, user_path(teacher), :class => "sy_teachers_name", :target => "_blank" %>
|
||||
<span class="sy_teachers_span">
|
||||
<% if teacher.user_extensions && teacher.user_extensions.identity %>
|
||||
<%= get_user_roll teacher %>
|
||||
<% end%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<%# end %>
|
||||
</ul>
|
@ -1,5 +1,5 @@
|
||||
<span style="word-break: normal; word-wrap: break-word;"><%=@syllabus.title %></span>
|
||||
|
||||
<% if User.current == syllabus.user || User.current.admin? %>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_title_png", :class => "none", :onclick => "show_edit_title('#{@syllabus.title}');"%>
|
||||
<% end %>
|
||||
<h2 style="position:relative; display:inline;">课程名称:<%=syllabus.title %>
|
||||
<% if User.current == syllabus.user || User.current.admin? %>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_title_png", :class => "none", :style => "width:15px; position:absolute; right: -20px; top: 15px;", :onclick => "show_edit_title('#{syllabus.title}');"%>
|
||||
<% end %>
|
||||
</h2>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue