Don't display admin in any premission select. Fix not necessary header for UT data

This commit is contained in:
Matthew K. Fu JuYuan 2012-05-10 14:43:05 +08:00 committed by Christophe Vilayphiou
parent cf8d20dc84
commit 8b42c595b3
11 changed files with 10 additions and 11 deletions

View File

@ -6,7 +6,7 @@ class Admin::NewInterfaceModuleAppsController < ApplicationController
layout "new_admin"
def setting
@sys_users = User.all
@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

View File

@ -12,6 +12,7 @@ class Panel::Announcement::BackEnd::ApprovalsController < OrbitBackendControlle
# end
def setting
@sys_users = User.all(conditions: {admin: false})
@bulletin_categorys = BulletinCategory.all
@options_from_collection_for_select_bulletin_categorys = @bulletin_categorys.collect{|bc| [bc.i18n_variable[I18n.locale],bc.id] }
if params.has_key? :category

View File

@ -12,6 +12,7 @@ class Panel::Announcement::BackEnd::BulletinCategorySettingController < OrbitBac
# 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] }

View File

@ -1,6 +1,5 @@
<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%>
<% sys_users = User.all -%>
<% sys_users.each do |sys_user| -%>
<% @sys_users.each do |sys_user| -%>
<div class="checkblock">

View File

@ -1,6 +1,5 @@
<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%>
<% sys_users = User.all -%>
<% sys_users.each do |sys_user| -%>
<% @sys_users.each do |sys_user| -%>
<div class="checkblock">

View File

@ -4,9 +4,9 @@ namespace :nccu_data do
desc "load nccu data from csv"
task :setup_ut_list => :environment do
require 'csv'
CSV.foreach("vendor/built_in_modules/announcement/lib/ut_list_from_nccu_2012feb.csv") do |row|
new_unit = UnitListForAnc.new(:order => row[0], :ut_code => row[1], :up_ut_code => row[2], :created_at => Time.now,:updated_at => Time.now)
# order,ut_code,up_tu_code,ut_zh_tw,ut_en
new_unit.build_title :en => row[4], :zh_tw => row[3]
new_unit.save
end

View File

@ -1,4 +1,3 @@
order,ut_code,up_tu_code,ut_zh_tw,ut_en
0100,H00,H00,校長室,Office of the President
0110,H01,H01,副校長室一,Office of the Vice President
0110,H03,H03,副校長室二,Office of the Vice President

1 order 0100 ut_code H00 up_tu_code H00 ut_zh_tw 校長室 ut_en Office of the President
order ut_code up_tu_code ut_zh_tw ut_en
1 0100 0100 H00 H00 H00 H00 校長室 校長室 Office of the President Office of the President
2 0110 0110 H01 H01 H01 H01 副校長室一 副校長室一 Office of the Vice President Office of the Vice President
3 0110 0110 H03 H03 H03 H03 副校長室二 副校長室二 Office of the Vice President Office of the Vice President

View File

@ -12,6 +12,7 @@ class Panel::News::BackEnd::NewsApprovalsController < OrbitBackendController
end
def setting
@sys_users = User.all(conditions: {admin: false})
@news_bulletin_categorys = NewsBulletinCategory.all
if params.has_key?(:category_id)
first_category = NewsBulletinCategory.find params[:category_id]

View File

@ -12,6 +12,7 @@ class Panel::News::BackEnd::NewsBulletinCategorySettingController < OrbitBackend
# 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] }

View File

@ -1,6 +1,5 @@
<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%>
<% sys_users = User.all -%>
<% sys_users.each do |user| -%>
<% @sys_users.each do |user| -%>
<div class="checkblock">

View File

@ -1,6 +1,5 @@
<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%>
<% sys_users = User.all -%>
<% sys_users.each do |sys_user| -%>
<% @sys_users.each do |sys_user| -%>
<div class="checkblock">