<% @count +=1 %>
diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb
index aac365a15..6786a06a7 100644
--- a/app/views/attachments/_form.html.erb
+++ b/app/views/attachments/_form.html.erb
@@ -31,7 +31,7 @@
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
- <%= button_tag "文件浏览", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'sub_btn' %>
+ <%= button_tag "上传附件", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'sub_btn' %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => 'file_selector',
diff --git a/app/views/attachments/_form_project.html.erb b/app/views/attachments/_form_project.html.erb
index a9cb068ad..f97bd8bea 100644
--- a/app/views/attachments/_form_project.html.erb
+++ b/app/views/attachments/_form_project.html.erb
@@ -109,7 +109,7 @@
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
- <%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %>
+ <%= button_tag "上传附件", :type=>"button", :onclick=>"_file.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => 'file_selector',
diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb
index 3b76689f5..0f7e8a012 100644
--- a/app/views/attachments/_project_file_links.html.erb
+++ b/app/views/attachments/_project_file_links.html.erb
@@ -37,7 +37,7 @@
<% if options[:length] %>
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%>
<% else %>
- <%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true -%>
+ <%= link_to_short_attachment attachment, :length=> 58,:class => 'hidden link_file_a fl newsBlue mw400', :download => true -%>
<% end %>
<%if is_float%>
diff --git a/app/views/blog_comments/show.html.erb b/app/views/blog_comments/show.html.erb
index ce8f52f25..4a407089f 100644
--- a/app/views/blog_comments/show.html.erb
+++ b/app/views/blog_comments/show.html.erb
@@ -94,7 +94,7 @@
<%= format_time( @article.created_on)%>
-
+
<%= @article.content.html_safe%>
@@ -208,4 +208,11 @@
<% end %>
-
\ No newline at end of file
+
+
diff --git a/app/views/courses/_recommendation.html.erb b/app/views/courses/_recommendation.html.erb
new file mode 100644
index 000000000..2b890ca5d
--- /dev/null
+++ b/app/views/courses/_recommendation.html.erb
@@ -0,0 +1,20 @@
+<% unless excellent_course_recommend(course).length == 0 %>
+
+ <%= l(:label_homework_recommendation) %>:
+ <% excellent_course_recommend(course).each do |e_course| %>
+ <% e_course = Course.find(e_course) %>
+
+ <%= image_tag(url_to_avatar(e_course), :width => "40", :height => "40", :class => "fl mr10 rankPortrait", :alt => "logo") %>
+
+
<%=link_to e_course.name, course_path(e_course.id), :class => "hidden fl w170" %>
+
+ <%= l(:project_module_attachments) %>(<%= link_to e_course.attachments.count, course_files_path(e_course), :class => "linkBlue2" %>)
+ <%= l(:label_homework_commont) %>(<%= link_to e_course.homework_commons.count, homework_common_index_path(:course=>e_course.id), :class => "linkBlue2" %>)
+
+
+
+ <% end %>
+
+
+<% end %>
+
diff --git a/app/views/courses/_searchmembers.html.erb b/app/views/courses/_searchmembers.html.erb
index 1956f34c4..b864bfd8f 100644
--- a/app/views/courses/_searchmembers.html.erb
+++ b/app/views/courses/_searchmembers.html.erb
@@ -1,5 +1,5 @@
<%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:remote=>true,:id => "search_student") do %>
- <%= text_field_tag 'name', params[:name], name: "name", :class => 'st_search_input', :placeholder => '输入学生昵称、姓名、学号进行搜索'%>
+ <%= text_field_tag 'name', params[:name], name: "name", :class => 'st_search_input', :placeholder => '输入学生登录名、姓名、学号进行搜索'%>
<% if @group %>
<%= hidden_field "search_group_id", params[:search_group_id],:value => "#{@group.id}", name: 'search_group_id' %>
diff --git a/app/views/courses/settings.html.erb b/app/views/courses/settings.html.erb
index f62951236..617cefc93 100644
--- a/app/views/courses/settings.html.erb
+++ b/app/views/courses/settings.html.erb
@@ -46,14 +46,15 @@
* <%= l(:label_course_term)%> :
- <%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {:id=>"time_selected"} %>
- <%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"term_selected"} %>
+ <%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {:id=>"time"} %>
+ <%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{:id=>"term"} %>
* 结束学期 :
- <%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),@course.end_time), {:id=>"end_time_selected"} %>
- <%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"end_term_selected"} %>
+ <%= select_tag :end_time,options_for_select(course_time_option(@course.end_time),@course.end_time), {:id=>"end_time"} %>
+ <%= select_tag :end_term,options_for_select(course_term_option,@course.end_term || cur_course_term),{:id=>"end_term"} %>
+
@@ -109,7 +110,7 @@
<%= form_tag(search_member_course_path,:id => "course_member_search_form", :method => :get, :class => "search_form_course",:remote => true) do %>
- <%= text_field_tag 'name', params[:name], :placeholder => "昵称、学号、姓名搜索", :class => "search_text fl" %>
+ <%= text_field_tag 'name', params[:name], :placeholder => "登录名、学号、姓名搜索", :class => "search_text fl" %>
<%= l(:label_search)%>
@@ -138,8 +139,6 @@
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
}
- $("#time_selected").click(select);
- $("#term_selected").click(select);
- $("#end_time_selected").click(select);
- $("#end_term_selected").click(select);
+ $("#time").click(select);
+ $("#term").click(select);
diff --git a/app/views/courses/syllabus.html.erb b/app/views/courses/syllabus.html.erb
index 9d20b5adb..c9d333e6d 100644
--- a/app/views/courses/syllabus.html.erb
+++ b/app/views/courses/syllabus.html.erb
@@ -94,7 +94,7 @@
<%= format_time( @article.created_on)%>
-
+
<%= @article.content.html_safe%>
@@ -214,4 +214,11 @@
<% end %>
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb
index 85b230be3..cf91b7814 100644
--- a/app/views/files/_course_file.html.erb
+++ b/app/views/files/_course_file.html.erb
@@ -126,4 +126,4 @@
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %>
-<% html_title(l(:label_attachment_plural)) -%>
\ No newline at end of file
+<%# html_title(l(:label_attachment_plural)) -%>
\ No newline at end of file
diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb
index 88c30e1b7..e8f4f023b 100644
--- a/app/views/files/_project_file.html.erb
+++ b/app/views/files/_project_file.html.erb
@@ -95,4 +95,4 @@
<%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %>
-<% html_title(l(:label_attachment_plural)) -%>
\ No newline at end of file
+<%# html_title(l(:label_attachment_plural)) -%>
\ No newline at end of file
diff --git a/app/views/files/_subfield_files.html.erb b/app/views/files/_subfield_files.html.erb
index eed9266d5..1de0e8dc2 100644
--- a/app/views/files/_subfield_files.html.erb
+++ b/app/views/files/_subfield_files.html.erb
@@ -74,7 +74,7 @@
-<% html_title(l(:label_attachment_plural)) -%>
+<%# html_title(l(:label_attachment_plural)) -%>
\ No newline at end of file
diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb
index ce2f6e085..022b8c76b 100644
--- a/app/views/messages/_course_show.html.erb
+++ b/app/views/messages/_course_show.html.erb
@@ -80,12 +80,12 @@
<%= format_time( @topic.created_on)%>
-
+
<%= @topic.content.html_safe%>
-
- <%= link_to_attachments_course @topic, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
@@ -168,4 +168,11 @@
<% end %>
-
\ No newline at end of file
+
+
diff --git a/app/views/messages/_org_subfield_show.html.erb b/app/views/messages/_org_subfield_show.html.erb
index 2578b2101..7fdf5d02c 100644
--- a/app/views/messages/_org_subfield_show.html.erb
+++ b/app/views/messages/_org_subfield_show.html.erb
@@ -110,12 +110,12 @@
<%= format_time( @topic.created_on)%>
-
+
<%= @topic.content.html_safe%>
-
- <%= link_to_attachments_course @topic, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
@@ -198,4 +198,11 @@
<% end %>
-
\ No newline at end of file
+
+
diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb
index 25fbc841b..a0e9db171 100644
--- a/app/views/messages/_project_show.html.erb
+++ b/app/views/messages/_project_show.html.erb
@@ -135,12 +135,12 @@
<%= format_time( @topic.created_on)%>
-
+
<%= @topic.content.html_safe%>
-
- <%= link_to_attachments_course @topic, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
@@ -225,3 +225,10 @@
+
diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb
index 07aaef26d..05a430d57 100644
--- a/app/views/news/_course_show.html.erb
+++ b/app/views/news/_course_show.html.erb
@@ -85,12 +85,12 @@
<%= format_time( @news.created_on)%>
-
+
<%= @news.description.html_safe%>
-
- <%= link_to_attachments_course @news, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @news} %>
@@ -182,3 +182,10 @@
<% end %>
+
diff --git a/app/views/news/_organization_show.html.erb b/app/views/news/_organization_show.html.erb
index 98d14c3ab..3189b03bf 100644
--- a/app/views/news/_organization_show.html.erb
+++ b/app/views/news/_organization_show.html.erb
@@ -75,12 +75,12 @@
<%= format_time( @news.created_on)%>
-
+
<%= @news.description.html_safe%>
-
- <%= link_to_attachments_course @news, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @news} %>
@@ -172,3 +172,10 @@
<% end %>
+
diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb
index a893040ce..144b93b28 100644
--- a/app/views/news/_project_show.html.erb
+++ b/app/views/news/_project_show.html.erb
@@ -85,12 +85,12 @@
<%= format_time( @news.created_on)%>
-
+
<%= @news.description.html_safe%>
-
- <%= link_to_attachments_course @news, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @news} %>
@@ -182,3 +182,10 @@
<% end %>
+
diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb
index 26d04924a..405631369 100644
--- a/app/views/org_document_comments/show.html.erb
+++ b/app/views/org_document_comments/show.html.erb
@@ -29,8 +29,9 @@
<%= @document.content.html_safe %>
<% end %>
-
- <%= link_to_attachments_course @document, :author => false %>
+
+ <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @document} %>
+ <%#= link_to_attachments_course @document, :author => false %>
+
\ No newline at end of file
diff --git a/app/views/users/_project_issue_reply.html.erb b/app/views/users/_project_issue_reply.html.erb
new file mode 100644
index 000000000..0a84ba9c4
--- /dev/null
+++ b/app/views/users/_project_issue_reply.html.erb
@@ -0,0 +1,89 @@
+<% count = activity.journals.count %>
+
+
+
回复
+ <%= count>0 ? "(#{count})" : "" %> ▪
+
+ <% if activity.author == User.current %>
+ 赞 <%= get_praise_num(activity) > 0 ? "(#{get_praise_num(activity)})" : "" %>
+ <% else %>
+ <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
+ <% end %>
+
+
+
<%#= format_date(activity.updated_on) %>
+ <% if count > 3 %>
+
+ <% end %>
+
+
+ <% replies_all_i = 0 %>
+ <% if count > 0 %>
+
+
+ <% activity.journals.reorder("created_on desc").each do |reply| %>
+
+ <% replies_all_i=replies_all_i + 1 %>
+
+
+ <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %>
+
+
+
+ <% if reply.try(:user).try(:realname) == ' ' %>
+ <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
+ <% else %>
+ <%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
+ <% end %>
+ <%= format_time(reply.created_on) %>
+
+ <% if reply.user == User.current %>
+ 赞 <%= get_praise_num(reply) > 0 ? "(#{get_praise_num(reply)})" : "" %>
+ <% else %>
+ <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
+ <% end %>
+
+
+
+ <% if reply.details.any? %>
+ <% details_to_strings(reply.details).each do |string| %>
+
<%= string %>
+ <% end %>
+ <% end %>
+
<%= reply.notes.html_safe %>
+
+
+
+
+ <% end %>
+
+
+ <% end %>
+
+
+
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
+
+
+ <%= form_for('new_form',:url => add_journal_issue_path(activity.id, :user_activity_id => user_activity_id),:method => "post", :remote => true) do |f| %>
+
+
+
+
发送
+
+
+ <% end%>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/users/_project_news.html.erb b/app/views/users/_project_news.html.erb
index f7a779eb6..d1db3416a 100644
--- a/app/views/users/_project_news.html.erb
+++ b/app/views/users/_project_news.html.erb
@@ -143,6 +143,3 @@
-
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index 62752bdf5..c8d599af4 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -111,7 +111,7 @@
<% case user_activity.act_type.to_s %>
<% when 'JournalsForMessage' %>
<% unless act.private == 1 && (!User.current || (User.current && act.jour_id != User.current.id && act.user_id != User.current.id)) %>
- <%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
+ <%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_activity=>1} %>
<% end %>
<% end %>
<% end %>
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb
index b3e14d174..36b2be34f 100644
--- a/app/views/users/_user_homework_detail.html.erb
+++ b/app/views/users/_user_homework_detail.html.erb
@@ -156,7 +156,9 @@
<% break %>
<% end %>
<% end %>
- <%= link_to "更多>>", student_work_index_path(:homework => homework_common.id),:class=>'linkGrey2 fl ml50',:style=>'margin-top:60px;'%>
+ <% if student_works.count > 5%>
+ <%= link_to "更多>>", student_work_index_path(:homework => homework_common.id),:class=>'linkGrey2 fl ml50',:style=>'margin-top:60px;'%>
+ <% end %>
<% end %>
@@ -189,10 +191,11 @@
<% else %>
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像") %>
<% end %>
+ <% com_time = project.project_score.commit_time %>
<% time=project.updated_on %>
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
<%=(User.find project.user_id).show_name %> (组长)
- <%=time_from_now time %> <%= project.project_score.changeset_num %>提交
+ <%=time_from_now !com_time.nil? && format_time(com_time) > format_time(time) ? com_time : time %> <%= project.project_score.changeset_num %>提交
项目名称:<%=project.name %>
创建者:<%=(User.find project.user_id).show_name %>(组长)
diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb
index 609b1e35b..e30fd1824 100644
--- a/app/views/users/_user_journalsformessage.html.erb
+++ b/app/views/users/_user_journalsformessage.html.erb
@@ -16,13 +16,22 @@
<% end %>
<% end %>
-
- <% if activity.parent %>
- <%= link_to activity.parent.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
- <% else %>
- <%= link_to activity.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
- <% end %>
-
+ <% if is_activity.to_i == 1 %>
+
+ <% if activity.parent %>
+ <%= link_to activity.parent.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
+ <% else %>
+ <%= link_to activity.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
+ <% end %>
+
+ <% else %>
+ <% if activity.parent %>
+ <% content = activity.parent.notes %>
+ <% else %>
+ <% content = activity.notes %>
+ <% end %>
+ <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
+ <% end %>
留言时间:<%= format_time(activity.created_on) %>
@@ -85,10 +94,10 @@
<%= comment.notes.html_safe %>
- <% end %>
+ <% end %>
<% end %>
@@ -104,6 +113,7 @@
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
<%= hidden_field_tag 'reply_type',params[:reply_type],:value =>'user' %>
+ <%= hidden_field_tag 'is_activity',params[:is_activity],:value =>is_activity %>
发送
diff --git a/app/views/users/_user_jours_list.html.erb b/app/views/users/_user_jours_list.html.erb
index cc5a589b5..d982d8984 100644
--- a/app/views/users/_user_jours_list.html.erb
+++ b/app/views/users/_user_jours_list.html.erb
@@ -18,11 +18,27 @@
<% jours.each do |jour|%>
<% unless jour.private == 1 && (!User.current || (User.current && jour.jour_id != User.current.id && jour.user_id != User.current.id)) %>
- <%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id} %>
+ <%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id,:is_activity=>0} %>
<%#= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
<% end %>
<%end%>
diff --git a/app/views/welcome/_search_project.html.erb b/app/views/welcome/_search_project.html.erb
index 6679f559d..fba855bde 100644
--- a/app/views/welcome/_search_project.html.erb
+++ b/app/views/welcome/_search_project.html.erb
@@ -91,7 +91,7 @@ form #search_by
{
if($("#search_type").val() == "users")
{
- $("#q").attr('placeholder','昵称/姓名/邮箱');
+ $("#q").attr('placeholder','登录名/姓名/邮箱');
// $("#search_by").show();
}
else
diff --git a/app/views/words/create_reply.js.erb b/app/views/words/create_reply.js.erb
index ac56b69fc..d4d9a2cd7 100644
--- a/app/views/words/create_reply.js.erb
+++ b/app/views/words/create_reply.js.erb
@@ -1,7 +1,7 @@
<% if @save_succ %>
<% if @user_activity_id %>
<% if @reply_type == 'user' %>
- $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
+ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>");
<% else %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
<% end %>
diff --git a/config/locales/navigatiors/zh.yml b/config/locales/navigatiors/zh.yml
index 97c6da61a..c0df616f3 100644
--- a/config/locales/navigatiors/zh.yml
+++ b/config/locales/navigatiors/zh.yml
@@ -63,7 +63,7 @@ zh:
course: 课程
user: 用户
userinfo:
- nickname: 昵称
+ nickname: 登录名
showname: 姓名
email: 邮箱
diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml
index 765060675..8bf3f03be 100644
--- a/config/locales/projects/zh.yml
+++ b/config/locales/projects/zh.yml
@@ -369,7 +369,7 @@ zh:
label_input_email: 请输入邮箱地址
label_invite_trustie_user: "邀请Trustie注册用户"
- label_invite_trustie_user_tips: "支持姓名、邮箱、昵称搜索!"
+ label_invite_trustie_user_tips: "支持姓名、邮箱、登录名搜索!"
label_user_role_null: 用户和角色不能留空!
label_invite_project: 邀请您加入项目
label_mail_invite_success: 您已成功加入项目!
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 34a526734..e9d3ed813 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -674,7 +674,7 @@ zh:
label_day_plural: 天
label_repository: 版本库
label_course_repository: 代码库
- label_browse: 浏览
+ label_browse: 上传文件
label_branch: 分支
label_tag: 标签
label_revision: 修订
@@ -1855,7 +1855,7 @@ zh:
excel_user_id: 学生id
excel_user_name: 用户名
- excel_nickname: 昵称
+ excel_nickname: 登录名
excel_student_id: 学号
excel_mail: 电子邮箱
excel_homework_name: 作品名
@@ -2106,4 +2106,6 @@ zh:
label_org_name: 组织名称:
label_blank_user_lists_for_org: 用户不能为空
-
+ # 课程推荐
+ label_homework_commont: 作业
+ label_homework_recommendation: 课程推荐
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 4f191a9bf..07c161265 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -529,6 +529,7 @@ RedmineApp::Application.routes.draw do
match 'file_score_index', :to => 'projects#file_score_index', :via => [:get, :post]
match 'code_submit_score_index', :to => 'projects#code_submit_score_index', :via => [:get, :post]
match 'projects_topic_score_index', :to => 'projects#projects_topic_score_index', :via => [:get, :post]
+ match 'user_act_issue_assign_to', :to => 'users#user_act_issue_assign_to', :via => [:get, :post]
get 'edit_brief_introduction'
get "user_resource"
get "resource_search"
diff --git a/db/migrate/20160115021923_add_is_excellent_to_course.rb b/db/migrate/20160115021923_add_is_excellent_to_course.rb
new file mode 100644
index 000000000..39bbf2dd5
--- /dev/null
+++ b/db/migrate/20160115021923_add_is_excellent_to_course.rb
@@ -0,0 +1,5 @@
+class AddIsExcellentToCourse < ActiveRecord::Migration
+ def change
+ add_column :courses, :is_excellent, :integer, :default => false
+ end
+end
diff --git a/db/migrate/20160115022341_add_excellent_course.rb b/db/migrate/20160115022341_add_excellent_course.rb
new file mode 100644
index 000000000..6d743d0c3
--- /dev/null
+++ b/db/migrate/20160115022341_add_excellent_course.rb
@@ -0,0 +1,7 @@
+class AddExcellentCourse < ActiveRecord::Migration
+ def up
+ end
+
+ def down
+ end
+end
diff --git a/db/migrate/20160118014219_define_excellent_course.rb b/db/migrate/20160118014219_define_excellent_course.rb
new file mode 100644
index 000000000..911c14a3e
--- /dev/null
+++ b/db/migrate/20160118014219_define_excellent_course.rb
@@ -0,0 +1,17 @@
+class DefineExcellentCourse < ActiveRecord::Migration
+ def up
+ arr = [302,192,370,394,183,361,117,218,379,178,418,203,342,403,225]
+ for i in 0..arr.length-1
+ begin
+ puts arr[i]
+ course = Course.find(arr[i])
+ course.update_attribute(:is_excellent, true)
+ rescue
+ logger.error("Course is not found!")
+ end
+ end
+ end
+
+ def down
+ end
+end
\ No newline at end of file
diff --git a/db/migrate/20160118083751_add_status_to_message.rb b/db/migrate/20160118083751_add_status_to_message.rb
new file mode 100644
index 000000000..46d63de3a
--- /dev/null
+++ b/db/migrate/20160118083751_add_status_to_message.rb
@@ -0,0 +1,5 @@
+class AddStatusToMessage < ActiveRecord::Migration
+ def change
+ add_column :messages, :status, :integer, :default => false
+ end
+end
diff --git a/db/migrate/20160122023014_add_commit_time.rb b/db/migrate/20160122023014_add_commit_time.rb
new file mode 100644
index 000000000..d9b860073
--- /dev/null
+++ b/db/migrate/20160122023014_add_commit_time.rb
@@ -0,0 +1,27 @@
+class AddCommitTime < ActiveRecord::Migration
+ def up
+ add_column :project_scores, :commit_time, :datetime, :default => nil
+ count = ProjectScore.all.count / 30 + 2
+ transaction do
+ for i in 1 ... count do i
+ ProjectScore.page(i).per(30).each do |ps|
+ unless ps.project.nil?
+ unless ps.project.gpid.nil?
+ g = Gitlab.client
+ begin
+ changesets = g.commits(ps.project.gpid)
+ ps.commit_time = changesets[0].created_at
+ ps.save
+ rescue
+ logger.error("The project's rep is not exit!")
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/migrate/20160122083400_add_excellent_option_to_course.rb b/db/migrate/20160122083400_add_excellent_option_to_course.rb
new file mode 100644
index 000000000..560153781
--- /dev/null
+++ b/db/migrate/20160122083400_add_excellent_option_to_course.rb
@@ -0,0 +1,6 @@
+class AddExcellentOptionToCourse < ActiveRecord::Migration
+ def change
+ add_column :courses, :excellent_option, :integer, :default => false
+ end
+end
+
diff --git a/db/migrate/20160122083507_define_excellent_option_course.rb b/db/migrate/20160122083507_define_excellent_option_course.rb
new file mode 100644
index 000000000..7b4a4ae4a
--- /dev/null
+++ b/db/migrate/20160122083507_define_excellent_option_course.rb
@@ -0,0 +1,19 @@
+class DefineExcellentOptionCourse < ActiveRecord::Migration
+ def up
+ arr = [151,122,15,227,139,410,291,224,55,137,414,43,417,52,205,44,216,132,204,258,411,50,
+ 419,390,420,133,91,112,202,95,194,34,172,403,177,252,138,352,225,46,279,382,397,286,344,27,175,
+ 124,265,88,59,110,72,92,392,413,26,201,94,57,156,393,154,12,262]
+ for i in 0..arr.length-1
+ begin
+ puts arr[i]
+ course = Course.find(arr[i])
+ course.update_attribute(:excellent_option, true)
+ rescue
+ logger.error("Course is not found!")
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/migrate/20160122094805_excellent_course.rb b/db/migrate/20160122094805_excellent_course.rb
new file mode 100644
index 000000000..465b81464
--- /dev/null
+++ b/db/migrate/20160122094805_excellent_course.rb
@@ -0,0 +1,17 @@
+class ExcellentCourse < ActiveRecord::Migration
+ def up
+ arr = [302,192,370,394,183,361,117,218,379,178,418,203,342,403,225]
+ for i in 0..arr.length-1
+ begin
+ puts arr[i]
+ course = Course.find(arr[i])
+ course.update_attribute(:is_excellent, true)
+ rescue
+ logger.error("Course is not found!")
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/migrate/20160122094829_excellent_option_course.rb b/db/migrate/20160122094829_excellent_option_course.rb
new file mode 100644
index 000000000..30ee53ba3
--- /dev/null
+++ b/db/migrate/20160122094829_excellent_option_course.rb
@@ -0,0 +1,19 @@
+class ExcellentOptionCourse < ActiveRecord::Migration
+ def up
+ arr = [151,122,15,227,139,410,291,224,55,137,414,43,417,52,205,44,216,132,204,258,411,50,
+ 419,390,420,133,91,112,202,95,194,34,172,403,177,252,138,352,225,46,279,382,397,286,344,27,175,
+ 124,265,88,59,110,72,92,392,413,26,201,94,57,156,393,154,12,262]
+ for i in 0..arr.length-1
+ begin
+ puts arr[i]
+ course = Course.find(arr[i])
+ course.update_attribute(:excellent_option, true)
+ rescue
+ logger.error("Course is not found!")
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/migrate/20160122142844_excellent_course_se.rb b/db/migrate/20160122142844_excellent_course_se.rb
new file mode 100644
index 000000000..c6f5dbb88
--- /dev/null
+++ b/db/migrate/20160122142844_excellent_course_se.rb
@@ -0,0 +1,17 @@
+class ExcellentCourseSe < ActiveRecord::Migration
+ def up
+ arr = [302,192,370,394,183,361,117,218,379,178,418,203,342,403,225]
+ for i in 0..arr.length-1
+ begin
+ puts arr[i]
+ course = Course.find(arr[i])
+ course.update_attribute(:is_excellent, true)
+ rescue
+ logger.error("Course is not found!")
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/migrate/20160122143138_excellent_option_se.rb b/db/migrate/20160122143138_excellent_option_se.rb
new file mode 100644
index 000000000..cee739b7f
--- /dev/null
+++ b/db/migrate/20160122143138_excellent_option_se.rb
@@ -0,0 +1,19 @@
+class ExcellentOptionSe < ActiveRecord::Migration
+ def up
+ arr = [151,122,15,227,139,410,291,224,55,137,414,43,417,52,205,44,216,132,204,258,411,50,
+ 419,390,420,133,91,112,202,95,194,34,172,403,177,252,138,352,225,46,279,382,397,286,344,27,175,
+ 124,265,88,59,110,72,92,392,413,26,201,94,57,156,393,154,12,262]
+ for i in 0..arr.length-1
+ begin
+ puts arr[i]
+ course = Course.find(arr[i])
+ course.update_attribute(:excellent_option, true)
+ rescue
+ logger.error("Course is not found!")
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 347f801a6..b2c74a96c 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20160121070232) do
+ActiveRecord::Schema.define(:version => 20160122143138) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -499,6 +499,8 @@ ActiveRecord::Schema.define(:version => 20160121070232) do
t.integer "is_delete", :default => 0
t.integer "end_time"
t.string "end_term"
+ t.integer "is_excellent", :default => 0
+ t.integer "excellent_option", :default => 0
end
create_table "custom_fields", :force => true do |t|
@@ -1072,6 +1074,7 @@ ActiveRecord::Schema.define(:version => 20160121070232) do
t.integer "sticky", :default => 0
t.integer "reply_id"
t.integer "quotes"
+ t.integer "status", :default => 0
end
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
@@ -1214,7 +1217,6 @@ ActiveRecord::Schema.define(:version => 20160121070232) do
create_table "org_members", :force => true do |t|
t.integer "user_id"
t.integer "organization_id"
- t.string "role"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
@@ -1370,6 +1372,7 @@ ActiveRecord::Schema.define(:version => 20160121070232) do
t.integer "board_message_num", :default => 0
t.integer "board_num", :default => 0
t.integer "attach_num", :default => 0
+ t.datetime "commit_time"
end
create_table "project_statuses", :force => true do |t|
@@ -1712,10 +1715,6 @@ ActiveRecord::Schema.define(:version => 20160121070232) do
t.string "extra"
end
- create_table "temp", :id => false, :force => true do |t|
- t.integer "id", :default => 0, :null => false
- end
-
create_table "time_entries", :force => true do |t|
t.integer "project_id", :null => false
t.integer "user_id", :null => false
diff --git a/lib/tasks/issue_due_date.rake b/lib/tasks/issue_due_date.rake
index 74ee242f5..8ea6d9ed0 100644
--- a/lib/tasks/issue_due_date.rake
+++ b/lib/tasks/issue_due_date.rake
@@ -14,10 +14,10 @@ namespace :issue_due_date do
recipients << assigner
recipients.each do |r|
issue.forge_messages << ForgeMessage.new(:user_id => r.id, :project_id => issue.project_id, :viewed => false, :status => 1)
- # issue截止时间邮件提醒
- Mailer.issue_due_date(issue, recipients).deliver
end
end
+ # issue截止时间邮件提醒
+ Mailer.issue_due_date(issue).deliver
end
end
end
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index 6c2f0af71..fff30dec5 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -193,7 +193,7 @@ function submit_new_course()
function submit_edit_course(id)
{
- if(regex_course_name()&®ex_course_class_period()&®ex_course_password())
+ if(regex_course_name()&®ex_course_class_period()&®ex_time_term()&®ex_course_password())
{
$("#edit_course_"+id).submit();
}
diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js
index 45721fd1b..bd2b967e4 100644
--- a/public/javascripts/homework.js
+++ b/public/javascripts/homework.js
@@ -117,6 +117,7 @@ $(function(){
$('#BluePopupBox').parent().resizable("disable");
$('#BluePopupBox').parent().removeClass("ui-state-disabled");
$('#BluePopupBox').parent().css("border","3px solid #269ac9").css("padding","10px");
+ $('#BluePopupBox').parent().css("position","fixed");
$('a.ProBtn').live('click', function(){
$("#BluePopupBox").dialog("open");
@@ -194,7 +195,7 @@ $(function(){
autoTextarea2(outputs[i], inputs[i]);
}
}
-
+ $(inputs[inputs.length - 1]).focus();
});
$("#BluePopupBox").on('click', 'a.icon_remove', function(){
$(this).parent('.mt10').remove();
diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js
index f273f0b77..b6301afad 100644
--- a/public/javascripts/new_user.js
+++ b/public/javascripts/new_user.js
@@ -75,7 +75,7 @@ function private_jour_submit(){
function jourReplyVerify() {
var content = jour_content_editor.html();//$.trim($("#message_content").val());
if (jour_content_editor.isEmpty()) {
- $("#jour_content_span").text("回复不能为空");
+ $("#jour_content_span").text("留言不能为空");
$("#jour_content_span").css('color', '#ff0000');
$("#submit_feedback_user").one('click',function() {
jour_submit();
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 810cd0fec..a0052b97a 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -95,6 +95,7 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
.mt-2 {margin-top:-2px;}
.homeworkInfo {background:#F6F6F6; padding:10px; margin-bottom:10px;}
.homeworkDetail {line-height:18px; font-size:12px; color:#484848; overflow:hidden;}
+.homeworkDetail p,.homeworkDetail div,.homeworkDetail em, .homeworkDetail span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;}
.max_h54 {max-height:54px; }
.homeworkState {padding:3px 5px; background-color:#28be6c; border-radius:3px; float:left; margin-left:15px; color:#ffffff;}
.homeworkClose {padding:3px 5px; background-color:#b2b2b2; border-radius:3px; float:left; margin-left:15px; color:#ffffff;}
@@ -512,7 +513,7 @@ a.exit { height:24px; display:block; width:80px; color:#000000; background:#c3c3
.st_list{ width:670px;}
.st_search{ }
.st_search span{ font-size:14px; font-weight:bold; color:#606060; margin-right:35px;}
-.st_search_input{ border:1px solid #1c9ec7; background:#fff; height:20px; color:#c4c4c4; width:200px; padding-left:5px; margin-bottom:5px;}
+.st_search_input{ border:1px solid #1c9ec7; background:#fff; height:20px; color:#c4c4c4; width:220px; padding-left:5px; margin-bottom:5px;}
.st_search a{ background:#1c9ec7; color:#fff;border:1px solid #1c9ec7; text-align:center; display:block; width:60px; height:20px; float:left; font-size:12px; }
.st_search a:hover{ background:#048fbb; text-decoration:none;}
.classbox{ border:1px solid #f8df8c; background:#fffce6; color:#0d90c3; padding:0 3px; float:left; margin-left:15px;}
@@ -1259,4 +1260,5 @@ div.disable_link {background-color: #c1c1c1 !important;}
.boutiqueP {position:absolute; left:0px; top:0px;}
.mh18 {max-height: 18px;}
-.relatePWrap{max-height: 210px;overflow:hidden;}
+.relatePWrap{max-height: 210px;overflow:hidden;}/*160114课程推荐*/
+.courseR {width:220px; padding:10px; background-color:#ffffff; margin-top:10px;}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index ee0c08a14..5a37e2908 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -1422,3 +1422,14 @@ span.at a{color:#269ac9;text-decoration: none;}
.orgSendSearch {border:1px solid #dddddd; outline:none; width:262px; height:22px; padding-left:10px; float:left;}
.relatePWrap{max-height: 210px;overflow:hidden;}
+
+/*20160115问题跟踪*/
+.proInfoBox2{ border:1px solid #dddddd; height:45px; padding:10px 0; background-color:#f1f1f1;}
+.proInfoBox2 ul li{ height:24px; position:relative;}
+.pic_edit2{display:inline-block; background:url(../images/public_icon.png) 0px -32px no-repeat; width:20px; height:15px; vertical-align:middle; display:none;}
+.pic_edit2:hover{display:inline-block; background:url(../images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;}
+.w70{ width:70px;}
+.w80{ width:80px;}
+.label03{ width:70px; text-align:right; display:block; float:left;}
+.pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
+.proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index c671f30ec..29c099d3d 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -414,7 +414,7 @@ a.link_file_board{ background:url(../images/pic_file.png) 0 3px no-repeat !impor
.st_list{ width:670px;}
.st_search{ }
.st_search span{ font-size:14px; font-weight:bold; color:#606060; margin-right:35px;}
-.st_search_input{ border:1px solid #1c9ec7; background:#fff; height:20px; color:#c4c4c4; width:200px; padding-left:5px; margin-bottom:5px;}
+.st_search_input{ border:1px solid #1c9ec7; background:#fff; height:20px; color:#c4c4c4; width:220px; padding-left:5px; margin-bottom:5px;}
.st_search a{ background:#1c9ec7; color:#fff;border:1px solid #1c9ec7; text-align:center; display:block; width:60px; height:20px; float:left; font-size:12px; }
.st_search a:hover{ background:#048fbb; text-decoration:none;}
.classbox{ border:1px solid #f8df8c; background:#fffce6; color:#0d90c3; padding:0 3px; float:left; margin-left:15px;}
@@ -1163,4 +1163,8 @@ a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat;
.mb10 {margin-bottom: 10px}
.mb15 {margin-bottom: 15px}
div.disable_link {background-color: #c1c1c1 !important;}
-.reUploadDetail{border:1px solid #dddddd; float:left; resize:none; width:400px; height:80px; overflow-y:auto;outline: none;}
\ No newline at end of file
+.reUploadDetail{border:1px solid #dddddd; float:left; resize:none; width:400px; height:80px; overflow-y:auto;outline: none;}
+
+/*问题跟踪局部修改属性*/
+.proInfoBox2{ border:1px solid #dddddd; height:45px; padding:10px 0; background-color:#f1f1f1;}
+.proInfoBox2 ul li{ height:24px; position:relative;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 79b441f25..abd2c10f9 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -140,10 +140,12 @@ h4{ font-size:14px; color:#3b3b3b;}
.w50 {width:50px;}
.w60{ width:60px;}
.w70{ width:70px;}
+.w80{ width:80px;}
.w90{ width:90px;}
.w100{width: 100px;}
.w210{ width:210px;}
.w150{ width:150px;}
+.w170{width:170px;}
.w230{width:230px !important;}
.w235{ width:235px !important;}
.w280{ width:280px;}
@@ -170,6 +172,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.h70{ height:70px;}
.h150{ height:150px;}
.p10 {padding-left:10px; padding-right:10px;}
+.mw360 {max-width: 360px !important;}
.mw400 {max-width: 400px !important;}
.mh18 {max-height: 18px;}
@@ -220,6 +223,7 @@ a.c_green{ color:#28be6c;}
.fontGrey {color:#cecece;}
.fontGrey2 {color:#888888;}
.fontGrey3 {color:#484848;}
+.fontGrey4{color:#999999;}
.fontBlue {color:#3498db;}
a.underline {text-decoration:underline;}
a.fontBlue {color:#297fb8;}
@@ -321,6 +325,9 @@ a:hover.bgreen_n_btn{background:#08a384;}
.pic_text02{display:block; background:url(../images/new_project/public_icon.png) 0px -642px no-repeat; width:20px; height:19px;}
.pic_edit{display:block; background:url(../images/new_project/public_icon.png) 0px -32px no-repeat; width:20px; height:15px;}
.pic_edit:hover{display:block; background:url(../images/new_project/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;}
+.pic_edit2{display:inline-block; background:url(../images/public_icon.png) 0px -32px no-repeat; width:20px; height:15px; vertical-align:middle; display:none;}
+.pic_edit2:hover{display:inline-block; background:url(../images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;}
+