From 3465a39285618f787c5c4db8a90966192e95eb22 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 13:07:12 +0800 Subject: [PATCH 01/27] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=85=8D=E7=BD=AE=20?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index e344e64dd..ff94326a0 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -77,7 +77,7 @@ <% @subfield_content.each do |field| %> <% if is_default_field?(field) %> <% case field.name %> - <% when 'activity' %> + <% when 'activity' %> <%= link_to "首页", organization_path(@organization), :class => "fl navact" %> <% when 'course' %> 课程动态 @@ -92,6 +92,9 @@ <% end %> <% end %> <% end %> + <% if User.current.admin_of_org?(@organization) %> + 配置 + <% end %> @@ -109,7 +112,7 @@ <% when 'course' %>
-

课程动态

course activities

+

课程动态

course activities

    <% unless @course_acts_homework.nil? %> @@ -136,14 +139,12 @@
- -
<% when 'project' %>
-

项目动态

project activities

+

项目动态

project activities

<% unless @project_message_acts.nil? %>
@@ -177,7 +178,7 @@ <% ids = field.org_document_comments.map{|o| o.id}.join(",") %>
-

<%= field.name %><%= field.id %>

discussion zone

+

<%= field.name %>

discussion zone

<% message_ats.each do |act| %> @@ -206,7 +207,7 @@ <% org_attachs = get_attach_org2(field) %>
-

<%= field.name %><%= field.id %>

resource dwonload

+

<%= field.name %>

resource dwonload

<%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %> From 20ea251cabb4b4b4277883ee8e72faa9e373bc9d Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 14:01:09 +0800 Subject: [PATCH 02/27] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20160331060004_add_type_to_organization.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 db/migrate/20160331060004_add_type_to_organization.rb diff --git a/db/migrate/20160331060004_add_type_to_organization.rb b/db/migrate/20160331060004_add_type_to_organization.rb new file mode 100644 index 000000000..e9313433b --- /dev/null +++ b/db/migrate/20160331060004_add_type_to_organization.rb @@ -0,0 +1,5 @@ +class AddTypeToOrganization < ActiveRecord::Migration + def change + add_column :organizations, :type, :integer, :default => true + end +end From cf946687d0a8f7c1f6892b15929c35b3cc2956b3 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 31 Mar 2016 14:02:35 +0800 Subject: [PATCH 03/27] =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/_subfield_list.html.erb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb index d907ac33e..e86ef5dae 100644 --- a/app/views/organizations/_subfield_list.html.erb +++ b/app/views/organizations/_subfield_list.html.erb @@ -2,6 +2,7 @@
  • 顺序
  • 已有栏目
  • 状态
  • +
  • 排列
  • 类型
  • 域名目录
  • @@ -21,6 +22,9 @@
  • <%= name %>
  • 默认
  • +
  • + 相关 +
  • 默认
  • <%= field.hide==0?"设为隐藏":"设为可见" %>
    @@ -42,6 +46,10 @@
  • 新增
  • +
  • + + 相关 +
  • <%= field.field_type == "Post" ? "帖子" : "资源" %>
  • <%= 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 %> +
    + +
    + <%= 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;"}) %> + <% end %>
  • 默认
  • <%= field.hide==0?"设为隐藏":"设为可见" %> @@ -47,8 +54,14 @@
  • 新增
  • - - 相关 + <%= 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 %> +
    + +
    + <%= 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;"}) %> + <% end %>
  • <%= field.field_type == "Post" ? "帖子" : "资源" %>