diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/fact_checks_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/fact_checks_controller.rb deleted file mode 100644 index 606225e9d..000000000 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/fact_checks_controller.rb +++ /dev/null @@ -1,75 +0,0 @@ -class Panel::Announcement::BackEnd::FactChecksController < OrbitBackendController - before_filter :authenticate_user! - include AdminHelper - # layout 'admin' - - def setting - @bulletin_categorys = BulletinCategory.all - if params.has_key?(:category_id) - first_category = BulletinCategory.find params[:category_id] - if params[:commit] == 'Update' - privilege_users = params[:users].collect{|key,value| User.find key } rescue [] - preload_object_auth_ary = first_category.object_auths.where(title: 'fact_check') || (first_category.object_auths.create :title=> 'fact_check') - preload_object_auth = preload_object_auth_ary.first - preload_object_auth.privilege_users = privilege_users - preload_object_auth.save! - end - else - first_category = @bulletin_categorys.first - end - preload_object_auth = first_category.object_auths.where(title: 'fact_check').empty?? (first_category.object_auths.create! :title=> 'fact_check') : first_category.object_auths.where(title: 'fact_check') - @users_array = preload_object_auth.first.privilege_users rescue [] - respond_to do |format| - format.html - format.js - end - end - - def update_setting - - end - # def index - # get_categorys(params[:bulletin_category_id]) - # - # @bulletins = params[:sort] ? get_sorted_bulletins : Bulletin.all - # @bulletin_categories = BulletinCategory.all - # - # module_app = ModuleApp.first(:conditions => {:key => 'announcement'}) - # @tags = Tag.all(:conditions => {:module_app_id => module_app.id}).order_by(I18n.locale, :asc) - # - # respond_to do |format| - # format.html # index.html.erb - # format.js - # format.xml { render :xml => @bulletins } - # end - # end - # - # def new - # - # end - # - # def create - # - # end - # - # def update - # - # end - # - # def edit - # - # end - # - # def destroy - # - # end - protected - 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/approvals/_list_table.html.erb.can_del b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/approvals/_list_table.html.erb.can_del index 59bac03aa..edb738d3d 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/approvals/_list_table.html.erb.can_del +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/approvals/_list_table.html.erb.can_del @@ -10,6 +10,6 @@ <% bulletin_category.bulletins.each do |post| %> - <%= render :partial => 'panel/announcement/back_end/bulletins/bulletins', :locals => {:post => post,:fact_check_allow=>true} %> + <%= render :partial => 'panel/announcement/back_end/bulletins/bulletins', :locals => {:post => post,:approval_allow=>true} %> <% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/_list_table.html.erb.can_del b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/_list_table.html.erb.can_del deleted file mode 100644 index 59bac03aa..000000000 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/_list_table.html.erb.can_del +++ /dev/null @@ -1,15 +0,0 @@ -

<%= bulletin_category.key %>

- - - - - - - - - - -<% bulletin_category.bulletins.each do |post| %> - <%= render :partial => 'panel/announcement/back_end/bulletins/bulletins', :locals => {:post => post,:fact_check_allow=>true} %> -<% end %> -
<%= t('bulletin.status') %><%= t('bulletin.category') %><%= t('bulletin.title') %><%= t('bulletin.postdate') %><%= t('bulletin.deadline') %><%= t('bulletin.action') %>
\ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/_privilege_user.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/_privilege_user.html.erb deleted file mode 100644 index 759e941dc..000000000 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/_privilege_user.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%> -<% sys_users = User.all -%> - <% sys_users.each do |user| -%> - -
- - <% user.sub_roles.each do |sr| %> - - <% end %> - <%= content_tag :div,:data=>{'original-title'=>t('announcement.bulletin.fact_check_setting_window_title'),:content => "#{user.sub_roles.collect{|sr| sr.key}.join(',')}"},:class=>"checkbox clear" do %> -
-
-
- <% 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 -%> - <%= check_box_tag "[users][#{user.id}]", 'true',users.include?(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/fact_checks/index.html.erb.can_del b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/index.html.erb.can_del deleted file mode 100644 index 32f3d8207..000000000 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/index.html.erb.can_del +++ /dev/null @@ -1,50 +0,0 @@ -<%= render 'panel/announcement/back_end/bulletins/filter' %> - - <%= render 'panel/announcement/back_end/bulletins/bulletins' %> -
-
- <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('admin.add'), new_panel_announcement_back_end_bulletin_path, :class => 'btn btn-primary' %> -
- - \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.js.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.js.erb deleted file mode 100644 index a01c9d6ab..000000000 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/fact_checks/setting.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#users_checkbox_ary").replaceWith('<%= (render :partial => 'privilege_user', :locals => {:users => @users_array}).html_safe%>'); \ No newline at end of file