diff --git a/app/controllers/org_subfields_controller.rb b/app/controllers/org_subfields_controller.rb
index 3edda8285..2b41983cc 100644
--- a/app/controllers/org_subfields_controller.rb
+++ b/app/controllers/org_subfields_controller.rb
@@ -14,9 +14,10 @@ class OrgSubfieldsController < ApplicationController
SubfieldSubdomainDir.create(:org_subfield_id => @subfield.id, :name => params[:sub_dir].downcase)
end
end
- @subfield.update_attributes(:field_type => params[:field_type])
+ #默认类型为帖子
+ @subfield.update_attributes(:field_type => params[:field_type]||"Post")
# admin配置的类型
- update_status_by_type(@subfield, params[:field_type])
+ update_status_by_type(@subfield, params[:field_type]||"Post")
else
@res = false
end
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/syllabus.html.erb b/app/views/courses/syllabus.html.erb
index 66bc8ff9a..f2d9cbdbd 100644
--- a/app/views/courses/syllabus.html.erb
+++ b/app/views/courses/syllabus.html.erb
@@ -184,20 +184,24 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@article.author_id), :alt => "用户头像" %>
-
- <%= form_for 'blog_comment',:url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id},:method => "post",:html => {:multipart => true, :id => 'message_form'} do |f|%>
-
-
-
-
-
-
-
-
发送
-
-
- <% end%>
-
+ <% if User.current.logged? %>
+
+ <%= form_for 'blog_comment',:url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id},:method => "post",:html => {:multipart => true, :id => 'message_form'} do |f|%>
+
+
+
+
+
+
+
+
发送
+
+
+ <% end%>
+
+ <% else %>
+ <%= render :partial => "users/show_unlogged" %>
+ <% end %>
diff --git a/app/views/forums/create.js.erb b/app/views/forums/create.js.erb
index 88e535e72..bea3f3872 100644
--- a/app/views/forums/create.js.erb
+++ b/app/views/forums/create.js.erb
@@ -1,6 +1,7 @@
<%if @save_flag%>
-$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
-$('#reorder_time').click();
+//$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
+//$('#reorder_time').click();
+ window.location.href= "http://"+"<%= Setting.host_name%>"+"/forums/" + "<%= @forum.id%>"
<%else%>
-$("#error").html("<%= @forum.errors.full_messages[0]%>").show();
-<%end %>
\ No newline at end of file
+ $("#error").html("<%= @forum.errors.full_messages[0]%>").show();
+<%end %>
diff --git a/app/views/issues/_issue_replies.html.erb b/app/views/issues/_issue_replies.html.erb
index 197cd9c02..7b5383c1e 100644
--- a/app/views/issues/_issue_replies.html.erb
+++ b/app/views/issues/_issue_replies.html.erb
@@ -62,23 +62,27 @@
-
- <%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %>
- <%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
-
-
-
-
-
-
-
- <%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
-
-
-
发送
-
- <% end %>
-
+ <% if User.current.logged? %>
+
+ <%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %>
+ <%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
+
+
+
+
+
+
+
+ <%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
+
+
+
发送
+
+ <% end %>
+
+ <% else %>
+ <%= render :partial => "users/show_unlogged" %>
+ <% end %>
diff --git a/app/views/issues/_issue_reply_ke_form.html.erb b/app/views/issues/_issue_reply_ke_form.html.erb
index a2975237b..7fbb0d191 100644
--- a/app/views/issues/_issue_reply_ke_form.html.erb
+++ b/app/views/issues/_issue_reply_ke_form.html.erb
@@ -5,21 +5,25 @@
<%= render :partial => 'courses/recommendation', :locals => {:course => @course} %>
-
访问计数 <%= @course.visits.to_i %> (自<%= Time.now.year %>年<%= Time.now.month %>月)
+
访问计数 <%= @course.visits.to_i %> (自2016年5月)
diff --git a/app/views/layouts/base_org.html.erb b/app/views/layouts/base_org.html.erb
index 114bb7219..9ba31bfe6 100644
--- a/app/views/layouts/base_org.html.erb
+++ b/app/views/layouts/base_org.html.erb
@@ -136,7 +136,7 @@
<%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %>
- 访问计数 <%= @organization.visits.to_i %> (自<%= Time.now.year %>年<%= Time.now.month %>月)
+ 访问计数 <%= @organization.visits.to_i %> (自2016年5月)
- 访问计数 <%= @project.visits.to_i %> (自<%= Time.now.year %>年<%= Time.now.month %>月)
+ 访问计数 <%= @project.visits.to_i %> (自2016年5月)
diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb
index a7d908212..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 %> (自<%= Time.now.year %>年<%= Time.now.month %>月)
+ 访问计数 <%= @user.visits.to_i %> (自2016年5月)