Remove useless files
This commit is contained in:
parent
ddf7931123
commit
0cdf27450b
|
@ -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
|
|
|
@ -10,6 +10,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% bulletin_category.bulletins.each do |post| %>
|
<% 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 %>
|
<% end %>
|
||||||
</table>
|
</table>
|
|
@ -1,15 +0,0 @@
|
||||||
<h1><%= bulletin_category.key %></h1>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th><%= t('bulletin.status') %></th>
|
|
||||||
<th><%= t('bulletin.category') %></th>
|
|
||||||
<th><%= t('bulletin.title') %></th>
|
|
||||||
<th><%= t('bulletin.postdate') %></th>
|
|
||||||
<th><%= t('bulletin.deadline') %></th>
|
|
||||||
<th><%= t('bulletin.action') %></th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<% bulletin_category.bulletins.each do |post| %>
|
|
||||||
<%= render :partial => 'panel/announcement/back_end/bulletins/bulletins', :locals => {:post => post,:fact_check_allow=>true} %>
|
|
||||||
<% end %>
|
|
||||||
</table>
|
|
|
@ -1,26 +0,0 @@
|
||||||
<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%>
|
|
||||||
<% sys_users = User.all -%>
|
|
||||||
<% sys_users.each do |user| -%>
|
|
||||||
|
|
||||||
<div class="checkblock">
|
|
||||||
|
|
||||||
<% user.sub_roles.each do |sr| %>
|
|
||||||
<div class="for_unit" style="display:none;"> <%= sr.key %></div>
|
|
||||||
<% 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 %>
|
|
||||||
<div class="check-icon">
|
|
||||||
</div>
|
|
||||||
<div class='member-avatar'>
|
|
||||||
<% if user.avatar? %>
|
|
||||||
<%= image_tag(user.avatar.thumb.url,:class => "member-img") %>
|
|
||||||
<% else %>
|
|
||||||
<%= image_tag "person.png",:class => "member-img" %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<%= 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 -%>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% end -%>
|
|
||||||
<% end -%>
|
|
|
@ -1,50 +0,0 @@
|
||||||
<%= render 'panel/announcement/back_end/bulletins/filter' %>
|
|
||||||
<table id="bulettin_sort_list" class="table main-list">
|
|
||||||
<%= render 'panel/announcement/back_end/bulletins/bulletins' %>
|
|
||||||
</table>
|
|
||||||
<div class="form-actions">
|
|
||||||
<%= 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' %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<% content_for :secondary do %>
|
|
||||||
<%#= render :partial => '/panel/announcement/back_end/announcement_secondary' %>
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<%= flash_messages %>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<fieldset><legend><%= t('bulletin.search') %></legend>
|
|
||||||
|
|
||||||
<%= form_for :bulletin, :action => 'search', :method => 'get', :url => panel_announcement_back_end_bulletins_path do |f| %>
|
|
||||||
|
|
||||||
<%#= f.select :bulletin_category_id, @bulletin_categorys.collect {|t| [ t.i18n_variable[I18n.locale], t.id ] },{ :include_blank => t('bulletin.select') }%>
|
|
||||||
|
|
||||||
Category <%#= select_tag "category_id", options_for_select(@bulletin_categorys.collect{|t| [t.i18n_variable[I18n.locale], t.id]}), :prompt => t('bulletin.select') %>
|
|
||||||
|
|
||||||
KeyWord <%#= text_field_tag :search, params[:search], :id => 'search_field' %>
|
|
||||||
|
|
||||||
<%= submit_tag "Search", :name => nil %>
|
|
||||||
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<h1><%= t('bulletin.list_announcement') %></h1>
|
|
||||||
|
|
||||||
<div id="check_block">
|
|
||||||
<h1>Check Please</h1>
|
|
||||||
<%#= render :partial => "list_table", :collection => @bulletin_categorys_check,:as => :bulletin_category%>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
-->
|
|
|
@ -1 +0,0 @@
|
||||||
$("#users_checkbox_ary").replaceWith('<%= (render :partial => 'privilege_user', :locals => {:users => @users_array}).html_safe%>');
|
|
Reference in New Issue