Skip to content
Browse files

update rake task, add students contoller

  • Loading branch information...
1 parent 7df1e9f commit b247069cf74ab4b7ea3d843ee91a408d2f8debcb @mouse-lin committed
View
2 app/controllers/students_controller.rb
@@ -0,0 +1,2 @@
+class StudentsController < ApplicationController
+end
View
2 app/helpers/students_helper.rb
@@ -0,0 +1,2 @@
+module StudentsHelper
+end
View
8 lib/tasks/genrate_data.rake
@@ -20,7 +20,7 @@ namespace :data do
:home => "广东移不动",
:number => "10086110120",
:sex => "",
- :type => "student",
+ :type => "Student",
:classes => Classes.all.first,
},
{
@@ -29,7 +29,7 @@ namespace :data do
:home => "中国电不信",
:number => "10010315123",
:sex => "",
- :type => "student",
+ :type => "Student",
:classes => Classes.all.first,
},
{
@@ -38,7 +38,7 @@ namespace :data do
:home => "广东移不动",
:number => "10086110911",
:sex => "",
- :type => "student",
+ :type => "Student",
:classes => Classes.all.last,
},
{
@@ -47,7 +47,7 @@ namespace :data do
:home => "中国电不信",
:number => "10010315892",
:sex => "",
- :type => "student",
+ :type => "Student",
:classes => Classes.all.last,
}
]
View
16 public/javascripts/PF/pages/student.js
@@ -2,7 +2,6 @@ Ext.ns("Pf.classes.student");
Pf.classes.student = Ext.extend(Ext.grid.EditorGridPanel,{
viewConfig: { forceFit: true },
- //title: "学生主档",
height: 600,
initComponent : function () {
this.store = this.initStore();
@@ -25,13 +24,22 @@ Pf.classes.student = Ext.extend(Ext.grid.EditorGridPanel,{
initCm: function(){
var cm = new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer(),
- { header: 'mouse', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
- { header: 'cat', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
+ { header: '学号', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
+ { header: '姓名', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
+ { header: '班级', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
+ { header: '性别', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
+ { header: '联系电话', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
+ { header: '住址', sortable: true, dataIndex: '',editor:new Ext.form.TextField()},
]);
return cm;
},
initStudentTbar: function(){
- var tbar = [{ iconCls: "add", text: "添加" }];
+ var tbar = [
+ { iconCls: "add", text: "添加" },
+ { iconCls: "delete", text: "删除" },
+ { iconCls: "table_edit", text: "编辑" },
+ { iconCls: "table_edit", text: "详细" },
+ ];
return tbar;
}
})
View
8 test/functional/students_controller_test.rb
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class StudentsControllerTest < ActionController::TestCase
+ # Replace this with your real tests.
+ test "the truth" do
+ assert true
+ end
+end
View
4 test/unit/helpers/students_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class StudentsHelperTest < ActionView::TestCase
+end

0 comments on commit b247069

Please sign in to comment.
Something went wrong with that request. Please try again.