diff --git a/app/controllers/admin/new_interface_module_apps_controller.rb b/app/controllers/admin/new_interface_module_apps_controller.rb
deleted file mode 100644
index 8cf77e5e..00000000
--- a/app/controllers/admin/new_interface_module_apps_controller.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-class Admin::NewInterfaceModuleAppsController < ApplicationController
- before_filter :authenticate_user!
- before_filter :is_admin?
- include AdminHelper
-
- layout "new_admin"
-
- def setting
- @sys_users = User.all(conditions: {admin: false})
- @module_app = ModuleApp.find(params[:module_app_id])
- @options_from_collection_for_select_bulletin_categorys = [@module_app].collect{|ma| [ma.title,ma.id] }
- # if params.has_key? :category
- # @bulletin_category = BulletinCategory.find params[:category][:id]
- # else
- # @bulletin_category = @bulletin_categorys.first
- # end
- @users_array = @module_app.managing_users rescue []
-
- respond_to do |format|
- format.html
- format.js
- end
- end
-
- def update_setting
- module_app = update_setting_by_params
- if module_app.save!
- flash[:notice] = "Update Done"
- else
- flash[:notice] = "Update Failed"
- end
- end
-
- def user_list
- @module_app = ModuleApp.find params[:module_app][:id]
- end
-
- protected
- def update_setting_by_params
- ma = ModuleApp.find params[:module_app][:id]
- user_sat = User.find params[:users].keys
- users_to_new = user_sat - ma.managing_users
- users_to_remove = ma.managing_users - user_sat
-
- users_to_new.each do |new_user|
- ma.assign_manager(new_user,current_user)
- end
-
- users_to_remove.each do |remove_user|
- ma.remove_manager(remove_user)
- end
- ma
- end
-
- def get_categorys(id = nil)
- @bulletin_categorys = []
- if(is_manager? || is_admin?)
- @bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.excludes('disabled' => true))
- elsif is_sub_manager?
- @bulletin_categorys = BulletinCategory.authed_for_user(current_user,'submit_new')
- end
- end
-
-
-
-end
\ No newline at end of file
diff --git a/app/views/admin/new_interface_module_apps/_modal_list.html.erb b/app/views/admin/new_interface_module_apps/_modal_list.html.erb
deleted file mode 100644
index b5b0ebcd..00000000
--- a/app/views/admin/new_interface_module_apps/_modal_list.html.erb
+++ /dev/null
@@ -1,42 +0,0 @@
-<% if module_app -%>
-
-
-
-
-
- <% module_app.managing_users.each do |user| %>
-
-
- <% if user.avatar? %>
- <%= image_tag(user.avatar.thumb.url,:class => "member-img") %>
- <% else %>
- <%= image_tag "person.png",:class => "member-img" %>
- <% end %>
-
- <%= label_tag "lab-user-#{user.id}", (user.name rescue ''),:class=>"member-name",:id=>nil -%>
-
- <% end -%>
-
-
-
-
-
-
-
-
-
-<% end -%>
\ No newline at end of file
diff --git a/app/views/admin/new_interface_module_apps/_privilege_user.html.erb b/app/views/admin/new_interface_module_apps/_privilege_user.html.erb
deleted file mode 100644
index 90f5cb65..00000000
--- a/app/views/admin/new_interface_module_apps/_privilege_user.html.erb
+++ /dev/null
@@ -1,25 +0,0 @@
-<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%>
- <% @sys_users.each do |sys_user| -%>
-
-
-
- <% sys_user.sub_roles.each do |sr| %>
-
<%= sr.key %>
- <% end %>
- <%= content_tag :div,:data=>{'original-title'=>t('announcement.bulletin.approval_setting_window_title'),:content => "#{sys_user.sub_roles.collect{|sr| sr.i18n_variable[I18n.locale]}.join(',')}"},:class=>"checkbox clear" do %>
-
-
-
- <% if sys_user.avatar? %>
- <%= image_tag(sys_user.avatar.thumb.url,:class => "member-img") %>
- <% else %>
- <%= image_tag "person.png",:class => "member-img" %>
- <% end %>
-
- <%= label_tag "lab-user-#{sys_user.id}", (sys_user.name rescue ''),:class=>"member-name",:id=>nil -%>
- <%= check_box_tag "[users][#{sys_user.id}]", 'true',users.include?(sys_user),:class => "check" -%>
- <%end -%>
-
-
- <% end -%>
-<% end -%>
\ No newline at end of file
diff --git a/app/views/admin/new_interface_module_apps/setting.html.erb b/app/views/admin/new_interface_module_apps/setting.html.erb
deleted file mode 100644
index 7d1179f0..00000000
--- a/app/views/admin/new_interface_module_apps/setting.html.erb
+++ /dev/null
@@ -1,56 +0,0 @@
-<% content_for :page_specific_css do %>
- <%= stylesheet_link_tag "inc/permission-checkbox" %>
-<% end %>
-<% content_for :page_specific_javascript do %>
- <%= javascript_include_tag "inc/permission-checkbox" %>
- <%= javascript_include_tag "inc/search" %>
- <%= javascript_include_tag "inc/modal-preview" %>
-<% end %>
-<%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
-<%= form_tag('', :remote => true,:class => "prevent_enter_submit_form") %>
-
-
- -
-
- <%= label_tag :module, t("module") %>
- <%= select "module_app",'id',@options_from_collection_for_select_bulletin_categorys %>
- <%= search_field_tag 'user_filter' %>
-
-
-
-
- <%= link_to t("admin.user_role.auth.manager"), admin_module_app_manager_auth_show_path , :class=>'preview_trigger btn btn-success pull-right'%>
-
-
-<%#= label_tag :role, t("admin.roles") %>
-
-<%= content_tag :div do -%>
- <% form_tag admin_module_app_manager_auth_proc_path do %>
- <%= render :partial => "privilege_user", :locals => {:users => @users_array} %>
-
- <% end -%>
-<% end -%>
-
-
-
\ No newline at end of file
diff --git a/app/views/admin/new_interface_module_apps/setting.js.erb b/app/views/admin/new_interface_module_apps/setting.js.erb
deleted file mode 100644
index 0ca148da..00000000
--- a/app/views/admin/new_interface_module_apps/setting.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$("#users_checkbox_ary").replaceWith('<%= escape_javascript(render :partial => "privilege_user", :locals => {:users => @users_array})%>');
-permissionCheckbox();
\ No newline at end of file
diff --git a/app/views/admin/new_interface_module_apps/update_setting.js.erb b/app/views/admin/new_interface_module_apps/update_setting.js.erb
deleted file mode 100644
index 7486000a..00000000
--- a/app/views/admin/new_interface_module_apps/update_setting.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-alert( "<% flash.each do |key, msg| %><%= msg %><% end%>");
\ No newline at end of file
diff --git a/app/views/admin/new_interface_module_apps/user_list.js.erb b/app/views/admin/new_interface_module_apps/user_list.js.erb
deleted file mode 100644
index 7caf1e39..00000000
--- a/app/views/admin/new_interface_module_apps/user_list.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$('#show_preview').html("<%= escape_javascript(render(:partial => 'modal_list',:locals => {:module_app => @module_app})) %>");
-var start_modal_with_id = "module_app-<%=@module_app.id%>"
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 63d70d30..d2294c17 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -16,6 +16,11 @@ Orbit::Application.routes.draw do
resources :assets
resources :app_auths
resources :object_auths do
+ match 'new_interface/:ob_type/:title/new' => "object_auths_new_interface#new" ,:as => :init_ob_auth,:via => :get
+ match 'new_interface' => "object_auths_new_interface#setting" ,:as => :ob_auth,:via => :get
+ match 'new_interface' => "object_auths_new_interface#update_setting" ,:as => :ob_auth,:via => :post
+ match 'new_interface' => "object_auths_new_interface#user_list" ,:as => :ob_auth_show,:via => :put
+
collection do
match 'new/:type/:obj_id',:action => 'new',:via => "get",:as => :init
end
@@ -62,9 +67,9 @@ Orbit::Application.routes.draw do
end
end
resources :module_apps do
- match 'manager_auth_proc' => "new_interface_module_apps#setting" ,:as => :manager_auth_proc,:via => :get
- match 'manager_auth_proc' => "new_interface_module_apps#update_setting" ,:as => :manager_auth_proc,:via => :post
- match 'manager_auth_proc' => "new_interface_module_apps#user_list" ,:as => :manager_auth_show,:via => :put
+ match 'manager_auth_proc' => "module_apps_new_interface#setting" ,:as => :manager_auth_proc,:via => :get
+ match 'manager_auth_proc' => "module_apps_new_interface#update_setting" ,:as => :manager_auth_proc,:via => :post
+ match 'manager_auth_proc' => "module_apps_new_interface#user_list" ,:as => :manager_auth_show,:via => :put
resources :app_auths do
member do
match 'remove/:type/:target_id' ,:action=> 'remove',:via => "delete",:as =>:remove
diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_category_setting_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_category_setting_controller.rb
deleted file mode 100644
index 8903adb2..00000000
--- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_category_setting_controller.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-class Panel::Announcement::BackEnd::BulletinCategorySettingController < OrbitBackendController
- before_filter :authenticate_user!
- before_filter :for_app_manager
- include AdminHelper
- # layout 'admin'
- def preview_and_approve
- @bulletin = Bulletin.find params[:bulletin_id]
- end
-
- # def approve
- #
- # end
-
- def setting
- @sys_users = User.all(conditions: {admin: false})
- @bulletin_categorys = []
- @bulletin_categorys << BulletinCategory.find(params[:bulletin_category_id])
- @options_from_collection_for_select_bulletin_categorys = @bulletin_categorys.collect{|bc| [bc.i18n_variable[I18n.locale],bc.id] }
- if params.has_key? :category
- @bulletin_category = BulletinCategory.find params[:category][:id]
- else
- @bulletin_category = @bulletin_categorys.first
- end
- preload_object_auth = @bulletin_category.object_auths.where(title: 'submit').empty?? (@bulletin_category.object_auths.create! :title=> 'submit') : @bulletin_category.object_auths.where(title: 'submit')
- @users_array = preload_object_auth.first.privilege_users rescue []
- respond_to do |format|
- format.html
- format.js
- end
- end
-
- def update_setting
- object_auth = update_setting_by_params
- if object_auth.save!
- flash[:notice] = "Update Done"
- else
- flash[:notice] = "Update Failed"
- end
- end
-
- def user_list
- @bulletin_category = BulletinCategory.find params[:category][:id]
- end
-
- protected
- def update_setting_by_params
- category = BulletinCategory.find params[:category][:id]
- privilege_users = params[:users].collect{|key,value| User.find key } rescue []
- object_auth_ary = category.object_auths.where(title: 'submit') || (category.object_auths.create :title=> 'submit')
- object_auth = object_auth_ary.first
- object_auth.privilege_users = privilege_users
- object_auth
- end
-
- def get_categorys(id = nil)
- @bulletin_categorys = []
- if(is_manager? || is_admin?)
- @bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.excludes('disabled' => true))
- elsif is_sub_manager?
- @bulletin_categorys = BulletinCategory.authed_for_user(current_user,'submit_new')
- end
- end
-
-end
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/_privilege_user.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/_privilege_user.html.erb
deleted file mode 100644
index 90f5cb65..00000000
--- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/_privilege_user.html.erb
+++ /dev/null
@@ -1,25 +0,0 @@
-<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%>
- <% @sys_users.each do |sys_user| -%>
-
-
-
- <% sys_user.sub_roles.each do |sr| %>
-
<%= sr.key %>
- <% end %>
- <%= content_tag :div,:data=>{'original-title'=>t('announcement.bulletin.approval_setting_window_title'),:content => "#{sys_user.sub_roles.collect{|sr| sr.i18n_variable[I18n.locale]}.join(',')}"},:class=>"checkbox clear" do %>
-
-
-
- <% if sys_user.avatar? %>
- <%= image_tag(sys_user.avatar.thumb.url,:class => "member-img") %>
- <% else %>
- <%= image_tag "person.png",:class => "member-img" %>
- <% end %>
-
- <%= label_tag "lab-user-#{sys_user.id}", (sys_user.name rescue ''),:class=>"member-name",:id=>nil -%>
- <%= check_box_tag "[users][#{sys_user.id}]", 'true',users.include?(sys_user),:class => "check" -%>
- <%end -%>
-
-
- <% end -%>
-<% end -%>
\ No newline at end of file
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/setting.js.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/setting.js.erb
deleted file mode 100644
index 0ca148da..00000000
--- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/setting.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$("#users_checkbox_ary").replaceWith('<%= escape_javascript(render :partial => "privilege_user", :locals => {:users => @users_array})%>');
-permissionCheckbox();
\ No newline at end of file
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/update_setting.js.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/update_setting.js.erb
deleted file mode 100644
index 7486000a..00000000
--- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/update_setting.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-alert( "<% flash.each do |key, msg| %><%= msg %><% end%>");
\ No newline at end of file
diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/user_list.js.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/user_list.js.erb
deleted file mode 100644
index 4c8bf25d..00000000
--- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/user_list.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$('#show_preview').html("<%= escape_javascript(render(:partial => 'modal_list',:locals => {:bulletin_category => @bulletin_category})) %>");
-var start_modal_with_id = "bulletin_category-<%=@bulletin_category.id%>"
\ No newline at end of file
diff --git a/vendor/built_in_modules/announcement/config/routes.rb b/vendor/built_in_modules/announcement/config/routes.rb
index c6a406b0..a9f1c496 100644
--- a/vendor/built_in_modules/announcement/config/routes.rb
+++ b/vendor/built_in_modules/announcement/config/routes.rb
@@ -21,11 +21,7 @@ Rails.application.routes.draw do
match "file_quick_edit/:bulletin_id" => "bulletins#file_quick_edit" ,:as => :file_quick_edit
end
- resources :bulletin_categorys do
- match 'submit_setting' => "bulletin_category_setting#setting" ,:as => :setting,:via => :get
- match 'submit_setting' => "bulletin_category_setting#update_setting" ,:as => :setting,:via => :post
- match 'submit_setting' => "bulletin_category_setting#user_list" ,:as => :user_list,:via => :put
- end
+ resources :bulletin_categorys
resources :bulletin_links, :controller => 'bulletin_links' do
match "link_quick_edit/:bulletin_link_id" => "bulletin_links#link_quick_edit" ,:as => :link_quick_edit
diff --git a/vendor/built_in_modules/news/app/controllers/panel/news/back_end/news_bulletin_category_setting_controller.rb b/vendor/built_in_modules/news/app/controllers/panel/news/back_end/news_bulletin_category_setting_controller.rb
deleted file mode 100644
index 6ac76973..00000000
--- a/vendor/built_in_modules/news/app/controllers/panel/news/back_end/news_bulletin_category_setting_controller.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-class Panel::News::BackEnd::NewsBulletinCategorySettingController < OrbitBackendController
- before_filter :authenticate_user!
- before_filter :for_app_manager
- include AdminHelper
- # layout 'admin'
- # def preview_and_approve
- # @bulletin = Bulletin.find params[:bulletin_id]
- # end
-
- # def approve
- #
- # end
-
- def setting
- @sys_users = User.all(conditions: {admin: false})
- @bulletin_categorys = []
- @bulletin_categorys << NewsBulletinCategory.find(params[:news_bulletin_category_id])
- @options_from_collection_for_select_bulletin_categorys = @bulletin_categorys.collect{|bc| [bc.i18n_variable[I18n.locale],bc.id] }
- if params.has_key? :category
- @bulletin_category = NewsBulletinCategory.find params[:category][:id]
- else
- @bulletin_category = @bulletin_categorys.first
- end
- preload_object_auth = @bulletin_category.object_auths.where(title: 'submit').empty?? (@bulletin_category.object_auths.create! :title=> 'submit') : @bulletin_category.object_auths.where(title: 'submit')
- @users_array = preload_object_auth.first.privilege_users rescue []
- respond_to do |format|
- format.html
- format.js
- end
- end
-
- def update_setting
- object_auth = update_setting_by_params
- if object_auth.save!
- flash[:notice] = "Update Done"
- else
- flash[:notice] = "Update Failed"
- end
- end
-
- def user_list
- @bulletin_category = NewsBulletinCategory.find params[:category][:id]
- end
-
- protected
- def update_setting_by_params
- category = NewsBulletinCategory.find params[:category][:id]
- privilege_users = params[:users].collect{|key,value| User.find key } rescue []
- object_auth_ary = category.object_auths.where(title: 'submit') || (category.object_auths.create :title=> 'submit')
- object_auth = object_auth_ary.first
- object_auth.privilege_users = privilege_users
- object_auth
- end
-
- def get_categorys(id = nil)
- @bulletin_categorys = []
- if(is_manager? || is_admin?)
- @bulletin_categorys = (id ? NewsBulletinCategory.find(id).to_a : NewsBulletinCategory.excludes('disabled' => true))
- elsif is_sub_manager?
- @bulletin_categorys = NewsBulletinCategory.authed_for_user(current_user,'submit_new')
- end
- end
-
-end
diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/_privilege_user.html.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/_privilege_user.html.erb
deleted file mode 100644
index 90f5cb65..00000000
--- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/_privilege_user.html.erb
+++ /dev/null
@@ -1,25 +0,0 @@
-<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%>
- <% @sys_users.each do |sys_user| -%>
-
-
-
- <% sys_user.sub_roles.each do |sr| %>
-
<%= sr.key %>
- <% end %>
- <%= content_tag :div,:data=>{'original-title'=>t('announcement.bulletin.approval_setting_window_title'),:content => "#{sys_user.sub_roles.collect{|sr| sr.i18n_variable[I18n.locale]}.join(',')}"},:class=>"checkbox clear" do %>
-
-
-
- <% if sys_user.avatar? %>
- <%= image_tag(sys_user.avatar.thumb.url,:class => "member-img") %>
- <% else %>
- <%= image_tag "person.png",:class => "member-img" %>
- <% end %>
-
- <%= label_tag "lab-user-#{sys_user.id}", (sys_user.name rescue ''),:class=>"member-name",:id=>nil -%>
- <%= check_box_tag "[users][#{sys_user.id}]", 'true',users.include?(sys_user),:class => "check" -%>
- <%end -%>
-
-
- <% end -%>
-<% end -%>
\ No newline at end of file
diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/setting.js.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/setting.js.erb
deleted file mode 100644
index 0ca148da..00000000
--- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/setting.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$("#users_checkbox_ary").replaceWith('<%= escape_javascript(render :partial => "privilege_user", :locals => {:users => @users_array})%>');
-permissionCheckbox();
\ No newline at end of file
diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/update_setting.js.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/update_setting.js.erb
deleted file mode 100644
index 7486000a..00000000
--- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/update_setting.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-alert( "<% flash.each do |key, msg| %><%= msg %><% end%>");
\ No newline at end of file
diff --git a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/user_list.js.erb b/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/user_list.js.erb
deleted file mode 100644
index 4c8bf25d..00000000
--- a/vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/user_list.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$('#show_preview').html("<%= escape_javascript(render(:partial => 'modal_list',:locals => {:bulletin_category => @bulletin_category})) %>");
-var start_modal_with_id = "bulletin_category-<%=@bulletin_category.id%>"
\ No newline at end of file
diff --git a/vendor/built_in_modules/news/config/routes.rb b/vendor/built_in_modules/news/config/routes.rb
index d718e7d6..5aa7118f 100644
--- a/vendor/built_in_modules/news/config/routes.rb
+++ b/vendor/built_in_modules/news/config/routes.rb
@@ -20,11 +20,7 @@ Rails.application.routes.draw do
match "file_quick_edit/:news_bulletin_id" => "news_bulletins#file_quick_edit" ,:as => :file_quick_edit
end
- resources :news_bulletin_categorys do
- match 'submit_setting' => "news_bulletin_category_setting#setting" ,:as => :setting,:via => :get
- match 'submit_setting' => "news_bulletin_category_setting#update_setting" ,:as => :setting,:via => :post
- match 'submit_setting' => "news_bulletin_category_setting#user_list" ,:as => :user_list,:via => :put
- end
+ resources :news_bulletin_categorys
resources :news_bulletin_links, :controller => 'news_bulletin_links' do
match "link_quick_edit/:news_bulletin_link_id" => "news_bulletin_links#link_quick_edit" ,:as => :link_quick_edit