diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb
index 59f32bda0..84b38e628 100644
--- a/app/helpers/organizations_helper.rb
+++ b/app/helpers/organizations_helper.rb
@@ -63,12 +63,12 @@ module OrganizationsHelper
def subfield_status_option
type = []
option1 = []
- option1 << 0
- option1 << 0
+ option1 << "列表"
+ option1 << "1"
type << option1
option2 = []
- option2 << 1
- option2 << 1
+ option2 << "图片"
+ option2 << "0"
type << option2
type
end
diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb
index 7b3bdb754..f2210ae3a 100644
--- a/app/views/layouts/base_org_newstyle.html.erb
+++ b/app/views/layouts/base_org_newstyle.html.erb
@@ -110,75 +110,103 @@
<% if is_default_field?(field) %>
<% case field.name %>
<% when 'course' %>
+
+
+
<%= field.name %>
-
- <%= render :partial => 'organizations/org_new_project_act_list', :locals =>{:activities => @project_acts, :field => field, :organization => @organization} %>
-
-
-
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
-
+ <% if @project_acts.nil? %>
+
暂无内容,敬请期待!
+ <% else %>
+
+ <%= render :partial => 'organizations/org_new_project_act_list', :locals =>{:activities => @project_acts, :field => field, :organization => @organization} %>
+
+
+
+ <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
+
+ <% end %>
+
<% end %>
@@ -188,31 +216,43 @@
<% message_ats = get_message_org(@organization.id, field.id) %>
<% ids = field.org_document_comments.map{|o| o.id}.join(",") %>
- <% if false %>
+ <% if field.status == 0 %>
<%= field.name %>
-
-
+ <% if message_ats.nil? %>
+ 暂无内容,敬请期待!
+ <% else %>
+
+
+
+ <% message_ats.each do |act| %>
+ <%= render :partial => 'organizations/org_new_forum_pic', :locals => {:activity => act, :field => field, :organization => @organization} %>
+ <% end %>
+
+
+ <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
+
+
+ <% end %>
- <% message_ats.each do |act| %>
- <%= render :partial => 'organizations/org_new_forum_pic', :locals => {:activity => act, :field => field, :organization => @organization} %>
- <% end %>
-
-
-
<% else %>
<%= field.name %>
-
- <% message_ats.each do |act| %>
- <%= render :partial => 'organizations/org_new_forum_list', :locals => {:activity => act, :field => field, :organization => @organization} %>
- <% end %>
-
-
-
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
-
+ <% if message_ats.nil? %>
+
暂无内容,敬请期待!
+ <% else %>
+
+ <% message_ats.each do |act| %>
+ <%= render :partial => 'organizations/org_new_forum_list', :locals => {:activity => act, :field => field, :organization => @organization} %>
+ <% end %>
+
+
+
+ <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
+
+ <% end %>
+
<% end %>
@@ -221,15 +261,20 @@
<% org_attachs = get_attach_org2(field) %>
-
<%= field.name %>
resource dwonload
-
- <%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %>
-
-
+
<%= field.name %>
+ <% if org_attachs.nil? %>
+
暂无内容,敬请期待!
+ <% else %>
+
+ <%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %>
+
+
+
+
+ <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
+
+ <% end %>
-
- <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
-
diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb
index 6a405e73a..e16e91486 100644
--- a/app/views/organizations/_subfield_list.html.erb
+++ b/app/views/organizations/_subfield_list.html.erb
@@ -2,7 +2,7 @@
顺序
已有栏目
状态
-
排列
+
排列
类型
域名目录
@@ -22,9 +22,9 @@
<%= name %>
默认
-
+
<%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %>
-
新增
-
+
+ <% if field.field_type == "Resource" %>
+ 列表
+ <% else %>
<%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %>
- <%=field.status %>
+
<%=field.status== 1 ? "列表" : "图片" %>
<%= select( :name,:group_id, subfield_status_option,
{ :include_blank => false,:selected => field.status},
- {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:30px;"}) %>
+ {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:40px;"}) %>
<% end %>
+
+ <% end %>
<%= field.field_type == "Post" ? "帖子" : "资源" %>
@@ -79,7 +84,7 @@
<%#= link_to "隐藏", hide_org_subfield_organizations_path(field), :method => 'post', :remote => true, :id => "hide_#{field.id}", :class => "linkBlue fr mr5" %>
-
<%= field.hide==0?"设为隐藏":"设为可见" %>
+
<%= field.hide==0?"隐藏":"可见" %>
<%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkBlue fr mr10" %>
编辑
@@ -195,7 +200,7 @@
$(edit_id).hide();
}
function hide(content, id){
- if (content.text() == '设为隐藏')
+ if (content.text() == '隐藏')
$.ajax({
url: "/organizations/hide_org_subfield?org_subfield_id=" + id,
type: "post"
diff --git a/app/views/organizations/hide_org_subfield.js.erb b/app/views/organizations/hide_org_subfield.js.erb
index 18241c269..4affb39fb 100644
--- a/app/views/organizations/hide_org_subfield.js.erb
+++ b/app/views/organizations/hide_org_subfield.js.erb
@@ -1,2 +1,2 @@
-$("#hide_<%= @org_subfield.id %>").text("设为可见");
+$("#hide_<%= @org_subfield.id %>").text("可见");
$("#org_subfield_<%= @org_subfield.id %>").css("display", "none");
\ No newline at end of file
diff --git a/app/views/organizations/show_org_subfield.js.erb b/app/views/organizations/show_org_subfield.js.erb
index 165b07afd..78b404b6f 100644
--- a/app/views/organizations/show_org_subfield.js.erb
+++ b/app/views/organizations/show_org_subfield.js.erb
@@ -1,2 +1,2 @@
-$("#hide_<%= @org_subfield.id %>").text("设为隐藏");
+$("#hide_<%= @org_subfield.id %>").text("隐藏");
$("#org_subfield_<%= @org_subfield.id %>").css("display", "block");
\ No newline at end of file
diff --git a/db/schema.rb b/db/schema.rb
index 732a42c6f..a3fb50eca 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 => 20160331060004) do
+ActiveRecord::Schema.define(:version => 20160331063938) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -1289,6 +1289,7 @@ ActiveRecord::Schema.define(:version => 20160331060004) do
t.datetime "updated_at", :null => false
t.string "field_type"
t.integer "hide", :default => 0
+ t.integer "status", :default => 1
end
create_table "organizations", :force => true do |t|
@@ -1302,7 +1303,6 @@ ActiveRecord::Schema.define(:version => 20160331060004) do
t.boolean "allow_guest_download", :default => true
t.integer "visits", :default => 0
t.integer "show_mode", :default => 0
- t.integer "type", :default => 1
end
create_table "phone_app_versions", :force => true do |t|
diff --git a/public/stylesheets/org.css b/public/stylesheets/org.css
index f2a3dd3c9..9dad153a3 100644
--- a/public/stylesheets/org.css
+++ b/public/stylesheets/org.css
@@ -18,12 +18,12 @@
.orgUrlInput {width:200px; outline:none; border:1px solid #eaeaea; height:22px;}
a.saveBtn {padding:3px 5px; background-color:#269ac9; color:#ffffff;}
a.saveBtn:hover {background-color:#297fb8;}
-.orgMemberList {width:460px; float:left;}
+.orgMemberList {width:480px; float:left;}
.orgListRow {border-bottom:1px solid #e4e4e4; padding-bottom:5px;}
.orgListUser {width:85px; float:left;}
.orgListRole {width:180px; float:left;}
.orgOrder {width:30px; float:left;margin-right:10px;text-align:center;}
-.orgMemContainer {width:228px;}
+.orgMemContainer {width:208px;}
.orgMemberAdd {float:right;}
.orgAddSearch {border:1px solid #dddddd; outline:none; width:180px; height:22px; color:#9b9b9b;}
.undis {display:none;}
@@ -75,7 +75,8 @@ a.linkGrey8:hover {color:#585858;}
#orgUserName {display:inline-block;}
.org_login_list a {color:#269ac9;}
-.orgListStatus {width:55px; float:left;}
+.orgListStatus {width:40px; float:left;}
+.orgListStatusList {width:55px; float:left;}
.personalUrl {border:1px solid #dddddd; width:75px; outline:none; white-space:nowrap; padding-left:2px;}
.reCon{ margin:5px; width:710px;}
.retop{width:710px; height:40px; background:#eaeaea; padding:5px;}
diff --git a/public/stylesheets/org_new_style.css b/public/stylesheets/org_new_style.css
index eb5a7c088..83fab83eb 100644
--- a/public/stylesheets/org_new_style.css
+++ b/public/stylesheets/org_new_style.css
@@ -182,6 +182,8 @@ a:hover.more-btn{ background:#29146f; color:#fff;}
a:hover.more-btn-center{ background:#29146f; color:#fff;}
.mt30{ margin-top:30px;}
+.nocontent{ font-size:30px; color:#888; margin:150px auto; text-align:center;}
+