<%=l(:label_excellent_courses_list)%>
@@ -33,12 +33,14 @@
资源数
-
+
帖子数
-
+
动态数
+
+
@@ -74,6 +76,9 @@
<%= course.course_activities.count%>
+
+ <%= link_to( course.is_excellent == 1 || course.excellent_option == 1 ? "取消精品" : "设为精品", { :controller => 'admin', :action => 'cancel_excellent_course', :id => course.id }, :class => 'icon-del') %>
+
<% end %>
diff --git a/app/views/admin/leave_messages.html.erb b/app/views/admin/leave_messages.html.erb
index dee8b7443..986823faa 100644
--- a/app/views/admin/leave_messages.html.erb
+++ b/app/views/admin/leave_messages.html.erb
@@ -59,12 +59,12 @@
<%= format_date(journal.created_on) %>
-
+
<%case journal.jour_type %>
<% when 'Principal' %>
- <%= link_to(journal.notes.html_safe, feedback_path(journal.jour_id)) %>
+ <%= link_to(strip_html(journal.notes), feedback_path(journal.jour_id)) %>
<% when 'Course' %>
- <%= link_to(journal.notes.html_safe, course_feedback_path(journal.jour_id)) %>
+ <%= link_to(strip_html(journal.notes), course_feedback_path(journal.jour_id)) %>
<% end %>
diff --git a/app/views/attachments/_show_attachment_history.html.erb b/app/views/attachments/_show_attachment_history.html.erb
index fb2afd308..61ccef344 100644
--- a/app/views/attachments/_show_attachment_history.html.erb
+++ b/app/views/attachments/_show_attachment_history.html.erb
@@ -1,7 +1,7 @@
更新资源版本
-
+
当前版本
@@ -39,10 +39,19 @@
-
-
(未选择文件)
-
您可以上传小于50MB 的文件
+
+ (未选择文件)
+ 您可以上传小于50MB 的文件
+
+
+
diff --git a/app/views/blog_comments/_simple_ke_reply_form.html.erb b/app/views/blog_comments/_simple_ke_reply_form.html.erb
index ac953b254..8339ae5ad 100644
--- a/app/views/blog_comments/_simple_ke_reply_form.html.erb
+++ b/app/views/blog_comments/_simple_ke_reply_form.html.erb
@@ -1,20 +1,24 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb
index 78f44aa31..eaea6c553 100644
--- a/app/views/courses/show.html.erb
+++ b/app/views/courses/show.html.erb
@@ -1,3 +1,4 @@
+
-
-
+
<% is_current_user = User.current.logged? && User.current == @user%>
<% if User.current.logged? %>
diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb
index d67b2d3f3..8455d5693 100644
--- a/app/views/layouts/new_base_user.html.erb
+++ b/app/views/layouts/new_base_user.html.erb
@@ -284,7 +284,7 @@
-
访问计数 <%= @user.visits.to_i %>
+
访问计数 <%= @user.visits.to_i %> (自2016年5月)
@@ -92,16 +94,20 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
- <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
-
-
-
-
发送
-
-
- <% end%>
-
+ <% if User.current.logged? %>
+
+ <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
+
+
+
+
发送
+
+
+ <% end%>
+
+ <% else %>
+ <%= render :partial => "users/show_unlogged" %>
+ <% end %>
diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb
index d8714400d..ccf0e456e 100644
--- a/app/views/users/_project_issue.html.erb
+++ b/app/views/users/_project_issue.html.erb
@@ -13,29 +13,31 @@
<% end %> TO
<%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%>
-
-
-
-
-
- <%= link_to l(:button_edit), issue_path(activity.id, :edit => 'true'), :class => 'postOptionLink', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
-
-
- <% if !defined?(project_id) && !defined?(user_id) %>
- <%= link_to l(:button_delete), issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
- <% elsif defined?(project_id) %>
- <%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
- <% elsif defined?(user_id) %>
- <%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "user_page", :page_id => user_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
- <% end %>
-
-
- <%= link_to l(:button_copy), project_copy_issue_path(activity.project, activity), :class => 'postOptionLink' if User.current.allowed_to?(:add_issues, activity.project) %>
+ <% if User.current.logged? %>
+
+
+
+
+
+ <%= link_to l(:button_edit), issue_path(activity.id, :edit => 'true'), :class => 'postOptionLink', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
+
+
+ <% if !defined?(project_id) && !defined?(user_id) %>
+ <%= link_to l(:button_delete), issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
+ <% elsif defined?(project_id) %>
+ <%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
+ <% elsif defined?(user_id) %>
+ <%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "user_page", :page_id => user_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
+ <% end %>
+
+
+ <%= link_to l(:button_copy), project_copy_issue_path(activity.project, activity), :class => 'postOptionLink' if User.current.allowed_to?(:add_issues, activity.project) %>
+
+
-
-
-
+
+ <% end %>
<% case activity.tracker_id %>
<% when 1%>
diff --git a/app/views/users/_project_issue_reply.html.erb b/app/views/users/_project_issue_reply.html.erb
index 1f4c4b44b..d1f7363a7 100644
--- a/app/views/users/_project_issue_reply.html.erb
+++ b/app/views/users/_project_issue_reply.html.erb
@@ -27,16 +27,20 @@
<%= 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%>
-
+ <% if User.current.logged? %>
+
+ <%= form_for('new_form',:url => add_journal_issue_path(activity.id, :user_activity_id => user_activity_id),:method => "post", :remote => true) do |f| %>
+
+
+
+
发送
+
+
+ <% end%>
+
+ <% else %>
+ <%= render :partial => "users/show_unlogged" %>
+ <% end %>
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb
index f82dc35e7..502706289 100644
--- a/app/views/users/_project_message.html.erb
+++ b/app/views/users/_project_message.html.erb
@@ -49,33 +49,35 @@
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
-
-
-
-
- <% if activity.author.id == User.current.id%>
-
- <%= link_to(
- l(:button_edit),
- edit_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
- :class => 'postOptionLink'
- ) if activity.editable_by?(User.current) %>
-
-
- <%= link_to(
- l(:button_delete),
- delete_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
- :method => :post,
- :data => {:confirm => l(:text_are_you_sure)},
- :class => 'postOptionLink'
- ) if activity.destroyable_by?(User.current) %>
-
- <% end %>
- <%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %>
+ <% if User.current.logged? %>
+
+
+
+
+ <% if activity.author.id == User.current.id%>
+
+ <%= link_to(
+ l(:button_edit),
+ edit_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
+ :class => 'postOptionLink'
+ ) if activity.editable_by?(User.current) %>
+
+
+ <%= link_to(
+ l(:button_delete),
+ delete_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
+ :method => :post,
+ :data => {:confirm => l(:text_are_you_sure)},
+ :class => 'postOptionLink'
+ ) if activity.destroyable_by?(User.current) %>
+
+ <% end %>
+ <%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %>
+
+
-
-
-
+
+ <% end %>
@@ -111,17 +113,21 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
- <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
-
-
-
-
-
发送
-
-
- <% end%>
-
+ <% if User.current.logged? %>
+
+ <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
+
+
+
+
+
发送
+
+
+ <% end%>
+
+ <% else %>
+ <%= render :partial => "users/show_unlogged" %>
+ <% end %>
diff --git a/app/views/users/_project_news.html.erb b/app/views/users/_project_news.html.erb
index 43b22b193..04edc05e0 100644
--- a/app/views/users/_project_news.html.erb
+++ b/app/views/users/_project_news.html.erb
@@ -32,31 +32,33 @@
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
-
-
-
- <% if User.current.logged? %>
-
- <%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %>
-
- <%= link_to(
- l(:button_edit),
- {:action => 'edit', :id => activity},
- :class => 'postOptionLink'
- ) if activity.author == User.current %>
-
-
- <%= delete_link(
- news_path(activity),
- :data => {:confirm => l(:text_are_you_sure)},
- :class => 'postOptionLink'
- ) if activity.author == User.current %>
-
-
- <% end %>
-
-
-
+ <% if User.current.logged? %>
+
+
+
+ <% if User.current.logged? %>
+
+ <%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %>
+
+ <%= link_to(
+ l(:button_edit),
+ {:action => 'edit', :id => activity},
+ :class => 'postOptionLink'
+ ) if activity.author == User.current %>
+
+
+ <%= delete_link(
+ news_path(activity),
+ :data => {:confirm => l(:text_are_you_sure)},
+ :class => 'postOptionLink'
+ ) if activity.author == User.current %>
+
+
+ <% end %>
+
+
+
+ <% end %>
@@ -89,16 +91,20 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
- <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
-
-
-
-
发送
-
-
- <% end%>
-
+ <% if User.current.logged? %>
+
+ <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
+
+
+
+
发送
+
+
+ <% end%>
+
+ <% else %>
+ <%= render :partial => "users/show_unlogged" %>
+ <% end %>
diff --git a/app/views/users/_reply_to.html.erb b/app/views/users/_reply_to.html.erb
index 30f4e3542..a7034ffc7 100644
--- a/app/views/users/_reply_to.html.erb
+++ b/app/views/users/_reply_to.html.erb
@@ -1,7 +1,8 @@
-
-
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
-
-
+
+ <% if User.current.logged? %>
+
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
+
+
<%= form_for('new_form',:url => {:controller => 'words', :action => 'reply_to_homework', :id => reply.id},:method => "post", :remote => true) do |f| %>
>
>
@@ -13,7 +14,10 @@
<% end%>
-
+
+ <% else %>
+ <%= render :partial => "users/show_unlogged_reply" %>
+ <% end %>
diff --git a/app/views/users/_show_unlogged.html.erb b/app/views/users/_show_unlogged.html.erb
index 258ebe7af..223ee3f40 100644
--- a/app/views/users/_show_unlogged.html.erb
+++ b/app/views/users/_show_unlogged.html.erb
@@ -1,3 +1,4 @@
- <%= link_to "登录", signin_path, :class => "linkBlue", :target => "_blank" %>后可添加回复
+
登录 后可添加回复
+ <%#= link_to "登录", signin_path, :class => "linkBlue", :target => "_blank" %>
\ No newline at end of file
diff --git a/app/views/users/_show_unlogged_reply.html.erb b/app/views/users/_show_unlogged_reply.html.erb
new file mode 100644
index 000000000..b428fd249
--- /dev/null
+++ b/app/views/users/_show_unlogged_reply.html.erb
@@ -0,0 +1,4 @@
+
+
登录 后可添加回复
+ <%#= link_to "登录", signin_path, :class => "linkBlue", :target => "_blank" %>
+
\ No newline at end of file
diff --git a/app/views/users/_user_at_message.html.erb b/app/views/users/_user_at_message.html.erb
index 8f0c6acaf..81139ab8e 100644
--- a/app/views/users/_user_at_message.html.erb
+++ b/app/views/users/_user_at_message.html.erb
@@ -1,4 +1,4 @@
-<% if AtMessage === ma && ma.at_valid? %>
+<% if ma.class == AtMessage && ma.at_valid? %>
<%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %>
diff --git a/app/views/users/_user_blog.html.erb b/app/views/users/_user_blog.html.erb
index 97b2737c8..f0761ff78 100644
--- a/app/views/users/_user_blog.html.erb
+++ b/app/views/users/_user_blog.html.erb
@@ -74,21 +74,25 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
- <%= form_for('new_form',:url => {:controller => 'blog_comments', :action => 'reply', :user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id},:method => "post", :remote => true) do |f|%>
-
-
-
-
-
-
-
-
-
发送
-
-
- <% end%>
-
+ <% if User.current.logged? %>
+
+ <%= form_for('new_form',:url => {:controller => 'blog_comments', :action => 'reply', :user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id},:method => "post", :remote => true) do |f|%>
+
+
+
+
+
+
+
+
+
发送
+
+
+ <% end%>
+
+ <% else %>
+ <%= render :partial => "users/show_unlogged" %>
+ <% end %>
diff --git a/app/views/users/_user_group_attr.html.erb b/app/views/users/_user_group_attr.html.erb
index 681f158e7..952a3396e 100644
--- a/app/views/users/_user_group_attr.html.erb
+++ b/app/views/users/_user_group_attr.html.erb
@@ -3,11 +3,14 @@
每组最小人数:
人
+
每组最大人数:
人
+
+
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb
index 97eeec89f..e7cd740f7 100644
--- a/app/views/users/_user_homework_detail.html.erb
+++ b/app/views/users/_user_homework_detail.html.erb
@@ -329,17 +329,21 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %>
-
- <%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => homework_common.id},:method => "post", :remote => true) do |f|%>
- <%= hidden_field_tag 'homework_common_id',params[:homework_common_id],:value =>homework_common.id %>
- <%= hidden_field_tag 'is_in_course',params[:is_in_course],:value =>is_in_course %>
-
-
-
发送
-
-
- <% end%>
-
+ <% if User.current.logged? %>
+
+ <%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => homework_common.id},:method => "post", :remote => true) do |f|%>
+ <%= hidden_field_tag 'homework_common_id',params[:homework_common_id],:value =>homework_common.id %>
+ <%= hidden_field_tag 'is_in_course',params[:is_in_course],:value =>is_in_course %>
+
+
+
发送
+
+
+ <% end%>
+
+ <% else %>
+ <%= render :partial => "users/show_unlogged" %>
+ <% end %>
diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb
index e7f42c661..b84adf5fe 100644
--- a/app/views/users/_user_journalsformessage.html.erb
+++ b/app/views/users/_user_journalsformessage.html.erb
@@ -16,22 +16,26 @@
<% end %>
<% 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 is_activity.to_i == 1 %>
+
+ <%# 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 %>
+
+
+
+
+ <%# end %>
留言时间:<%= format_time(activity.created_on) %>
@@ -87,21 +91,25 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %>
-
- <%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id},:method => "post", :remote => true) do |f|%>
- <%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %>
- <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %>
- <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
- <%= 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 'is_activity',params[:is_activity],:value =>is_activity %>
-
-
-
发送
-
-
- <% end%>
-
+ <% if User.current.logged? %>
+
+ <%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id},:method => "post", :remote => true) do |f|%>
+ <%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %>
+ <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %>
+ <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
+ <%= 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 'is_activity',params[:is_activity],:value =>is_activity %>
+
+
+
发送
+
+
+ <% end%>
+
+ <% else %>
+ <%= render :partial => "users/show_unlogged" %>
+ <% end %>
diff --git a/app/views/users/_user_jours_list.html.erb b/app/views/users/_user_jours_list.html.erb
index afd498d06..6211aac7d 100644
--- a/app/views/users/_user_jours_list.html.erb
+++ b/app/views/users/_user_jours_list.html.erb
@@ -5,7 +5,7 @@
<%if jours %>
<% jours.each do |jour|%>
- <% unless jour.private == 1 && (!User.current || (User.current && jour.jour_id != User.current.id && jour.user_id != User.current.id)) %>
+ <% unless jour.private == 1 && (!User.current || (User.current && jour.jour_id != User.current.id && jour.user_id != User.current.id && !User.current.admin?)) %>
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index 391709b52..1ff8adc57 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -4,8 +4,9 @@
<% if (!@message_alls.nil? && @message_alls.count >0) %>
<% if params[:type].nil? || params[:type] == "unviewed" %>
diff --git a/config/locales/account/zh.yml b/config/locales/account/zh.yml
index c6a23b964..532806356 100644
--- a/config/locales/account/zh.yml
+++ b/config/locales/account/zh.yml
@@ -37,7 +37,7 @@ zh:
label_password_lost: "忘记密码?"
button_login: 登录
# account_controller中判断用户名或密码输入有误的提示信息
- notice_account_invalid_creditentials: "无效的用户名或密码,注意登录名区分大小写,谢谢!"
+ notice_account_invalid_creditentials: "无效的用户名或密码,注意登录名区分大小写。"
# account_controller中判断未激活的提示信息
notice_account_invalid_creditentials_new: "您还未到邮箱激活。如果您丢失帐户,电子邮件验证帮助我们的支持团队验证帐户的所有权,并允许您接收所有您要求的通知。"
diff --git a/config/routes.rb b/config/routes.rb
index e4b462d93..ec8fa2337 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -130,6 +130,7 @@ RedmineApp::Application.routes.draw do
end
member do
match "quote_resource_show_org_subfield", :via => [:get]
+ get "update_file_description"
end
end
@@ -329,6 +330,7 @@ RedmineApp::Application.routes.draw do
post 'last_codecomparetime'
post 'set_score_rule'
get 'work_canrepeat'
+ get 'get_user_infor'
end
end
@@ -779,6 +781,7 @@ RedmineApp::Application.routes.draw do
member do
match "quote_resource_show", :via => [:get]
get "file_hidden"
+ get "update_file_description"
end
end
@@ -975,7 +978,6 @@ RedmineApp::Application.routes.draw do
match 'delete_softapplications', :via => [:get, :post]
end
end
-
resources :groups do
member do
get 'autocomplete_for_user'
@@ -1019,6 +1021,7 @@ RedmineApp::Application.routes.draw do
get 'admin/excellent_courses', as: :excellent_courses
get 'admin/excellent_all_courses', as: :excellent_all_courses
match 'admin/set_excellent_course/:id', :to => 'admin#set_excellent_course'
+ match 'admin/cancel_excellent_course/:id', :to => 'admin#cancel_excellent_course'
get 'admin/course_resource_list'
get 'admin/project_resource_list'
match 'admin/users', :via => :get
@@ -1114,6 +1117,7 @@ RedmineApp::Application.routes.draw do
match "quote_resource_show", :via => [:get]
get "file_hidden"
post "republish_file"
+ get "update_file_description"
end
end
resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do
diff --git a/db/migrate/20160613064914_create_syllabuses.rb b/db/migrate/20160613064914_create_syllabuses.rb
new file mode 100644
index 000000000..a9a926d7e
--- /dev/null
+++ b/db/migrate/20160613064914_create_syllabuses.rb
@@ -0,0 +1,12 @@
+class CreateSyllabuses < ActiveRecord::Migration
+ def change
+ create_table :syllabuses do |t|
+ t.string :title
+ t.text :description
+ t.references :user
+
+ t.timestamps
+ end
+ add_index :syllabuses, :user_id
+ end
+end
diff --git a/db/migrate/20160613065840_add_syllabus_to_course.rb b/db/migrate/20160613065840_add_syllabus_to_course.rb
new file mode 100644
index 000000000..b40d187d0
--- /dev/null
+++ b/db/migrate/20160613065840_add_syllabus_to_course.rb
@@ -0,0 +1,6 @@
+class AddSyllabusToCourse < ActiveRecord::Migration
+ def change
+ add_column :courses, :syllabus_id, :integer
+ add_index :courses, :syllabus_id
+ end
+end
diff --git a/public/assets/kindeditor/pasteimg.js b/public/assets/kindeditor/pasteimg.js
index 97d5e33c5..479b1101a 100644
--- a/public/assets/kindeditor/pasteimg.js
+++ b/public/assets/kindeditor/pasteimg.js
@@ -327,28 +327,28 @@ function enablePasteImg(_editor) {
};
$(nodeBody).on('pasteImage', function(ev, data) {
- console.log('pasteImage');
- console.log("dataURL: " + data.dataURL);
- console.log("width: " + data.width);
- console.log("height: " + data.height);
- var blob = dataURItoBlob(data.dataURL);
- if (data.blob !== null) {
- var data = new FormData();
- data.append("imgFile",blob, "imageFilename.png");
- console.log(data);
- $.ajax({
- url: '/kindeditor/upload?dir=image',
- contentType: false,
- type: 'POST',
- data: data,
- processData: false,
- success: function(data) {
- console.log(data);
- editor.exec('insertimage', JSON.parse(data).url);
- }
- });
- }
-
+ //粘贴图片时走这里会出现两张图片走df()即可
+// console.log('pasteImage');
+// console.log("dataURL: " + data.dataURL);
+// console.log("width: " + data.width);
+// console.log("height: " + data.height);
+// var blob = dataURItoBlob(data.dataURL);
+// if (data.blob !== null) {
+// var data = new FormData();
+// data.append("imgFile",blob, "imageFilename.png");
+// console.log(data);
+// $.ajax({
+// url: '/kindeditor/upload?dir=image',
+// contentType: false,
+// type: 'POST',
+// data: data,
+// processData: false,
+// success: function(data) {
+// console.log(data);
+// editor.exec('insertimage', JSON.parse(data).url);
+// }
+// });
+// }
});
return;
};
@@ -371,7 +371,8 @@ function df(myself) {
sstr += that.attr("src") + "|";
}
else if (that.attr("src").indexOf("data:image") >= 0){
- that.parents().removeAttr("href"); //删除所有父节点的href
+ //去掉外链
+// that.parents().removeAttr("href"); //删除所有父节点的href
}
}
});
@@ -421,10 +422,10 @@ function uploadpic(piclist,myself) {
//复制过来带的链接class等都要去掉 和视频图片有关系
that.removeAttr("class");
- that.parent().removeAttr("class");
- that.parents().removeAttr("href"); //删除所有父节点的href
-// that.parent().removeAttr("href");
- that.parent().removeAttr("data-ke-src");
+ //去掉外链
+// that.parent().removeAttr("class");
+// that.parents().removeAttr("href"); //删除所有父节点的href
+// that.parent().removeAttr("data-ke-src");
tIndex = tIndex + 1;
}
}
diff --git a/public/images/login/bg_login.jpg b/public/images/login/bg_login.jpg
new file mode 100644
index 000000000..274dcb6f6
Binary files /dev/null and b/public/images/login/bg_login.jpg differ
diff --git a/public/images/login/bg_register.jpg b/public/images/login/bg_register.jpg
new file mode 100644
index 000000000..c1a027a86
Binary files /dev/null and b/public/images/login/bg_register.jpg differ
diff --git a/public/images/login/icons_login.png b/public/images/login/icons_login.png
new file mode 100644
index 000000000..9d1ba136d
Binary files /dev/null and b/public/images/login/icons_login.png differ
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 73b667740..22483c1d5 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1045,6 +1045,12 @@ function showNormalImage(id) {
$(image).attr('src',_src);
return;
}
+
+ //已被加链接则不处理
+ if ($(image).parent() && $(image).parent().attr('href')){
+ return;
+ }
+
//无格式的图片不让点击显示大图,显示的话会有问题
var tmpsrc = image.attr('src');
if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) {
@@ -1480,3 +1486,21 @@ function autoUrl(id){
}
}
+//编辑资源描述
+function show_edit_file_description(id) {
+ $("#file_description_show_"+id).hide();
+ $("#file_description_edit_"+id).show();
+ $("#file_description_edit_"+id).focus();
+}
+
+//编辑资源描述之后提交
+function edit_file_description(url,id){
+ $.get(
+ url,
+ {id: id ,description: $("#file_description_edit_"+id).val() },
+ function (data) {
+
+ }
+ );
+}
+
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index 9f6b6aabd..6fbf9f8c4 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -550,7 +550,7 @@ function check_late_penalty(id)
}
else
{
- obj.val("0");
+ obj.val("");
}
}
diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js
index e9ef7ad6c..1578d72df 100644
--- a/public/javascripts/homework.js
+++ b/public/javascripts/homework.js
@@ -194,9 +194,11 @@ $(function(){
$("#GroupPopupBox").dialog("open");
$(".ui-dialog-titlebar").hide();
$("a.popClose").on('click', function(){
+ reset_group_attr();
$("#GroupPopupBox" ).dialog("close");
});
$("#cancel_group").on('click', function(){
+ reset_group_attr();
$("#GroupPopupBox" ).dialog("close");
});
$('#min_num').focus();
@@ -351,29 +353,67 @@ $(function(){
$("#GroupPopupBox").dialog("open");
$(".ui-dialog-titlebar").hide();
$("a.popClose").on('click', function () {
+ reset_group_attr();
$("#GroupPopupBox").dialog("close");
});
$("#cancel_group").on('click', function () {
+ reset_group_attr();
$("#GroupPopupBox").dialog("close");
});
$('#min_num').focus();
}
});
+ var reset_group_attr = function() {
+ $("#min_num_notice").hide();
+ $("#min_max_num_notice").hide();
+ $("#max_num_notice").hide();
+ if($("input[name=min_num]").length > 0 && $("input[name=max_num]").length > 0) {
+ $("#min_num").val($("input[name=min_num]").val());
+ $("#max_num").val($("input[name=max_num]").val());
+ } else {
+ $("#min_num").val(2);
+ $("#max_num").val(10);
+ }
+ };
var saveGroupAttr = function() {
var valid = true;
var base_on_project = 0;
var min = $.trim($("#min_num").val());
var max = $.trim($("#max_num").val());
- if(min.length <= 0) {
+ var regex = /^\d+$/;
+ if(!regex.test(min) || parseInt(min) <= 0) {
+ $("#min_num_notice").html("请输入正整数");
+ $("#max_num_notice").html("");
+ $("#min_max_num_notice").html("");
+ $("#min_num_notice").show();
$("#min_num").focus();
- valid = false;
return false;
+ } else {
+ $("#min_num_notice").html("");
+ $("#min_num_notice").hide();
+ }
+ if(!regex.test(max) || parseInt(max) <= 0) {
+ $("#max_num_notice").html("请输入正整数");
+ $("#min_num_notice").html("");
+ $("#min_max_num_notice").html("");
+ $("#max_num_notice").show();
+ $("#max_num").focus();
+ return false;
+ } else {
+ $("#max_num_notice").html("");
+ $("#max_num_notice").hide();
}
- if(max.length <= 0) {
+ if(parseInt(min) > parseInt(max)) {
+ $("#min_max_num_notice").html("最小人数不得大于最大人数");
+ $("#min_num_notice").html("");
+ $("#max_num_notice").html("");
+ $("#min_max_num_notice").show();
$("#max_num").focus();
- valid = false;
return false;
+ } else {
+ $("#min_max_num_notice").html("");
+ $("#min_max_num_notice").hide();
}
if ($("#base_on_project").is(":checked")) {
base_on_project = 1;
diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js
index b6301afad..8db3fbc20 100644
--- a/public/javascripts/new_user.js
+++ b/public/javascripts/new_user.js
@@ -259,6 +259,24 @@ function regex_evaluation_end(){
}
}
+//处理迟交、缺评扣分
+function check_late_penalty(id)
+{
+ var obj = $("#" + id);
+ var regex = /^\d+$/;
+ if(regex.test(obj.val()))
+ {
+ if(obj.val() > 50)
+ {
+ obj.val("50");
+ }
+ }
+ else
+ {
+ obj.val("");
+ }
+}
+
//验证匿评数量
function regex_evaluation_num(){
var evaluation_num = $.trim($("#evaluation_num").val());
@@ -627,4 +645,52 @@ var autoTextarea2 = function (elem,elem2, extra, maxHeight) {
addEvent(elem2, 'input', change);
addEvent(elem2, 'focus', change);
change();
-};
\ No newline at end of file
+};
+
+function user_name_keypress(e){
+ if (e.keyCode == '13') {
+ $('#main_login_form').submit();
+ }
+}
+
+function changeRegisterBtn(checkbox){
+ if(checkbox.checked == true){
+ $("#loginUpButton").removeClass('new_login_submit_disable');
+ $("#loginUpButton").addClass('new_login_submit');
+ }else{
+ $("#loginUpButton").removeClass('new_login_submit')
+ $("#loginUpButton").addClass('new_login_submit_disable');
+ }
+}
+
+function clearInfo(id, content) {
+ var text = $('#' + id);
+ if (text.val() == content) {
+ $('#' + id).val('');
+ }
+}
+
+function showInfo(id, content) {
+ var text = $('#' + id);
+ if (text.val() == '') {
+ $('#' + id).val(content);
+ }
+}
+
+function login(){
+ $('#main_login_form').submit(); //表单提交没有任何反应的原因:js冲突
+}
+
+function register(){
+ if($("#loginUpButton").hasClass('new_login_submit_disable')){
+ return;
+ }
+ if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
+ $("#main_reg_form").submit();
+ }else{
+ $('#user_login').blur();
+ $('#user_mail').blur();
+ $('#user_password').blur();
+ $('#user_password_confirmation').blur();
+ }
+}
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 56ae81f8d..ed99217b8 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -1372,6 +1372,7 @@ a:hover.comment_ding_link{ color:#269ac9;}
.comment_content{ color:#333;}
.t_txt{ margin-top:10px;}
.orig_reply_box{border-top:1px solid #e3e3e3; width:95%; padding:15px 0px 15px 25px;}
+.orig_reply_box2{border-top:1px solid #e3e3e3; width:95%; padding:10px 25px 10px 0;}
.orig_textarea{width:90%; margin-bottom:10px;}
.orig_sub{ float:right; background-color:#269ac9; color:#fff; height:25px; line-height:25px; text-align:center; width:80px; border:none;}
.orig_sub:hover{ background:#297fb8;}
@@ -1418,3 +1419,11 @@ a.pages-big{ width:50px;}
.red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
+/*未登录回复提示*/
+.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
+
+/*更新资源文件的描述框*/
+.H60 {height:60px !important;}
+.W420 {width:420px;}
+.W300 {width:300px !important;}
+.W600{ width:600px;}
\ No newline at end of file
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 32e727ba4..ee3ddf6df 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -747,8 +747,8 @@ a:hover .gz_btn{color:#ff5722;}
.homepageCoursesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-65px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;}
/*注册登陆页面*/
-#loginInBox {display:block; margin-top:143px;}
-#signUpBox {display:none; margin-top:79px;}
+#loginInBox {display:block;}
+#signUpBox {display:none;}
#loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
#loginSignButton:hover {background-color:#297fb8;}
@@ -1553,6 +1553,7 @@ a:hover.comment_ding_link{ color:#269ac9;}
.comment_content{ color:#333;}
.t_txt{ margin-top:10px;}
.orig_reply_box{border-top:1px solid #e3e3e3; width:95%; padding:15px 0px 15px 25px;}
+.orig_reply_box2{border-top:1px solid #e3e3e3; width:95%; padding:10px 25px 10px 0;}
.orig_textarea{width:90%; margin-bottom:10px;}
.orig_sub{ float:right; background-color:#269ac9; color:#fff; height:25px; line-height:25px; text-align:center; width:80px; border:none;}
.orig_sub:hover{ background:#297fb8;}
@@ -1628,3 +1629,176 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
span.shadowbox_news_user{ color:#3b94d6;}
a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;}
+/* 新版登录注册 */
+.mr45{ margin-right:45px;}
+.mt100{ margin-top:100px;}
+.mt50{ margin-top:50px;}
+.new_login{
+ width:100%;
+ height:524px;
+ background-color:#3b94d6;
+}
+.new_login_con{
+ width:1000px;
+ height:524px;
+ margin:0 auto;
+ background:url(../images/login/bg_login.jpg) 0 0 no-repeat;
+}
+.new_login_box{
+ background:#FFF;
+ width:265px;
+ padding:20px 15px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ background-color: rgba(255,255,255,0.3);
+}
+.new_login_h2{
+ font-size:18px;
+ color:#fff;
+ border-bottom:1px solid #fff;
+ font-weight:normal;
+ padding-bottom:5px;
+ margin-bottom:30px;
+}
+.new_login_h2 a{
+ font-size:12px;
+ color:#fff;
+ background:url(../images/login/icons_login.png) 0 -69px no-repeat;
+ padding-left:10px;
+}
+input.new_register_input{
+ -webkit-box-shadow: 0 0 0px 1000px white inset;
+ margin-left:5px;
+ width:250px;
+ height:45px;
+ border:none;
+ outline: none;
+}
+input.new_loggin_input{
+ -webkit-box-shadow: 0 0 0px 1000px white inset;
+ outline: none;
+ width:205px;
+ height:45px;
+ border:none;
+ margin-left:50px;
+}
+.new_loggin_users{
+ width:265px;
+ height:45px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+ background:#fff url(../images/login/icons_login.png) 8px 9px no-repeat;
+
+}
+.new_login_lock{
+ background:#fff url(../images/login/icons_login.png) 8px -28px no-repeat;
+ width:265px;
+ height:45px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+}
+.new_register_li{
+ background:#fff;
+ width:265px;
+ height:45px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+}
+
+.new_login_form ul li{
+ margin-bottom:20px;
+}
+.new_login_error{
+ color:#c00202;
+}
+.new_login_submit_disable{
+ width:265px;
+ height:40px;
+ line-height: 40px;
+ background:#ccc;
+ color:#fff;
+ font-size:14px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+ text-align:center;
+ cursor:pointer;
+ vertical-align: middle;
+}
+.new_login_submit{
+ width:265px;
+ height:40px;
+ line-height: 40px;
+ background:#f27d0d;
+ color:#fff;
+ font-size:14px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+ text-align:center;
+ cursor:pointer;
+ vertical-align: middle;
+}
+.new_login_check{
+ width:15px;
+ height:15px;
+ border:1px solid #fff;
+ border-style:none;
+ margin-right:5px;
+ vertical-align: -2px;
+}
+.new_login_form label{ color:#fff;}
+.new_login_form a{ color:#fff; text-decoration:underline;}
+.new_register{
+ width:100%;
+ height:579px;
+ background-color:#3b94d6;
+}
+.new_register_con{
+ width:1000px;
+ height:580px;
+ margin:0 auto;
+ background:url(../images/login/bg_register.jpg) 0 0 no-repeat;
+}
+.new_login_txt{
+ width:282px;
+ height:140px;
+ padding:30px 12px 0;
+ color:#fff;
+ margin:235px 0 0 165px;
+}
+.new_login_txt h3{
+ font-size:18px;
+ text-align:center;
+ margin-bottom:20px;
+}
+.new_login_txt p{
+ line-height:2.0;
+}
+.new_register_left{
+ margin-top:250px;
+}
+
+/*未登录回复提示*/
+.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
+
+/*更新资源文件的描述框*/
+.H60 {height:60px !important;}
+.W420 {width:420px;}
+.W300 {width:300px !important;}
+.W600{ width:600px;}
\ No newline at end of file
diff --git a/public/stylesheets/org2.css b/public/stylesheets/org2.css
index 9e19fb5cb..23e53fd7b 100644
--- a/public/stylesheets/org2.css
+++ b/public/stylesheets/org2.css
@@ -197,7 +197,7 @@ a.sn-reply-username { color:#24366e; margin-right:15px; }
.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px;}
.topnav_login_list a{color:#269ac9;}
.topnav_login_list li{ }
-.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
+.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:50px; position:relative; display:inline-block; line-height:0;}
.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;}
.none {display: none;}
.user-img,.user-img img{ margin-right:10px; -moz-border-radius: 50px; -webkit-border-radius: 50px;border-radius: 50px; display:block; width:40px; height:40px;}
diff --git a/public/stylesheets/org_custom.css b/public/stylesheets/org_custom.css
index 0bdc8a670..5ff340272 100644
--- a/public/stylesheets/org_custom.css
+++ b/public/stylesheets/org_custom.css
@@ -1,74 +1,74 @@
/* 门户首页 */
#por_header{ width:100%; }
-.por_header_top{ width:100%; height:70px; background:#3b94d6; }
-.por_header_con{ width:1000px; margin:0 auto; height:70px; }
-.por_logo{ margin-top:5px;}
+.por_header_top{ width:100%; height:55px; background:#3b94d6; }
+.por_header_con{ width:1000px; margin:0 auto; height:55px; }
+.por_logo img{ margin-top:2px; height:51px;}
.por_login li{ float:left;}
-.por_login li a{ display:block; padding:0 15px; height:70px; line-height:70px;font-size:16px; color:#fff; }
+.por_login li a{ display:block; padding:0 15px; height:55px; line-height:55px;font-size:16px; color:#fff; }
.por_login li a:hover{ background-color:#1173bc;}
-.por_search{ margin-top:15px; margin-right:20px;}
+.por_search{ margin-top:10px; margin-right:20px;}
.pro_input_search{ background-color:#daeefc; height:36px; width:355px; border:none; padding:0 5px; color:#3b94d6;}
-a.por_search_btn{ display:block;background:#daeefc url(../images/org_custom/icons_por.png) 0 8px no-repeat; width:25px; height:36px;}
-a:hover.por_search_btn{background:#daeefc url(../images/org_custom/icons_por.png) -35px 8px no-repeat; }
-.por_nav{ width:1000px; height:70px; overflow:hidden; margin: 0 auto; position:relative; }
-a.por_edit_index{ position:absolute; font-size:14px; right:5px; top:20px;}
-.por_nav ul{ border-bottom:7px solid #ccc; height:63px;}
+a.por_search_btn{ display:block;background:#daeefc url(../images/icons_por.png) 0 8px no-repeat; width:25px; height:36px;}
+a:hover.por_search_btn{background:#daeefc url(../images/icons_por.png) -35px 8px no-repeat; }
+.por_nav{ width:100%; height:50px; background-color:#eeefef; }
+.por_nav ul{ width:1000px;height:50px; overflow:hidden; margin: 0 auto; position:relative;}
+a.por_edit_index{ position:absolute; font-size:14px; right:5px; top:15px;}
.por_nav ul li{ float:left; }
-.por_nav ul li a{ display: block; height:63px; padding:0 20px; line-height:63px; font-size:18px; color:#333; }
-.por_nav ul li a:hover{ border-bottom:7px solid #3b94d6; }
-.por_index_act{border-bottom:7px solid #3b94d6; }
+.por_nav ul li a{ display: block; height:63px; padding:0 20px; line-height:50px; font-size:16px; color:#333; }
+.por_nav ul li a:hover{ color:#3b94d6; }
+.por_nav ul li a.por_index_act{color:#3b94d6; }
#por_container{ width:1000px; margin:10px auto;}
.por_left{ width:685px; margin-right:15px; float:left; }
.por_right{ width:300px; float:left;}
.por_icons_hot{ background:url(../images/org_custom/icons_por.png) 0 -78px no-repeat; height:22px; width:55px; padding-left:3px; color:#fff; font-size:12px; line-height:22px; font-weight:normal;}
-.por_h2_index{ font-size:20px; font-weight:normal; color:#3b94d6; width:100%; border-bottom:1px solid #e8e5e5; height:40px; line-height:40px;}
+.por_h2_index{ font-size:18px; font-weight:normal; color:#3b94d6; width:100%; border-bottom:1px solid #e8e5e5; height:40px; line-height:40px;}
a.por_more_index{ font-size:12px; color:#999; }
.por_hotbar_left li{ width:365px; padding:12px 5px 12px 0; border-bottom:1px dashed #e8e5e5;}
-a.por_hot_title{ font-size:16px; display:block; font-weight:bold; width:365px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
-.por_hot_txt{ color:#666; line-height:20px;max-height:60px;overflow:hidden;text-overflow:ellipsis;}
+a.por_hot_title{ font-size:16px; display:block; width:365px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color: #02253f;}
+.por_hot_txt{ color:#637379; line-height:20px;max-height:60px;overflow:hidden;text-overflow:ellipsis;}
.por_time{ color:#999;}
a.por_hot_name{color:#3b94d6;}
-.por_hotbar_right{ border:1px solid #e8e5e5; padding:5px; margin-top:15px; width:300px;}
+.por_hotbar_right{ padding:5px 0 5px 10px; margin-top:15px; width:300px; }
.por_hotbar_right img{ width:300px; height:246px;}
-.por_hot_title_r{ font-size:16px; display:block; font-weight:bold; width:300px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
+.por_hot_title_r{ font-size:16px; display:block; width:300px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color: #02253f;}
.por_hot_txt_r{color:#666; line-height:20px;max-height:80px;overflow:hidden;text-overflow:ellipsis;}
.por_course{ }
-.por_course_bar{ width:328px; margin:0 7px; padding:20px 0; border-bottom:1px solid #e8e5e5;}
-a.por_course_title{font-size:14px; margin-bottom:10px; display:block; font-weight:bold; width:328px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
+.por_course_bar{ width:328px; margin:0 7px; padding:20px 0 0px;}
+a.por_course_title{font-size:16px; margin-bottom:10px; display:block; width:328px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color: #02253f;}
.por_course_bar img{ width:140px; height:100px; }
-.por_course_txt { width:180px; margin-left:5px;color:#666; line-height:20px;max-height:80px;overflow:hidden;text-overflow:ellipsis;}
+.por_course_txt { width:180px; margin-left:5px;color:#637379; line-height:20px;max-height:80px;overflow:hidden;text-overflow:ellipsis;}
.por_course_time{color:#3b94d6; margin-left:5px;}
-.por_post{ border-bottom:1px solid #e8e5e5; padding-bottom:5px;}
-.por_post_left{ width:394px; margin-top:15px;}
+.por_post{ padding-bottom:5px;}
+.por_post_left{ width:385px; margin-top:15px; margin-right: 9px;}
.por_post_leftbar img{ width:377px; height:163px;}
.por_post_leftbar { border-bottom:1px dashed #e8e5e5; padding-bottom:5px; margin-bottom:10px;}
-a.por_post_title{font-size:18px; display:block; width:377px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
-.por_post_txt{color:#666; line-height:20px;max-height:40px;overflow:hidden;text-overflow:ellipsis; }
-.post_icons_grey{ width:5px; height:5px; margin:10px 5px 0 0; background-color:#b3b3b3; display:block; line-height:20px;}
-.por_post_list li{ height:20px; height:30px;}
+a.por_post_title{font-size:18px; display:block; width:377px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; color: #02253f;}
+.por_post_txt{color:#637379; line-height:20px;max-height:40px;overflow:hidden;text-overflow:ellipsis; margin-bottom: 5px;}
+.post_icons_grey{ width:4px; height:4px; margin:10px 5px 0 0; background-color:#b3b3b3; display:block; line-height:20px;}
+.por_post_list li{ height:35px;}
.por_post_list li a{ font-size:14px; }
-a.por_hidden_w390{ display:block; width:390px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
-a.por_hidden_w270{ display:block; width:280px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
+a.por_hidden_w390{ display:block; width:390px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; color: #02253f;}
+a.por_hidden_w270{ display:block; width:280px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; color: #02253f;}
.por_post_right{ width:280px; border-left:1px solid #e8e5e5; margin-top:15px; padding-left:10px;}
.por_news_list li{ padding:15px 0; border-bottom:1px dashed #e8e5e5;}
-.por_users_img{ width:40px; height:40px; border:1px solid #e8e5e5;}
+.por_users_img{ width:40px; height:40px; -webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;}
.por_news_txt{ width:245px; margin-left:10px;}
.por_news_p{ line-height:20px;max-height:40px;min-width:240px;overflow:hidden;text-overflow:ellipsis; }
a.por_zan{ background:url(../images/org_custom/icons_por.png) 0 -41px no-repeat; height:15px; width:20px; display:block; padding-left:15px; line-height:20px; color:#999;}
a.por_zan:hover{background:url(../images/org_custom/icons_por.png) -34px -42px no-repeat; color:#3b94d6; }
-.por_hidden_w205{ font-size:14px; display:block; width:205px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
-.por_projects{border-bottom:1px solid #e8e5e5; padding-bottom:10px; margin-top:10px;}
+.por_hidden_w205{ font-size:14px; display:block; width:205px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; color: #02253f;}
+.por_projects{ padding-bottom:10px; margin-top:10px;}
.por_projects ul li{ padding:5px 0;}
.por_projects ul{ margin-top:5px;}
-.por_project_p{ line-height:20px;max-height:40px;overflow:hidden;text-overflow:ellipsis; margin-top:5px; margin-left:10px; color:#666; }
+.por_project_p{ line-height:20px;max-height:40px;overflow:hidden;text-overflow:ellipsis; margin-top:5px; margin-left:10px; color:#637379; margin-bottom: 5px;}
.por_project_li{border-bottom:1px dashed #ccc; padding-bottom:10px; margin-bottom:5px;}
.por_time a{ color:#3b94d6;}
.por_teachers{ margin-top:20px; }
#por_teachers_nav {border-bottom:1px solid #d0d0d0; height:31px;}
#por_teachers_nav li {float:left; padding:0px 5px; text-align:center; }
-#por_teachers_nav li a{font-size:20px;}
-.por_teachers_hover {border:1px solid #d0d0d0; border-bottom:1px solid #fff; }
+#por_teachers_nav li a{font-size:18px;}
+.por_teachers_hover { }
.por_teachers_hover a{color:#3b94d6;}
.por_teachers_nomal {border-bottom:none; }
.por_teachers_nomal a{color:#999;}
@@ -76,9 +76,9 @@ a.por_zan:hover{background:url(../images/org_custom/icons_por.png) -34px -42px n
.dis {display:block;}
a.por_more_teacher{ font-size:12px; }
.por_teachers_li{ margin-top:10px;}
-.por_teachers_li li{ padding:10px 0;border-bottom:1px solid #e8e5e5;}
+.por_teachers_li li{ padding:10px 0;}
.por_teachers_img{ width:60px; height:60px; -webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;}
-a.por_teachers_name{ display:block; width:75px; font-size:18px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
+a.por_teachers_name{ display:block; width:75px; font-size:18px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; color: #02253f;}
.por_teachers_p{ font-size:14px; color:#999; width:150px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.por_teachers_span{ color:#999;}
.por_teachers_span a{ margin:0 5px; color:#999;}
@@ -88,22 +88,4 @@ a.por_teachers_name{ display:block; width:75px; font-size:18px;overflow:hidden;
.por_footer_con ul li{ float:left; text-align:center;}
.por_footer_con ul li a{ font-size:14px;}
.por_footer_con ul li a span{ color:#999; margin:0 15px ;}
-.por_footer_con p{ text-align:center; margin-top:20px; color:#777;}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+.por_footer_con p{ text-align:center; margin-top:20px; color:#777;}
\ No newline at end of file
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index 90a94b52f..d8b8cc74a 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -1246,3 +1246,12 @@ a.pages-big{ width:50px;}
.red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
+
+/*未登录回复提示*/
+.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
+
+/*更新资源文件的描述框*/
+.H60 {height:60px !important;}
+.W420 {width:420px;}
+.W300 {width:300px !important;}
+.W600{ width:600px;}
\ No newline at end of file
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index d9306fa0b..333c410ca 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -1029,7 +1029,8 @@ span.at a{color:#269ac9;text-decoration: none;}
.blueBtn:hover {background-color:#298fbd;}
a.blue-btn{ padding:4px 7px; color:#FFF; border:none; background-color:#269ac9; cursor:pointer; text-align:center;}
a.blue-btn:hover {background-color:#298fbd;}
-
+a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
+a:hover.Blue-btn{ background:#3598db; color:#fff;}
/*文本描述展开高度*/
.maxh360 {max-height: 810px;}
.lh18 { line-height: 18px;}
@@ -1161,3 +1162,6 @@ a.st_down{ display: block; width:8px; float:left; height:13px; background:url(..
.shadowbox_news_list li:hover{ background-color:#eee;}
span.shadowbox_news_user{ color:#3b94d6;}
a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;}
+
+/*未登录回复提示*/
+.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
diff --git a/spec/controllers/syllabuses_controller_spec.rb b/spec/controllers/syllabuses_controller_spec.rb
new file mode 100644
index 000000000..72c43dff1
--- /dev/null
+++ b/spec/controllers/syllabuses_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe SyllabusesController, :type => :controller do
+
+end
diff --git a/spec/factories/syllabuses.rb b/spec/factories/syllabuses.rb
new file mode 100644
index 000000000..436972e39
--- /dev/null
+++ b/spec/factories/syllabuses.rb
@@ -0,0 +1,9 @@
+# Read about factories at https://github.com/thoughtbot/factory_girl
+
+FactoryGirl.define do
+ factory :syllabus do
+ title "MyString"
+ description "MyText"
+ user nil
+ end
+end
diff --git a/spec/models/syllabus_spec.rb b/spec/models/syllabus_spec.rb
new file mode 100644
index 000000000..6072c09ce
--- /dev/null
+++ b/spec/models/syllabus_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe Syllabus, :type => :model do
+ pending "add some examples to (or delete) #{__FILE__}"
+end