@@ -79,7 +41,7 @@ 作品描述 : - <%= f.text_area "description", :class => "w620", :maxlength => 3000, :style => "width:430px", :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%> + <%= f.text_area "description", :class => "w620", :maxlength => 3000, :style => "width:430px", :placeholder => "最多3000个汉字", :onkeyup => "regexHomeworkCommonDescription();"%>
diff --git a/app/views/homework_common/_alert_anonyoms.html.erb b/app/views/homework_common/_alert_anonyoms.html.erb index 3b199e0d8..73f240b02 100644 --- a/app/views/homework_common/_alert_anonyoms.html.erb +++ b/app/views/homework_common/_alert_anonyoms.html.erb @@ -5,7 +5,11 @@开启匿评后学生将不能对作品进行 修改、删除 - 等操作,目前有 + 等操作,开启匿评后的提交作品,将 + 不能参与匿评, + 匿评评分将被记为 + 0分 + 。目前有 <%= @totle_size%>个 学生,共提交了 <%= @cur_size %> diff --git a/app/views/homework_common/_homework_common_form.html.erb b/app/views/homework_common/_homework_detail_manual_form.html.erb similarity index 94% rename from app/views/homework_common/_homework_common_form.html.erb rename to app/views/homework_common/_homework_detail_manual_form.html.erb index fa45397f0..ffec93e73 100644 --- a/app/views/homework_common/_homework_common_form.html.erb +++ b/app/views/homework_common/_homework_detail_manual_form.html.erb @@ -10,7 +10,6 @@
基本规则设置(总分为100分)
-
-
- +
- <%= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %> 分 @@ -99,11 +98,11 @@ -
- +
-
<%= select_tag :absence_penalty,options_for_select(absence_penalty_option,homework.homework_detail_manual.absence_penalty), {:class => "fl mb10 h26 w70"} %>
分
-
学生漏评1个作品将扣 2 分
+学生漏评1个作品将扣 <%= homework.homework_detail_manual.absence_penalty%> 分
-
+
- + + + + + +
-
+
+ + <% if edit_mode %> + <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %> + <% else %> + <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> + <%= f.kindeditor :description,:editor_id => 'homework_description_editor' %> + <% end %> ++
+
+
- + + <%= render :partial => 'attachments/new_form', :locals => {:container => homework} %> + + +
- + + + <%= calendar_for('homework_end_time')%> + + +
- + + + <%= calendar_for('homework_publish_time')%> + + + +
- + + <%= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %> + 分 + + +
编程评测设置
+ +-
+
- + + <%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language), {:class => "fl mb10 h26 w70"} %> + + + +
- + + <%= select_tag :ta_proportion,options_for_select(ta_proportion_option,homework.homework_detail_programing.ta_proportion), {:class => "fl mb10 h26 w70"} %> + × 教辅评分 + + + + × 系统评分 + = 学生得分 + + +
- + + 如果教师对学生作品进行了评分,则教师评分为学生最终得分。 + + + +
- + + + + + + <% if edit_mode %> + <% homework.homework_tests.each do |homework_test|%> + + <% end%> + <% else %> + + <% end %> +
+ 输入 + | ++ 输出 + | +
+ <%=test.input%> + | ++ <%= test.output%> + | +
<%= l(:label_course_homework_new)%>
+ 请选择将要发布的作业类型 +
+ + + 人工评分的作业(支持匿名互评、灵活设置评分比例) + + + + + 自动评测的编程作业(支持C/C++程序的自动评分) + + + + 下一步 + <% end%>+ <%= l(:label_course_homework_new)%> +
++ <% if journal.details.any? %> + <% details_to_strings(journal.details).each do |string| %> +
<%= string %>
+ <% end %> + <% end %> + +<%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
+ +- <% if journal.details.any? %> - <% details_to_strings(journal.details).each do |string| %> -
<%= string %>
- <% end %> - <% end %> -<%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
-diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 1bd956074..8c12d62e0 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -14,8 +14,9 @@
- <%= @issue.subject %> - <%= get_issue_type(@issue.tracker_id)[1] %> + + <%= @issue.subject %> + <%= get_issue_priority(@issue.priority_id)[1] %>
@@ -109,6 +110,9 @@ <%= render :partial => 'edit' %>
<%=h @issue.tracker %> #<%= @issue.id %>
-<%= authoring @journal.created_on, @journal.user, :label => :label_updated_time_by %>
+由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %>
-
+
- <%= @organizer.description.html_safe %> +
-
<% if @show_course == 1 && !visiable %>
- <% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
- <% hasCourse=false %>
- <% User.current.courses.each do |course| %>
- <% if !course_endTime_timeout?(course) %>
- <% hasCourse=true %>
- <% end %>
+ <% hasCourse=false %>
+ <% User.current.courses.each do |course| %>
+ <% if !course_endTime_timeout?(course) %>
+ <% hasCourse=true %>
+ <% break %>
<% end %>
- <%= render :partial => 'layouts/user_courses_list', :locals => {:hasCourse => hasCourse} %>
- <% end -%>
+ <% end %>
+ <%= render :partial => 'layouts/user_courses_list', :locals => {:hasCourse => hasCourse} %>
<% end %>
<%= render :partial => 'layouts/user_project_list', :locals => {:hasCourse => hasCourse} %>
-
@@ -102,10 +101,7 @@
addSlipMenu();
addProjectSlipMenu ();
addCourseSlipMenu();
- });
-
- jQuery(document).ready(function($) {
- $('.sub_menu').find("a").attr('target', '_blank');
+ $('.sub_menu').find("a").attr('target', '_blank');
$('.project_sub_menu').find("a").attr('target', '_blank');
$('.course_sub_menu').find("a").attr('target', '_blank');
});
diff --git a/app/views/layouts/_base_header_new.html.erb b/app/views/layouts/_base_header_new.html.erb
new file mode 100644
index 000000000..71cf8ab02
--- /dev/null
+++ b/app/views/layouts/_base_header_new.html.erb
@@ -0,0 +1,77 @@
+++ \ No newline at end of file diff --git a/app/views/layouts/_new_header.html.erb b/app/views/layouts/_new_header.html.erb index f26317acd..a756009f0 100644 --- a/app/views/layouts/_new_header.html.erb +++ b/app/views/layouts/_new_header.html.erb @@ -20,13 +20,13 @@+ <%=link_to image_tag("/images/logo.png",weight:"35px", height: "30px")%> +++ <%= render_dynamic_nav if User.current.logged? || !Setting.login_required? -%> ++++++
-
+ <% if User.current.logged? %>
+
-
+ <%=link_to_user(User.current)%>
+
-
+ <% hidden_non_project = Setting.find_by_name("hidden_non_project")
+ visiable = hidden_non_project && hidden_non_project.value == "0"%>
+ <% if @show_course == 1 && !visiable %>
+ <%# if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
+ <% hasCourse=false %>
+ <% User.current.courses.each do |course| %>
+ <% if !course_endTime_timeout?(course) %>
+ <% hasCourse=true %>
+ <% end %>
+ <% end %>
+ <% if hasCourse %>
+
-
+ 我的课程
+
-
+ <% User.current.courses.each do |course| %>
+ <% if !course_endTime_timeout?(course) %>
+
- course.id, :host=>Setting.host_course) %>"><%= course.name %> + <% end %> + <% end %> +
+ <% end %>
+ <%# end -%>
+ <% end %>
+
+ <% if User.current.projects.count>0 %>
+ -
+ 我的项目
+
-
+ <% User.current.projects.each do |project| %>
+
- project.id, :host=>Setting.host_name) %>"><%=project.name%> + <% end %> +
+ <% end %>
+ - 编辑资料 + + + + + + + + + + + + + + + + + +
+
+ <% end %>
+ -
+ 我的课程
+
-
+ <%=link_to_user(User.current)%>
+
-
<%= link_to "#{User.current.login}".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user}, target:"_blank", :class => "uses_name"%>
-
- <% if @show_course == 1 && User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) %>
+ <% if @show_course == 1 %>
<% user_course = get_user_course User.current%>
<% unless user_course.empty? %>
-
<%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id},target:"_blank", :class => "parent" %>
-
- <% user_course.each do |course| %>
+ <% user_course.reverse.each do |course| %>
- <%= link_to course.name, {:controller => 'courses',:action => 'show',:id => course.id},target:"_blank" %> @@ -40,7 +40,7 @@
-
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %>
-
- <% User.current.projects.each do |project| %>
+ <% User.current.projects.reverse.each do |project| %>
- <%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name }, target:"_blank" %> diff --git a/app/views/layouts/_user_courses_list.html.erb b/app/views/layouts/_user_courses_list.html.erb index ce9282ee7..a5cd6f273 100644 --- a/app/views/layouts/_user_courses_list.html.erb +++ b/app/views/layouts/_user_courses_list.html.erb @@ -4,7 +4,7 @@
-
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name} %>
-
- <% User.current.projects.each do |project| %>
+ <% User.current.projects.reverse.each do |project| %>
- <%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name } %> diff --git a/app/views/layouts/_user_watch_btn.html.erb b/app/views/layouts/_user_watch_btn.html.erb new file mode 100644 index 000000000..71eea7166 --- /dev/null +++ b/app/views/layouts/_user_watch_btn.html.erb @@ -0,0 +1,8 @@ +<% if(User.current.logged? && User.current!=target)%> + <%if(target.watched_by?(User.current))%> + 取消 + <% else %> + 关注 + <% end %> +<% end %> \ No newline at end of file diff --git a/app/views/layouts/_user_watch_list.html.erb b/app/views/layouts/_user_watch_list.html.erb new file mode 100644 index 000000000..00c0cdc40 --- /dev/null +++ b/app/views/layouts/_user_watch_list.html.erb @@ -0,0 +1,11 @@ + <% watcher_count,watcher_list = get_watcher_users(user) %> +
- 加入时间 : + <% if @user.user_extensions!=nil && @user.user_extensions.identity == 2 %> +
- <%= l(:label_company_name) %> : + <% elsif !@user.firstname.empty? || !@user.lastname.empty? %> +
- 真实姓名 : + <% end %> + <% unless @user.user_extensions.nil? %> + <% if @user.user_extensions.identity == 0 %> +
- 职称 : + <% end %> + <% if @user.user_extensions && @user.user_extensions.location && !@user.user_extensions.location.empty?%> +
- 地区 : + <% end %> + <% if (@user.user_extensions.identity == 0 || @user.user_extensions.identity == 1) && !@user.user_extensions.school.nil? %> +
- 工作单位 : + <% elsif @user.user_extensions.identity == 3 && !@user.user_extensions.occupation.nil? && !@user.user_extensions.occupation.empty? %> +
- 工作单位 : + <% elsif @user.user_extensions.identity == 2 %> +
- 工作单位 : + <% end %> + <% if (!@user.user_extensions.description.nil? && !@user.user_extensions.description.empty?) %> +
- 个人简介 : + <% end %> + <% end %> +
- <%= format_date(@user.created_on) %> +
- <%= @user.show_name %> + <% unless @user.user_extensions.nil? %> + <% if @user.user_extensions.identity == 0 %> +
- <%= get_technical_title @user %> + <% end %> + <% if @user.user_extensions && @user.user_extensions.location && !@user.user_extensions.location.empty?%> +
- <%= @user.user_extensions.location %> <%= @user.user_extensions.location_city %> + <% end %> + + <% if (@user.user_extensions.identity == 0 || @user.user_extensions.identity == 1) && !@user.user_extensions.school.nil? %> +
- <%= @user.user_extensions.school.name %> + <% elsif @user.user_extensions.identity == 3 && !@user.user_extensions.occupation.nil? && !@user.user_extensions.occupation.empty? %> +
- <%= @user.user_extensions.occupation %> + <% elsif @user.user_extensions.identity == 2 %> +
- <%= @user.show_name %> + <% end %> + <% if (!@user.user_extensions.description.nil? && !@user.user_extensions.description.empty?) %> +
- <%= @user.user_extensions.description %> + <% end %> + <% end %> +
- 创建课程 : +
- 发布作业 : + <% end %> +
- 加入课程 : +
- 参加匿评 : +
- 发布资源 : +
- 创建项目 : +
- 加入项目 : +
- 发布缺陷 : +
- 解决缺陷 : +
- <%= get_create_course_count(@user) %> +
- <%= get_homework_commons_count(@user) %> + <% end %> +
- <%= get_join_course_count(@user) %> +
- <%= get_anonymous_evaluation_count(@user) %> +
- <%= get_projectandcourse_attachment_count(@user) %> +
- <%= get_create_project_count(@user) %> +
- <%= get_join_project_count(@user) %> +
- <%= get_create_issue_count(@user) %> +
- <%= get_resolve_issue_count(@user) %> +
- ▪ [ <% unless course_news_comment.commented.nil? %> - <%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course, :token => @token.value), - :class=> "wmail_column", - :style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + <%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course, :token => @token.value), + :class=> "wmail_column", + :style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> <% end %> ] <%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value), :class => "wmail_name", :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> - <%= l(:label_project_notice) %> + <%= l(:label_project_notice_reply) %> - <%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value), + <%= link_to truncate(l(:label_course_notice_point),length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value), :class => 'wmail_info', :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> @@ -65,7 +57,7 @@ <% end %> -
-
@@ -197,8 +189,8 @@
<% if @issues.first || @project_messages.first || @issues_journals.first || @wiki_contents.first || @project_news.first || @project_news_comments.first || @project_journal_messages.first ||
@project_news_comments.first %>
-
<%= l(:label_project_overview_new)%>
- <% unless @issues.first.nil? %> +<%= l(:label_project_overview_new)%>
+ <% unless @issues.first.nil? || @issues_journals.first.nil? %>-
<%= l(:label_issue_tracking) %>
@@ -220,44 +212,32 @@
<%= format_time(issue.created_on) %>
<% end %>
-
+
+ <% @issues_journals.each do |issues_journal| %>
+
- + ▪ + [ + <%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value), + :class=> "wmail_column", + :style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + ] + <%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name", + :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> + <%= l(:label_project_issue_update) %> + <% if issues_journal.notes.blank? || issues_journal.notes.nil? %> + <%= link_to truncate(l(:label_isuue_mail_status),length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), + :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + <% else %> + <%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), + :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + <% end %> + <%= format_time(issues_journal.created_on) %> + + <% end %>
-
-
- <%= l(:label_issue_tracking) %>
-
- <% @issues_journals.each do |issues_journal| %>
-
- - ▪ - [ - <%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value), - :class=> "wmail_column", - :style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> - ] - <%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name", - :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> - <%= l(:label_project_issue) %> - <% if issues_journal.notes.blank? || issues_journal.notes.nil? %> - <%= l(:label_isuue_mail_status) %> - <% else %> - <%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value), - :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" - %> - <% end %> - <%= format_time(issues_journal.created_on) %> - - <% end %> - - -
-
@@ -322,7 +302,7 @@
<% end %>
- <% unless @project_news.first.nil? %>
+ <% unless @project_news.first.nil? || @project_news_comments.first.nil? %>
- ▪ [ <% unless project_news_comment.commented.nil? %> - <%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value), - :class=> "wmail_column", - :style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> + <%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value), + :class=> "wmail_column", + :style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> <% end %> ] <%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value), :class => "wmail_name", :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> - <%= l(:label_project_mail_notice) %> + <%= l(:lable_project_mail_notice_reply) %> - <%= link_to truncate(project_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value), + <%= link_to truncate(l(:lable_project_notice_point),length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value), :class => 'wmail_info', :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> <%= format_time(project_news_comment.created_on) %> <% end %> -
-
<%= l(:label_project_news) %>
@@ -347,37 +327,29 @@
<% end %>
-
-
-
- <%= l(:label_project_news) %>
-
+
<% @project_news_comments.each do |project_news_comment|%>
-<%= l(:label_activities) %>
+<%= l(:label_activities) %>
-
@@ -479,7 +451,7 @@
<% end %>
<% if @forums.first || @memos.first %>
- 基本资料 +
- 账号管理 +
- 登录名 : * +
- 邮箱 : * +
- 身份 : +
- 姓氏 : * +
- 名字 : * +
- 组织名 : * +
- 性别 : +
- 工作单位 : +
- 地区 : +
- 邮件通知 : +
- 个人签名 : +
- 个人简介 : +
- +
- <%= f.text_field :login,:no_label=>true, :required => true, :nh_required=>"1", :name => "login",:class=>"w210"%> +
- <%= f.text_field :mail,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210"%> + +
-
+
+
+
<% if !User.current.user_extensions.nil? && !User.current.user_extensions.student_id.nil? %>
- <%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => l(:label_account_identity_studentID) %>
+ <%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => l(:label_account_identity_studentID),:style=>"width:127px;" %>
<% else %>
- <%= text_field_tag :no, nil, :placeholder => l(:label_account_identity_studentID) %>
+ <%= text_field_tag :no, nil, :placeholder => l(:label_account_identity_studentID),:style=>"60px" %>
<% end %>
-
-
-
-
-
-
- <%= f.text_field :lastname, :size => 25, :required => true %> - - <%= l(:field_lastname_eg) %> - - -
-- <%= f.text_field :firstname, :size => 25, :required => true %> - - <%= l(:field_firstname_eg) %> - - -
- - - -- <%= l(:label_company_name)%> * - <%= text_field_tag :enterprise_name, @user.firstname %> - -
- - - - - <% if @user.user_extensions.nil? %> -- - <%= select_tag 'gender', "".html_safe, :class => 'gender' %> -
- <% else %> - <% if @user.user_extensions.gender == 0 %> -- - <%= select_tag 'gender', "".html_safe, :class => 'gender' %> -
+ +
+
+ - <%= f.text_field :lastname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %> +
- <%= f.text_field :firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %> +
- <%= text_field_tag :enterprise_name,@user.firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %> +
- + + + +
-
+ <% if User.current.user_extensions.nil? %>
+ readonly>
+
+
+ <% elsif User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
+ readonly>
+
+
+ <% elsif User.current.user_extensions.school.nil? %>
+ readonly>
+
+
<% else %>
-
- - <%= select_tag 'gender', "".html_safe, :class => 'gender' %> -
+ + + <% end %> +
+
+ - + + + + +
- + <%= select_tag( 'user[mail_notification]', options_for_select( user_mail_notification_options(@user), @user.mail_notification) ) %> + + + + +
- <%= f.select :language, :Chinese => :zh, :English => :en %> +
- + 确认 + + + +
- - <%= s.province %> - - - <% end %> -
- 原始密码 : +
- 新密码 : +
- 确认密码 : +
- 请输入6-12个字符 + +
- + 确认 + + + +
- + <%= s.province %> + + + <% end %> +
- <%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%> + +
- + <% if User.current.admin? %> + <%= link_to l(:label_project_dts_yun) ,yun_dep_project_path(@project), data: { confirm:'你确定要对本项目进行云化部署吗?' } %> + <% end %> + +
- + <% if User.current.admin? %> + 软件知识库 + <%#= link_to l(:label_project_soft_knowledge) ,soft_knowledge_project_path(@project) %> + <% end %> + +
- + <% if User.current.admin? %> + 软件资源库 + <%#= link_to l(:label_project_soft_file) ,soft_file_project_path(@project) %> + <% end %> + + +
- + <% if User.current.admin? %> + <%= link_to l(:label_project_dts_new) ,dts_dep_project_path(@project), data: { confirm:'你确定要对本项目进行代码缺陷测试分析吗?' } %> + <% end %> + + +
- + <% if User.current.admin? %> + 在线开发平台 + <%#= link_to l(:label_project_online_dev) ,online_dev_project_path(@project) %> + <% end %> + +
- + <% if User.current.admin? %> + 软工服务平台 + <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> + <% end %> + + +
- + <% if User.current.admin? %> + 形式验证工具 + <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> + <% end %> + + +
- + <% if User.current.admin? %> + QoS 评估工具 + <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> + <% end %> + + +
- + <% if User.current.admin? %> + QoS 证据采集工具 + <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> + <% end %> + + +
- + <% if User.current.admin? %> + 可信度评估工具 SAS + + <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> + <% end %> + + +
- + <% if User.current.admin? %> + 可信评估工具 Evaluator + <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> + <% end %> + + +
- + <% if User.current.admin? %> + 软件测试工具 SSCC-Web + <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> + <% end %> + + +
- + <% if User.current.admin? %> + QoS 证据评估统计分析工具 + <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> + <% end %> + + +
- + <% if User.current.admin? %> + 在线验证工具 BACH-Online + <%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %> + <% end %> + + diff --git a/app/views/projects/dts_dep.html.erb b/app/views/projects/dts_dep.html.erb new file mode 100644 index 000000000..a0a79740d --- /dev/null +++ b/app/views/projects/dts_dep.html.erb @@ -0,0 +1,77 @@ +
- + + <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> + + +
- + <%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%> + +
- + <%= link_to student_work.name, student_work_path(student_work.id),:remote => true,:title => student_work.name, :class => "c_blue02"%> + +
- + <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %> + 迟交 + <% else%> + <%= student_work.created_at.strftime("%m-%d").to_s%> + <% end %> + +
- + <%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%> + +
- + <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%> + +
-
+ <%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%>
+ <% unless student_work.student_score.nil? || student_work.homework_common.homework_type == 2%>
+
+ (<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>)
+
+ + 现共有 + <%= student_work.student_works_scores.where(:reviewer_role => 3).count%> + 名学生进行了匿评,平均分为 + <%= format("%.1f",student_work.student_score)%> 分。 ++ <% end%> +
+ <% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%>
+
-
+ <%= score.nil? ? "--" : format("%.1f",score)%>
+ <% unless score.nil?%>
+ + 作品最终评分为 + <%= student_work.final_score%> 分。 + 迟交扣分 + <%= student_work.late_penalty%> 分, + 缺评扣分 + <%= student_work.absence_penalty%> 分, + 最终成绩为 + <%= format("%.1f",score)%> 分。 ++ <% end%> +
+
+
- + 学号 + +
- + <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "name"%> + <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + <% end%> + +
- + 作品名称 + +
- + <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "created_at"%> + <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + <% end%> + +
- + <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "teacher_score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + <% end%> + +
- + <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "teaching_asistant_score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + + <% end%> + +
- + <% if @homework.homework_type == 1%> + <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% elsif @homework.homework_type == 2%> + <%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% end %> + <% if @show_all && @order == "student_score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + <% end%> + +
- + <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + <% end%> + \ No newline at end of file diff --git a/app/views/student_work/_new_student_work_alert.html.erb b/app/views/student_work/_new_student_work_alert.html.erb new file mode 100644 index 000000000..8e0c8a954 --- /dev/null +++ b/app/views/student_work/_new_student_work_alert.html.erb @@ -0,0 +1,14 @@ +
- + + 上交时间: + + <%=format_time @work.created_at %> + + <% if @work.user != User.current%> + +
- + <%= render :partial => 'student_work_praise' %> + + <% end%> + +
-
+
+ 编程代码:
+
+ + <%= text_format @work.description%> ++ +
+
- 测试结果:
+
+ + + + + + + + + + + + + + + <%@homework.homework_tests.each do |test|%> +
+ +"> + + <% end%> + + ++ <%= test.input%> + ++ <%= test.output%> + +<%= test.student_work_test.nil? ? "正在编译" : test.student_work_test.status_to_s%> + +
+ <% if @is_teacher%>
+
+ -
内容:
- <%= textilizable @work.description%> + <%= text_format @work.description%>
diff --git a/app/views/student_work/_student_work.html.erb b/app/views/student_work/_student_work.html.erb
index cd60ef024..dd7ab7e2d 100644
--- a/app/views/student_work/_student_work.html.erb
+++ b/app/views/student_work/_student_work.html.erb
@@ -8,7 +8,7 @@
- <%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%> -
- +
- <%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
- @@ -24,22 +24,20 @@
- <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%> -
- - <%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%> - <% unless student_work.student_score.nil?%> - - (<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>) - + <% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%> +
-
+ <%= score.nil? ? "--" : format("%.1f",score)%>
+ <% unless score.nil?%>
+
- 现共有 - <%= student_work.student_works_scores.where(:reviewer_role => 3).count%> - 名学生进行了匿评,平均分为 - <%= format("%.1f",student_work.student_score)%> 分。 + 作品最终评分为 + <%= student_work.final_score%> 分。 + 迟交扣分 + <%= student_work.late_penalty%> 分, + 最终成绩为 + <%= format("%.1f",score)%> 分。<% end%>
-
- - <%= student_work.final_score.nil? ? "--" : format("%.1f",student_work.final_score)%> - \ No newline at end of file diff --git a/app/views/student_work/_student_work_title.html.erb b/app/views/student_work/_student_work_title.html.erb index 2a3a5e124..24e6a1b37 100644 --- a/app/views/student_work/_student_work_title.html.erb +++ b/app/views/student_work/_student_work_title.html.erb @@ -2,41 +2,36 @@ 学号
- - <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> <% if @show_all && @order == "name"%> - + <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> <% end%> -
- +
- 作品名称
- - <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> <% if @show_all && @order == "created_at"%> - + <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> <% end%>
- - <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> <% if @show_all && @order == "teacher_score"%> - + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> <% end%>
- - <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> <% if @show_all && @order == "teaching_asistant_score"%> - - <% end%> - -
- - <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "student_score"%> - + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> + <% end%>
- - <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "final_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> - <% if @show_all && @order == "final_score"%> - + <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%> + <% if @show_all && @order == "score"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%> <% end%> \ No newline at end of file diff --git a/app/views/student_work/add_score.js.erb b/app/views/student_work/add_score.js.erb index 0ba275d5d..1de92b51a 100644 --- a/app/views/student_work/add_score.js.erb +++ b/app/views/student_work/add_score.js.erb @@ -6,24 +6,35 @@ $('#score_<%= @work.id%>').peSlider({range: 'min'}); <% else %> $("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>"); <% end%> + $("#score_list_<%= @work.id%>").removeAttr("style"); <% if @is_teacher %> - $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'student_work',:locals => {:student_work => @work}) %>"); + <% if @homework.homework_type == 1%> + $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_student_work',:locals => {:student_work => @work}) %>"); + <% elsif @homework.homework_type == 2%> + $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_student_work',:locals => {:student_work => @work}) %>"); + <% else%> + $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'student_work',:locals => {:student_work => @work}) %>"); + <% end%> <% else %> $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work}) %>"); <% end%> $(function(){ + //匿评评分提示 $(".student_score_info").bind("mouseover",function(e){ - //alert($(this).html()); $(this).find("div").show(); - $(this).find("div").css("top",e.pageY); - $(this).find("div").css("left",e.pageX); }); $(".student_score_info").bind("mouseout",function(e){ - //alert($(this).html()); + $(this).find("div").hide(); + }); + //最终成绩提示 + $(".student_final_scor_info").bind("mouseover",function(e){ + $(this).find("div").show(); + }); + $(".student_final_scor_info").bind("mouseout",function(e){ $(this).find("div").hide(); }); }); diff --git a/app/views/student_work/add_score_reply.js.erb b/app/views/student_work/add_score_reply.js.erb index 2c6f1c9bf..28704630f 100644 --- a/app/views/student_work/add_score_reply.js.erb +++ b/app/views/student_work/add_score_reply.js.erb @@ -1,6 +1,7 @@ $("#add_score_reply_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'add_score_reply', :locals => {:score => @score}) %>"); <% if @status && @status == 1%> $("#replay_histroy_<%= @score.id%>").prepend("<%= escape_javascript(render :partial => 'jour_replay', :locals => {:jour => @jour}) %>"); + $("#add_score_reply_<%= @score.id%>").hide(); <% else%> alert("回复内容不能为空"); <% end%> \ No newline at end of file diff --git a/app/views/student_work/edit.html.erb b/app/views/student_work/edit.html.erb index dfa995f47..6e36447d2 100644 --- a/app/views/student_work/edit.html.erb +++ b/app/views/student_work/edit.html.erb @@ -2,14 +2,6 @@
- - 应评 + <%= l(:lable_all_penalty)%>
- - 实评 + <%= l(:lable_has_penalty)%>
- - <%= link_to "缺评",student_work_absence_penalty_student_work_index_path(:homework => @homework.id,:order => @order)%> + <%= link_to l(:lable_absence_penalty),student_work_absence_penalty_student_work_index_path(:homework => @homework.id,:order => @order)%> diff --git a/app/views/users/_course_form.html.erb b/app/views/users/_course_form.html.erb index 82b69ab63..3a6b317f0 100644 --- a/app/views/users/_course_form.html.erb +++ b/app/views/users/_course_form.html.erb @@ -1,74 +1,46 @@ -
-
-
-
-- -- <%= image_tag(url_to_avatar(membership.course), :class => 'avatar') %> - -- --
-- -- - <%= link_to_course(membership.course) %> - - - <%= render :partial => 'courses/set_course_time', :locals => {:course => membership.course} %> - <% if (User.current == @user && (!@user.allowed_to?(:as_teacher,membership.course)))%> - <%= join_in_course(membership.course, User.current) %> - <% end %> - - - <%= l(:label_x_base_courses_member, :count => membership.course.members.count) %> - (<%= "#{membership.course.members.count}" %>) - - <%= l(:label_homework) %> - ( - - <%= link_to (membership.course.homework_commons.count), homework_common_index_path(:course => membership.course.id) %> - - ) - - <%= l(:label_course_news) %> - ( - - <%= link_to (membership.course.news.count), {:controller => 'news', :action => 'index', :course_id => membership.course.id} %> - ) - - -- -- -- <%= textilizable membership.course.short_description %> -
-- -- - <% @course = Course.find_by_extra(membership.course.extra) %> - <% unless (@course.nil? || @course.teacher.nil? || @course.teacher.name.nil?) %> - - <%= l(:label_main_teacher) %> - : <%= link_to(@course.teacher.realname, user_path(@course.teacher)) %> - - - <%= l(:label_course_term) %> - : <%= @course.time %><%= get_course_term_locales @course %> - - <% end %> - -
-
+<% can_edit_flag = User.current.allowed_to?(:as_teacher,item) || User.current.admin? %>
+<% course_end_flag = course_endTime_timeout?(item) %>
+ - + <%= item.user_extensions.school.name %> + +
- + <%= item.user_extensions.occupation %> + +
- + <%= item.show_name %> + +
- "> - <%= l :label_user_all_activity %> - -
- "> - <%= l :label_user_activity_myself %> - -
- "> - <%= l :label_user_all_respond %> - -
-
-
-
-- -- <%= link_to image_tag(url_to_avatar(user), :class => "avatar"),user_path(user),:title => "#{user.name}" %> - -- --
-- - -- <%= content_tag "div", link_to(user.name, user_path(user)), :class => "project_avatar_name" %> - -- - - - -- <% cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" %> - <% memberships = user.memberships.all(:conditions => cond) %> - <%= l(:label_x_contribute_to, :count => memberships.count) %> - <% for member in memberships %> - <%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %> - <% end %> - -
- <% user_courses = user_courses_list(user) %> - <%= l(:label_x_course_contribute_to, :count => user_courses.count) %> - <%= ":" unless user_courses.empty? %> - <% for course in user_courses %> - <%= link_to course.name,{:controller => 'courses',:action => 'show',id:course.id, host: Setting.host_course} %><%= (user_courses.last == course) ? '' : ',' %> - <% end %> -
-- -<%= l(:label_user_joinin) %><%= format_date(user.created_on) %> - -
- - "><%=l :label_project_take%> -
- "><%=l :label_has_watched_project%> -
-
-
-
- -- -<%= image_tag(url_to_avatar(membership.project), :class => 'avatar') %> -- --
- -<%= link_to_user(membership.user) if membership.respond_to?(:user) %> - <%= l(:label_project_take_in) %> <%= link_to_project(membership.project) %> -- -- -- <%= membership.project.short_description%> -
- -<%= l(:label_create_time) %> : <%= format_time(membership.created_on) %> -<%= h membership.roles.sort.collect(&:to_s).join(', ') %> -
- <% end %>
- -
- <%= image_tag(get_course_avatar(course), :class => "avatar-4") %> + <%= image_tag(url_to_avatar(course), :class => "avatar-4") %>@@ -27,7 +27,7 @@ (<%= course.members.count %>人) <% files_count = visable_attachemnts_incourse(course).count %> <% if files_count > 0%> - (<%= link_to "#{files_count.to_s}份", course_files_path(course) %>公开资料) + (<%= link_to "#{files_count.to_s}份", course_files_path(course) %>资料) <% end %>
diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb
index 7c8dd7f64..db848d2cd 100644
--- a/app/views/words/_journal_reply_items.html.erb
+++ b/app/views/words/_journal_reply_items.html.erb
@@ -11,12 +11,12 @@
<%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %>
<% end %>
-<% end %><%= l(:lable_bar_active) %>
+<%= l(:lable_bar_active) %>
<% unless @forums.first.nil? %>-
@@ -536,7 +508,7 @@
-<%= l(:label_mail_policy) %>: +<%= l(:label_mail_policy) %>: <% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %> <% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %> diff --git a/app/views/mailer/send_for_user_activities.text.erb b/app/views/mailer/send_for_user_activities.text.erb index bcafb896f..f86dec62d 100644 --- a/app/views/mailer/send_for_user_activities.text.erb +++ b/app/views/mailer/send_for_user_activities.text.erb @@ -23,7 +23,7 @@ <% end %> ] <%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value) %> - <%= l(:label_project_notice) %> + <%= l(:label_project_notice_reply) %> <%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value) %> <%= format_time(course_news_comment.created_on) %> <% end %> @@ -49,7 +49,7 @@ [ <%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value) %>] <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value) %> <%= l(:label_send_course_journals_for_messages) %> - <%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value) %> + <%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value) %> <%= format_time(course_journal_message.created_on) %> <% end %> <% end %> @@ -66,7 +66,7 @@ <% end %> <% unless @attachments.first.nil? %> - <%= l(:label_course_attendingcontestwork_download) %> + <%= l(:label_course_mail_files) %> <% @attachments.each do |attachment|%> ▪[<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value) %>] <%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value) %> @@ -101,11 +101,11 @@ <% @issues_journals.each do |issues_journal| %> ▪[<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value) %>] <%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value) %> - <%= l(:label_project_issue) %> + <%= l(:label_project_issue_update) %> <% if issues_journal.notes.nil? %> <%= link_to truncate(issues_journal.issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value) %> <% else %> - <%= link_to truncate(issues_journal.notes,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value) %> + <%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value) %> <% end %> <%= format_time(issues_journal.created_on) %> <% end %> @@ -148,7 +148,7 @@ ▪[<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value) %> ] <%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value) %> <%= l(:label_project_mail_notice) %> - <%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new,:token => @token.value) %> + <%= link_to truncate(project_new.title.html_safe,length: 30,omission: '...'), news_url(project_new,:token => @token.value) %> <%= format_time(project_new.created_on) %> <% end %> <% end %> @@ -161,7 +161,7 @@ <%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value) %> <% end %>] <%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value) %> - <%= l(:label_project_mail_notice) %> + <%= l(:lable_project_mail_notice_reply) %> <%= link_to truncate(project_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value) %> <%= format_time(project_news_comment.created_on) %> <% end %> @@ -204,7 +204,7 @@ <% @user_journal_messages.each do |user_journal_message|%> ▪ <%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value)%> <%= l(:label_show_your_message) %> - <%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'), feedback_url(@user,:token => @token.value) %> + <%= link_to truncate(user_journal_message.notes.html_safe,length: 30,omission: '...'), feedback_url(@user,:token => @token.value) %> <%= format_time(user_journal_message.created_on) %> <% end %> <% end %> @@ -216,7 +216,7 @@ <% @forums.each do |forum|%> ▪<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value) %> <%= l(:label_forum_new) %> - <%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value) %> + <%= link_to truncate(forum.name.html_safe,length: 30,omission: '...'),forum_url(forum,:token => @token.value) %> <%= format_time(forum.created_at) %> <% end %> @@ -226,7 +226,7 @@ <% @memos.each do |memo|%> ▪<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value)%> <%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %> - <%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id))%> + <%= link_to truncate(memo.subject.html_safe,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id))%> <%= format_time(memo.created_at) %> <% end %> diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 6c0c3a78a..c23266afd 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -1,743 +1,552 @@ -<% @nav_dispaly_home_path_label = 1 - @nav_dispaly_main_course_label = 1 - @nav_dispaly_main_project_label = 1 - @nav_dispaly_main_contest_label = 1 %> -<% @nav_dispaly_forum_label = 1%> - - - - -- <%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %> - <%= call_hook(:view_my_account_contextual, :user => @user) %> -- -- <%= l(:label_my_account) %> -
-<%= error_messages_for 'user' %> --<%= labelled_form_for :user, @user, - :url => {:action => "account"}, - :html => {:id => 'my_account_form', - - :method => :post} do |f| %> - - - -- - <%= render :partial => "avatar/avatar_form",:style => "display:inline", :locals => {source: @user} %> - --- - - - +<%= stylesheet_link_tag 'nyan' %> +<%= javascript_include_tag '/javascripts/jquery.leanModal.min.js' %> +<% if !User.current.user_extensions.nil? %> + <% province = User.current.user_extensions.location %> + <% city = User.current.user_extensions.location_city %> + <% identity = User.current.user_extensions.identity %> + <% occupation1 = User.current.user_extensions.occupation %> + <% occupation = User.current.user_extensions.occupation %> + <% title = User.current.user_extensions.technical_title %> + <% language = User.current.language %> +<% else %> + <% province = "湖南省" %> + <% city = "长沙"%> + <% identity = ""%> + <% occupation1 = ""%> + <% title = "" %> + <% language = ""%> <% end %> -<% html_title(l(:label_my_account)) -%> - + \ No newline at end of file diff --git a/app/views/my/clear_user_avatar_temp.js.erb b/app/views/my/clear_user_avatar_temp.js.erb new file mode 100644 index 000000000..9513bdac4 --- /dev/null +++ b/app/views/my/clear_user_avatar_temp.js.erb @@ -0,0 +1,7 @@ + $("img[nhname='avatar_image']").attr('src',$("#nh_user_tx").attr('src')); + $('#ajax-modal').html($("#nh_tx_dialog_html").html()); + showModal('ajax-modal','460px'); + $('#ajax-modal').siblings().hide(); + $('#ajax-modal').parent().removeClass("alert_praise"); + //$('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("alert_box"); \ No newline at end of file diff --git a/app/views/my/save_user_avatar.js.erb b/app/views/my/save_user_avatar.js.erb new file mode 100644 index 000000000..ce4bae501 --- /dev/null +++ b/app/views/my/save_user_avatar.js.erb @@ -0,0 +1,2 @@ +$("#nh_user_tx").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:216px;height:216px;",:alt=>"头像") %>'); +hideModal(); \ No newline at end of file diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb index 28eb5c805..c89f0af26 100644 --- a/app/views/news/_course_news.html.erb +++ b/app/views/news/_course_news.html.erb @@ -34,6 +34,7 @@ <%= l(:label_release_news) %>: <%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %> + <%=link_to "#{news.comments.all.count}".html_safe, news_path(news.id), :class => "pro_mes_w" %>- --- <%= f.text_field :login, :required => true, :size => 25, :name => "login", :style => 'border:1px solid #d3d3d3;'%> - <%= l(:label_max_number) %> -
- -
-- - - - - - - - + + +
+- - - <% if Setting.openid? %> -+- - - - - - -++ +-
+
+ <%= labelled_form_for :user, @user, :url => {:action => "account"}, :html => {:id => 'my_account_form', :method => :post} do |f| %> ++ + ++ <% if( @act.nil? || @act != 'password') %> + <%= render_flash_messages %> + <%= error_messages_for 'user',@user.user_extensions %> + <% end %> ++ <% end %> + + <%= form_tag({:action => "password"},:id => 'my_password_form') do %> +-
+
-
+
+ <% if( !@act.nil? && @act == 'password') %> + <%= render_flash_messages %> + <%= error_messages_for 'user' %> <% end %> - - - - - - - - -+ + <% end %> +- - - - <% if User.current.user_extensions.nil? %> - readonly> - - - <% else %> - <% if User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %> - - readonly> - - - <% elsif User.current.user_extensions.school.nil? %> - - readonly> - - - <% else %> - - - - - <% end %> - <% end %> -
- -- -+<%= l(:lable_school_list)%>
- --- --
- <% @ss = School.find_by_sql("select distinct province from schools") %>
- <% @ss.each do |s| %>
-
---
-
-
-
+
-
+
+
- <%= f.text_field :mail, :required => true %> -
- -- <%= f.select :language, :Chinese => :zh, :English => :en %> -
- - - <% if !User.current.user_extensions.nil? %> - <% province = User.current.user_extensions.location %> - <% city = User.current.user_extensions.location_city %> - <% identity = User.current.user_extensions.identity %> - <% occupation1 = User.current.user_extensions.occupation %> - <% occupation = User.current.user_extensions.occupation %> - <% title = User.current.user_extensions.technical_title %> - <% language = User.current.language %> - <% else %> - <% province = "湖南省" %> - <% city = "长沙"%> - <% identity = ""%> - <% occupation1 = ""%> - <% title = "" %> - <% language = ""%> - <% end %> - - -- - -
- - - - -- <%= f.text_field :identity_url %> -
- <% end %> - - <% @user.custom_field_values.select(&:editable?).each do |value| %> -<%= custom_field_tag_with_label :user, value %>
- <% end %> - <%= call_hook(:view_my_account, :user => @user, :form => f) %> - +- - +--- <%= render :partial => 'users/mail_notifications' %> -
+ +- -<%= l(:lable_school_list)%>
+ +++ +-
+ <% @ss = School.find_by_sql("select distinct province from schools") %>
+ <% @ss.each do |s| %>
+
++-
+
+
- - - - -- <%= render :partial => 'users/user_extensions' %>-
diff --git a/app/views/poll/poll_result.html.erb b/app/views/poll/poll_result.html.erb index 47f3b179d..4145ec1b2 100644 --- a/app/views/poll/poll_result.html.erb +++ b/app/views/poll/poll_result.html.erb @@ -1,5 +1,5 @@ <%= stylesheet_link_tag 'polls', :media => 'all' %> -+<%= @poll.polls_name.empty? ? l(:label_poll_new) : @poll.polls_name %> diff --git a/app/views/projects/_history.html.erb b/app/views/projects/_history.html.erb index 54dda7b28..b31445fdc 100644 --- a/app/views/projects/_history.html.erb +++ b/app/views/projects/_history.html.erb @@ -4,15 +4,15 @@
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>-+- <%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10', :target => "_blank" %> - <%= format_time(journal.created_on) %> + <%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10 f14', :target => "_blank" %> + <%= format_time(journal.created_on) %>-<%=journal.notes.html_safe%>
+<% ids = 'project_respond_form_'+ journal.id.to_s%> <% if journal.user == User.current|| User.current.admin? %> <%= link_to(l(:label_bid_respond_delete), @@ -31,7 +31,7 @@ <% ids = 'project_respond_form_'+ journal.id.to_s%> <% if reply_allow %> -+<%= render :partial => 'words/new_respond_project', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %><% end %> diff --git a/app/views/projects/_tools_expand.html.erb b/app/views/projects/_tools_expand.html.erb index e9e7492cc..4cf7ebcab 100644 --- a/app/views/projects/_tools_expand.html.erb +++ b/app/views/projects/_tools_expand.html.erb @@ -35,9 +35,105 @@++ + + +<%= l(:label_project_dts_new) %>
+++ +++代码上传分析中...
+++1%++ +++\ No newline at end of file diff --git a/app/views/projects/dts_repos.html.erb b/app/views/projects/dts_repos.html.erb new file mode 100644 index 000000000..28f0398c5 --- /dev/null +++ b/app/views/projects/dts_repos.html.erb @@ -0,0 +1,3 @@ +语言:Java 总文件数:361 代码行数:48662
+ + <% @dts.each do |dt| %> +++ <% end %> + ++
++ +错误变量 +<%= dt.Variable %> +起始行 +<%= dt.StartLine %> +IP行 +<%= dt.IPLine %> ++ +缺陷代码 +<%= dt.IPLineCode %> ++ +错误描述 +<%= dt.Description %> ++ +文件 +<%= dt.File %> ++\ No newline at end of file diff --git a/app/views/projects/join_project.js.erb b/app/views/projects/join_project.js.erb index f3bdfb50a..92cdfcf2c 100644 --- a/app/views/projects/join_project.js.erb +++ b/app/views/projects/join_project.js.erb @@ -1,7 +1,8 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/join_project') %>'); -showModal('ajax-modal', '510px'); +showModal('ajax-modal', '540px'); $('#ajax-modal').css('height','260px'); -$('#ajax-modal').siblings().remove(); +//$('#ajax-modal').siblings().remove(); +$('#ajax-modal').siblings().hide(); $('#ajax-modal').before("" + "<%= l(:label_project_dts) %>
+"); $('#ajax-modal').parent().removeClass("alert_praise"); diff --git a/app/views/projects/online_dev.html.erb b/app/views/projects/online_dev.html.erb new file mode 100644 index 000000000..d6a4b6795 --- /dev/null +++ b/app/views/projects/online_dev.html.erb @@ -0,0 +1,47 @@ +
++ + + +<%= l(:label_project_online_dev) %>
+++ +++在线开发部署中...
+++0%++ +++\ No newline at end of file diff --git a/app/views/projects/search.html.erb b/app/views/projects/search.html.erb index ccffce775..fedc9f846 100644 --- a/app/views/projects/search.html.erb +++ b/app/views/projects/search.html.erb @@ -116,9 +116,9 @@ <% end %> -<% other_formats_links do |f| %> -<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> -<% end %> +<%# other_formats_links do |f| %> +<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> +<%# end %> <% content_for :sidebar do %> <%= form_tag({}, :method => :get) do %> diff --git a/app/views/projects/soft_file.html.erb b/app/views/projects/soft_file.html.erb new file mode 100644 index 000000000..9e486dd78 --- /dev/null +++ b/app/views/projects/soft_file.html.erb @@ -0,0 +1,46 @@ +点击进入: + 在线开发平台
+++ + + +<%= l(:label_project_soft_file) %>
+++ +++软件资源库部署中...
+++0%++ +++ +\ No newline at end of file diff --git a/app/views/projects/soft_knowledge.html.erb b/app/views/projects/soft_knowledge.html.erb new file mode 100644 index 000000000..bcb745357 --- /dev/null +++ b/app/views/projects/soft_knowledge.html.erb @@ -0,0 +1,46 @@ +++ + + +<%= l(:label_project_soft_knowledge) %>
+++ +++云化部署中...
+++0%++ +++ +\ No newline at end of file diff --git a/app/views/projects/soft_service.html.erb b/app/views/projects/soft_service.html.erb new file mode 100644 index 000000000..43376b915 --- /dev/null +++ b/app/views/projects/soft_service.html.erb @@ -0,0 +1,46 @@ +++ + + +<%= l(:label_project_soft_service) %>
+++ +++云化部署中...
+++0%++ +++ +\ No newline at end of file diff --git a/app/views/projects/yun_dep.html.erb b/app/views/projects/yun_dep.html.erb new file mode 100644 index 000000000..20abf038f --- /dev/null +++ b/app/views/projects/yun_dep.html.erb @@ -0,0 +1,47 @@ +++ + + +<%= l(:label_project_dts_yun) %>
+++ +++云化部署中...
+++0%++ +++\ No newline at end of file diff --git a/app/views/repositories/stats.html.erb b/app/views/repositories/stats.html.erb index 50648f66f..7e558119f 100644 --- a/app/views/repositories/stats.html.erb +++ b/app/views/repositories/stats.html.erb @@ -1,12 +1,11 @@ -所部署服务的网址: + http://rubyblog.forge.trustie.net/accounts/login
+<%= l(:label_statistics) %>
- ++<%= l(:label_statistics) %>
+-<%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %> + <%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>
--<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %> +
+ <%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>
-<%= link_to l(:button_back), :action => 'show', :id => @project %>
- <% html_title(l(:label_repository), l(:label_statistics)) -%> diff --git a/app/views/stores/_search_bar.html.erb b/app/views/stores/_search_bar.html.erb index e4dea7a02..8a7481aa6 100644 --- a/app/views/stores/_search_bar.html.erb +++ b/app/views/stores/_search_bar.html.erb @@ -1,8 +1,9 @@ -+<%= form_tag( search_stores_path, method: 'post') do %> <%= text_field_tag 'name', params[:name], placeholder: l('welcome.search.information'), name: "name", :class => 'blueinputbar', :style => 'width:450px;'%> - <%= submit_tag l(:label_search), :class => "enterprise"%> + <%= submit_tag l(:label_search), :class => "enterprise "%> <% end %> + <%= link_to("导出缺失列表",lost_file_stores_path(:format => 'xls'),:style => "background-color: #15bccf;padding: 4px 5px;color: white;") if User.current.admin?%>\ No newline at end of file diff --git a/app/views/student_work/_evaluation_student_work.html.erb b/app/views/student_work/_evaluation_student_work.html.erb new file mode 100644 index 000000000..b5bdd6f55 --- /dev/null +++ b/app/views/student_work/_evaluation_student_work.html.erb @@ -0,0 +1,58 @@ + +<%= l(:label_resources_search_all)%>- " id="student_work_<%= student_work.id%>">
+
+diff --git a/app/views/student_work/_praise_alert.html.erb b/app/views/student_work/_praise_alert.html.erb new file mode 100644 index 000000000..293bcab13 --- /dev/null +++ b/app/views/student_work/_praise_alert.html.erb @@ -0,0 +1,9 @@ ++++ 当前作业 + 已开启匿评 + 您提交作品后将 + 不会收到任何匿评作品, + 您的作品也 + 不会被其他用户匿评. + 如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分 +
+ 确定 ++diff --git a/app/views/student_work/_programing_work_show.html.erb b/app/views/student_work/_programing_work_show.html.erb new file mode 100644 index 000000000..eab8313bc --- /dev/null +++ b/app/views/student_work/_programing_work_show.html.erb @@ -0,0 +1,76 @@ + +++
+据说雷锋做完好事是从来不留名的呢,我们这次评分也不留名!!!但是,但是,您给的分数一定要公正哦,老天爷看不到,我们的系统可是清楚得很!
+别怪我没告诉你,系统分配给你的作品不评价可是要扣分的哈!
+ 匿名评分 + 冒着扣分的危险残忍拒绝 ++\ No newline at end of file diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb index dfe61d3db..2b7d49402 100644 --- a/app/views/student_work/_show.html.erb +++ b/app/views/student_work/_show.html.erb @@ -36,7 +36,7 @@-
+
+ <%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%> ++ <% end%> ++ <%@work.student_works_scores.order("updated_at desc").each do |score|%> ++ 收起 + ++ <%= render :partial => 'student_work_score',:locals => {:score => score}%> ++ <% end%> +编辑作品
- - - - - - - -<%= labelled_form_for @work,:html => { :multipart => true } do |f|%> diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 6325abc09..781277b57 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -1,3 +1,17 @@ + ++ + +-
@@ -34,39 +48,68 @@
<%= link_to "所有作品(#{@stundet_works.count})".html_safe,student_work_index_path(:homework => @homework.id), :class => "fl"%>
<% if @show_all%>
-
- 搜索
- <%= link_to "缺评情况",student_work_absence_penalty_student_work_index_path(:homework => @homework.id), :class => "student_work_search fl", :target => "_blank" if @is_teacher%>
+
+ <%= select_tag(:late_penalty,options_for_select(course_group_list(@course),@group), {:class => "fl h22 w100 ml10"}) if(@is_teacher && course_group_list(@course).count > 0) %>
+ 搜索
+ <%= link_to("缺评情况",student_work_absence_penalty_student_work_index_path(:homework => @homework.id), :class => "student_work_search fl", :target => "_blank") if((@is_teacher || User.current.admin?) && @homework.homework_type == 1) %>
<% end%>
<% if @is_teacher%>
<% if @homework.student_works.empty?%> - <%= link_to "附件", "javascript:void(0)", class: "down_btn fr", :onclick => "alert('没有学生提交作业,无法下载附件')" %> + <%= link_to "附件", "javascript:void(0)", class: "down_btn fr zip_download_alert", :onclick => "alert('没有学生提交作业,无法下载附件')" %> <% else%> <%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json), - remote: true, class: "down_btn fr", :id => "download_homework_attachments" %> + remote: true, class: "down_btn fr zip_download_alert", :id => "download_homework_attachments" %> <% end%> - +<% end%>+ 使用 + winzip + 工具进行解压可能会导致 + 下载文件乱码 + ,建议您使用 + winrar + 工具进行解压 ++ <%= link_to("匿评", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%> + <%= link_to("缺评", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%> <%= link_to l(:label_list), student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%> 导出全部:-
- <% if @is_evaluation.nil?%>
- <%= render :partial => 'student_work_title'%>
- <% else%>
- <%= render :partial => 'evaluation_work_title'%>
- <% end%>
-
-
+ <%= render :partial => 'evaluation_work_title'%>
+
-
+ <%= render :partial => 'evaluation_student_work_title'%>
+
-
+ <%= render :partial => 'student_work_title'%>
+
<%= @homework.description.html_safe %>+ + <% if @homework.homework_type == 2 && @homework.homework_detail_programing%> ++ + <% @homework.homework_tests.each do |test|%> +
+ <% end%> +"> + + <% end%> + ++ <%=test.input%> + ++ <%= test.output%> + +<% unless @homework.attachments.empty?%> 附件: @@ -99,6 +160,18 @@<% end%>+ 扣分标准: +截止时间:<%= @homework.end_time%> diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb index 7d685131f..eda09114e 100644 --- a/app/views/student_work/new.html.erb +++ b/app/views/student_work/new.html.erb @@ -1,3 +1,17 @@ ++ <% if @homework.homework_type == 1%> + <%= scoring_rules @homework.late_penalty,@homework.id,@is_teacher,@homework.homework_detail_manual.absence_penalty%> + <% else%> + <%= scoring_rules @homework.late_penalty,@homework.id,@is_teacher%> + <% end%> ++创建作品
+ <% if @homework.homework_type == 1%> ++ 提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息 ++ <% end%><%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %> - 项目信息 -
@@ -27,17 +49,23 @@- + <% if @homework.homework_type != 2%> + + 项目信息 +
+ + <% end%>
- - <%= f.text_area "description", :class => "w620 hwork_txt ", :maxlength => 3000, :placeholder => "最多3000个汉字", :onkeyup => "regexStudentWorkDescription();"%> + + <%= f.text_area "description", :class => "w620 hwork_txt ", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>
-- - <%= render :partial => 'attachments/new_form' %> -
- + <% if @homework.homework_type != 2%> ++ + <%= render :partial => 'attachments/new_form' %> +
+ + <% end%>提交作品 <%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%> diff --git a/app/views/student_work/set_program_score.html.erb b/app/views/student_work/set_program_score.html.erb new file mode 100644 index 000000000..6ea169c64 --- /dev/null +++ b/app/views/student_work/set_program_score.html.erb @@ -0,0 +1 @@ +成功 \ No newline at end of file diff --git a/app/views/student_work/show.js.erb b/app/views/student_work/show.js.erb index fa12e097d..1c8874c2f 100644 --- a/app/views/student_work/show.js.erb +++ b/app/views/student_work/show.js.erb @@ -2,6 +2,10 @@ if($("#about_hwork_<%= @work.id%>").children().length > 0) {$("#about_hwork_<%= @work.id%>").html("");} else { - $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>"); + <% if @homework.homework_type == 2%> + $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show') %>"); + <% else%> + $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show') %>"); + <% end%> $('#score_<%= @work.id%>').peSlider({range: 'min'}); } \ No newline at end of file diff --git a/app/views/student_work/student_work_absence_penalty.html.erb b/app/views/student_work/student_work_absence_penalty.html.erb index e9054561f..967480552 100644 --- a/app/views/student_work/student_work_absence_penalty.html.erb +++ b/app/views/student_work/student_work_absence_penalty.html.erb @@ -14,13 +14,13 @@ 姓名
-\ No newline at end of file diff --git a/app/views/users/_history.html.erb b/app/views/users/_history.html.erb index d69b6b25b..a87c2d8e4 100644 --- a/app/views/users/_history.html.erb +++ b/app/views/users/_history.html.erb @@ -9,7 +9,7 @@-
- <% for membership in memberships %>
-
+ ++ <% if(course_end_flag) %> + 课程结束 + <% elsif(can_edit_flag) %> + 发布作业 + <% else %> + 提交作品 + <% end %> + ++ item.id, :host=>Setting.host_course) %>" title="<%= item.name %>" class="courses_list_title f14 fb <%=course_end_flag ? 'c_dark' : 'c_blue02'%> fl"><%= item.name %> + <% if(can_edit_flag) %> + <% if(course_end_flag) %> + + <% else %> + + <% end %> <% end %> - --<%= call_hook :view_account_left_bottom, :user => @user %> \ No newline at end of file + ++++
++ +主讲老师: ++ <%= item.teacher.show_name %> + +课程作业: +<%= item.homework_commons.count %> ++ +学生人数: +item.id,:role=>2, :host=>Setting.host_course) %>"><%= studentCount(item) %> +开课学期: +<%= item.time %><%= get_course_term_locales item %> +- <%= link_to journal.user, user_path(journal.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%><%= format_time(journal.created_on) %> + <%= link_to "#{journal.user.show_name}(#{journal.user.login})", user_path(journal.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%><%= format_time(journal.created_on) %><%=journal.notes.html_safe%>
diff --git a/app/views/users/_influence_new_score_index.html.erb b/app/views/users/_influence_new_score_index.html.erb index c0a89536a..505785351 100644 --- a/app/views/users/_influence_new_score_index.html.erb +++ b/app/views/users/_influence_new_score_index.html.erb @@ -4,4 +4,5 @@<%= l('userscore.active.commit.attachments')%> * 4 = <%= option_num.attachment %> * 4 = <%= option_num.attachment * 4 %><%= l('userscore.active.update_issues')%> * 2 = <%= option_num.issue_done_ratio %> * 2 = <%= option_num.issue_done_ratio * 2 %><%= l('userscore.active.release_issues')%> * 4 = <%= option_num.post_issue %> * 4 = <%= option_num.post_issue * 4 %>-<%= l(:label_user_score_of_active)%> = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> = <%= active(option_num) %>\ No newline at end of file +<%= l('userscore.active.release_messages')%> * 1 = <%= option_num.memo %> * 2 = <%= option_num.memo * 2 %>+<%= l(:label_user_score_of_active)%> = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> + <%= option_num.memo * 2 %> = <%= active(option_num) %>\ No newline at end of file diff --git a/app/views/users/_show_new_score.html.erb b/app/views/users/_show_new_score.html.erb index c0e731a65..2081c38d6 100644 --- a/app/views/users/_show_new_score.html.erb +++ b/app/views/users/_show_new_score.html.erb @@ -4,7 +4,7 @@- <%= image_tag(url_to_avatar(@user), :class => 'avatar2') %> +<%= image_tag(url_to_avatar(@user), :class => 'avatar2',:style=>'max-width:150px;max-height:150px;') %> diff --git a/app/views/users/_topic_new_score_index.html.erb b/app/views/users/_topic_new_score_index.html.erb index af2ff0da3..86dc1f80f 100644 --- a/app/views/users/_topic_new_score_index.html.erb +++ b/app/views/users/_topic_new_score_index.html.erb @@ -1,7 +1,5 @@ - -<%= h @user.name %> <%= l('userscore.collaboration.memos')%> * 2 = <%= option_num.memo %> * 2 = <%= option_num.memo * 2 %><%= l('userscore.collaboration.message_for_issues')%> * 1 = <%= option_num.messages_for_issues %> * 1 = <%= option_num.messages_for_issues * 1 %><%= l('userscore.collaboration.issue_status')%> * 1 = <%= option_num.issues_status %> * 1= <%= option_num.issues_status * 1 %><%= l('userscore.collaboration.reply_for_messages')%> * 1 = <%= option_num.replay_for_message %> * 1 = <%= option_num.replay_for_message * 1 %><%= l('userscore.collaboration.reply_for_memos')%> * 1 = <%= option_num.replay_for_memo %> * 1 = <%= option_num.replay_for_memo * 1 %>-<%= l(:label_user_score_of_collaboration)%> = <%= option_num.memo * 2 %> + <%= option_num.messages_for_issues * 1 %> + <%= option_num.issues_status * 1 %> + <%= option_num.replay_for_message * 1 %> + <%= option_num.replay_for_memo * 1 %> = <%= collaboration(option_num) %>+<%= l(:label_user_score_of_collaboration)%> = <%= option_num.messages_for_issues * 1 %> + <%= option_num.issues_status * 1 %> + <%= option_num.replay_for_message * 1 %> + <%= option_num.replay_for_memo * 1 %> = <%= collaboration(option_num) %>diff --git a/app/views/users/_user_fans_item.html.erb b/app/views/users/_user_fans_item.html.erb new file mode 100644 index 000000000..66181d23b --- /dev/null +++ b/app/views/users/_user_fans_item.html.erb @@ -0,0 +1,50 @@ ++ +diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 40122fba7..efe5d0539 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,661 +1,348 @@ -<% if User.current.id == @user.id %> -+ <%= item.show_name %> + ++ <% if(User.current.logged? && User.current != item )%> + <%if(item.watched_by?(User.current))%> + 取消关注 + <% else %> + 添加关注 + <% end %> + <% end %> + ++ <% if item.user_extensions && !item.user_extensions.brief_introduction.nil? && !item.user_extensions.brief_introduction.empty? %> ++个性签名:<%= item.user_extensions.brief_introduction %>
+ <% end %> +
++ 加入时间: +<%= format_date(item.created_on) %> + <% if (item.user_extensions.identity == 0 || item.user_extensions.identity == 1) && !item.user_extensions.school.nil? %> +工作单位: ++ + <% elsif item.user_extensions.identity == 3 && !item.user_extensions.occupation.nil? && !item.user_extensions.occupation.empty? %> +工作单位: ++ + <% elsif item.user_extensions.identity == 2 %> +工作单位: ++ + <% end %> +-- - <%= form_tag(:controller => 'users', :action => "show") do %> -- - <%= l(:label_user_activities, :name => @user.name) %> - -- -- <%#链接绑定在页面最下方的jQuery%>
-
-+ +<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> +<% @center_flag = (User.current == @user) %> +<% if @center_flag %> +-
-- -- -- <%= text_field_tag 'user', params[:user], :size => 30 %> - <%= submit_tag l(:label_search_by_user), :class => "small", :name => nil %> --+ + <% if @user.allowed_to?(:add_project, nil, :global => true) %> + 新建项目 + <% else %> + 加入项目 <% end %> -<% end %> - -<%= render_flash_messages %> -<% unless @state == 2 %> - <% unless @activity.empty? %> -+ + -<% html_title(l(:label_activity)) -%> diff --git a/app/views/users/show_new_score.js.erb b/app/views/users/show_new_score.js.erb index 4baee5c04..40ef7d5c5 100644 --- a/app/views/users/show_new_score.js.erb +++ b/app/views/users/show_new_score.js.erb @@ -1,3 +1,4 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_new_score') %>'); showModal('ajax-modal', '400px'); +$('#ajax-modal').siblings().show(); $('#ajax-modal').addClass('new-watcher'); diff --git a/app/views/users/user_activities.html.erb b/app/views/users/user_activities.html.erb index 9165e6f2e..32915245f 100644 --- a/app/views/users/user_activities.html.erb +++ b/app/views/users/user_activities.html.erb @@ -28,7 +28,7 @@- <% @activity.each do |e| %> - <%# 以下一行代码解决有未知的活动无法转换成Model报错%> - <% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %> - <% act = e.act %> - <% unless act.nil? %> - <% if e.act_type == 'JournalsForMessage' || e.act_type == 'HomeworkCommon' || e.act_type == 'Journal'|| e.act_type == 'Changeset' || e.act_type == 'Message' || e.act_type == 'Principal' || e.act_type == 'News' || e.act_type == 'Issue' || e.act_type == 'Contest' %> ---
+ <% if !@center_flag %> +- -- <%= image_tag(url_to_avatar(e.user), :class => "avatar") %> - -- -- <% case e.act_type %> - <% when 'JournalsForMessage' %> -
-- -- <% if User.current.login == e.user.try(:login) %> - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - - - <% if User.current.language == "zh" %> - - <%= l(:label_i_have_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - <%= l(:label_of_feedback) + l(:label_layouts_feedback) %> - - <% else %> - - <%= l(:label_i_have_feedback) %> - <%= l(:label_layouts_feedback) + l(:label_of_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - - <% end %> - <% else %> - - <%= link_to("#{e.user.name}", user_path(e.user_id)) %> - - <% if User.current.language == "zh" %> - - <%= l(:label_have_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - <%= l(:label_of_feedback) + l(:label_layouts_feedback) %> - - <% else %> - - <%= l(:label_have_feedback) %> - <%= l(:label_layouts_feedback) + l(:label_of_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %> - - <% end %> - <% end %> - -- -- -- <%= textAreailizable act.notes %> -
- -- - <%= user_jour_feed_back_url e %> - --- - <% when 'HomeworkCommon' %> -- -- - <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> - -- -- <% if e.user == User.current %> - -- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - - - <%= l(:label_i_new_activity) %> - - <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), student_work_index_path(:homework => e.act_id) %> - - <% else %> -- - <%= link_to(h(e.user), user_path(e.user_id)) %> - - - <%= l(:label_new_activity) %> - - <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), student_work_index_path(:homework => e.act_id) %> - - <% end %> -- -- -- <%= textAreailizable act, :description %> -
- - <% when 'Journal' %> -- -- - <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_at)).to_s %> - -- - - - - - - - -- <% if e.user == User.current %> - -- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - - - - <%= l(:label_i_new_activity) %> - - - <%= link_to(l(:label_activity_project)+":"+act.issue.project.name, project_path(act.issue.project.id)) %> - <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), - {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> - - <% else %> -- - <%= link_to(h(e.user), user_path(e.user_id)) %> - - - - <%= l(:label_new_activity) %> - - - <%= link_to(l(:label_activity_project)+":"+act.issue.project.name, project_path(act.issue.project.id)) %> - <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), - {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> - - <% end %> -- <% if act.notes.nil? %> - <% desStr = '' %> - <% else %> - <% desStr= textAreailizable(act, :notes) %> - <% end %> - -- -- <%= desStr %> -
-- - <% when 'Changeset' %> -- -- - <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> - -- -- <% if e.user == User.current %> - -- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - - - - <%= l(:label_i_new_activity) %> - - - <%= link_to format_activity_title(act.title), - {:controller => 'repositories', - :action => 'revision', - :id => act.repository.project, - :repository_id => act.repository.identifier_param, - :rev => act.identifier} %> - - <% else %> -- - <%= link_to(h(e.user), user_path(e.user_id)) %> - - - - <%= l(:label_new_activity) %> - - - <%= link_to format_activity_title(act.title), - {:controller => 'repositories', - :action => 'revision', - :id => act.repository.project, - :repository_id => act.repository.identifier_param, - :rev => act.identifier} %> - - <% end %> -- -- -- <%= textAreailizable act, :long_comments %> -
-- - <% when 'Message' %> -- -- - <%= format_time(e.act.committed_on) %> - --- <%= link_to l(:label_find_all_comments), - {:controller => 'repositories', - :action => 'revision', - :id => act.repository.project, - :repository_id => act.repository.identifier_param, - :rev => act.identifier} if e.act.count!= 0 %> - - - <%= l(:label_comments_count, :count => e.act.count) %> - --- <% if e.user == User.current %> - -- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - - - - <%= l(:label_i_new_activity) %> - - - <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), - act.board.project ? project_boards_path(act.board.project,:topic_id => act.id) : course_boards_path(act.board.course,:topic_id => act.id), - :class => "problem_tit fl fb " %> - - <% else %> -- - <%= link_to(h(e.user), user_path(e.user_id)) %> - - - - <%= l(:label_new_activity) %> - - - <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), - {:controller => 'messages', - :action => 'show', - :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> - - <% end %> -- -- -- <%= textAreailizable(act, :content) %> -
-- - <% when 'Principal' %> -- -- - <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> - -- -- <% if e.user == User.current %> - -- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - - - - <%= l(:label_new_user) %> - - - <% else %> -- - <%= link_to(h(e.user), user_path(e.user_id)) %> - - - - <%= l(:label_new_user) %> - - - <% end %> -- -- - -- - <% when 'News' %> -- -- - <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> - -- -- <% if e.user == User.current %> - -- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - - - - <%= l(:label_i_new_activity) %> - - - <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> - - <% else %> -- - <%= link_to(h(e.user), user_path(e.user_id)) %> - - - - <%= l(:label_new_activity) %> - - - <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> - - <% end %> -- -- -- <%= textAreailizable act, :description %> -
-- - <% when 'Issue' %> - <% if e.user == User.current %> -- -- - <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> - --- - <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} if e.act.comments_count!= 0 %> - - - <%= l(:label_comments_count, :count => e.act.comments_count) %> - --+ <% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %> + 新建课程 + <% else %> + + 加入课程 + <% end %> + + +<% end %> - -- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - - - - <%= l(:label_i_new_activity) %> - - <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), - {:controller => 'issues', - :action => 'show', - :id => act.id} %> - -- -- <%= textAreailizable act, :description %> - -- - <% else %> -- -- - <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> - --- - <%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} if e.act.journals.count!= 0 %> - - - <%= l(:label_comments_count, :count => e.act.journals.count) %> - --- - <%= link_to(h(e.user), user_path(e.user_id)) %> - - - <%= l(:label_new_activity) %> - - <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), - {:controller => 'issues', - :action => 'show', - :id => act.id} %> - - -- -- <%= textAreailizable act, :description %> - -- +- -- - <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> - --- - <%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} if e.act.journals.count!= 0 %> - - - <%= l(:label_comments_count, :count => e.act.journals.count) %> - --+ - <% when 'Contest' %> -- <% if e.user == User.current && @show_contest == 1 %> - -- - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> - - - - <%= l(:label_i_new_activity) %> - - - <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> - - <% else %> -- - <%= link_to(h(e.user), user_path(e.user_id)) %> - - - - <%= l(:label_new_activity) %> - - - <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> - - <% end %> -- -- -- <%= textAreailizable act, :description %> -
-- - <% else %> - <% end %> -- - - <%= (l(:label_update_time).to_s << ': ' << format_time(e.act.created_on)).to_s %> - --++ <% end %> + - <% end %> - <% end %> - <% end %> -+ <%= @center_flag ? '我的课程' : 'TA的课程' %> + <% if @center_flag %> + <% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %> + 新建课程 + <% else %> + 加入课程 + <% end %> + <% end %> ++ + + + + +-- <% else %> - <% if @user == User.current %> - <%= l(:label_user_activities_no) %> + <% if !@center_flag %> +- <%= pagination_links_full @activity_pages %>
++ <% end %> -<% else %> - <% unless @message.empty? %> -+ <%= @center_flag ? '我的项目' : 'TA的项目' %> + <% if @center_flag %> + <% if @user.allowed_to?(:add_project, nil, :global => true) %> + 新建项目 <% else %> -+ + + + + +- <%= l(:label_user_activities_other) %> -
+ 加入项目 <% end %> - <% end %> + <% end %> +- <% @message.each do |e| -%> -+- <%= content_tag('span', h(e.project), :class => 'project') %> <%= l(:label_new_activity) %> + <%= content_tag('span', h(e.project), :class => 'project') %> <% if e.event_type.eql?("message") || e.event_type.eql?("reply") %> <%= link_to format_activity_title(e.event_title), e.board.project ? project_boards_path(e.board.project,:topic_id => e.id):course_boards_path(e.board.course,:topic_id => e.id) %> <%else %> diff --git a/app/views/users/user_course_activities.html.erb b/app/views/users/user_course_activities.html.erb new file mode 100644 index 000000000..bdebee6a5 --- /dev/null +++ b/app/views/users/user_course_activities.html.erb @@ -0,0 +1,19 @@ +<% for rec in @list %> + + + + <%= rec[:e].name %> + + <%# if( rec[:e].is_public == false || rec[:e].is_public == 0 ) %> + + <%# end %> + + <%= rec[:item].user.show_name %> + <%= get_activity_opt(rec[:item],rec[:e]) %> + + <%= get_activity_act_showname_htmlclear(rec[:item]) %> + + <%= time_tag(get_activity_act_createtime(rec[:item])).html_safe %> ++<% end %> \ No newline at end of file diff --git a/app/views/users/user_courses.html.erb b/app/views/users/user_courses.html.erb index 6e0a1ca17..36e061efa 100644 --- a/app/views/users/user_courses.html.erb +++ b/app/views/users/user_courses.html.erb @@ -1,33 +1,31 @@ -<% if @user.user_extensions.identity == UserExtensions::TEACHER %> - <%= render :partial => 'my_course' %> -<% else %> - <%= render :partial => 'my_joinedcourse' %> -<% end %> - ++ + <% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %> + 新建课程 + <% else %> + 加入课程 + <% end %> + +- -<% html_title(l(:label_user_course)) -%> \ No newline at end of file ++\ No newline at end of file diff --git a/app/views/users/user_courses4show.html.erb b/app/views/users/user_courses4show.html.erb new file mode 100644 index 000000000..7aab1b2a5 --- /dev/null +++ b/app/views/users/user_courses4show.html.erb @@ -0,0 +1,16 @@ +<% for item in @list %> + ++ + <% for item in @list %> + <%= render :partial => 'course_form', :locals => {:item => item} %> + <% end %> ++<%= l(:label_no_data) %>
+-
+ <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
+
+ + + item.id, :host=>Setting.host_course) %>" class="home_list_title c_blue02 fl mb10" title="<%= item.name %>"><%= item.name %> + + + ++<% end %> diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb index 92cc1cfb7..0b42da9f8 100644 --- a/app/views/users/user_fanslist.html.erb +++ b/app/views/users/user_fanslist.html.erb @@ -1,52 +1,25 @@ - -<%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count) %>
-- <% for user in @user.watcher_users %> -\ No newline at end of file +-
-
+diff --git a/app/views/users/user_feedback4show.html.erb b/app/views/users/user_feedback4show.html.erb new file mode 100644 index 000000000..0a1fc8af2 --- /dev/null +++ b/app/views/users/user_feedback4show.html.erb @@ -0,0 +1,36 @@ +<% for item in feed_list %> ++++ <% if @action == 'fans' %> ++ <% for item in @list %> + <%= render :partial => 'users/user_fans_item', :locals => {:item => item,:target=>@user} %> + <% end %> +粉丝
+共有<%=@obj_count%>名粉丝+ <% elsif @action == 'visitor' %> +访客
+共有<%=@obj_count%>访客+ <% else %> +关注
+一共关注<%=@obj_count%>人+ <% end %> + +<%= l(:label_no_data) %>
+-
+ <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
+
+ + <%= image_tag url_to_avatar(item.user),:width => '27',:height => '27' %> + + <%= item.user.show_name %> + <% if item.at_user %> + 回复 + <%= item.at_user.show_name %> + <% end %> + : ++<% end %> diff --git a/app/views/users/user_projects.html.erb b/app/views/users/user_projects.html.erb index 69dda693e..e7eeedb29 100644 --- a/app/views/users/user_projects.html.erb +++ b/app/views/users/user_projects.html.erb @@ -1,66 +1,56 @@ - - - -<%=item.notes.html_safe%>+ <% if JournalsForMessage.create_by_user? User.current %> + 回复 + <% end %> + <% if User.current.admin? || item.user.id == User.current.id %> + item.id,:user_id=>item.user.id) %>" data-confirm="您确定要删除吗?" data-remote="true" data-method="delete" class="fl mt5 c_purple ml5">删除 + <% end %> + <%= time_tag(item.created_on).html_safe %> + ++ + ++--- <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => 0}, :class => 'icon icon-add') if(User.current.allowed_to?(:add_project, nil, :global => true) && @user == User.current)%> -- - -<%#= watch_projects @state %> -<% unless @memberships.empty? %> -- <%#链接绑定在页面最下方的jQuery%>
-
-- -<% html_title(l(:label_user_project)) -%> \ No newline at end of file +-
- <% for membership in @memberships %>
-
<%= l(:label_project_un) %>
-<% else %> -<%= l(:label_project_unadd) %>
-<% end %> - -<% end %> -<%= call_hook :view_account_left_bottom, :user => @user %> -+\ No newline at end of file diff --git a/app/views/users/user_projects4show.html.erb b/app/views/users/user_projects4show.html.erb new file mode 100644 index 000000000..3c709bd5d --- /dev/null +++ b/app/views/users/user_projects4show.html.erb @@ -0,0 +1,16 @@ +<% for item in @list %> ++ + <% for item in @list %> + <% creator = User.find(item.user_id)%> +++ ++ <% end %> ++ item.id, :host=>Setting.host_name) %>" class="courses_list_title f14 fb c_blue02 fl" title="<%= item.name %>"><%= item.name %> + ++ item.id, :host=>Setting.host_name) %>" target="_blank" class="blue_n_btn fr mt20">发布问题 + ++++
++ +创建者: +<%= creator.show_name %> +创建时间: +<%= format_date(item.created_on) %> ++ +成员人数: +item.id, :host=>Setting.host_name) %>"><%= item.members.count %> +项目类型: +<%= item.project_new_type == 1 ? l(:label_development_team) : (item.project_new_type == 2 ? l(:label_research_group) : l(:label_friend_organization))%> +<%= l(:label_no_data) %>
+-
+ <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
+
+ + + item.id, :host=>Setting.host_name) %>" class="home_list_title c_blue02 fl mb10" title="<%= item.name %>"><%= item.name %> + + + ++<% end %> diff --git a/app/views/watchers/_set_watcher.js.erb b/app/views/watchers/_set_watcher.js.erb index 3f469f5c6..da794d18b 100644 --- a/app/views/watchers/_set_watcher.js.erb +++ b/app/views/watchers/_set_watcher.js.erb @@ -1,11 +1,70 @@ +<% if( params[:object_type] == 'user') %> + <% if( params[:target_id] == params[:object_id] ) %> + <% target = User.find_by_id(params[:target_id]) %> + //btn + var btn_html = "<%= escape_javascript( render( :partial => 'layouts/user_watch_btn', :locals => {:target => target} ) )%>"; + $('#user_watch_id').replaceWith(btn_html); + //count + $("*[nh_name='fans_count']").html("<%= target.watcher_users.count.to_s %>"); + //left list + var list_left_html = "<%= escape_javascript( render( :partial => 'layouts/user_fans_list', :locals => {:user => target} ) )%>"; + $('#fans_nav_list').replaceWith(list_left_html); + //list + if( $("#nh_fans_list") != undefined && $("#nh_fans_list").length != 0 ){ + <% if( opt == 'add') %> + var list_html = "<%= escape_javascript( render( :partial => 'users/user_fans_item', :locals => {:item=>User.current,:target => target} ) )%>"; + $("#nh_fans_list").after(list_html); + $("#nodata").hide(); + <% else %> + $("#fans_item_<%= User.current.id %>",$("#nh_fans_list").parent('div')).remove(); + if( $('>div',$("#nh_fans_list").parent('div')).length == 1 ){ + $("#nodata").show(); + } + <% end %> + } + + <% elsif( params[:target_id] == User.current.id.to_s )%> + <% target = User.find_by_id(params[:target_id]) %> + <% item = User.find_by_id(params[:object_id]) %> + //count + $("*[nh_name='watcher_count']").html("<%= User.watched_by(target.id).count.to_s %>"); + //left list + var list_left_html = "<%= escape_javascript( render( :partial => 'layouts/user_watch_list', :locals => {:user => target} ) )%>"; + $('#watcher_nav_list').replaceWith(list_left_html); + //list + if( $("#nh_wacth_list") != undefined && $("#nh_wacth_list").length != 0 ){ + <% if( opt == 'delete') %> + $("#fans_item_<%= item.id %>",$("#nh_wacth_list").parent('div')).remove(); + if( $('>div',$("#nh_wacth_list").parent('div')).length == 1 ){ + $("#nodata").show(); + } + <% end %> + }else if($("#nh_fans_list") != undefined && $("#nh_fans_list").length != 0){ + var list_html = "<%= escape_javascript( render( :partial => 'users/user_fans_item', :locals => {:item=>item,:target => target} ) )%>"; + $('#fans_item_<%= item.id %>').replaceWith(list_html); + } + + <% else %> + <% target = User.find_by_id(params[:target_id]) %> + <% item = User.find_by_id(params[:object_id]) %> + //list + var list_html = "<%= escape_javascript( render( :partial => 'users/user_fans_item', :locals => {:item=>item,:target => target} ) )%>"; + $('#fans_item_<%= item.id %>').replaceWith(list_html); + <% end %> + +<% else %> + <% selector = ".#{watcher_css(watched)}" %> <% id_selector = "#{watcher_css(watched)}" %> if($("<%= selector %>").get(0) == undefined) { - $("#<%= id_selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link_for_project(watched, user) %>")}); + $("#<%= id_selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link_for_project(watched, user) %>")}); } else { - $("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link(watched, user) %>")}); + $("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript watcher_link(watched, user) %>")}); } +<% end %> + + diff --git a/app/views/welcome/_course_list.html.erb b/app/views/welcome/_course_list.html.erb index d51bcc8f7..09cf17a12 100644 --- a/app/views/welcome/_course_list.html.erb +++ b/app/views/welcome/_course_list.html.erb @@ -1,7 +1,7 @@ <% course_list.map do |course| %>+<% id = 'project_respond_form_'+ reply.id.to_s %> - <%= link_to reply.user.name, user_path(reply.user) %> + <%= link_to "#{reply.user.show_name}(#{reply.user.login})", user_path(reply.user) %> <%= l(:label_reply_to)%> <% if show_name %> - <%= link_to parent_jour.user.name, user_path(parent_jour.user) %> + <%= link_to "#{parent_jour.user.show_name}(#{parent_jour.user.login})", user_path(parent_jour.user) %> <% else %> <%= l(:label_anonymous) %> <% end %> @@ -24,20 +24,21 @@<%= reply.notes.html_safe %>
+ <%= format_time reply.created_on %> -- <% if User.current.admin? || reply.user.id == User.current.id || allow_delete%> - <%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user}, - :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %> - <% end %> - <% if reply_allow %> - <%#= link_to l(:button_reply),'', ++ <% if User.current.admin? || reply.user.id == User.current.id || allow_delete%> + <%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user}, + :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %> + <% end %> + <% if reply_allow %> + <%#= link_to l(:button_reply),'', {:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %> - <%= link_to l(:button_reply),'javascript:;',{:nhname=>"reply_btn"} %> - <% end %> -+ <%= link_to l(:button_reply),'javascript:;',{:nhname=>"reply_btn"} %> + <% end %> +<% if reply_allow %> diff --git a/app/views/words/create.js.erb b/app/views/words/create.js.erb index 16f26d5f7..046bc7d1d 100644 --- a/app/views/words/create.js.erb +++ b/app/views/words/create.js.erb @@ -1,9 +1,15 @@ -//$('#message').html('<#%= escape_javascript(render(:partial => 'words/message', :locals => {:jour => @jour, :state => false, :user => @user, :feedback_pages => @feedback_pages,:show_name => true})) %>'); +//$('#message').html('<%#= escape_javascript(render(:partial => 'words/message', :locals => {:jour => @jour, :state => false, :user => @user, :feedback_pages => @feedback_pages,:show_name => true})) %>'); +<% if !@jour.nil? && @jour.jour_type == 'Principal' %> + var html = $(""+"<%= escape_javascript( render(:template => 'users/user_feedback4show',:locals => {:feed_list=>[@jour]} )) %>"+""); + $("div[nhname='container']",$("#nh_messages")).prepend(html.html()); + $('#new_message_cancel_btn').click(); + var params = init_list_more_div_params($("#nh_messages")); + change_status_4_list_more_div(params); + +<% else %> $('#history').html('<%= escape_javascript(render(:partial => 'users/history',:locals => { :journals => @jour, :state => false})) %>') $('#jour_count').html('<%= @obj_count%>') $('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>'); $('#new_form_user_message').val(""); -if($('#new_message_cancel_btn') != undefined && $('#new_message_cancel_btn').length!=0){ - $('#new_message_cancel_btn').click(); -} -$('#new_form_reference_user_id').val(""); \ No newline at end of file +$('#new_form_reference_user_id').val(""); +<% end %> diff --git a/app/views/words/create_reply.js.erb b/app/views/words/create_reply.js.erb index eeb4e3ef6..8e57d7b0e 100644 --- a/app/views/words/create_reply.js.erb +++ b/app/views/words/create_reply.js.erb @@ -1,5 +1,14 @@ <% if @save_succ %> - var pre_append = $('<%= j( + <% if !@jfm.nil? && @jfm.jour_type == 'Principal' %> + var html = $(""+"<%= escape_javascript( render(:template => 'users/user_feedback4show',:locals => {:feed_list=>[@jfm]} )) %>"+""); + $("div[nhname='container']",$("#nh_messages")).prepend(html.html()); +// $('#new_message_cancel_btn').click(); + $("a[nhname='reply_btn']",$("#nh_jours_<%= @jfm.m_reply_id %>")).click(); + var params = init_list_more_div_params($("#nh_messages")); + change_status_4_list_more_div(params); + <% else %> + + var pre_append = $('<%= j( render :partial => "words/journal_reply_items", :locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm,:show_name => @show_name} ) %>').hide(); @@ -12,6 +21,8 @@ textarea1.val(''); $('#course_respond_form_<%=@jfm.m_reply_id.to_s%>').hide(); setMaxLengthItem(pre_append.find('textarea')[0]); + <% end %> + <% else %> alert("<%= l(:label_feedback_fail) %>"); <% end %> \ No newline at end of file diff --git a/app/views/words/destroy.js.erb b/app/views/words/destroy.js.erb index dabd3a8c7..92e15ab93 100644 --- a/app/views/words/destroy.js.erb +++ b/app/views/words/destroy.js.erb @@ -1,18 +1,26 @@ <% if @journal_destroyed.nil? %> alert('<%=l(:notice_failed_delete)%>'); <% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%> - <% if @bid && @jours_count %> - $('#jours_count').html("<%= @jours_count %>"); - <% elsif @course && @jours_count%> - $('#course_jour_count').html("(<%= @jours_count %>)"); - <% elsif @user && @jours_count%> - $('#jour_count').html("<%= @jours_count %>"); + <% if @is_user%> + $("#nh_jours_<%= @journal_destroyed.id %>",$("div[nhname='container']",$("#nh_messages"))).remove(); + var params = init_list_more_div_params($("#nh_messages")); + change_status_4_list_more_div(params); + <% else %> + <% if @bid && @jours_count %> + $('#jours_count').html("<%= @jours_count %>"); + <% elsif @course && @jours_count%> + $('#course_jour_count').html("(<%= @jours_count %>)"); + <% elsif @user && @jours_count%> + $('#jour_count').html("<%= @jours_count %>"); + <% end %> + var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>') + destroyedItem.fadeOut(600,function(){ + destroyedItem.remove(); + }); + <% end %> - var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>') - destroyedItem.fadeOut(600,function(){ - destroyedItem.remove(); - }); <% else %> $('#message').html('<%= escape_javascript(render(:partial => 'words/message', :locals => {:jour => @jour, :state => false, :user => @user, :feedback_pages => @feedback_pages})) %>'); $('#new_form_reference_user_id').val(""); <% end %> + diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index f83d3810c..457d56dad 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -263,7 +263,7 @@ zh: label_tags_numbers: "Tag统计" label_issue_plural: 问题跟踪 - label_project_plural: 项目列表 +# label_project_plural: 项目列表 label_user_plural: 用户列表 label_tags_call: 需求 field_filename: 文件 @@ -337,7 +337,7 @@ zh: # # 贴吧动态栏 # - lable_bar_active: 问题和反馈动态 + lable_bar_active: 贴吧动态 label_my_question: 我要提问 label_my_feedback: 我要反馈 diff --git a/config/locales/courses/zh.yml b/config/locales/courses/zh.yml index 772d6bb52..498388cfc 100644 --- a/config/locales/courses/zh.yml +++ b/config/locales/courses/zh.yml @@ -20,7 +20,7 @@ zh: label_course_mail_news_reply: 课程通知回复 label_main_teacher: 主讲教师 label_course_term: 开课学期 - label_isuue_mail_status: 更新了issue状态 + label_isuue_mail_status: 更新了issue状态! label_join_course: 加入 label_exit_course: 退出 diff --git a/config/locales/en.yml b/config/locales/en.yml index 8419ae188..f532f5cbc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -183,10 +183,10 @@ en: setting_bcc_recipients: Blind carbon copy recipients (bcc) setting_plain_text_mail: Plain text mail (no HTML) setting_host_name: Host name and path - setting_host_course: Host course and path - setting_host_contest: Host contest and path - setting_host_user: Host user and path - setting_host_repository: Host repository and path + setting_host_course: Host course and path + setting_host_contest: Host contest and path + setting_host_user: Host user and path + setting_host_repository: Host repository and path setting_text_formatting: Text formatting setting_wiki_compression: Wiki history compression setting_feeds_limit: Maximum number of items in Atom feeds @@ -961,6 +961,8 @@ en: label_overview: "Overview" label_project_tool: "Tool" label_project_issues: "Issues" + label_project_issue: "Created the Issue:" + label_project_issue_update: "Upadated the Issue:" label_project_newother: "See other comments" label_project_newshare: "has shared" label_project_newadd: "added" @@ -1469,6 +1471,7 @@ en: label_borad_course: Course-borad label_project_notice: release the notice + label_project_notice_reply: reply the notice label_forum_new: New forum label_memo_new_from_forum: Release memo @@ -1524,7 +1527,7 @@ en: label_recently_updated_courseware: Recently updated the courseware label_no_courses: You do not participate in any course, please search the curriculum, course, or create a course! label_commit_failed: commit failed - #api end - error_upload_avatar_to_large: "too big (%{max_size})" - not_valid_image_file: not a valid image file - + #api end + error_upload_avatar_to_large: "too big (%{max_size})" + not_valid_image_file: not a valid image file + diff --git a/config/locales/my/zh.yml b/config/locales/my/zh.yml index 35fd4e48a..4220aceca 100644 --- a/config/locales/my/zh.yml +++ b/config/locales/my/zh.yml @@ -31,9 +31,11 @@ zh: label_account_identity_developer: 开发者 label_account_identity_enterprise: 组织 label_account_identity_studentID: 请输入学号 - + + field_brief_introduction_my: 个人签名 + field_description: 个人简介 field_is_required: 必填 - field_firstname: 名字 + field_firstname: 名字或组织名 firstname_empty: 名字不能为空 field_firstname_eg: '(例:张三丰,请填写[三丰])' field_lastname: 姓氏 diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 5bf8957bf..e1971cfb9 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -90,6 +90,14 @@ zh: label_project_tool_response: 用户反馈 label_project_news: 项目新闻 + label_project_dts_new: DTS缺陷测试 + label_project_dts_statics: DTS缺陷报告 + label_project_dts_yun: 云化部署 + label_project_soft_knowledge: 软件知识库 + label_project_soft_file: 软件资源库 + label_project_online_dev: 在线开发平台 + label_project_soft_service: 软工服务平台 + label_project_overview: "项目简介" label_expend_information: 展开更多信息 label_project_create: "新建了项目" @@ -399,6 +407,7 @@ zh: label_issue_number: issue的数量 label_issue_journal_number: issue的留言数量 label_project_mail_feedback: 项目留言 + label_project_issue_feedback: 留言 label_news_score: 新闻得分 label_new_number: 新闻的数量 diff --git a/config/locales/users/zh.yml b/config/locales/users/zh.yml index 4c792ef82..d90d8c537 100644 --- a/config/locales/users/zh.yml +++ b/config/locales/users/zh.yml @@ -67,7 +67,8 @@ zh: documents: 提交文档次数 attachments: 提交附件次数 update_issues: 更新缺陷完成度次数 - release_issues: 发布缺陷数量 + release_issues: 发布缺陷数量 + release_messages: 发布帖子数量 label_score_less_than_zero: 得分小于0,修正为0 label_user_info: "个人简介" diff --git a/config/locales/zh.yml b/config/locales/zh.yml index b327b1d5f..b2faa6319 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -7,11 +7,33 @@ zh: direction: ltr jquery: locale: "zh-CN" + date: + formats: + # Use the strftime parameters for formats. + # When no format has been given, it uses default. + # You can provide other formats here if you like! + default: "%Y-%m-%d" + short: "%b%d日" + long: "%Y年%b%d日" + + day_names: [星期天, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六] + abbr_day_names: [日, 一, 二, 三, 四, 五, 六] + + # Don't forget the nil at the beginning; there's no such thing as a 0th month + month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月] + abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月] + # Used in date_select and datime_select. + order: + - :year + - :month + - :day notice_account_updated: 帐号更新成功 + notice_account_old_wrong_password: 原始密码错误 notice_account_wrong_password: 密码错误 name_can_be_empty: 可以不填写真实姓名[保密所需] notice_successful_create: 创建成功 + notice_create_failed: 创建失败,请先完善个人信息 notice_failed_create: 创建失败 notice_successful_update: 更新成功 notice_successful_edit: 修改成功 @@ -264,9 +286,9 @@ zh: permission_view_gantt: 查看甘特图 permission_view_calendar: 查看日历 permission_view_issue_watchers: 查看跟踪者列表 - - - + + + permission_add_issue_watchers: 添加跟踪者 permission_delete_issue_watchers: 删除跟踪者 permission_log_time: 登记工时 @@ -635,7 +657,7 @@ zh: label_comment_add: 添加评论 label_comment_added: 评论已添加 label_comment_delete: 删除评论 - + @@ -736,7 +758,7 @@ zh: label_date_to: 到 label_language_based: 根据用户的语言 - label_mail_policy: 邮件策略 + label_mail_policy: 您可以修改邮件通知策略 label_send_test_email: 发送测试邮件 label_feeds_access_key: RSS存取键 label_missing_feeds_access_key: 缺少RSS存取键 @@ -783,8 +805,13 @@ zh: label_project_newother: "查看其他评论" label_project_newshare: "分享了" label_project_notice: "发布了通知:" + label_project_notice_reply: "回复了通知:" + label_course_notice_point: "通知有了新的回复!" + lable_project_notice_point: "新闻有了新的回复!" label_project_mail_notice: "发布了新闻:" - label_project_issue: "发布了问题:" + lable_project_mail_notice_reply: "回复了新闻:" + label_project_issue: "发布了问题:" + label_project_issue_update: "更新了问题:" label_project_newadd: "添加了" label_project_unadd: "暂无项目,赶快去创建吧!" label_project_un: "该用户暂未参与任何项目!" @@ -1194,9 +1221,9 @@ zh: label_post_on: 发表了 label_post_on_issue: 发表了问题 - - + + label_updated_time_on: " 更新于 %{value} " label_call_list: 需求列表 @@ -1507,9 +1534,9 @@ zh: label_news_number: 新闻的数量 label_wiki_number: wiki的数量 label_wiki_mail_notification: 发布了wiki - - - + + + # redmine活跃度评分 label_message_number: 留言的数量 # delete label_activity_number: 个人动态数量 # delete @@ -1519,14 +1546,14 @@ zh: label_wiki_number: wiki的数量 # delete - + label_activities: 个人动态 label_issue_message_number: 对issue的留言数量 label_code_submit_number: 代码提交次数 label_topic_number: 讨论区发言数量 - + label_join_contest: 加入竞赛 label_exit_contest: 退出竞赛 label_participator: 参与者 @@ -1621,7 +1648,7 @@ zh: label_bid_contest_show_course_name: 课程名称 label_bid_contest_show_teacher_name: 教师 label_contest_list: 竞赛列表 - + label_bids_task_list: 作业列表 @@ -1815,6 +1842,8 @@ zh: excel_member_with_out_class: "未加入班级的学生" excel_member_list: 成员列表 excel_homework_list: 作品列表 + excel_absence_list: 缺评列表 + excel_evaluation_list: 匿评列表 excel_been_rated: 已评 excel_not_rated: 未评 label_export_excel: 导出列表 @@ -1845,6 +1874,7 @@ zh: label_attendingcontestwork_adaptive_system: 系统支持 label_attendingcontestwork_download: 作品下载 label_course_attendingcontestwork_download: 课件下载 + label_course_mail_files: 课程资源 label_attendingcontestwork_developers: 开发人员 label_attendingcontestwork_average_scores: 平均评分 label_attendingcontestwork_release_time: 发布时间 @@ -1894,9 +1924,9 @@ zh: lable_teacher_evaluation: 作业综评 lable_course_teacher: 主讲老师 lable_course_end: 课程学期已结束 - label_no_contest_news_description: 竞赛描述不能为空 + label_no_contest_news_description: 竞赛通知描述不能为空 label_contest_news_condition: 竞赛描述超过5000个汉字 - label_no_contest_news_title: 竞赛标题不能为空 + label_no_contest_news_title: 竞赛通知标题不能为空 label_contest_news_title_condition: 竞赛标题超过255个汉字 label_course_organizers: 开设单位 @@ -1919,6 +1949,7 @@ zh: label_my_score: 我的评分 field_open_anonymous_evaluation: 是否使用匿评 label_course_empty_select: 尚未选择课程! + label_project_empty_select: 尚未选择项目! label_course_prompt: 课程: label_project_prompt: 项目: label_contain_resource: 已包含资源: @@ -1948,9 +1979,9 @@ zh: label_poll_republish_success: 取消成功 label_answer_total: 总计: label_join_project: 加入项目 - - - + + + # # # 项目企业模块 @@ -2000,3 +2031,23 @@ zh: error_upload_avatar_to_large: "超过大小限制 (%{max_size})" not_valid_image_file: 不是有效的图片文件 + + lable_all_penalty: 应评 + lable_has_penalty: 实评 + lable_absence_penalty: 缺评 + + label_work_name: 作品名称 + label_work_autor: 作品提交者 + label_work_id: 提交者学号 + label_evaluation_id: 匿评者学号 + label_evaluation_name: 匿评者 + label_evaluation_score: 匿评分数 + label_evaluation_common: 匿评评语 + label_evaluation_time: 匿评时间 + + label_file_lost_list: 缺失文件列表 + lable_unset: 未设置 + label_chose_group: 请选择分班 + + + diff --git a/config/routes.rb b/config/routes.rb index b5a244345..1ae607eb7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -85,7 +85,7 @@ RedmineApp::Application.routes.draw do get 'alert_anonymous_comment' end collection do - + post 'next_step' end end @@ -98,6 +98,9 @@ RedmineApp::Application.routes.draw do post 'add_score_reply' get 'destroy_score_reply' get 'student_work_absence_penalty' + get 'absence_penalty_list' + get 'evaluation_list' + post 'set_program_score' end end @@ -190,6 +193,7 @@ RedmineApp::Application.routes.draw do resources :stores do collection do match 'search', :via => [:get, :post] + get 'lost_file' end end @@ -294,6 +298,12 @@ RedmineApp::Application.routes.draw do match 'user_watchlist', :to => 'users#user_watchlist', :via => :get, :as => "user_watchlist" #add by huang match 'user_fanslist', :to => 'users#user_fanslist', :via => :get, :as => "user_fanslist" #add by huang match 'user_courses', :to => 'users#user_courses', :via => :get + match 'user_courses4show', :to => 'users#user_courses4show', :via => :get + match 'user_projects4show', :to => 'users#user_projects4show', :via => :get + match 'user_course_activities', :to => 'users#user_course_activities', :via => :get + match 'user_project_activities', :to => 'users#user_project_activities', :via => :get + match 'user_feedback4show', :to => 'users#user_feedback4show', :via => :get + match 'user_visitorlist', :to => 'users#user_visitorlist', :via => :get match 'user_homeworks', :to => 'users#user_homeworks', :via => :get match 'watch_projects', :to => 'users#watch_projects', :via => :get # added by bai @@ -337,6 +347,8 @@ RedmineApp::Application.routes.draw do match 'my/remove_block', :via => :post match 'my/order_blocks', :via => :post match 'my/change_mail_notification', via: :get + match 'my/save_user_avatar', :to => 'my#save_user_avatar', :via => [:get, :post] + match 'my/clear_user_avatar_temp', :to => 'my#clear_user_avatar_temp', :via => [:get, :post] get 'my/page2', :to => 'my#page2', :as => "my_page2" @@ -373,10 +385,20 @@ RedmineApp::Application.routes.draw do get 'feedback', :action => 'feedback', :as => 'project_feedback' get 'watcherlist', :action=> 'watcherlist' + + # 添加dts测试工具 + get 'dts_dep', :action=> 'dts_dep' + get 'yun_dep', :action=> 'yun_dep' + get 'soft_knowledge', :action=> 'soft_knowledge' + get 'soft_file', :action=> 'soft_file' + get 'online_dev', :action=> 'online_dev' + get 'soft_service', :action=> 'soft_service' + get 'invite_members', :action=> 'invite_members' get 'invite_members_by_mail', :action=> 'invite_members_by_mail' + # get 'dts_repos', :aciton => 'dts_repos' get 'send_mail_to_member', :action => 'send_mail_to_member' - match 'user_watcherlist', :to => 'projects#watcherlist', :via => :get, :as => "watcherlist" #add by huang + match 'user_watcherlist', :to => 'projects#watcherlist', :via => :get, :as => "watcherlist" #end post 'modules' post 'archive' @@ -633,6 +655,7 @@ RedmineApp::Application.routes.draw do match 'admin', :to => 'admin#index', :via => :get match 'admin/projects', :via => :get + get 'admin/courses' match 'admin/users', :via => :get match 'admin/first_page_made', as: :first_page_made match 'admin/course_page_made', as: :course_page_made diff --git a/db/migrate/20150630031857_delete_same_score.rb b/db/migrate/20150630031857_delete_same_score.rb new file mode 100644 index 000000000..261a54552 --- /dev/null +++ b/db/migrate/20150630031857_delete_same_score.rb @@ -0,0 +1,13 @@ +class DeleteSameScore < ActiveRecord::Migration + def up + student_work_scores = StudentWorksScore.find_by_sql("SELECT * FROM student_works_scores AS a + WHERE (a.student_work_id,a.user_id) IN (SELECT student_work_id,user_id FROM student_works_scores GROUP BY student_work_id,user_id HAVING COUNT(*) > 1) + AND id NOT IN (SELECT MIN(id) FROM student_works_scores GROUP BY student_work_id,user_id HAVING COUNT(*)>1)") + student_work_scores.each do |score| + score.destroy + end + end + + def down + end +end diff --git a/db/migrate/20150702073245_add_late_penalty_to_studnet_work.rb b/db/migrate/20150702073245_add_late_penalty_to_studnet_work.rb new file mode 100644 index 000000000..e8dcf12b7 --- /dev/null +++ b/db/migrate/20150702073245_add_late_penalty_to_studnet_work.rb @@ -0,0 +1,9 @@ +class AddLatePenaltyToStudnetWork < ActiveRecord::Migration + def up + add_column :student_works, :late_penalty, :integer, default: 0 + end + + def down + remove_column :student_works, :late_penalty + end +end diff --git a/db/migrate/20150702073308_add_absence_penalty_to_studnet_work.rb b/db/migrate/20150702073308_add_absence_penalty_to_studnet_work.rb new file mode 100644 index 000000000..401de3d34 --- /dev/null +++ b/db/migrate/20150702073308_add_absence_penalty_to_studnet_work.rb @@ -0,0 +1,9 @@ +class AddAbsencePenaltyToStudnetWork < ActiveRecord::Migration + def up + add_column :student_works, :absence_penalty, :integer, default: 0 + end + + def down + remove_column :student_works, :absence_penalty + end +end diff --git a/db/migrate/20150708025533_add_proportion_to_programing.rb b/db/migrate/20150708025533_add_proportion_to_programing.rb new file mode 100644 index 000000000..b3da59c25 --- /dev/null +++ b/db/migrate/20150708025533_add_proportion_to_programing.rb @@ -0,0 +1,9 @@ +class AddProportionToPrograming < ActiveRecord::Migration + def up + add_column :homework_detail_programings, :ta_proportion, :float, :default => 0.1 + end + + def down + remove_column :homework_detail_programings, :ta_proportion + end +end diff --git a/db/migrate/20150708085629_change_studen_work_desc.rb b/db/migrate/20150708085629_change_studen_work_desc.rb new file mode 100644 index 000000000..af3c25671 --- /dev/null +++ b/db/migrate/20150708085629_change_studen_work_desc.rb @@ -0,0 +1,9 @@ +class ChangeStudenWorkDesc < ActiveRecord::Migration + def up + change_column :student_works,:description,:text,:limit => 4294967295 + end + + def down + change_column :student_works,:description,:text + end +end diff --git a/db/migrate/20150709071731_add_question_id_to_homework.rb b/db/migrate/20150709071731_add_question_id_to_homework.rb new file mode 100644 index 000000000..d1be59431 --- /dev/null +++ b/db/migrate/20150709071731_add_question_id_to_homework.rb @@ -0,0 +1,9 @@ +class AddQuestionIdToHomework < ActiveRecord::Migration + def up + add_column :homework_detail_programings, :question_id, :integer + end + + def down + remove_column :homework_detail_programings, :question_id + end +end diff --git a/db/migrate/20150713161100_add_description_to_user_extensions.rb b/db/migrate/20150713161100_add_description_to_user_extensions.rb new file mode 100644 index 000000000..97cca4222 --- /dev/null +++ b/db/migrate/20150713161100_add_description_to_user_extensions.rb @@ -0,0 +1,9 @@ +class AddDescriptionToUserExtensions < ActiveRecord::Migration + def up + add_column :user_extensions, :description, :string, default: '' + end + + def down + remove_column :user_extensions, :description + end +end \ No newline at end of file diff --git a/db/migrate/20150714161100_create_visitors.rb b/db/migrate/20150714161100_create_visitors.rb new file mode 100644 index 000000000..2430b6002 --- /dev/null +++ b/db/migrate/20150714161100_create_visitors.rb @@ -0,0 +1,14 @@ +class CreateVisitors < ActiveRecord::Migration + def change + create_table :visitors do |t| + t.integer :user_id + t.integer :master_id + t.datetime :updated_on + t.datetime :created_on + + end + add_index "visitors", ["user_id"], :name => "index_visitors_user_id" + add_index "visitors", ["master_id"], :name => "index_visitors_master_id" + add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" + end +end \ No newline at end of file diff --git a/db/migrate/20150714162200_add_activity_container_type_to_activities.rb b/db/migrate/20150714162200_add_activity_container_type_to_activities.rb new file mode 100644 index 000000000..9effc48a2 --- /dev/null +++ b/db/migrate/20150714162200_add_activity_container_type_to_activities.rb @@ -0,0 +1,11 @@ +class AddActivityContainerTypeToActivities < ActiveRecord::Migration + def up + add_column :activities, :activity_container_id, :int + add_column :activities, :activity_container_type, :string, default: '' + end + + def down + remove_column :activities, :activity_container_type + remove_column :activities, :activity_container_id + end +end \ No newline at end of file diff --git a/db/migrate/20150715070534_create_test_result.rb b/db/migrate/20150715070534_create_test_result.rb new file mode 100644 index 000000000..4816fbcb8 --- /dev/null +++ b/db/migrate/20150715070534_create_test_result.rb @@ -0,0 +1,14 @@ +class CreateTestResult < ActiveRecord::Migration + def up + create_table :student_work_tests do |t| + t.integer :student_work_id + t.integer :homework_test_id + t.integer :result + t.timestamps + end + end + + def down + drop_table :student_work_tests + end +end diff --git a/db/migrate/20150715162300_change_activities_container_type.rb b/db/migrate/20150715162300_change_activities_container_type.rb new file mode 100644 index 000000000..0adffd66a --- /dev/null +++ b/db/migrate/20150715162300_change_activities_container_type.rb @@ -0,0 +1,13 @@ +class ChangeActivitiesContainerType < ActiveRecord::Migration + def up + activities = Activity.where("activity_container_type = ''") + activities.each do |activity| + activity.set_container_type_val + activity.save + end + end + + def down + Activity.where("activity_container_type <> ''").update_all(activity_container_type: '',activity_container_id:nil) + end +end \ No newline at end of file diff --git a/db/migrate/20150719092427_create_dts.rb b/db/migrate/20150719092427_create_dts.rb new file mode 100644 index 000000000..36ff24756 --- /dev/null +++ b/db/migrate/20150719092427_create_dts.rb @@ -0,0 +1,22 @@ +class CreateDts < ActiveRecord::Migration + def change + create_table :dts do |t| + t.string :IPLineCode + t.string :Description + t.string :Num + t.string :Variable + t.string :TraceInfo + t.string :Method + t.string :File + t.string :IPLine + t.string :Review + t.string :Category + t.string :Defect + t.string :PreConditions + t.string :StartLine + t.integer :project_id + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index bc2f2abfe..6754a30b7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,12 +11,14 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150712063406) do +ActiveRecord::Schema.define(:version => 20150719092427) do create_table "activities", :force => true do |t| - t.integer "act_id", :null => false - t.string "act_type", :null => false - t.integer "user_id", :null => false + t.integer "act_id", :null => false + t.string "act_type", :null => false + t.integer "user_id", :null => false + t.integer "activity_container_id" + t.string "activity_container_type", :default => "" end add_index "activities", ["act_id", "act_type"], :name => "index_activities_on_act_id_and_act_type" @@ -473,6 +475,25 @@ ActiveRecord::Schema.define(:version => 20150712063406) do add_index "documents", ["created_on"], :name => "index_documents_on_created_on" add_index "documents", ["project_id"], :name => "documents_project_id" + create_table "dts", :force => true do |t| + t.string "IPLineCode" + t.string "Description" + t.string "Num" + t.string "Variable" + t.string "TraceInfo" + t.string "Method" + t.string "File" + t.string "IPLine" + t.string "Review" + t.string "Category" + t.string "Defect" + t.string "PreConditions" + t.string "StartLine" + t.integer "project_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "enabled_modules", :force => true do |t| t.integer "project_id" t.string "name", :null => false @@ -586,8 +607,10 @@ ActiveRecord::Schema.define(:version => 20150712063406) do t.string "language" t.text "standard_code", :limit => 2147483647 t.integer "homework_common_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.float "ta_proportion", :default => 0.1 + t.integer "question_id" end create_table "homework_evaluations", :force => true do |t| @@ -1219,18 +1242,28 @@ ActiveRecord::Schema.define(:version => 20150712063406) do t.integer "project_id" end + create_table "student_work_tests", :force => true do |t| + t.integer "student_work_id" + t.integer "homework_test_id" + t.integer "result" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "student_works", :force => true do |t| t.string "name" - t.text "description" + t.text "description", :limit => 2147483647 t.integer "homework_common_id" t.integer "user_id" t.float "final_score" t.float "teacher_score" t.float "student_score" t.float "teaching_asistant_score" - t.integer "project_id", :default => 0 - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.integer "project_id", :default => 0 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "late_penalty", :default => 0 + t.integer "absence_penalty", :default => 0 end create_table "student_works_evaluation_distributions", :force => true do |t| @@ -1328,7 +1361,7 @@ ActiveRecord::Schema.define(:version => 20150712063406) do end create_table "user_extensions", :force => true do |t| - t.integer "user_id", :null => false + t.integer "user_id", :null => false t.date "birthday" t.string "brief_introduction" t.integer "gender" @@ -1336,8 +1369,8 @@ ActiveRecord::Schema.define(:version => 20150712063406) do t.string "occupation" t.integer "work_experience" t.integer "zip_code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "technical_title" t.integer "identity" t.string "student_id" @@ -1345,6 +1378,7 @@ ActiveRecord::Schema.define(:version => 20150712063406) do t.string "student_realname" t.string "location_city" t.integer "school_id" + t.string "description", :default => "" end create_table "user_grades", :force => true do |t| @@ -1451,6 +1485,17 @@ ActiveRecord::Schema.define(:version => 20150712063406) do add_index "versions", ["project_id"], :name => "versions_project_id" add_index "versions", ["sharing"], :name => "index_versions_on_sharing" + create_table "visitors", :force => true do |t| + t.integer "user_id" + t.integer "master_id" + t.datetime "updated_on" + t.datetime "created_on" + end + + add_index "visitors", ["master_id"], :name => "index_visitors_master_id" + add_index "visitors", ["updated_on"], :name => "index_visitors_updated_on" + add_index "visitors", ["user_id"], :name => "index_visitors_user_id" + create_table "watchers", :force => true do |t| t.string "watchable_type", :default => "", :null => false t.integer "watchable_id", :default => 0, :null => false diff --git a/lib/redmine.rb b/lib/redmine.rb index ba0fd0cee..3043cfe5d 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -367,6 +367,7 @@ end Redmine::MenuManager.map :admin_menu do |menu| menu.push :organization, {:controller => 'admin', :action => 'organization'}, :caption => :label_organization_list menu.push :projects, {:controller => 'admin', :action => 'projects'}, :caption => :label_project_plural + menu.push :courses, {:controller => 'admin', :action => 'courses'}, :caption => :label_course_all menu.push :users, {:controller => 'admin', :action => 'users'}, :caption => :label_user_plural menu.push :first_page_made, {:controller => 'admin',:action => 'first_page_made'},:caption => :label_first_page_made menu.push :mobile_version, {:controller => 'admin',:action => 'mobile_version'},:caption => :label_mobile_version diff --git a/plugins/redmine_code_review/app/controllers/code_review_controller.rb b/plugins/redmine_code_review/app/controllers/code_review_controller.rb index 14c702e1e..421599525 100644 --- a/plugins/redmine_code_review/app/controllers/code_review_controller.rb +++ b/plugins/redmine_code_review/app/controllers/code_review_controller.rb @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class CodeReviewController < ApplicationController - layout "project_base" + layout "base_projects" unloadable before_filter :find_project, :authorize, :find_user, :find_setting, :find_repository diff --git a/public/assets/kindeditor/themes/default/default.css b/public/assets/kindeditor/themes/default/default.css index c5a84c186..986263903 100644 --- a/public/assets/kindeditor/themes/default/default.css +++ b/public/assets/kindeditor/themes/default/default.css @@ -522,8 +522,7 @@ /* statusbar */ .ke-statusbar { position: relative; - background-color: #F0F0EE; - border-top: 1px solid #CCCCCC; + font-size: 0; line-height: 0; *height: 12px; diff --git a/public/images/pic_uersall.png b/public/images/pic_uersall.png new file mode 100644 index 000000000..6f94640e3 Binary files /dev/null and b/public/images/pic_uersall.png differ diff --git a/public/images/public_icon.png b/public/images/public_icon.png index 1fa463e4e..4dffad183 100644 Binary files a/public/images/public_icon.png and b/public/images/public_icon.png differ diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 8f87767ed..b2736993b 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -394,6 +394,7 @@ function show_bid_dead_line(year,month,day,divname) + "" + "作品提交还剩:
"); } + //验证新建作业的名字 function regex_homework_name() { @@ -414,6 +415,7 @@ function regex_homework_name() //验证匿评数量 function regex_evaluation_num() { + if($("#evaluation_num").length == 0){ return true;} var evaluation_num = $.trim($("#evaluation_num").val()); var regex = /^\d+$/; if(evaluation_num=="") @@ -471,15 +473,18 @@ $(function(){ }); //第一次加载时,如果未开启匿评作业,隐藏显示匿评配置信息 $(function(){ - if($("#homework_common_homework_type").attr("checked") == "checked") - { - $("#evaluation_setting").show(); - $("#ta_proportion").removeAttr("disabled"); - } - else + if($("#homework_common_homework_type").attr("id") != null && $("#homework_common_homework_type").val() != 2) { - $("#evaluation_setting").hide(); - $("#ta_proportion").attr("disabled","disabled"); + if($("#homework_common_homework_type").attr("checked") == "checked") + { + $("#evaluation_setting").show(); + $("#ta_proportion").removeAttr("disabled"); + } + else + { + $("#evaluation_setting").hide(); + $("#ta_proportion").attr("disabled","disabled"); + } } }); @@ -501,6 +506,62 @@ function submit_homework(id) } } +function regexHomeworkCommonName() +{ + var name = $.trim($("#homework_attach_name").val()); + + if(name=="") + { + $("#homework_attach_name_span").text("作品名称不能为空"); + $("#homework_attach_name_span").css('color','#ff0000'); + return false; + } + else + { + $("#homework_attach_name_span").text("填写正确"); + $("#homework_attach_name_span").css('color','#008000'); + return true; + } +} +function regexHomeworkCommonDescription() +{ + var name = $.trim($("#homework_attach_description").val()); + + if(name=="") + { + $("#homework_attach_description_span").text("作品描述不能为空"); + $("#homework_attach_description_span").css('color','#ff0000'); + return false; + } + else + { + $("#homework_attach_description_span").text("填写正确"); + $("#homework_attach_description_span").css('color','#008000'); + return true; + } +} + +function submit_homework_form(){if(regexHomeworkCommonName()&®exHomeworkCommonDescription()){$('#new_homework_attach').submit();}} + +//增加测试结果 +function add_programing_test(obj) { + var now = new Date().getTime(); + obj.after(""); +} +//删除测试结果 +function remove_programing_test(obj) { + if(obj.siblings("div").length == 0){ + alert("至少需要一组测试"); + } + else{ + obj.remove(); + } +} + function show_window (id1,id2,top,left) { $('#'+ id1).css('top',top); $('#'+ id1).css('left',left); @@ -671,6 +732,8 @@ function edit_student_work(id) {$("#edit_student_work_" + id).submit();} } +// + //滑动打分 $.fn.peSlider = function(settings){ //configurable options (none so far) @@ -786,15 +849,38 @@ $(function(){ $(".student_score_info").bind("mouseover",function(e){ //alert($(this).html()); $(this).find("div").show(); - $(this).find("div").css("top",e.pageY); - $(this).find("div").css("left",e.pageX); + //$(this).find("div").css("top",e.pageY); + //$(this).find("div").css("left",e.pageX); }); $(".student_score_info").bind("mouseout",function(e){ //alert($(this).html()); $(this).find("div").hide(); }); + //最终成绩提示 + $(".student_final_scor_info").bind("mouseover",function(e){ + //alert($(this).html()); + $(this).find("div").show(); + //$(this).find("div").css("top",e.pageY); + //$(this).find("div").css("left",e.pageX); + }); + $(".student_final_scor_info").bind("mouseout",function(e){ + //alert($(this).html()); + $(this).find("div").hide(); + }); $("#about_project label").eq(1).remove(); + + //附件下载提示 + $(".zip_download_alert").bind("mouseover",function(e){ + //alert($(this).html()); + $(this).next("div").show(); + //$(this).next("div").css("top",e.pageY); + //$(this).next("div").css("left",e.pageX); + }); + $(".zip_download_alert").bind("mouseout",function(e){ + //alert($(this).html()); + $(this).next("div").hide(); + }); }); //匿评弹框取消按钮 @@ -812,14 +898,19 @@ function clickOK(path) }); } //查询 -function SearchByName(obj,url,event) +function SearchByName(url,event) { var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == '13'){ - location.href = url + "&name=" + obj.val(); + location.href = url + "&name=" + $("#course_student_name").val() + "&group=" + $("#late_penalty").val(); } } -function SearchByName_1(obj,url) +function SearchByName_1(url) { - location.href = url + "&name=" + obj.val(); + if($("#late_penalty").val() == null){ + location.href = url + "&name=" + $("#course_student_name").val() + } + else{ + location.href = url + "&name=" + $("#course_student_name").val() + "&group=" + $("#late_penalty").val(); + } } diff --git a/public/javascripts/header.js b/public/javascripts/header.js index e27f758d3..06748d726 100644 --- a/public/javascripts/header.js +++ b/public/javascripts/header.js @@ -1,11 +1,15 @@ function addSlipMenu () { - var loggedas = $('#current_user_li:first'); + var loggedas = $('#current_user_li a:first'); var sub_menu = $('#user_sub_menu'); - loggedas.mouseenter(function(event) { + loggedas.mouseenter(function() { sub_menu.show(); + $('#my_projects_ul').hide(); + $('#my_courses_ul').hide(); }); - sub_menu.mouseleave(function(event) { + sub_menu.mouseleave(function() { sub_menu.hide(); + $('#my_projects_ul').hide(); + $('#my_courses_ul').hide(); }); } @@ -13,24 +17,26 @@ function addProjectSlipMenu () { var loggedas = $('#my_projects_li'); var project_sub_menu = $('#my_projects_ul'); var course_sub_menu = $('#my_courses_ul'); - loggedas.mouseenter(function(event) { + loggedas.mouseenter(function() { course_sub_menu.hide(); project_sub_menu.show(); }); - loggedas.mouseleave(function(event) { + loggedas.mouseleave(function() { project_sub_menu.hide(); + course_sub_menu.hide(); }); } function addCourseSlipMenu () { var loggedas = $('#my_courses_li'); var project_sub_menu = $('#my_projects_ul'); var course_sub_menu = $('#my_courses_ul'); - loggedas.mouseenter(function(event) { + loggedas.mouseenter(function() { project_sub_menu.hide(); course_sub_menu.show(); }); - loggedas.mouseleave(function(event) { + loggedas.mouseleave(function() { course_sub_menu.hide(); + project_sub_menu.hide(); }); } diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 67d67d69b..d4d309181 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2795,3 +2795,5 @@ div.repos_explain{ } .upload_img img{max-width: 100%;} #activity .upload_img img{max-width: 580px;} + +img,embed{max-width: 100%;} \ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index bb5baedd6..5a7bb001a 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -30,6 +30,10 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;} .box_h3{ color:#15bccf; text-align:center; font-size:16px;} .box_p{ color:#404040; margin-bottom:5px;} .fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:10px; padding-left:5px; width:290px;} +a.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;} +a:hover.icon_addm{background:url(../images/img_floatbox.png) 0 -61px no-repeat; } +a.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px} +a:hover.icon_removem{background:url(../images/img_floatbox.png) -22px -61px no-repeat;} a.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;} a:hover.btn_free{ background:#d63502;} /*成员邀请*/ @@ -52,6 +56,7 @@ a:hover.problem_pic{border:1px solid #64bdd9;} a.problem_name{ color:#ff5722;max-width:60px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} a:hover.problem_name{ color:#d33503;} a.problem_tit{ color:#0781b4; max-width:410px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +a.pro_mes_w{ height:20px; float:right;display:block; color:#999999;} a:hover.problem_tit{ color:#09658c; } .problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} /****翻页***/ @@ -278,14 +283,11 @@ a:hover.member_btn{ background:#329cbd;} /* 匿名评分弹框 */ /*.popbox02{width:480px;height:200px;position:absolute;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}*/ .alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;} -.ni_con { width:425px; margin:25px 30px;} -.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;} -.ni_con p{ color:#808181;} -.ni_con a:hover{ text-decoration:none;} a.xls{ margin-left:5px; color:#136b3b;} /* 开启匿评弹框 */ .anonymos{width:480px;height:180px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} +.anonymos_work {position:fixed !important;left:60%;top:60%;margin:-215px 0 0 -300px; box-shadow:0px 0px 8px #194a81; overflow:auto;} .ni_con { width:425px; margin:25px 30px;} .ni_con h2{ display:block; height:40px; width:425px; text-align:center; color:#3a3a3a;} .ni_con p{ color:#808181; } @@ -294,6 +296,8 @@ a.xls{ margin-left:5px; color:#136b3b;} a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:15px;} a:hover.tijiao{ background:#0f99a9;} .c_pink{ color:#e65d5e;} +.ni_con_work { width:300px; margin:25px 20px;} +.ni_con_work p{ color:#808181; } /* 学生列表*/ .st_list{ width:670px;} @@ -338,7 +342,6 @@ a:hover.st_add{ color:#ff8e15;} .upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;} .upbtn:hover{border:1px solid #64bdd9; color:#64bdd9;cursor: pointer;} .upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer} - /* 功能倒计时*/ .w_img{ float:left; margin:10px 10px 15px 0px;} .w_p{ float:left; color:#15bccf; font-size:16px; font-weight:bold; margin-top:70px; } @@ -349,7 +352,9 @@ a:hover.st_add{ color:#ff8e15;} .upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;} .upload_box{ width:430px; margin:15px auto;} +a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; } a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} +.r_txt_tit{width:510px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;} blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;word-break: break-all;word-wrap: break-word;} .respond-form{display: none;margin: auto;clear: both;} @@ -561,8 +566,8 @@ a.files_tag_select{ background:#64bdd9; color:#fff; border:1px solid #64bdd9; pa .hwork_new_left{ width:220px; float:left; } .hwork_new_right{ width:350px; float:left; margin-left:40px;} .w305{ width:305px;} -.icon_add{ background:url(images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;} -a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;} +.icon_add{ background:url(../stylesheets/images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;} +a:hover.icon_add{background:url(../stylesheets/images/icons.png) -20px -310px no-repeat;} /* 20150505讨论区*/ .w664{ width:664px;} @@ -598,10 +603,13 @@ a:hover.Reply_pic{border:1px solid #64bdd9;} /*.talk_new{ border-bottom:1px dashed #d9d9d9; padding-bottom:10px;}*/ #about_newtalk{ display:none;} +/* 20150423作业评分*/ .ml14{ margin-left:14px;} .w548{ width:552px;} .w547{ width:544px;} .w196{ width:196px;} +.w186{ width:186px;} +.w200{width: 200px;} .w459{ width:459px;} .hwork_new_set{border:1px dashed #CCC; background:#f5f5f5; text-align:center; padding:10px 0; margin-bottom:10px;} .hwork_new_grey{background:#dbdbdb; width:610px; padding:10px 20px; margin:0 auto; text-align:left; margin-bottom:5px;} @@ -610,6 +618,8 @@ a:hover.Reply_pic{border:1px solid #64bdd9;} .w305{ width:305px;} .icon_add{background:url(images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;} a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;} +.icon_remove{background:url(images/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;} +a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;} /* 20150506上传头像*/ .uppicBox{ width:265px; height:265px; background:#f2f2f5; float:left; color:#666; text-align:center;} @@ -626,6 +636,8 @@ a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;} .hwork_tit{ width:210px; float:left; } .hwork_tit a{ width:205px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.hwork_tit_une{ width:270px; float:left; } +.hwork_tit_une a{ width:265px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .hwork_code{ width:56px; text-align:center; } .hwork_code02{ width:60px; text-align:center; } .hwork_tit_e{ width:420px; float:left; } @@ -654,8 +666,10 @@ a:hover.ping_pic{border:1px solid #64bdd9;} a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px; text-align:center; display:block;} a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;} .fr{ float:right;} +.min_search{ width:140px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; } .li_min_search{ float:right; margin-right:-10px;} -.info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;} +.info_ni_download{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;} +.info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 50px;margin-top: -5px;} /*返回顶部*/ .to_top{width: 19px;height: 74px;position: fixed;top: 50px;right: 1px;color: white;background: #15bccf; line-height: 1.2; padding-top: 10px;padding-left: 5px;font-size: 14px;cursor: pointer;} .hwork_num_ab{ width:120px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;min-height: 1px;} @@ -671,6 +685,12 @@ input#score{ width:40px;} .ui-slider .ui-slider-handle:hover,.ui-slider .ui-slider-handle:focus{background:#64bdd9;} .ui-slider .ui-slider-handle:active{background-image:none;} .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;top:0;height:100%;background:#64bdd9;left:0;} +/* 编程作品 */ +.border_ce{ border:1px solid #e4e4e4; } +.border_ce tr td{ height:26px; } +.td_tit{width:155px; text-align:center;} +.td_50{width:50px; text-align:center;} +a.work_list_tit{width:610px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;} .evaluation{position: relative;} @@ -678,11 +698,13 @@ input#score{ width:40px;} .student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; } /* 与我相关 */ -.new_icon{background:url(../images/new_icon.png) 0px 0px no-repeat; width:35px; height:15px; display:block;} +/*.new_icon{background:url(../images/new_icon.png) 0px 0px no-repeat; width:35px; height:15px; display:block;}*/ a.about_me{text-align:center;font-size:16px; color:#64bdd9; margin:10px 0 0 10px;} a:hover.about_me{ color:#0781b4;} - +.mb5 li{width:200px;word-wrap: break-word; + word-break: normal; +} diff --git a/public/stylesheets/jstoolbar.css b/public/stylesheets/jstoolbar.css index 2cc00b4a3..bfd93619a 100644 --- a/public/stylesheets/jstoolbar.css +++ b/public/stylesheets/jstoolbar.css @@ -3,7 +3,7 @@ } .jstEditor textarea, .jstEditor iframe { margin: 0; - margin-left: 80px; + margin-left: 0px; } .jstHandle { diff --git a/public/stylesheets/leftside.css b/public/stylesheets/leftside.css index 9095cc6e3..50b47fff4 100644 --- a/public/stylesheets/leftside.css +++ b/public/stylesheets/leftside.css @@ -45,7 +45,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} .course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} -.project_board_content{overflow: hidden;max-height: 182px;word-break: break-all;word-wrap: break-word;} +.project_board_content{overflow: hidden;max-height: 212px;word-break: break-all;word-wrap: break-word;} .project_board_content1{overflow: hidden;max-height: 72px;word-break: break-all;word-wrap: break-word;} .course_description_none{max-height: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;} diff --git a/public/stylesheets/leftside_new.css b/public/stylesheets/leftside_new.css new file mode 100644 index 000000000..c2d4d043c --- /dev/null +++ b/public/stylesheets/leftside_new.css @@ -0,0 +1,67 @@ +.topbar_info02{ margin:5px 10px;width:480px; } +.topbar_info02 p{color: #7f7f7f;} +.search{ margin-top:8px; float:right; margin-right:5px;} +/*信息*/ +.project_info{ background:#fff; padding:10px; padding-right:0px;width:222px; padding-right:8px; margin-bottom:10px;} +.pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;} +.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;} +.pr_info_logo:hover{ border:1px solid #64bdd9; } +.pr_info_join{} +a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; } +a:hover.pr_join_a{ background:#41a8c8;} +.pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background: #CCC;} +.pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; } +.pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } +.pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } +.pr_add{display:block; background:url(../images/leftside.png) 0px -71px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } +.pr_arrow{display:block; background:url(../images/leftside.png) 0px -90px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } +.pr_info_name{ color:#3e4040; font-size:14px; line-height:1.5;} +.pr_info_name:hover{ color:#3ca5c6;} +.pr_info_score{ font-size:14px; color:#3e4040; } +.pr_info_score a{ color:#ff7143;} +.pr_info_score a:hover{ color:#64bdd9;} + +.img_private{ background:url(../images/new_project/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; } +/*.img_private{ background:url(../images/project/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; }*/ +.info_foot_num{ color:#3ca5c6; } +.pr_info_foot{ color:#7f7f7f; margin-top:5px; } +.info_foot_num:hover{ color:#2390b2;} +.info_box{background:#fff; padding:10px;width:220px; } +.info_box ul li{ font-size:12px; color: #3e4040; line-height:1.7;} + +/*左侧导航*/ +.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;} +.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;} +.subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;} +.subNav_jiantou:hover{color:#0781b4; } +.currentDd{color:#0781b4;} +.currentDt{background-color:#fff;} +.navContent{display: none;border-bottom:solid 1px #e5e3da; } +.navContent li a{display:block;width:240px;heigh:28px;text-align:center;font-size:12px;line-height:28px;color:#333} +.navContent li a:hover{color:#fff;background-color:#b3e0ee} +a.subnav_num{ font-weight:normal; color:#ff7143; font-size:12px;} +a.subnav_green{ background:#28be6c; color:#fff; font-size:12px; font-weight:normal;height:18px; padding:0px 5px; padding-top:2px; display:block; margin-top:2px; margin-bottom:5px; float:right; margin-right:5px;} +a:hover.subnav_green{ background:#14ad5a;} + + +/*简介*/ +.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} +.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} +.course_description_none{max-height: none;} +.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} +.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} +/****标签(和资源库的tag样式一致)***/ +.project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;} +a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} +.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } +.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} +.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } +.re_tag a{ color:#0d90c3;} +.tag_h{ } +.tag_h span,.tag_h a{ margin-bottom:5px;} + + + + + + diff --git a/public/stylesheets/pleft.css b/public/stylesheets/pleft.css index acf470dfe..1f48c9166 100644 --- a/public/stylesheets/pleft.css +++ b/public/stylesheets/pleft.css @@ -49,7 +49,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} .course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} -.project_board_content{overflow: hidden;max-height: 182px;word-break: break-all;word-wrap: break-word;} +.project_board_content{overflow: hidden;max-height: 212px;word-break: break-all;word-wrap: break-word;} .project_board_content1{overflow: hidden;max-height: 72px;word-break: break-all;word-wrap: break-word;} .course_description_none{max-height: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index a32a050d7..f005b2df6 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -12,6 +12,7 @@ a:hover.lg-foot{ color:#787b7e;} /*右侧内容--动态*/ .project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;} .project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} +.project_h22{ background:#64bdd9; color:#fff; height:33px; width:124px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} .project_r_box{ border:1px solid #e2e1e1; width:670px; margin-top:10px;} .project_h3 { color:#646464; font-size:14px; padding:0 10px; border-bottom:1px solid #e2e1e1;} a.more{ float:right; font-size:12px; font-weight:normal; color:#a9a9a9; margin-top:3px;} @@ -84,6 +85,7 @@ a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; } .problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} a.pro_mes{ float:left; color:#a0a0a0; display:block; width:100px; height:20px; } a.pro_mes_w{ height:20px; float:left;display:block; color:#999999;} +a.pro_mes_w_news{ height:20px; float:right;display:block; color:#999999;} .pro_page_top{ font-size:14px; border-bottom:2px solid #64bdd9; margin-bottom:10px; padding-bottom:5px;} .pro_page_tit{color:#3e4040; font-weight:bold;width:480px; float:left; font-size:14px; margin-bottom:5px;} @@ -94,6 +96,12 @@ a.pro_mes_w{ height:20px; float:left;display:block; color:#999999;} .pro_info_box ul li{ height:24px;} .pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .edit_pro_box{overflow:hidden;display:none; margin-bottom:30px; border-bottom:1px dashed #CCC; padding-bottom:10px;} +/*问题状态图片*/ +.issues{ background:url(../images/public_icon.png) -66px 5px no-repeat; width:16px; height:21px;} +.duty{ background:url(../images/public_icon.png) -66px -18px no-repeat; width:16px; height:21px;} +.support{ background:url(../images/public_icon.png) -66px -45px no-repeat; width:16px; height:21px;} +.function{ background:url(../images/public_icon.png) -66px -70px no-repeat; width:16px; height:21px;} +.weekly{ background:url(../images/public_icon.png) -66px -95px no-repeat; width:16px; height:21px;} /****翻页***/ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; } ul.wlist li{float: left;} @@ -152,7 +160,7 @@ a:hover.c_dblue{ color: #0781b4;} .re_top input{ float:left;} .re_search{ margin-top:7px; margin-left:5px;} .re_schbox{ width:240px; height:24px; border:1px solid #64bdd9; color:#666666;} -.re_schbtn{ width:60px; height:26px; color:#fff; margin-right:5px; border:none; margin-left:0px; } +.re_schbtn{ width: 60px;height: 26px;color: #FFF;margin-right: 5px;margin-left: 0px;padding-left: 0px;border: medium none; } a.re_fabu { display:block; width:90px; height:30px; font-size:14px; color:#fff; text-align:center; padding-top:10px; } a:hover.re_fabu{background:#55a1b9;} .re_con{ margin:5px; width:665px;} @@ -244,7 +252,7 @@ a.remove-upload:hover {text-decoration:none !important;} #attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;} a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;} -#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;} +#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px; white-space: nowrap; text-overflow:ellipsis;} span.add_attachment {font-size: 80%;line-height: 2.5em;} #attachments_fields span {display: block;white-space: nowrap;} .file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);} @@ -745,3 +753,4 @@ a:hover.Reply_pic{border:1px solid #64bdd9;} #about_newtalk{ display:none;} + diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index b688b495f..b3d16908d 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -79,6 +79,7 @@ h4{ font-size:14px; color:#3b3b3b;} .mr50{margin-right: 50px;} .mr55{margin-right: 55px;} .mr70{margin-right: 70px;} +.mt1{margin-top: 1px;} .mt3{ margin-top:3px;} .mt5{ margin-top:5px;} .mt8{ margin-top:8px;} @@ -95,9 +96,12 @@ h4{ font-size:14px; color:#3b3b3b;} .w60{ width:60px;} .w70{ width:70px;} .w90{ width:90px;} +.w100{width: 100px;} .w210{ width:210px;} .w150{ width:150px;} .w280{ width:280px;} +.w265{ width: 265px;} +.w270{ width: 270px;} .w430{ width:470px;} .w520{ width:520px;} .w543{ width:543px;} @@ -107,6 +111,7 @@ h4{ font-size:14px; color:#3b3b3b;} .w350{ width:350px;} .w610{ width:610px;} .w600{ width:600px;} +.h20{height: 20px;} .h22{ height:22px;} .h26{ height:26px;} .h50{ height:50px;} @@ -164,6 +169,7 @@ a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; pa a:hover.green_btn{ background:#14ad5a;} .blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;} a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;} +a.orange_btn_homework{background:#d63502;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;} a:hover.blue_btn{ background:#329cbd;cursor: pointer;} a.orange_btn{ background:#ff5722;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center; } a:hover.orange_btn{ background:#d63502;} @@ -439,7 +445,7 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} /*文本左对齐*/ .tl{text-align: left;} -img{max-width: 100%;} +img,embed{max-width: 100%;} .attachments {clear: both;} .is_public_checkbox{margin-left: 15px;margin-right: 10px;} .author_name{color: #3ca5c6 !important;} diff --git a/public/stylesheets/public_new.css b/public/stylesheets/public_new.css new file mode 100644 index 000000000..428da5712 --- /dev/null +++ b/public/stylesheets/public_new.css @@ -0,0 +1,432 @@ +/* CSS Document */ +/* 2015-06-26 */ +body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} +body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5; background:#eaebec;} +div,img,tr,td,table{ border:0;} +table,tr,td{border:0;cellspacing:0; cellpadding:0;} +ol,ul,li{ list-style-type:none} +a:link,a:visited{color:#7f7f7f;text-decoration:none;} +a:hover,a:active{color:#000;} + +/*常用*/ +select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; } +.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;} +.sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;} +table{ background:#fff;} +.more{ font-weight:normal; color:#999; font-size:12px;} +.no_line{ border-bottom:none;} +.line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} +.no_border{ border:none;background:none;} +.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 135px -193px no-repeat; cursor:pointer;} + +/* font & color */ +h2{ font-size:18px; color:#15bccf;} +h3{ font-size:14px; color:#e8770d;} +h4{ font-size:14px; color:#3b3b3b;} +.f12{font-size:12px; font-weight:normal;} +.f14{font-size:14px;} +.f16{font-size:16px;} +.f18{font-size:18px;} +.fb{font-weight:bold;} +.lh20{line-height:20px;} +.lh22{line-height:22px;} +.lh24{line-height:24px;} +.lh26{line-height:26px;} +.fmYh{font-family:"MicroSoft Yahei";} +.font999{ color:#999;} +.fontRed{color:#770000;} +.text_c{ text-align:center;} + +/* Float & Clear */ +.cl{ clear:both; overflow:hidden; } +.fl{float:left;display:inline;} +.fr{float:right;display:inline;} +.f_l{ float:left;} +.f_r{ float:right;} +.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} +.clearfix{clear:both;zoom:1} +.break_word{ word-break:break-all; word-wrap: break-word;} +.white_space{white-space:nowrap;} + +/* Spacing */ +.ml2{ margin-left:2px;} +.ml3{ margin-left:3px;} +.ml4{ margin-left:4px;} +.ml5{ margin-left:5px;} +.ml8{ margin-left:8px;} +.ml10{ margin-left:10px;} +.ml15{ margin-left:15px;} +.ml20{ margin-left:20px;} +.ml40{ margin-left:40px;} +.ml45{ margin-left:45px;} +.ml55{ margin-left:55px;} +.ml30{ margin-left:30px;} +.ml60{ margin-left:60px;} +.ml80{ margin-left:80px;} +.ml90{ margin-left:90px;} +.ml100{ margin-left:100px;} +.ml110{ margin-left:110px;} +.mr5{ margin-right:5px;} +.mr10{ margin-right:10px;} +.mr20{ margin-right:20px;} +.mr30{ margin-right:30px;} +.mr40{ margin-right:40px;} +.mt3{ margin-top:3px;} +.mt5{ margin-top:5px;} +.mt8{ margin-top:8px;} +.mt10{ margin-top:10px;} +.mb5{ margin-bottom:5px;} +.mb10{ margin-bottom:10px;} +.mb20{ margin-bottom:20px;} +.pl15{ padding-left:15px;} +.w20{ width:20px;} +.w60{ width:60px;} +.w70{ width:70px;} +.w90{ width:90px;} +.w210{ width:210px;} +.w150{ width:150px;} +.w280{ width:280px;} +.w430{ width:470px;} +.w520{ width:520px;} +.w543{ width:543px;} +.w557{ width:557px;} +.w583{ width:583px;} +.w350{ width:350px;} +.w610{ width:610px;} +.w600{ width:600px;} +.h22{ height:22px;} +.h26{ height:26px;} +.h50{ height:50px;} +.h70{ height:70px;} +.h150{ height:150px;} + +/* Font & background Color */ +a.b_grey{ background: #F5F5F5;} +a.b_dgrey{ background: #CCC;} +a.c_orange{color:#ff5722;} +a:hover.c_orange{color: #d33503;} +a.c_lorange{color:#ff9900;} +a:hover.c_lorange{color:#fff;} +a.c_blue{ color:#15bccf;} +a.c_dblue{ color:#09658c;} +a:hover.c_dblue{ color:#15bccf;} +a.c_white{ color:#fff;} +a.c_dorange{ color:#fd6e2a;} +a.c_dark{color: #3e4040;} +a:hover.c_dark{color: #3ca5c6;} +a.b_blue{background: #64bdd9;} +a:hover.b_blue{background: #41a8c8;} +a.b_green{background:#28be6c;} +a:hover.b_green{background:#14ad5a;} +a.c_blue02{color: #3ca5c6;} +a:hover.c_blue02{color: #0781b4;} +a.c_red{ color:#F00;} +a:hover.c_red{ color: #C00;} +a.c_purple{color: #426e9a;} +a:hover.c_purple{color: #d33503;} +a.c_green{ color:#28be6c;} + +.b_grey{ background: #F5F5F5;} +.b_dgrey{ background: #CCC;} +.c_orange{color:#e8770d;} +.c_dark{ color:#2d2d2d;} +.c_lorange{ color:#ff9900;} +.c_purple{color: #6883b6;} +.c_blue{ color:#15bccf;} +.c_red{ color:#F00;} +.c_green{ color:#28be6c;} +.c_dblue{ color:#09658c;} +.b_blue{background:#64bdd9;} +.b_green{background:#28be6c;} +.b_w{ background:#fff;} + +/* commonBtn */ +.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;} +a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;} +a:hover.grey_btn{ background:#717171; color:#fff;} +.grey_n_btn{ background:#d9d9d9; color:#656565; font-weight:normal;padding:2px 10px; text-align:center;} +a.grey_n_btn{background:#d9d9d9; color:#656565;font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.grey_n_btn{ background:#717171; color:#fff;} +.green_btn{ background:#28be6c; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;} +a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.green_btn{ background:#14ad5a;} +.blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;} +a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.blue_btn{ background:#329cbd;} +a.orange_btn{ background:#ff5722;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center; } +a:hover.orange_btn{ background:#d63502;} + +.green_u_btn{border:1px solid #3cb761; padding:2px 10px; color:#3cb761;} +a.green_u_btn{border:1px solid #3cb761; padding:2px 10px; color:#3cb761;} +a:hover.green_u_btn{ background:#3cb761; color:#fff;} +.orange_u_btn{border:1px solid #ff5d31; padding:2px 10px; color:#ff5d31;} +a.orange_u_btn{border:1px solid #ff5d31; padding:2px 10px; color:#ff5d31;} +a:hover.orange_u_btn{background:#ff5d31; color:#fff;} +.bgreen_u_btn{border:1px solid #1abc9c; padding:2px 10px; color:#1abc9c;} +a.bgreen_u_btn{border:1px solid #1abc9c1; padding:2px 10px; color:#1abc9c;} +a:hover.bgreen_u_btn{background:#1abc9c; color:#fff;} +.blue_u_btn{border:1px solid #64bdd9; padding:2px 10px; color:#64bdd9;} +a.blue_u_btn{border:1px solid #64bdd9; padding:2px 10px; color:#64bdd9;} +a:hover.blue_u_btn{background:#64bdd9; color:#fff;} +.blue_n_btn{ background:#64bdd9; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;} +a.blue_n_btn{background:#64bdd9;color:#fff;font-weight:normal; padding:2px 10px; text-align:center;} +a:hover.blue_n_btn{ background:#329cbd;} +.green_n_btn{background:#3cb761; padding:2px 10px; color:#fff;} +a.green_n_btn{background:#3cb761; padding:2px 10px; color:#fff;} +a:hover.green_n_btn{ background:#14ad5a;} +.orange_n_btn{background:#ff5d31; padding:2px 10px; color:#fff;} +a.orange_n_btn{background:#ff5d31; padding:2px 10px; color:#fff;} +a:hover.orange_n_btn{background:#d63502;} +.bgreen_n_btn{background:#1abc9c; padding:2px 10px; color:#fff;} +a.bgreen_n_btn{background:#1abc9c; padding:2px 10px; color:#fff;} +a:hover.bgreen_n_btn{background:#08a384;} + +.nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;} +.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;} +.upbtn{ margin:42px 0 0 10px; border:none; color:#999; width:150px;} +.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;} +.bgreen_btn_cir{ background:#1abc9c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;} +/* commonpic */ +.pic_date{ display:block; background:url(../images/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; float:left;} +.pic_add{ display:block; background:url(../images/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; float:left;} +.pic_sch{ display:block; background:url(../images/public_icon.png) -31px -195px no-repeat; width:16px; height:15px; float:left;} +.pic_mes{ display:block; background:url(../images/public_icon.png) 0px -376px no-repeat; width:20px; height:15px; padding-left:18px;} +.pic_img{ display:block; background:url(../images/public_icon.png) -31px -419px no-repeat; width:20px; height:15px; } +.pic_del{ display:block; background:url(../images/public_icon.png) 0px -235px no-repeat; width:20px; height:15px; } +.pic_del:hover{ background:url(../images/public_icon.png) -32px -235px no-repeat; } +.pic_stats{display:block; background:url(../images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;} +.pic_files{display:block; background:url(../images/public_icon.png) 0px -578px no-repeat; width:20px; height:15px;} +.pic_text{display:block; background:url(../images/public_icon.png) 0px -609px no-repeat; width:20px; height:18px;} +.pic_text02{display:block; background:url(../images/public_icon.png) 0px -642px no-repeat; width:20px; height:19px;} +.pic_edit{display:block; background:url(../images/public_icon.png) 0px -32px no-repeat; width:20px; height:15px;} +.pic_edit:hover{display:block; background:url(../images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;} + + + + + +/*框架主类容*/ +#Container{ width:1000px; margin:0 auto; } + +/*头部导航*/ +#Header{ margin:10px 0; background:#15bccf; height:40px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; } +.logo{ margin:5px 10px; } +#TopNav{} +#TopNav ul li{ margin-top:8px;} +.topnav_a a{ font-size:14px; font-weight:bold; color:#fff; margin-right:10px;} +.topnav_a a:hover{color: #a1ebff;} +#TopUser{} +#TopUser ul li{ margin-top:8px;} +.topuser_a a{ font-size:14px; font-weight:bold; color:#fff; margin-right:10px;} +.topuser_a a:hover{color: #a1ebff;} +#TopUser02{ } +#TopUser02 li{ float: left;} +#TopUser02 li a{ margin-right:10px;color: #FFF;text-align: center;} +#TopUser02 li a:hover{color: #a1ebff;} +#TopUser02 div{ position: absolute;visibility: hidden;background:#fff;border: 1px solid #15bccf;} +#TopUser02 div a{position: relative;display: block;white-space: nowrap;text-align: left; line-height:1.9; margin-left:5px;background: #fff;color:#15bccf; font-weight:normal;} +#TopUser02 div a:hover{ color:#e8770d; font-weight: bold;} +/*头部导航下拉*/ +div#menu {height:41px; font-size:14px; font-weight:bold; } +div#menu ul {float: left;} +div#menu ul.menu { padding-left: 30px; } +div#menu li {position: relative; z-index: 9; margin: 0; display: block; float: left; } +div#menu li:hover>ul { left: -2px;} +div#menu a {position: relative;z-index: 10; height: 41px; display: block; float: left;line-height: 41px; text-decoration: none; font-size:14px; } +div#menu a:hover, div#menu a:hover span { color: #a1ebff; } +div#menu li.current a {} +div#menu {display: block; cursor: pointer; background-repeat: no-repeat;background-position: 95% 0;padding-right: 15px; _padding-right: 20px;} +div#menu ul a.parent {background: url(../images/item.png) -20px -30px no-repeat; width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +div#menu ul a.parent:hover {background: url(../images/item.png) -20px -60px no-repeat;} +div#menu ul ul a.parent {background: url(../images/item.png) -20px 6px no-repeat;} +div#menu ul ul a.parent:hover {background: url(../images/item.png) -20px -11px no-repeat;} +/* menu::level1 */ +div#menu a { padding: 5px 12px 0 10px;line-height: 30px; color: #fff;} +div#menu li { background: url(images/main-delimiter.png) 98% 4px no-repeat; } +div#menu li.last { background: none; } +/* menu::level2 */ +div#menu ul ul li { background: none; } +div#menu ul ul { position: absolute;top: 38px; left: -999em; width: 90px; padding: 5px 0 0 0; background:#fff; border:1px solid #15bccf; margin-top:1px;} +div#menu ul ul a {padding: 0 0 0 15px; height: auto; float: none;display: block; line-height: 24px; font-size:12px; font-weight:normal;color:#15bccf;} +div#menu ul ul a:hover { color:#ff9900;} +div#menu ul ul li.last { margin-left:15px; } +div#menu ul ul li {width: 100%;} +/* menu::level3 */ +div#menu ul ul ul {padding: 0;margin: -38px 0 0 92px !important; width:140px; } +div#menu ul ul ul li a{ width:125px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf;} + +/*主类容*/ +#Main{ background:#fff; margin-bottom:10px;} +#content{} +#content02{ background:#fff; padding:10px; margin-bottom:10px;} +/*主类容搜索*/ +#TopBar{ height:60px; margin-bottom:10px; background:#fff;} +.topbar_info02{ margin:5px 10px;width:480px; } +.topbar_info02 p{color: #7f7f7f;} +.search{ margin-top:8px; margin-left:71px;} +.search_form{margin-top:8px;margin-left:72px;} +.topbar_info{ width:350px; color:#5c5c5c; font-size:16px; margin-right:50px; line-height:1.3; padding-left:100px;} +a.search_btn{ display:block; background:#15bccf; color:#fff; width:60px; height:24px; text-align:center; padding-top:3px;} +a:hover.search_btn{ background: #0fa9bb;} +.search_text{ border:1px solid #15bccf; background:#fff; width:220px; height:25px; padding-left:5px; } +/*主类容左右分栏*/ +#LSide{ width:240px; } +#RSide{ width:730px; margin-left:10px; background:#fff; padding:10px; margin-bottom:10px;} + + +/*底部*/ +#Footer{ padding-top:10px; background:#fff; margin-bottom:10px;} +.copyright{ width:780px; margin:0 auto;height:30px; } +.footlogo{ width:580px; margin:0 auto;height:50px; } +/*意见反馈*/ +html{ overflow-x:hidden;} +.scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; } +.side_content{width:154px; height:auto; overflow:hidden; float:left; } +.side_content .side_list {width:154px;overflow:hidden;} +.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:190px;cursor:pointer;} +.show_btn span { display:none;} +.close_btn{width:24px;height:24px;cursor:pointer;} +.side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; } +.side_title {height:35px;} +.side_bottom { height:8px;} +.side_center {font-family:Verdana, Geneva, sans-serif; padding:0px 12px; font-size:12px;} +.close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;} +.close_btn span { display:none;} +.side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;} +.msgserver { margin-top:5px;} +/*.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; }*/ +.msgserver a { height:21px; display:block; } +.opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;} +a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;} +a:hover.opnionButton{background: #0fa9bb; } +/* blue skin as the default skin */ +.side_title {background-position:-195px 0;} +.side_center {background:url(../images/blue_line.png) repeat-y center; } +.side_bottom {background-position:-195px -50px;} +a.close_btn {background-position:-44px 0;} +a:hover.close_btn {background-position:-66px 0;} +.show_btn {background-position:-119px 0;} +.msgserver a {color:#15bccf; } +.msgserver a:hover { text-decoration:underline; } + + +/***** Ajax indicator ******/ +#ajax-indicator { + position: absolute; /* fixed not supported by IE */ + background-color:#eee; + border: 1px solid #bbb; + top:35%; + left:40%; + width:20%; + font-weight:bold; + text-align:center; + padding:0.6em; + z-index:100000; + opacity: 0.5; +} + +html>body #ajax-indicator { position: fixed; } + +#ajax-indicator span { + background-position: 0% 40%; + background-repeat: no-repeat; + background-image: url(../images/loading.gif); + padding-left: 26px; + vertical-align: bottom; +} + +div.modal { + border-radius: 5px; + background: #fff; + z-index: 50; + padding: 4px; +} +.ui-widget-content { + border: 1px solid #ddd; + color: #333; +} +.ui-widget { + font-family: Verdana, sans-serif; + font-size: 1.1em; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; + zoom: 1; +} +.ui-widget-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-widget-overlay { + background: #666 url(http://forge.trustie.net/stylesheets/jquery/images/xui-bg_diagonals-thick_20_666666_40x40.png.pagespeed.ic.9mfuw_R0z1.png) 50% 50% repeat; + opacity: .5; + filter: Alpha(Opacity=50); +} +/***** end Ajax indicator ******/ + +/***** Flash & error messages ****/ +#errorExplanation, div.flash, .nodata, .warning, .conflict { + padding: 4px 4px 4px 30px; + margin-bottom: 12px; + font-size: 1.1em; + border: 2px solid; +} + +div.flash {margin-top: 8px;} + +div.flash.error, #errorExplanation { + background: url(../images/exclamation.png) 8px 50% no-repeat; + background-color: #ffe3e3; + border-color: #dd0000; + color: #880000; +} + +div.flash.notice { + background: url(../images/true.png) 8px 5px no-repeat; + background-color: #dfffdf; + border-color: #9fcf9f; + color: #005f00; +} + +div.flash.warning, .conflict { + background: url(../images/warning.png) 8px 5px no-repeat; + background-color: #FFEBC1; + border-color: #FDBF3B; + color: #A6750C; + text-align: left; +} + +.nodata, .warning { + text-align: center; + background-color: #FFEBC1; + border-color: #FDBF3B; + color: #A6750C; +} + +#errorExplanation ul { font-size: 0.9em;} +#errorExplanation h2, #errorExplanation p { display: none; } + +.conflict-details {font-size:80%;} +/***** end Flash & error messages ****/ + + +/*弹出框*/ +.black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);} +.white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} +.white_content02{display:none;position:fixed;top:15%;left:30%;width:200px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} +.newhwork_content{ display:none;position:fixed;top:15%;left:30%;width:600px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} +.floatbox{ width:420px; border:3px solid #15bccf; background:#fff; padding:5px;} +a.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;} +a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} + +div.ke-statusbar{height:1px; border-top:none;} \ No newline at end of file diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css new file mode 100644 index 000000000..81529288c --- /dev/null +++ b/public/stylesheets/users.css @@ -0,0 +1,127 @@ +#RSide{ min-height:1px;} +/* 左侧信息*/ +.users_info{background:#fff; padding:10px; width:230px; padding-right:0px; margin-bottom:10px; } +.pic_head{ width:214px; height:214px; border:1px solid #cbcbcb; padding:2px; position:relative;} +.pic_head:hover{border:1px solid #64bdd9;} +.usersphoto_edit{ position:absolute; left:198px; top:200px;} +.icon_male{ background:url(../images/pic_uersall.png) 0 0 no-repeat; width:15px; height:15px;} +.icon_female{ background:url(../images/pic_uersall.png) 0 -24px no-repeat; width:15px; height:15px;} +.pf_intro{ width:222px; margin-top:5px; color:#696969;word-break: break-all; } +.leftbox{ width:230px; padding:10px; padding-right:0px; padding-bottom:5px;background:#fff; margin-bottom:10px; margin-right:10px;} +.pic_members{ background:url(../images/pic_users.jpg) 0 0 no-repeat; display:block; width:38px; height:38px; border:1px solid #e9edf0; margin-right:5px; margin-bottom:5px;float:left;} +.pic_members:hover{border:1px solid #c9c9c9;} +/*新建*/ +.top_new{ height:26px; border-bottom:10px solid #eaebed; padding:10px; background:#fff; float:left; margin-left:10px; width:730px; } +.top_new_bg{ background:url(../images/pic_uersall.png) -43px 3px no-repeat; height:26px; width:260px;} +.top_newcourses_bg{ background:url(../images/pic_uersall.png) -43px -29px no-repeat; height:28px; width:260px;} +.top_newproject_bg{ background:url(../images/pic_uersall.png) -43px -56px no-repeat; height:26px; width:260px;} +.newbtn{ height:24px; background:#18ca74; color:#fff; font-size:14px; padding:2px 12px 0 12px;} +.newbtn:hover{background: #14ad5a;} +a.newbtn_add{ display:block; background:url(../images/pic_uersall.png) -265px 3px no-repeat; height:20px; width:15px;} +a.newbtn_t{ font-size:14px; font-weight:bold; color:#fff;} +/*留言*/ +a.icon_face{background:url(../images/public_icon.png) 0px -671px no-repeat; display:block; height:25px; width:40px; padding-left:25px; padding-top:3px; } +a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; } +.inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;} +.inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; } +.message_list_box{ background:#f5f5f5; padding:10px;} +.users_pic{ width:27px; height:27px; border:1px solid #e3e3e3;} +.users_pic:hover{ border:1px solid #a5a5a5;} +.massage_txt{ max-width:360px; color: #666;word-break:break-all;} +.massage_time{ color:#8d8d8d; margin-top:5px;} +.message_list{ border-bottom:1px dashed #c9c9c9; padding-bottom:10px; margin-bottom:10px;} +.message_list_more{ text-align:center; width:720px;} +/*课程动态*/ +.line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;} +.users_courses_list{ height:24px; border-bottom:1px dashed #CCC; margin-bottom:10px;} +.users_coursename{max-width:135px; font-weight:bold; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; margin-right:5px; } +.course_name{max-width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.c_grey{ color:#8d8d8d;} +.users_courses_txt{max-width:330px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.users_top{ height:39px; border-bottom:1px solid #d9d9d9; margin-bottom:10px;} +.users_h4{border-bottom:1px solid #d9d9d9; height:29px; padding:10px 0 0 10px; margin-bottom:10px; } +/*弹框*/ +.white_content_users{display:none;position:fixed;top:45%;left:45%;width:210px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} +a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} +/*我的课程*/ +.courses_top{ height:27px; border-bottom:3px solid #ebebeb;} +.courses_h2{ font-size:16px; font-weight:bold; color:#64bddb; border-bottom:3px solid #64bddb; padding-bottom:3px; padding-right:3px;} +.courses_select{} +a.select_btn{ border:1px solid #acacac; padding:0px 10px; color:#989898; display:block;} +a.select_btn:hover{ background:#64bddb; color:#fff;} +a.select_btn_select{ background:#64bddb; color:#fff;} +.courses_list_pic{ border:1px solid #ede7e9; width:64px; height:64px; padding:1px;} +.courses_list_pic:hover{border:1px solid #64bdd9;} +.courses_list_title{ max-width:500px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.pic_eye_blue{display:block; background:url(../images/pic_uersall.png) -372px 3px no-repeat; width:16px; height:15px; } +.pic_eye_grey{display:block; background:url(../images/pic_uersall.png) -372px -10px no-repeat; width:16px; height:15px; } +.td_w70{ width:70px;} +.td_w60{ width:60px;} +.td_w110{ width:110px;} +.mt20{ margin-top:20px;} +.courses_list{ padding-bottom:10px; } +.courses_list_table{ color:#6e6e6e;} +/****翻页***/ +.wlist{float:right;} +.wlist li{float:left;} +.wlist a{ float:left; border:1px solid #64bdd9; padding:0 5px; margin-left:3px; color:#64bdd9;} +.wlist a:hover{border:1px solid #64bdd9; background-color:#64bdd9; color:#fff; text-decoration:none;} +.wlist_select a { background-color:#48aac9; color:#fff;} +/* 设置 */ +#users_setting{clear:both;width:730px;/*滑动门的宽度*/} +/* TAB 切换效果 */ +.users_tb_{ border-bottom:3px solid #CCC; height:26px; } +.users_tb_ ul{height:26px; } +.users_tb_ li{float:left;height:26px;width: 90px;cursor:pointer; font-size:14px; text-align:center; } +/* 控制显示与隐藏css类 */ +.users_normaltab { color:#666; } +.users_hovertab { color:#64bdd9; border-bottom:3px solid #64bdd9; font-weight:bold;} +.users_normaltab a { color:#64bdd9 ; } +.users_hovertab a{color:#fff; background-color:#64bdd9; text-decoration:none;} +.users_dis{display:block; } +.users_undis{display:none;} +.users_ctt{ font-size:14px; color:#666; margin-top:10px;} +.setting_left{ width:85px; text-align:right; float:left;} +.setting_left li{ height:28px;line-height:28px;} +.setting_right{width:500px; text-align:left; float:left; margin-left:8px;} +.setting_right li{ height:28px;line-height:28px;} +.users_ctt ul li{ margin-bottom:10px;} +.users_ctt input,.users_ctt select,.users_ctt textarea{ border:1px solid #CCC;} +.users_ctt input,.users_ctt select,.users_ctt option{ height:26px;} +.users_ctt input,.users_ctt textarea{ margin-left:2px;} +.users_ctt textarea{ margin-bottom:none;} +.w450{ width:450px;} +.w210{ width:200px;} +.w70{ width:70px;} +.h200{ height:200px;} +/* 个人主页*/ +a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;} +a:hover.gz_btn{ color:#ff5722;} +a.qx_btn{display:block; background:url(../images/pic_uersall.png) -318px -47px no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;} +a:hover.qx_btn{color:#64bdd9;} +a.c_lgrey{ color:#CCC;} +a:hover.c_lgrey{ color:#3ca5c6;} +.leftbox_ul_left{ width:60px; float:left; text-align:right; } +.leftbox_ul_right{ width:155px; float:left; margin-left:10px; } +.leftbox_ul_left li,.leftbox_ul_right li{ margin-bottom:5px;} +.c_dgrey{ color:#696969;} +.home_courses_list{ width:364px; margin-bottom:10px; } +.home_list_title{ max-width:260px; font-size:14px; font-weight:bold;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.users_list{ } +.users_course_intro{ width:530px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} + +/* 20150506上传头像*/ +.uppicBox{ width:265px; height:265px; background:#f2f2f5; float:left; color:#666; text-align:center;} +.showpicBox{width:133px; height:250px; background:#f2f2f5; float:left; margin-left:20px; text-align:center; padding-top:15px; color:#666;} +.mr2{ margin-right:2px;} +.uppic_btn{border:none; width:150px; background:none; margin-bottom:5px; color:#666; margin-top:105px;} +/* 新建作品*/ +.mr8{ margin-right:8px;} +.mt2{ margin-top:2px;} +.fans_sign{ width:560px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.newhwork_div ul li{ margin-bottom:10px; font-size:14px; color:#666;} +.newhwork_div input,.newhwork_div select{ height:26px;border:1px solid #CCC; } +.newhwork_div textarea{border:1px solid #CCC;} +.w460{ width:460px;} + +a.hidepic>img{display:none;} \ No newline at end of file diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 95092aa1d..4a23e59c5 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -1635,6 +1635,7 @@ img.avatar { display: block; width: 38px; height: 38px; + max-width: none; } @@ -1697,6 +1698,23 @@ div.project-search { } /*huang*/ +/*zhangshen*/ +a.enterprise { + float:left; + text-align: center; + width: 40px; + height: 18px; + font-family: '微软雅黑',Arial,Helvetica,sans-serif; + font-size: 12px; + color:#fff; + padding: 0px; + border-radius:4px; + border: 1px solid rgb(148, 148, 148); + box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 0px 2px rgb(255, 255, 255) inset; + text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1), 0px 0px 0px rgb(255, 255, 255); + cursor: pointer; +} + input.enterprise[type="button"] { padding-bottom: 5px; width: 55px; diff --git a/spec/factories/dts.rb b/spec/factories/dts.rb new file mode 100644 index 000000000..05e6148c2 --- /dev/null +++ b/spec/factories/dts.rb @@ -0,0 +1,19 @@ +FactoryGirl.define do + factory :dt, :class => 'Dts' do + IPLineCode "MyString" +Description "MyString" +Num "MyString" +Variable "MyString" +TraceInfo "MyString" +Method "MyString" +File "MyString" +IPLine "MyString" +Review "MyString" +Category "MyString" +Defect "MyString" +PreConditions "MyString" +StartLine "MyString" +project_id 1 + end + +end diff --git a/spec/models/dts_spec.rb b/spec/models/dts_spec.rb new file mode 100644 index 000000000..5c274cba4 --- /dev/null +++ b/spec/models/dts_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe Dts, :type => :model do + pending "add some examples to (or delete) #{__FILE__}" +end
+\ No newline at end of file diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb index 26015d536..cef5c0955 100644 --- a/app/views/layouts/base_newcontest.html.erb +++ b/app/views/layouts/base_newcontest.html.erb @@ -66,7 +66,8 @@ <%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName1();', :width => "125px", :style=>"float:left" %> <%= hidden_field_tag 'project_type', params[:project_type] %> <%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %> - + + <%= l(:label_search)%>关注
更多 + ++ <% for watcher in watcher_list %> + <%= link_to image_tag(url_to_avatar(watcher), :style => "width:38px;height:38px;"), user_path(watcher), :class => "pic_members", :title => "#{watcher.name}" %> + <% end %> + ++
@@ -80,7 +81,7 @@ <%=link_to l(:field_homepage), home_path %> > <%=l(:label_contests_management_platform)%> - + > <%= link_to h(truncate(@contest.name, length: 20, omission: '...')), contest_contestnotifications_path(@contest) %> diff --git a/app/views/layouts/base_users_new.html.erb b/app/views/layouts/base_users_new.html.erb new file mode 100644 index 000000000..ef6d82245 --- /dev/null +++ b/app/views/layouts/base_users_new.html.erb @@ -0,0 +1,332 @@ +<% @nav_dispaly_home_path_label = 1 + @nav_dispaly_main_course_label = 1 + @nav_dispaly_main_project_label = 1 + @nav_dispaly_main_contest_label = 1 %> +<% @nav_dispaly_forum_label = 1%> +<% @nav_dispaly_user_label = show_item_on_navbar(params) %> +<% @center_flag = (User.current == @user) %> + + + + +<%= h html_title %> + + +<%= csrf_meta_tag %> +<%= favicon %> +<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'public_new', 'leftside_new','users', :media => 'all' %> +<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> +<%= javascript_heads %> +<%= heads_for_theme %> +<%= call_hook :view_layouts_base_html_head %> + +<%= yield :header_tags -%> + + + + + + + ++ <%= render :partial => 'layouts/base_header_new'%> ++ +<%= render :partial => 'layouts/new_feedback' %> + + +<%= javascript_include_tag '/javascripts/avatars.js' %> +++ + +++ + + + + + +<%= @center_flag ? '个人中心' : '个人主页' %>
+当前位置 : + <%=link_to l(:field_homepage), home_path %> > <%=link_to (@center_flag ? '个人中心' : '个人主页'), user_path(@user) %> > <%=link_to @user.name, user_path(@user) %> +
+++ + + <%= render :partial => 'layouts/new_footer'%> + +++ + <%= yield %> + +++ ++ <%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:216px;height:216px;",:alt=>"头像") %> + <% if @center_flag %> + + <% end %> +++ <%=link_to @user.name, user_path(@user),:class=>"fl c_dark fb f14" %> + <% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %> + + <% end %> + + <%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %> ++ + ++ <%=l(:label_user_watcher)%>(<%= link_to User.watched_by(@user.id).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"c_blue",:nh_name=>"watcher_count" %>) + | + <%=l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)%>(<%= link_to @user.watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"c_blue",:nh_name=>"fans_count"%>) + | 积分(<%= link_to(format("%.2f" ,get_option_number(@user,1).total_score ).to_i, + {:controller => 'users', :action => 'show_new_score', :remote => true, :id => @user.id }, :class => 'c_blue',:id => 'user_score') %>) ++ + <% if (@user.user_extensions) %> +<%= @user.user_extensions.brief_introduction %>+ <% end %> +++ + <% if @center_flag %> +-
+
-
+
+ + + + + + + + + + + + + + + + + + ++ <% end %> + + +++ + + + <%= render :partial => 'layouts/user_watch_list', :locals => {:user => @user} %> + <%= render :partial => 'layouts/user_fans_list', :locals => {:user => @user} %> + <% visitor_count,visitor_list = get_visitor_users(@user) %> +-
+ <% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
+
-
+ <% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
+
++ +访客
更多 + ++ <% for visitor in visitor_list %> + <%= link_to image_tag(url_to_avatar(visitor.user), :style => "width:38px;height:38px;"), user_path(visitor.user), :class => "pic_members", :title => "#{visitor.user.name}" %> + <% end %> + ++++ + + diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 98abc00f7..59dc1e674 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -5,9 +5,9 @@ <% if @attachments.first || @course_news.first || @course_news_comments.first || @bids.first || @course_journal_messages.first|| @course_messages.first || @attachments.first %>+ + ++++ +头像设置
++ <%= file_field_tag 'avatar[image]', + :id => nil, + :class => 'uppic_btn', + :style => 'width:70px;',#added by young + :size => "1", + :multiple => false, + :onchange => 'addInputAvatar(this);', + :data => { + :max_file_size => Setting.attachment_max_size.to_i.kilobytes, + :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), + :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, + :file_type => Redmine::Configuration['pic_types'].to_s, + :type_support_message => l(:error_pic_type), + :upload_path => upload_avatar_path(:format => 'js'), + :description_placeholder => nil ,# l(:label_optional_description) + :source_type => @user.class.to_s, + :source_id => @user.id.to_s + } %> + + ++++ + 取 消 + 确 定 + +预览
+ <%= image_tag(url_to_avatar(@user), :style=>"width:96px;height:96px;",:class=>"mb5 mt10",:nhname=>'avatar_image') %> + 96px*96px
+ + <%= image_tag(url_to_avatar(@user), :style=>"width:48px;height:48px;",:class=>"mb5",:nhname=>'avatar_image') %> +
+ 48px*48px
+-<%= l(:label_course_overview)%>
+<%= l(:label_course_overview)%>
- <% unless @course_news.first.nil? %> + <% unless @course_news.first.nil? || @course_news_comments.first.nil? %>-
<%= l(:label_course_news) %>
@@ -25,7 +25,7 @@
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
<%= l(:label_project_notice) %>
- <%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
+ <%= link_to truncate(course_new.title.html_safe,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
:class => 'wmail_info',
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
%>
@@ -33,31 +33,23 @@
<% end %>
-
-
-
- <%= l(:label_course_mail_news_reply) %>
-
+
<% @course_news_comments.each do |course_news_comment|%>
-
- <%= l(:label_course_attendingcontestwork_download) %>
+ <%= l(:label_course_mail_files) %>
<% @attachments.each do |attachment|%>
-
<% course_index = 0 %>
- <% User.current.courses.each do |course| %>
+ <% User.current.courses.reverse.each do |course| %>
<% if !course_endTime_timeout?(course) %>
<%= render :partial => 'layouts/user_homework_list', :locals => {:course => course,:course_index => course_index} %>
<% course_index += 1 %>
diff --git a/app/views/layouts/_user_fans_list.html.erb b/app/views/layouts/_user_fans_list.html.erb
new file mode 100644
index 000000000..8c39c528c
--- /dev/null
+++ b/app/views/layouts/_user_fans_list.html.erb
@@ -0,0 +1,12 @@
+ <% fans_count,fans_list = get_fans_users(user) %>
+
++ \ No newline at end of file diff --git a/app/views/layouts/_user_project_list.html.erb b/app/views/layouts/_user_project_list.html.erb index e38f9c4bd..4df61b01b 100644 --- a/app/views/layouts/_user_project_list.html.erb +++ b/app/views/layouts/_user_project_list.html.erb @@ -2,7 +2,7 @@粉丝
更多 + ++ <% for fans in fans_list %> + <%= link_to image_tag(url_to_avatar(fans), :style => "width:38px;height:38px;"), user_path(fans), :class => "pic_members", :title => "#{fans.name}" %> + <% end %> + ++
-
<%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id},target:"_blank", :class => "parent" %>