diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb
index 6ebe6b9eb..3332f1207 100644
--- a/app/controllers/forums_controller.rb
+++ b/app/controllers/forums_controller.rb
@@ -296,12 +296,12 @@ class ForumsController < ApplicationController
#检查forum的名字
def check_forum_name
- forum_name_exist = false
- # if params[:forum_id]
- # forum_name_exist = Forum.where("name = '#{params[:forum_name]}' and id != #{params[:forum_id]}").count >= 1 ? true : false
- # else
+ forum_name_exist = true
+ if params[:forum_id]
+ forum_name_exist = Forum.where("name = '#{params[:forum_name]}' and id != #{params[:forum_id]}").count >= 1 ? true : false
+ else
forum_name_exist = Forum.where("name = '#{params[:forum_name]}' ").count >= 1 ? true : false
- # end
+ end
render :text => forum_name_exist
end
diff --git a/app/views/files/_attachment_history_popub.html.erb b/app/views/files/_attachment_history_popub.html.erb
index c0a833030..6fed80053 100644
--- a/app/views/files/_attachment_history_popub.html.erb
+++ b/app/views/files/_attachment_history_popub.html.erb
@@ -10,7 +10,7 @@
- |
+ 当前版本 |
<%= @attachment.downloads %> |
<%= @attachment.try(:quotes).to_i %> |
<%= format_time(@attachment.created_on) %> |
diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb
index ee467067b..1d245b809 100644
--- a/app/views/organizations/_org_left_subfield_list.html.erb
+++ b/app/views/organizations/_org_left_subfield_list.html.erb
@@ -43,11 +43,12 @@
$(this).prev().css("color","#808080");
$(this).css("z-index", "1");
});
+
//二级菜单滑动时箭头方向控制
$(".homepageLeftMenuMoreIcon").toggle(function(){
- $(this).css("background","url(/images/homepage_icon.png) -74px -240px no-repeat");
- },function(){
$(this).css("background","url(/images/homepage_icon.png) 100px -624px no-repeat");
+ },function(){
+ $(this).css("background","url(/images/homepage_icon.png) -74px -240px no-repeat");
});
})
@@ -55,7 +56,7 @@
<% organization.org_subfields.order("priority").each do |field| %>
<% if is_default_field?(field) %>
<% case field.name %>
- <% when 'activity' %>
+<% when 'activity' %>
@@ -102,15 +103,17 @@
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% end %>
<% else %>
- <%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
+
+
<% end %>
<% if User.current.logged? and User.current.admin_of_org?(organization) %>
<%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子" %>
<% end %>
-
+
+
- <%= render :partial => 'organizations/org_subdomain',:locals => {:subdomains => field.sub_domains.reorder('priority').uniq.limit(5), :org_subfield_id => field.id, :page=>1, :org_id => organization.id } %>
+ <%= render :partial => 'organizations/org_subdomain',:locals => {:subdomains => field.sub_domains.reorder('priority').uniq, :org_subfield_id => field.id} %>
@@ -136,7 +139,7 @@
<% elsif field.field_type == "Resource" %>