From 7c818ce59ac3cbfdcf6c6d996899c95796ad43db Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 27 Jul 2015 16:07:29 +0800 Subject: [PATCH] =?UTF-8?q?admin=E7=95=8C=E9=9D=A2=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AD=A6=E6=A0=A1=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=8C=89=E5=90=8D=E7=A7=B0=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin_controller.rb | 13 +++++++++ app/views/admin/schools.html.erb | 44 +++++++++++++++++++++++++++++ config/locales/zh.yml | 1 + config/routes.rb | 1 + lib/redmine.rb | 1 + public/stylesheets/courses.css | 1 - 6 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 app/views/admin/schools.html.erb diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 086ecfb7f..d2c94f5de 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -337,6 +337,19 @@ class AdminController < ApplicationController format.html end end + + #学校列表 + def schools + @q = params[:school_name] + if @q + @schools = School.where("name like '%#{@q}%'") + else + @schools = School.all + end + respond_to do |format| + format.html + end + end #移动端版本管理 def mobile_version @versions = PhoneAppVersion.reorder('created_at desc') diff --git a/app/views/admin/schools.html.erb b/app/views/admin/schools.html.erb new file mode 100644 index 000000000..760a0c5a4 --- /dev/null +++ b/app/views/admin/schools.html.erb @@ -0,0 +1,44 @@ +
+ LOGO + | ++ 学校名称 + | ++ |
---|---|---|
+ <%= image_tag(school.logo_link,width:46,height:46) %> + | + ++ <%= link_to("上传logo", edit_organization_path(school.id), :class => 'icon icon-copy') %> + <%#= link_to(l(:button_delete), organization_path(school.id), :method => :delete,:confirm => l(:text_are_you_sure), :class => 'icon icon-del') %> + | +