Merge branch 'szzh' into dev_hjq
This commit is contained in:
commit
b5dc6cabef
|
@ -36,8 +36,9 @@ class AccountController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 服务协议
|
||||||
def agreement
|
def agreement
|
||||||
render :layout => 'users_base'
|
render :layout => 'static_base'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Log out current user and redirect to welcome page
|
# Log out current user and redirect to welcome page
|
||||||
|
@ -78,7 +79,7 @@ class AccountController < ApplicationController
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
render :template => "account/password_recovery"
|
render :layout => 'static_base', :template => "account/password_recovery"
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
if request.post?
|
if request.post?
|
||||||
|
@ -86,6 +87,7 @@ class AccountController < ApplicationController
|
||||||
# user not found or not active
|
# user not found or not active
|
||||||
unless user && user.active?
|
unless user && user.active?
|
||||||
flash.now[:error] = l(:notice_account_unknown_email)
|
flash.now[:error] = l(:notice_account_unknown_email)
|
||||||
|
render :layout => 'static_base'
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
# user cannot change its password
|
# user cannot change its password
|
||||||
|
@ -98,10 +100,11 @@ class AccountController < ApplicationController
|
||||||
if token.save
|
if token.save
|
||||||
Mailer.run.lost_password(token)
|
Mailer.run.lost_password(token)
|
||||||
flash[:notice] = l(:notice_account_lost_email_sent)
|
flash[:notice] = l(:notice_account_lost_email_sent)
|
||||||
redirect_to signin_url
|
redirect_to lost_password_path
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
render :layout => 'static_base'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ class UsersController < ApplicationController
|
||||||
:activity_new_score_index, :influence_new_score_index, :score_new_index,:update_score,:user_activities,:user_projects_index,
|
:activity_new_score_index, :influence_new_score_index, :score_new_index,:update_score,:user_activities,:user_projects_index,
|
||||||
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,
|
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,
|
||||||
:user_resource,:user_resource_create,:user_resource_delete,:rename_resource,:search_user_course,:add_exist_file_to_course,
|
:user_resource,:user_resource_create,:user_resource_delete,:rename_resource,:search_user_course,:add_exist_file_to_course,
|
||||||
:search_user_project,:resource_preview,:resource_search,:add_exist_file_to_project,:user_messages, :edit_brief_introduction]
|
:search_user_project,:resource_preview,:resource_search,:add_exist_file_to_project,:user_messages,:edit_brief_introduction,:user_new_homework]
|
||||||
#edit has been deleted by huang, 2013-9-23
|
#edit has been deleted by huang, 2013-9-23
|
||||||
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses,
|
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses,
|
||||||
:user_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments,
|
:user_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments,
|
||||||
|
@ -74,6 +74,8 @@ class UsersController < ApplicationController
|
||||||
include WordsHelper
|
include WordsHelper
|
||||||
include GitlabHelper
|
include GitlabHelper
|
||||||
include UserScoreHelper
|
include UserScoreHelper
|
||||||
|
|
||||||
|
include PollHelper
|
||||||
helper :user_score
|
helper :user_score
|
||||||
helper :journals
|
helper :journals
|
||||||
|
|
||||||
|
@ -311,6 +313,38 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def user_new_homework
|
||||||
|
if params[:homework_common]
|
||||||
|
homework = HomeworkCommon.new
|
||||||
|
homework.name = params[:homework_common][:name]
|
||||||
|
homework.description = params[:homework_common][:description]
|
||||||
|
homework.end_time = params[:homework_common][:end_time]
|
||||||
|
homework.publish_time = Time.now
|
||||||
|
homework.homework_type = 1
|
||||||
|
homework.late_penalty = 2
|
||||||
|
homework.user_id = User.current.id
|
||||||
|
homework.course_id = params[:course_id]
|
||||||
|
|
||||||
|
homework.save_attachments(params[:attachments])
|
||||||
|
render_attachment_warning_if_needed(homework)
|
||||||
|
|
||||||
|
#匿评作业相关属性
|
||||||
|
homework_detail_manual = HomeworkDetailManual.new
|
||||||
|
homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6
|
||||||
|
homework_detail_manual.comment_status = 1
|
||||||
|
homework_detail_manual.evaluation_start = Time.now
|
||||||
|
homework_detail_manual.evaluation_end = Time.now
|
||||||
|
homework_detail_manual.evaluation_num = params[:evaluation_num] || 3
|
||||||
|
homework_detail_manual.absence_penalty = 2
|
||||||
|
homework.homework_detail_manual = homework_detail_manual
|
||||||
|
|
||||||
|
if homework.save
|
||||||
|
homework_detail_manual.save if homework_detail_manual
|
||||||
|
redirect_to user_homeworks_user_path(User.current.id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
include CoursesHelper
|
include CoursesHelper
|
||||||
def user_courses
|
def user_courses
|
||||||
|
@ -553,7 +587,7 @@ class UsersController < ApplicationController
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")"
|
user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")"
|
||||||
user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
||||||
course_types = "('Message','News','HomeworkCommon')"
|
course_types = "('Message','News','HomeworkCommon','poll')"
|
||||||
project_types = "('Message','Issue')"
|
project_types = "('Message','Issue')"
|
||||||
if @type
|
if @type
|
||||||
case @type
|
case @type
|
||||||
|
|
|
@ -537,4 +537,16 @@ module UsersHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#获取指定用户作为老师的课程
|
||||||
|
def get_as_teacher_courses user
|
||||||
|
type = []
|
||||||
|
user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course|
|
||||||
|
option = []
|
||||||
|
option << course.name
|
||||||
|
option << course.id
|
||||||
|
type << option
|
||||||
|
end
|
||||||
|
type
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<%= stylesheet_link_tag 'new_user'%>
|
<%= stylesheet_link_tag 'new_user'%>
|
||||||
<div class="homepageContentContainer " style="margin-top:20px;">
|
<!--<div class="homepageContentContainer mb20" >-->
|
||||||
<div class="homepageContent BgBox">
|
<div class="homepageContent BgBox">
|
||||||
<h2 class="BgBox_h2">Trustie服务协议</h2>
|
<h2 class="BgBox_h2">Trustie服务协议</h2>
|
||||||
<div class="AgreementBox">
|
<div class="AgreementBox">
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
|
|
||||||
</div><!---BgBox end--->
|
</div><!---BgBox end--->
|
||||||
</div><!---homepageContentContainer end--->
|
<!--</div><!–-homepageContentContainer end-–>-->
|
||||||
<script>
|
<script>
|
||||||
$(".resourcesList").mousedown(function(e) {
|
$(".resourcesList").mousedown(function(e) {
|
||||||
if (3 == e.which) {
|
if (3 == e.which) {
|
||||||
|
|
|
@ -172,7 +172,7 @@
|
||||||
<li class="loginChooseBorder fl"></li>
|
<li class="loginChooseBorder fl"></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="loginSignAlert" style="color: red"><%= flash.empty? ? "" : flash[:error].html_safe %></div>
|
<div class="loginSignAlert" style="color: red"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="loginIn">
|
<div class="loginIn">
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,26 @@
|
||||||
<% @nav_dispaly_home_path_label = 1
|
<%= stylesheet_link_tag 'new_user'%>
|
||||||
@nav_dispaly_main_course_label = 1
|
|
||||||
@nav_dispaly_main_project_label = 1
|
|
||||||
@nav_dispaly_main_contest_label = 1 %>
|
|
||||||
<% @nav_dispaly_forum_label = 1%>
|
|
||||||
<h3><%=l(:label_password_forget)%></h3>
|
|
||||||
|
|
||||||
<%= form_tag(lost_password_path) do %>
|
<div class="homepageContentContainer " style="margin-top:20px;">
|
||||||
<div class="box tabular">
|
<div class="homepageContent BgBox">
|
||||||
<p>
|
<h2 class="BgBox_h2">忘记密码</h2>
|
||||||
<label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
|
<div class="BgBoxCon">
|
||||||
<%= text_field_tag 'mail', nil, :size => 40, :placeholder => '请输入注册邮箱'%>
|
<%= form_tag(lost_password_path) do %>
|
||||||
<%= submit_tag l(:button_submit) %>
|
<p class="BgBoxConP mb5">通过注册邮箱链接重设密码</p>
|
||||||
</p>
|
<!--<input type="text" class="NomalInput mb20 " value="请输入登录邮箱地址" />-->
|
||||||
</div>
|
<%= text_field_tag 'mail', nil, :size => 40, :placeholder => '请输入注册邮箱',:class=>'NomalInput mb20'%>
|
||||||
<% end %>
|
<% if flash[:error] %>
|
||||||
|
<p class="c_red mb5"><%= flash[:error]%></p>
|
||||||
|
<!--<div style="color: red" class="mb5" ><%#= flash[:error]%></div>-->
|
||||||
|
<% elsif flash[:notice] %>
|
||||||
|
<p class="c_green mb5"><%= flash[:notice]%></p>
|
||||||
|
<!--<div style="color: green" class="mb5" ><%#= flash[:notice]%></div>-->
|
||||||
|
<% end %>
|
||||||
|
<div class="LoginButton"><a href="javascript:void(0);" class="c_white db" onclick="$(this).parent().parent().submit();">提交</a></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div><!---BgBox end--->
|
||||||
|
</div><!---homepageContentContainer end--->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -13,15 +13,25 @@
|
||||||
<%= javascript_heads %>
|
<%= javascript_heads %>
|
||||||
<%= heads_for_theme %>
|
<%= heads_for_theme %>
|
||||||
<%= call_hook :view_layouts_base_html_head %>
|
<%= call_hook :view_layouts_base_html_head %>
|
||||||
<%= stylesheet_link_tag 'public', 'leftside', 'courses'%>
|
<%= stylesheet_link_tag 'public', 'leftside', 'courses','header'%>
|
||||||
<%= javascript_include_tag "course","header" %>
|
<%= javascript_include_tag "course","header" %>
|
||||||
<!-- page specific tags -->
|
<!-- page specific tags -->
|
||||||
<%= yield :header_tags -%>
|
<%= yield :header_tags -%>
|
||||||
</head>
|
</head>
|
||||||
<!--add by huang-->
|
<!--add by huang-->
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<div class="navContainer mb10">
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<%= render :partial => 'layouts/logined_header' %>
|
||||||
|
<% else%>
|
||||||
|
<%= render :partial => 'layouts/unlogin_header' %>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
<div id="Container">
|
<div id="Container">
|
||||||
<%= render :partial => 'layouts/new_header' %>
|
<%#= render :partial => 'layouts/new_header' %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<div id="content02" >
|
<div id="content02" >
|
||||||
|
@ -31,9 +41,12 @@
|
||||||
</div><!--Content end-->
|
</div><!--Content end-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<%= render :partial => 'layouts/new_footer' %>
|
<%#= render :partial => 'layouts/new_footer' %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div><!--Container end-->
|
</div><!--Container end-->
|
||||||
|
<div class="cl"></div>
|
||||||
|
<%= render :partial => 'layouts/footer' %>
|
||||||
|
<div class="cl"></div>
|
||||||
<%= render :partial => 'layouts/new_feedback' %>
|
<%= render :partial => 'layouts/new_feedback' %>
|
||||||
<div id="ajax-indicator" style="display:none;">
|
<div id="ajax-indicator" style="display:none;">
|
||||||
<span><%= l(:label_loading) %></span>
|
<span><%= l(:label_loading) %></span>
|
||||||
|
|
|
@ -95,7 +95,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="homepageLeftMenuBlock">
|
<div class="homepageLeftMenuBlock">
|
||||||
<a href="javascript:void(0);" class="homepageMenuText">课程</a>
|
<a href="javascript:void(0);" class="homepageMenuText">课程</a>
|
||||||
<%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), "javascript:void(0);"%>
|
<% if is_current_user%>
|
||||||
|
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
|
||||||
|
<%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), new_course_path%>
|
||||||
|
<% else%>
|
||||||
|
<%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), join_private_courses_courses_path ,:remote => true%>
|
||||||
|
<% end%>
|
||||||
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepageLeftMenuCourses">
|
<div class="homepageLeftMenuCourses">
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -105,7 +111,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="homepageLeftMenuBlock">
|
<div class="homepageLeftMenuBlock">
|
||||||
<a href="javascript:void(0);" class="homepageMenuText">项目</a>
|
<a href="javascript:void(0);" class="homepageMenuText">项目</a>
|
||||||
<%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), "javascript:void(0);"%>
|
|
||||||
|
<% if is_current_user%>
|
||||||
|
<%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), new_project_path%>
|
||||||
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepageLeftMenuCourses">
|
<div class="homepageLeftMenuCourses">
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="<%= current_language %>">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title><%=h html_title %></title>
|
||||||
|
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
||||||
|
<meta name="keywords" content="issue,bug,tracker" />
|
||||||
|
<%= csrf_meta_tag %>
|
||||||
|
<%= favicon %>
|
||||||
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
|
||||||
|
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||||
|
<%= javascript_heads %>
|
||||||
|
<%= javascript_include_tag "jquery.leanModal.min" %>
|
||||||
|
<%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%>
|
||||||
|
<%= heads_for_theme %>
|
||||||
|
<%= call_hook :view_layouts_base_html_head %>
|
||||||
|
<!-- page specific tags -->
|
||||||
|
<%= yield :header_tags -%>
|
||||||
|
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="navContainer mb10">
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<%= render :partial => 'layouts/logined_header',:locals=>{:name=>@name,:type=>@type} %>
|
||||||
|
<% else%>
|
||||||
|
<%= render :partial => 'layouts/unlogin_header',:locals=>{:name=>@name,:type=>@type} %>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div>
|
||||||
|
<%= yield %>
|
||||||
|
<div style="clear:both;"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<%= render :partial => 'layouts/footer' %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<%= call_hook :view_layouts_base_body_bottom %>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -4,7 +4,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo">
|
<div class="homepagePostTo" style="word-break:break-all;">
|
||||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||||
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -12,12 +12,12 @@
|
||||||
<% end %> TO
|
<% end %> TO
|
||||||
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle">
|
<div class="homepagePostTitle" style="word-break:break-all;">
|
||||||
<%= link_to activity.name.to_s+"(作业名称)", student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %>
|
<%= link_to activity.name.to_s+"(作业名称)", student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostSubmitContainer">
|
<div class="homepagePostSubmitContainer">
|
||||||
<div class="homepagePostSubmit">
|
<div class="homepagePostSubmit">
|
||||||
<%= link_to "提交("+activity.student_works.count.to_s+")", student_work_index_path(activity.id), :class=> "c_blue" %>
|
<%= link_to "提交("+activity.student_works.count.to_s+")", student_work_index_path(:homework => activity.id), :class=> "c_blue" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDeadline">截止时间:<%= format_date(activity.end_time) %></div>
|
<div class="homepagePostDeadline">截止时间:<%= format_date(activity.end_time) %></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo">
|
<div class="homepagePostTo" style="word-break:break-all;">
|
||||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -13,16 +13,23 @@
|
||||||
TO
|
TO
|
||||||
<%= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
|
<%= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle">
|
<div class="homepagePostTitle" style="word-break:break-all;">
|
||||||
<% if activity.parent_id.nil? %>
|
<% if activity.parent_id.nil? %>
|
||||||
<%= link_to activity.subject.to_s.html_safe+"(讨论区内容)", course_boards_path(Board.where('id=?',activity.board_id).first.course_id), :class=> "postGrey", :style=>"word-break:break-all" %>
|
<%= link_to activity.subject.to_s.html_safe+"(帖子标题)", course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to activity.parent.subject.to_s.html_safe+"(讨论区内容)", course_boards_path(Board.where('id=?',activity.board_id).first.course_id), :class=> "postGrey", :style=>"word-break:break-all"%>
|
<%= link_to activity.parent.subject.to_s.html_safe+"(帖子标题)", course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostSubmitContainer">
|
<div class="homepagePostSubmitContainer">
|
||||||
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
|
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="homepagePostIntro" style="word-break:break-all">(描述)
|
||||||
|
<% if activity.parent_id.nil? %>
|
||||||
|
<%= activity.content.to_s.html_safe%>
|
||||||
|
<% else %>
|
||||||
|
<%= activity.parent.content.to_s.html_safe%>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo">
|
<div class="homepagePostTo" style="word-break:break-all;">
|
||||||
<% if @ctivity.try(:author).try(:realname) == ' ' %>
|
<% if @ctivity.try(:author).try(:realname) == ' ' %>
|
||||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<% end %> TO
|
<% end %> TO
|
||||||
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle">
|
<div class="homepagePostTitle" style="word-break:break-all;">
|
||||||
<%=link_to activity.title.to_s+"(通知标题)", news_path(activity), :class=> "postGrey", :style=>"word-break:break-all" %>
|
<%=link_to activity.title.to_s+"(通知标题)", news_path(activity), :class=> "postGrey", :style=>"word-break:break-all" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostSubmitContainer">
|
<div class="homepagePostSubmitContainer">
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
<%# has_commit = has_commit_poll?(activity.id ,User.current)%>
|
||||||
|
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
||||||
<div class="resources mt15">
|
<div class="resources mt15">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
|
@ -5,7 +7,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo">
|
<div class="homepagePostTo" style="word-break:break-all;">
|
||||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||||
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -15,13 +17,18 @@
|
||||||
<%= link_to Course.find(activity.polls_group_id).name.to_s+"(课程名称)", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
<%= link_to Course.find(activity.polls_group_id).name.to_s+"(课程名称)", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||||
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
|
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle">
|
<div class="homepagePostTitle" style="word-break:break-all;">
|
||||||
<a href="javascript:void(0);" class="postGrey"><%=activity.polls_name.to_s%>(问卷名称)</a>
|
<%#= link_to activity.polls_name.to_s+"(问卷名称)", %>
|
||||||
|
<%# if has_commit %>
|
||||||
|
<%#= link_to poll_name, poll_result_poll_path(activity.id), :class => "polls_title polls_title_w fl c_dblue"%>
|
||||||
|
<%# else %>
|
||||||
|
<%= link_to poll_name+"(问卷名称)", poll_path(activity.id), :class => "postGrey"%>
|
||||||
|
<%# end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostSubmitContainer">
|
<div class="homepagePostSubmitContainer">
|
||||||
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_at) %></div>
|
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_at) %></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostIntro">(问卷描述)<%=activity.polls_description.to_s%></div>
|
<div class="homepagePostIntro" style="word-break:break-all;">(问卷描述)<%=activity.polls_description.to_s%></div>
|
||||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo">
|
<div class="homepagePostTo" style="word-break:break-all;">
|
||||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<% end %> TO
|
<% end %> TO
|
||||||
<%= link_to activity.project.name.to_s+"(项目名称)", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
<%= link_to activity.project.name.to_s+"(项目名称)", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle">
|
<div class="homepagePostTitle" style="word-break:break-all;">
|
||||||
<%= link_to activity.subject.to_s+"(缺陷标题)", issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %>
|
<%= link_to activity.subject.to_s+"(缺陷标题)", issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %>
|
||||||
<span class="homepagePostProjectState"><%=activity.status.name %></span>
|
<span class="homepagePostProjectState"><%=activity.status.name %></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostDes">
|
<div class="homepagePostDes">
|
||||||
<div class="homepagePostTo">
|
<div class="homepagePostTo" style="word-break:break-all;">
|
||||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -14,16 +14,17 @@
|
||||||
<%= link_to activity.project.name.to_s+"(项目讨论区)", project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
|
<%= link_to activity.project.name.to_s+"(项目讨论区)", project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
|
||||||
<!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>-->
|
<!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle">
|
<div class="homepagePostTitle" style="word-break:break-all;">
|
||||||
<% if activity.parent_id.nil? %>
|
<% if activity.parent_id.nil? %>
|
||||||
<%= link_to activity.subject.to_s.html_safe+"(讨论区内容)", project_boards_path(Board.where('id=?',activity.board_id).first.project_id), :class=> "postGrey", :style=>"word-break:break-all" %>
|
<%= link_to activity.subject.to_s.html_safe+"(帖子标题)", project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to activity.parent.subject.to_s.html_safe+"(讨论区内容)", project_boards_path(Board.where('id=?',activity.board_id).first.project_id), :class=> "postGrey", :style=>"word-break:break-all"%>
|
<%= link_to activity.parent.subject.to_s.html_safe+"(帖子标题)", project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostSubmitContainer">
|
<div class="homepagePostSubmitContainer">
|
||||||
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
|
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="homepagePostIntro" style="word-break:break-all">(描述)<%= activity.content.html_safe %></div>
|
||||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
|
|
|
@ -22,21 +22,23 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% when 'Project' %>
|
<% when 'Project' %>
|
||||||
<% case user_activity.act_type.to_s %>
|
<% if act %>
|
||||||
<% when 'Issue' %>
|
<% case user_activity.act_type.to_s %>
|
||||||
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity =>user_activity} %>
|
<% when 'Issue' %>
|
||||||
<% when 'Message' %>
|
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||||
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity =>user_activity} %>
|
<% when 'Message' %>
|
||||||
<%# when 'Journal' %>
|
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||||
<%#= render :partial => 'project_journal', :locals => {:activity => act,:user_activity =>user_activity} %>
|
<%# when 'Journal' %>
|
||||||
<%# when 'News' %>
|
<%#= render :partial => 'project_journal', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||||
<%#= render :partial => 'project_news', :locals => {:activity => act,:user_activity =>user_activity} %>
|
<%# when 'News' %>
|
||||||
<%# when 'Document' %>
|
<%#= render :partial => 'project_news', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||||
<%#= render :partial => 'project_document', :locals => {:activity => act,:user_activity =>user_activity} %>
|
<%# when 'Document' %>
|
||||||
<%# when 'Attachment' %>
|
<%#= render :partial => 'project_document', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||||
<%#= render :partial => 'project_attachment', :locals => {:activity => act,:user_activity =>user_activity} %>
|
<%# when 'Attachment' %>
|
||||||
<%# when 'ProjectCreateInfo' %>
|
<%#= render :partial => 'project_attachment', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||||
<%#= render :partial => 'project_create', :locals => {:activity => act,:user_activity =>user_activity} %>
|
<%# when 'ProjectCreateInfo' %>
|
||||||
|
<%#= render :partial => 'project_create', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="fl">
|
<div class="mt10">
|
||||||
<span id="attachments_fields" class="attachments_fields">
|
<span id="attachments_fields" class="attachments_fields">
|
||||||
<% if defined?(container) && container && container.saved_attachments %>
|
<% if defined?(container) && container && container.saved_attachments %>
|
||||||
<% container.attachments.each_with_index do |attachment, i| %>
|
<% container.attachments.each_with_index do |attachment, i| %>
|
||||||
|
@ -10,8 +10,8 @@
|
||||||
<%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
<%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
<% container.saved_attachments.each_with_index do |attachment, i| %>
|
||||||
<span id="attachments_p<%= i %>">
|
<span id="attachments_p<%= i %>">
|
||||||
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
|
||||||
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
|
||||||
|
@ -20,46 +20,34 @@
|
||||||
<%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
<%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
|
||||||
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<% project = project %>
|
<%= file_field_tag 'attachments[dummy][file]',
|
||||||
<span class="add_attachment" style="font-weight:normal;">
|
:id => '_file',
|
||||||
<%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sub_btn', :style => ie8? ? 'display:none' : '' %>
|
:class => ie8? ? '' : 'file_selector',
|
||||||
<%= file_field_tag 'attachments[dummy][file]',
|
:multiple => true,
|
||||||
:id => '_file',
|
:onchange => 'addInputFiles(this);',
|
||||||
:class => ie8? ? '' : 'file_selector',
|
:style => ie8? ? '' : 'display:none',
|
||||||
:multiple => true,
|
:data => {
|
||||||
:onchange => 'addInputFiles(this);',
|
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||||
:style => ie8? ? '' : 'display:none',
|
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||||
:data => {
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
:upload_path => uploads_path(:format => 'js',:project =>nil),
|
||||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
:description_placeholder => l(:label_optional_description),
|
||||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
:field_is_public => l(:field_is_public),
|
||||||
:upload_path => uploads_path(:format => 'js',:project =>project),
|
:are_you_sure => l(:text_are_you_sure),
|
||||||
:description_placeholder => l(:label_optional_description),
|
:file_count => l(:label_file_count),
|
||||||
:field_is_public => l(:field_is_public),
|
:delete_all_files => l(:text_are_you_sure_all)
|
||||||
:are_you_sure => l(:text_are_you_sure),
|
} %>
|
||||||
:file_count => l(:label_file_count),
|
</div>
|
||||||
:delete_all_files => l(:text_are_you_sure_all)
|
<div class="cl"></div>
|
||||||
} %>
|
|
||||||
<span id="upload_file_count">
|
|
||||||
<%= l(:label_no_file_uploaded)%>
|
|
||||||
</span>
|
|
||||||
(<%= l(:label_max_size) %>:
|
|
||||||
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<div class="mt5 fl">
|
||||||
<%= javascript_include_tag 'attachments' %>
|
<a href="javascript:void(0);" class="AnnexBtn fl mt3" onclick="$('#_file').click();">上传附件</a>
|
||||||
<% end %>
|
<!--<a href="javascript:void(0);" class="FilesBtn fl mr15 mt3">资源库</a>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% content_for :header_tags do %>
|
||||||
<textarea class="InputBox fl W120 " placeholder="截止日期"></textarea>
|
<%= javascript_include_tag 'attachments' %>
|
||||||
<a href="javascript:void(0);" class="fl mr10">
|
<% end %>
|
||||||
<img src="../images/Calendar.png" width="16" height="15" class="calendarContainer calendar1" />
|
|
||||||
</a>
|
|
||||||
<a href="javascript:void(0);" class="fl mr10">
|
|
||||||
<img src="../images/Calendar_hover.png" width="16" height="15" class="calendarContainer calendar1Active" />
|
|
||||||
</a>
|
|
|
@ -2,20 +2,16 @@
|
||||||
<div class="HomeWorkCon">
|
<div class="HomeWorkCon">
|
||||||
<div class="mt15">
|
<div class="mt15">
|
||||||
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox W700" maxlength="255" onkeyup="regex_homework_name();" placeholder="请输入作业标题" value="<%= homework.name%>" >
|
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox W700" maxlength="255" onkeyup="regex_homework_name();" placeholder="请输入作业标题" value="<%= homework.name%>" >
|
||||||
|
<p id="homework_name_span" class="c_red mt5"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<div class=" mt10">
|
<div class=" mt10">
|
||||||
<a href="javascript:void(0);" class="BlueCirBtn fl mr10">导入作业</a>
|
<a href="javascript:void(0);" class="BlueCirBtn fl mr10">导入作业</a>
|
||||||
<input type="text" name="homework_common[end_time]" id="homework_end_time" placeholder="截止日期" class="InputBox fl W120" readonly="readonly" value="<%= homework.end_time%>" >
|
<div class="calendar_div fl">
|
||||||
<%= calendar_for('homework_end_time')%>
|
<input type="text" name="homework_common[end_time]" id="homework_end_time" placeholder="截止日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.end_time || (Time.now + 3600 * 24).strftime('%Y-%m-%d')%>" >
|
||||||
<!--<div class="fl DateBorder mr10">-->
|
<%= calendar_for('homework_end_time')%>
|
||||||
<!--<a href="javascript:void(0);" class="pic_date "></a>-->
|
</div>
|
||||||
<!--</div>-->
|
|
||||||
<!--<textarea class="InputBox fl W120 " placeholder="发布日期"></textarea>-->
|
|
||||||
<!--<div class="fl DateBorder" >-->
|
|
||||||
<!--<a href="javascript:void(0);" class="pic_date "></a>-->
|
|
||||||
<!--</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
@ -30,27 +26,17 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
<input type="text" class="InputBox W700 SearchIcon" placeholder="发送到课程" />
|
<!--<input type="text" class="InputBox W700 SearchIcon" placeholder="发送到课程" />-->
|
||||||
|
<%= select_tag :course_id,options_for_select(get_as_teacher_courses(User.current),homework.course_id), {:class => "InputBox W700 SearchIcon"} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<div class="mt10">
|
<%= render :partial => 'users/user_homework_attachment', :locals => { :container => homework } %>
|
||||||
<%= render :partial => 'attachments/new_form', :locals => {:container => homework} %>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
|
|
||||||
<div class="mt5">
|
<div class="mt5 fr">
|
||||||
<a href="javascript:void(0);" class="AnnexBtn fl mt3">上传附件</a>
|
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick=" submit_homework('new_homework_common');">发送</a>
|
||||||
<a href="javascript:void(0);" class="FilesBtn fl mr15 mt3">资源库</a>
|
|
||||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr">发送</a>
|
|
||||||
<span class="fr mr10 mt3">或</span>
|
<span class="fr mr10 mt3">或</span>
|
||||||
<a href="javascript:void(0);" class=" fr mr10 mt3">取消</a>
|
<a href="javascript:void(0);" class=" fr mr10 mt3">取消</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
|
||||||
<!--<div class="mt10">-->
|
|
||||||
<!--<a href="javascript:void(0);" class=" fl DropBtn">高级功能</a>-->
|
|
||||||
<!--<div class="DropLine" ></div>-->
|
|
||||||
<!--<div class="cl"></div>-->
|
|
||||||
<!--</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
|
@ -30,7 +30,8 @@
|
||||||
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework_common.attachments} %>
|
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework_common.attachments} %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% if is_teacher%>
|
<%# if is_teacher%>
|
||||||
|
<% if false%>
|
||||||
<div class="homepagePostSetting">
|
<div class="homepagePostSetting">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
|
|
|
@ -20,10 +20,18 @@
|
||||||
<div class="NewsBannerName">发布作业</div>
|
<div class="NewsBannerName">发布作业</div>
|
||||||
</div>
|
</div>
|
||||||
<% homework = HomeworkCommon.new %>
|
<% homework = HomeworkCommon.new %>
|
||||||
<%= labelled_form_for homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
|
<%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
|
||||||
<%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %>
|
<%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %>
|
||||||
<% end%>
|
<% end%>
|
||||||
</div><!----HomeWork end-->
|
</div><!----HomeWork end-->
|
||||||
|
|
||||||
|
<%else%>
|
||||||
|
<div class="resources mb10">
|
||||||
|
<div class="homepageRightBanner">
|
||||||
|
<div class="NewsBannerName">作业</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0} %>
|
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0} %>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<!--<div class="users_r_top">-->
|
<!--<div class="users_r_top">-->
|
||||||
<!--<h2 class="users_r_h2">用户留言</h2>-->
|
<!--<h2 class="users_r_h2">用户留言</h2>-->
|
||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
<div class="feedBack">
|
<div id="users_setting">
|
||||||
<div class="homepageRightBanner">
|
<div class="homepageRightBanner">
|
||||||
<div class="NewsBannerName">留言</div>
|
<div class="NewsBannerName">留言</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -308,6 +308,7 @@ RedmineApp::Application.routes.draw do
|
||||||
resources :users do
|
resources :users do
|
||||||
collection do
|
collection do
|
||||||
match "tag_saveEx" , :via => [:get, :post]
|
match "tag_saveEx" , :via => [:get, :post]
|
||||||
|
post "user_new_homework"
|
||||||
end
|
end
|
||||||
member do
|
member do
|
||||||
match 'user_projects_index', :to => 'users#user_projects_index', :via => :get
|
match 'user_projects_index', :to => 'users#user_projects_index', :via => :get
|
||||||
|
@ -326,7 +327,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'user_visitorlist', :to => 'users#user_visitorlist', :via => :get
|
match 'user_visitorlist', :to => 'users#user_visitorlist', :via => :get
|
||||||
match 'user_homeworks', :to => 'users#user_homeworks', :via => :get
|
match 'user_homeworks', :to => 'users#user_homeworks', :via => :get
|
||||||
match 'watch_projects', :to => 'users#watch_projects', :via => :get
|
match 'watch_projects', :to => 'users#watch_projects', :via => :get
|
||||||
|
#
|
||||||
# added by bai
|
# added by bai
|
||||||
match 'show_score', :to => 'users#show_score', :via => :get
|
match 'show_score', :to => 'users#show_score', :via => :get
|
||||||
match 'topic_score_index', :to => 'users#topic_score_index', :via => [:get, :post]
|
match 'topic_score_index', :to => 'users#topic_score_index', :via => [:get, :post]
|
||||||
|
|
10
db/schema.rb
10
db/schema.rb
|
@ -476,6 +476,13 @@ ActiveRecord::Schema.define(:version => 20150826061843) do
|
||||||
|
|
||||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||||
|
|
||||||
|
create_table "discuss_demos", :force => true do |t|
|
||||||
|
t.string "title"
|
||||||
|
t.text "body"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "documents", :force => true do |t|
|
create_table "documents", :force => true do |t|
|
||||||
t.integer "project_id", :default => 0, :null => false
|
t.integer "project_id", :default => 0, :null => false
|
||||||
t.integer "category_id", :default => 0, :null => false
|
t.integer "category_id", :default => 0, :null => false
|
||||||
|
@ -906,7 +913,6 @@ ActiveRecord::Schema.define(:version => 20150826061843) do
|
||||||
t.datetime "created_on"
|
t.datetime "created_on"
|
||||||
t.integer "comments_count", :default => 0, :null => false
|
t.integer "comments_count", :default => 0, :null => false
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
t.datetime "updated_on"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "news", ["author_id"], :name => "index_news_on_author_id"
|
add_index "news", ["author_id"], :name => "index_news_on_author_id"
|
||||||
|
@ -1311,6 +1317,7 @@ ActiveRecord::Schema.define(:version => 20150826061843) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "late_penalty", :default => 0
|
t.integer "late_penalty", :default => 0
|
||||||
t.integer "absence_penalty", :default => 0
|
t.integer "absence_penalty", :default => 0
|
||||||
|
t.integer "system_score"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "student_works_evaluation_distributions", :force => true do |t|
|
create_table "student_works_evaluation_distributions", :force => true do |t|
|
||||||
|
@ -1528,7 +1535,6 @@ ActiveRecord::Schema.define(:version => 20150826061843) do
|
||||||
t.string "identity_url"
|
t.string "identity_url"
|
||||||
t.string "mail_notification", :default => "", :null => false
|
t.string "mail_notification", :default => "", :null => false
|
||||||
t.string "salt", :limit => 64
|
t.string "salt", :limit => 64
|
||||||
t.integer "gid"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
|
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
|
||||||
|
|
|
@ -54,19 +54,34 @@ function show_more_project(url){
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
//
|
|
||||||
//$(function(){
|
//老师提交 新建/修改 作业
|
||||||
// $(".newsType").mouseover(function(){
|
function submit_homework(id)
|
||||||
// $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"});
|
{
|
||||||
// });
|
if(!regex_homework_name())
|
||||||
// $(".newsType").mouseout(function(){
|
{
|
||||||
// $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"});
|
$("#homework_name").focus();
|
||||||
// });
|
}
|
||||||
// $(".resourcesSelected").mouseover(function(){
|
else
|
||||||
// $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"});
|
{
|
||||||
// });
|
homework_description_editor.sync();
|
||||||
// $(".resourcesSelected").mouseout(function(){
|
$("#"+id).submit();
|
||||||
// $(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"});
|
}
|
||||||
// });
|
}
|
||||||
//});
|
|
||||||
//个人动态 end
|
//验证新建作业的名字
|
||||||
|
function regex_homework_name()
|
||||||
|
{
|
||||||
|
var name = $.trim($("#homework_name").val());
|
||||||
|
|
||||||
|
if(name=="")
|
||||||
|
{
|
||||||
|
$("#homework_name_span").text("名称不能为空");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#homework_name_span").text("");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -635,7 +635,7 @@ ul.list_watch{
|
||||||
|
|
||||||
|
|
||||||
/*20150826忘记密码 LB*/
|
/*20150826忘记密码 LB*/
|
||||||
.BgBox{ width:968px; border:1px solid #dddddd; background:#fff; padding:15px; padding-top:10px;}
|
.BgBox{ width:968px; border:1px solid #dddddd; background:#fff; padding:15px; padding-top:10px;margin: 20px auto}
|
||||||
.BgBox_h2{ font-size:16px; color:#484848; width:968px;border-bottom:1px solid #e3e3e3; padding-bottom:5px;}
|
.BgBox_h2{ font-size:16px; color:#484848; width:968px;border-bottom:1px solid #e3e3e3; padding-bottom:5px;}
|
||||||
.NomalInput{width:308px; height:38px; border:1px solid #98a1a6; outline:none; color:#888888; font-size:14px;}
|
.NomalInput{width:308px; height:38px; border:1px solid #98a1a6; outline:none; color:#888888; font-size:14px;}
|
||||||
.BgBoxCon{ width:310px; margin:80px auto;}
|
.BgBoxCon{ width:310px; margin:80px auto;}
|
||||||
|
@ -868,11 +868,30 @@ img.ui-datepicker-trigger {
|
||||||
width:16px;
|
width:16px;
|
||||||
height:15px;
|
height:15px;
|
||||||
float:left;
|
float:left;
|
||||||
|
margin: 7px;
|
||||||
}
|
}
|
||||||
/*消息*/
|
/*消息*/
|
||||||
.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;}
|
.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;}
|
||||||
.homepageNewsTypeNotRead {width:95px; font-size:12px; color:#888888; display:block;}
|
.homepageNewsTypeNotRead {width:95px; font-size:12px; color:#888888; display:block;}
|
||||||
|
.calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;}
|
||||||
|
.calendar_div{border: 1px solid #d9d9d9;}
|
||||||
|
|
||||||
|
#attachments_fields input.filename {
|
||||||
|
border: 0;
|
||||||
|
height: 1.8em;
|
||||||
|
max-width: 670px;
|
||||||
|
color: #7f7f7f;
|
||||||
|
background-color: inherit;
|
||||||
|
background: url(../images/pic_file.png) 0 3px no-repeat;
|
||||||
|
padding-left: 18px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
}
|
||||||
|
.description{display: none !important;}
|
||||||
|
.ispublic-label{display: none !important;}
|
||||||
|
.is_public_checkbox{display: none !important;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue