scidea-schools 1.0.6 → 1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +2 -2
- data/app/controllers/admin/schools_controller.rb +1 -1
- data/app/views/admin/schools/_school.html.erb +3 -2
- data/app/views/admin/schools/_search.html.erb +1 -1
- data/app/views/admin/schools/index.html.erb +2 -2
- data/app/views/admin/schools/new_migration.html.erb +3 -3
- data/lib/generators/scidea/schools/templates/scidea_schools_02_remove_menu.rb +22 -0
- data/lib/scidea/schools/engine.rb +11 -2
- data/lib/scidea/schools/version.rb +1 -1
- metadata +95 -80
data/CHANGELOG
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
1.
|
|
2
|
-
|
|
1
|
+
1.1
|
|
2
|
+
- adds a Schools menu item to the admin UI primary nav
|
|
3
3
|
|
|
4
4
|
1.0.4
|
|
5
5
|
- override core styles for alert message on profile form so that messages stays within the form div
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<address>
|
|
1
|
+
<div class="school-address">
|
|
2
2
|
<%= school.name %><br />
|
|
3
3
|
<%= school.address_1 %><br />
|
|
4
4
|
<% if school.address_2 && !school.address_2.empty? %>
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
|
|
8
8
|
<%= school.city %>, <%= school.state %> <%= school.zipcode %><br />
|
|
9
9
|
<%= school.phone %>
|
|
10
|
-
</
|
|
10
|
+
</div>
|
|
11
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%= form_tag form_url, :method => 'get', :id => "listview_search" do %>
|
|
1
|
+
<%= form_tag form_url, :method => 'get', :id => "listview_search", :role => 'search' do %>
|
|
2
2
|
<%= hidden_field_tag :direction, params[:direction] %>
|
|
3
3
|
<%= hidden_field_tag :sort, params[:sort] %>
|
|
4
4
|
<%= hidden_field_tag :per_page, params[:per_page] %>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% css do %>
|
|
2
|
-
<%= theme_css '
|
|
2
|
+
<%= theme_css 'layouts/index', :media => 'screen' %>
|
|
3
3
|
<% end %>
|
|
4
4
|
|
|
5
5
|
<% page_title 'Manage Educational Institutions' %>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
]
|
|
49
49
|
],
|
|
50
50
|
:actions_are_admin => true,
|
|
51
|
-
:css_class => '
|
|
51
|
+
:css_class => 'datatable',
|
|
52
52
|
:sort_column => sort_column
|
|
53
53
|
}
|
|
54
54
|
],
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<% css do %>
|
|
2
|
-
<%= theme_css '
|
|
2
|
+
<%= theme_css 'layouts/index.css', :media => 'screen' %>
|
|
3
3
|
<%= stylesheet_link_tag 'scidea/admin/pages/schools/user_migrate' %>
|
|
4
4
|
<% end %>
|
|
5
5
|
|
|
6
6
|
<% page_title 'Migrate Users between Educational Institutions' %>
|
|
7
7
|
|
|
8
8
|
<div id="school-migration-message">
|
|
9
|
-
<p>You are migrating users from
|
|
9
|
+
<p>You are migrating users from:</p>
|
|
10
10
|
<%= render :partial => 'school', :locals => { :school => @school } %>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
}
|
|
65
65
|
]
|
|
66
66
|
],
|
|
67
|
-
:css_class => '
|
|
67
|
+
:css_class => 'datatable',
|
|
68
68
|
:sort_column => sort_column
|
|
69
69
|
}
|
|
70
70
|
],
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
class ScideaSchools02RemoveMenu < ActiveRecord::Migration
|
|
2
|
+
|
|
3
|
+
def up
|
|
4
|
+
execute "delete from menu_elements where display_name = 'Educational Institutions';"
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def down
|
|
8
|
+
|
|
9
|
+
sql = <<-SQL
|
|
10
|
+
set @course_and_scitent_admins = (select group_concat(id) from roles where symbol in ('course_admin', 'scitent_admin'));
|
|
11
|
+
set @product_and_scitent_admins = (select group_concat(id) from roles where symbol in ('product_admin', 'scitent_admin'));
|
|
12
|
+
|
|
13
|
+
SELECT @admin_nav_secondary_id:=id FROM menus WHERE name = 'Admin Navigation: Secondary' LIMIT 1;
|
|
14
|
+
|
|
15
|
+
INSERT INTO menu_elements (display_name, menu_id, url, view_role_list, edit_role_list, order_sequence) VALUES ('Educational Institutions', @admin_nav_secondary_id, '/admin/schools', @course_and_scitent_admins, @product_and_scitent_admins, 102);
|
|
16
|
+
SQL
|
|
17
|
+
|
|
18
|
+
sql.split("\n").reject{|s| s.strip.start_with?('#') || s.strip.empty? }.each{ |s| execute s.strip }
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
end
|
|
@@ -7,13 +7,22 @@ module Scidea
|
|
|
7
7
|
|
|
8
8
|
initializer "scidea.schools.register_view_callbacks" do
|
|
9
9
|
Scidea::Plugins::Plugin.on(:admin_user_form_after_profile) { conditional_render('users/school_edit') }
|
|
10
|
-
|
|
11
|
-
Scidea::Plugins::Plugin.on(:registration_new_after_profile) { conditional_render('users/school_edit') }
|
|
10
|
+
|
|
11
|
+
Scidea::Plugins::Plugin.on(:registration_new_after_profile) { conditional_render('users/school_edit') }
|
|
12
12
|
Scidea::Plugins::Plugin.on(:user_profile_form_after_profile) { conditional_render('users/school_edit') }
|
|
13
13
|
|
|
14
14
|
Scidea::Plugins::Plugin.on(:admin_user_profile_after_profile) { 'admin/users/profile_show_school' }
|
|
15
15
|
|
|
16
16
|
Scidea::Plugins::Plugin.on(:user_profile_page_js) { 'backbone_apps/school_selector' }
|
|
17
|
+
|
|
18
|
+
Scidea::Plugins::Plugin.on(:admin_primary_navigation_users_menu_append) do |callback, menu|
|
|
19
|
+
|
|
20
|
+
menu.item :schools,
|
|
21
|
+
'Schools',
|
|
22
|
+
callback.view_binding.eval('admin_schools_path')
|
|
23
|
+
{}
|
|
24
|
+
|
|
25
|
+
end
|
|
17
26
|
end
|
|
18
27
|
|
|
19
28
|
config.to_prepare do
|
metadata
CHANGED
|
@@ -1,141 +1,156 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scidea-schools
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
prerelease: false
|
|
5
|
+
segments:
|
|
6
|
+
- 1
|
|
7
|
+
- 1
|
|
8
|
+
version: "1.1"
|
|
6
9
|
platform: ruby
|
|
7
|
-
authors:
|
|
10
|
+
authors:
|
|
8
11
|
- Phoenix Team
|
|
9
12
|
autorequire:
|
|
10
13
|
bindir: bin
|
|
11
14
|
cert_chain: []
|
|
12
|
-
|
|
15
|
+
|
|
16
|
+
date: 2012-01-16 00:00:00 -05:00
|
|
17
|
+
default_executable:
|
|
13
18
|
dependencies: []
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
email:
|
|
19
|
+
|
|
20
|
+
description: Schools augments user's profiles with an associated school, along with interfaces for adding new schools at runtime. Administrators can manage schools and modify learner's schools.
|
|
21
|
+
email:
|
|
18
22
|
- phoenix@scitent.com
|
|
19
23
|
executables: []
|
|
24
|
+
|
|
20
25
|
extensions: []
|
|
26
|
+
|
|
21
27
|
extra_rdoc_files: []
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- app/
|
|
28
|
+
|
|
29
|
+
files:
|
|
30
|
+
- app/assets/javascripts/backbone_apps/models/school.js
|
|
31
|
+
- app/assets/javascripts/backbone_apps/school_selector.js
|
|
32
|
+
- app/assets/stylesheets/scidea/admin/pages/schools/user_migrate.css
|
|
33
|
+
- app/assets/stylesheets/scidea/pages/schools/user_profile.css
|
|
25
34
|
- app/controllers/admin/schools_controller.rb
|
|
35
|
+
- app/controllers/application_controller.rb
|
|
26
36
|
- app/controllers/schools_controller.rb
|
|
37
|
+
- app/controllers/test/scidea_schools_qunit_tests_controller.rb
|
|
27
38
|
- app/helpers/schools_helper.rb
|
|
28
|
-
- app/
|
|
29
|
-
- app/
|
|
30
|
-
- app/
|
|
39
|
+
- app/models/school.rb
|
|
40
|
+
- app/themes/global_sass/_mixins.scss
|
|
41
|
+
- app/themes/scidea/sass/_config.scss
|
|
42
|
+
- app/themes/scidea/sass/admin/pages/schools/user_migrate.scss
|
|
43
|
+
- app/themes/scidea/sass/components/_schools.scss
|
|
44
|
+
- app/themes/scidea/sass/pages/schools/user_profile.scss
|
|
31
45
|
- app/views/admin/schools/_form.html.erb
|
|
32
|
-
- app/views/admin/schools/
|
|
46
|
+
- app/views/admin/schools/_school.html.erb
|
|
33
47
|
- app/views/admin/schools/_search.html.erb
|
|
34
48
|
- app/views/admin/schools/confirm_migration.html.erb
|
|
35
|
-
- app/views/admin/schools/new.html.erb
|
|
36
|
-
- app/views/admin/schools/new_migration.html.erb
|
|
37
49
|
- app/views/admin/schools/edit.html.erb
|
|
38
50
|
- app/views/admin/schools/index.html.erb
|
|
39
|
-
- app/views/admin/schools/
|
|
51
|
+
- app/views/admin/schools/new.html.erb
|
|
52
|
+
- app/views/admin/schools/new_migration.html.erb
|
|
53
|
+
- app/views/admin/schools/show.html.erb
|
|
54
|
+
- app/views/admin/users/_profile_show_school.html.erb
|
|
55
|
+
- app/views/layouts/application.html.erb
|
|
40
56
|
- app/views/schools/_form.html.erb
|
|
57
|
+
- app/views/schools/_profile_form.html.erb
|
|
41
58
|
- app/views/schools/_script_form.html.erb
|
|
42
59
|
- app/views/schools/_search.html.erb
|
|
43
|
-
- app/views/
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- app/models/school.rb
|
|
50
|
-
- app/assets/javascripts/backbone_apps/school_selector.js
|
|
51
|
-
- app/assets/javascripts/backbone_apps/models/school.js
|
|
52
|
-
- app/assets/stylesheets/scidea/admin/pages/schools/user_migrate.css
|
|
53
|
-
- app/assets/stylesheets/scidea/pages/schools/user_profile.css
|
|
54
|
-
- lib/scidea/schools.rb
|
|
60
|
+
- app/views/users/_school_edit.html.erb
|
|
61
|
+
- lib/generators/scidea/schools/migrations_generator.rb
|
|
62
|
+
- lib/generators/scidea/schools/removal_migrations_generator.rb
|
|
63
|
+
- lib/generators/scidea/schools/templates/removal/scidea_schools_99_remove.rb
|
|
64
|
+
- lib/generators/scidea/schools/templates/scidea_schools_01_install.rb
|
|
65
|
+
- lib/generators/scidea/schools/templates/scidea_schools_02_remove_menu.rb
|
|
55
66
|
- lib/scidea/schools/engine.rb
|
|
56
|
-
- lib/scidea/schools/models/profile.rb
|
|
57
67
|
- lib/scidea/schools/models/ability.rb
|
|
68
|
+
- lib/scidea/schools/models/profile.rb
|
|
58
69
|
- lib/scidea/schools/version.rb
|
|
59
|
-
- lib/
|
|
70
|
+
- lib/scidea/schools.rb
|
|
60
71
|
- lib/scidea-schools.rb
|
|
61
|
-
- lib/
|
|
62
|
-
- lib/generators/scidea/schools/templates/removal/scidea_schools_99_remove.rb
|
|
63
|
-
- lib/generators/scidea/schools/templates/scidea_schools_01_install.rb
|
|
64
|
-
- lib/generators/scidea/schools/migrations_generator.rb
|
|
65
|
-
- config/routes.rb
|
|
66
|
-
- config/initializers/schools_assets.rb
|
|
67
|
-
- config/environment.rb
|
|
72
|
+
- lib/tasks/db/seed.rake
|
|
68
73
|
- config/compass.rb
|
|
69
|
-
- config/locales/en.yml
|
|
70
74
|
- config/cucumber.yml
|
|
75
|
+
- config/environment.rb
|
|
76
|
+
- config/initializers/schools_assets.rb
|
|
77
|
+
- config/locales/en.yml
|
|
71
78
|
- config/requirejs.yml
|
|
79
|
+
- config/routes.rb
|
|
72
80
|
- db/seeds.rb
|
|
81
|
+
- features/applying_for_seminars.feature
|
|
82
|
+
- features/edit_seminar_application.feature
|
|
83
|
+
- features/manage_users.feature
|
|
73
84
|
- features/qunit/qunit.feature
|
|
74
|
-
- features/
|
|
75
|
-
- features/
|
|
76
|
-
- features/step_definitions/
|
|
85
|
+
- features/schools/manage_schools.feature
|
|
86
|
+
- features/schools/schools.feature
|
|
87
|
+
- features/step_definitions/audience_steps.rb
|
|
77
88
|
- features/step_definitions/authentication_steps.rb
|
|
78
|
-
- features/step_definitions/
|
|
79
|
-
- features/step_definitions/
|
|
89
|
+
- features/step_definitions/custom_form_steps.rb
|
|
90
|
+
- features/step_definitions/email_steps.rb
|
|
80
91
|
- features/step_definitions/menu_steps.rb
|
|
81
|
-
- features/step_definitions/
|
|
92
|
+
- features/step_definitions/misc_steps.rb
|
|
93
|
+
- features/step_definitions/qunit_steps.rb
|
|
82
94
|
- features/step_definitions/registration_steps.rb
|
|
83
95
|
- features/step_definitions/school_steps.rb
|
|
84
|
-
- features/step_definitions/
|
|
85
|
-
- features/step_definitions/
|
|
96
|
+
- features/step_definitions/seminar_application_steps.rb
|
|
97
|
+
- features/step_definitions/seminar_steps.rb
|
|
98
|
+
- features/step_definitions/steps.rb
|
|
99
|
+
- features/step_definitions/user_steps.rb
|
|
86
100
|
- features/step_definitions/web_steps.rb
|
|
87
|
-
- features/step_definitions/custom_form_steps.rb
|
|
88
|
-
- features/applying_for_seminars.feature
|
|
89
|
-
- features/support/seed_user_roles.rb
|
|
90
101
|
- features/support/env.rb
|
|
91
|
-
- features/support/selectors.rb
|
|
92
|
-
- features/support/paths.rb
|
|
93
102
|
- features/support/hooks.rb
|
|
94
|
-
- features/
|
|
95
|
-
- features/
|
|
96
|
-
- features/
|
|
97
|
-
- features/schools/schools.feature
|
|
103
|
+
- features/support/paths.rb
|
|
104
|
+
- features/support/seed_user_roles.rb
|
|
105
|
+
- features/support/selectors.rb
|
|
98
106
|
- qunit/helpers/qunit.js
|
|
99
|
-
- qunit/tests/backbone_apps/school_selector.js
|
|
100
|
-
- qunit/test_runner.html.erb
|
|
101
107
|
- qunit/html_fixtures/backbone_apps/_school_selector.html.erb
|
|
108
|
+
- qunit/test_runner.html.erb
|
|
109
|
+
- qunit/tests/backbone_apps/school_selector.js
|
|
102
110
|
- spec/controllers/admin/schools_controller_spec.rb
|
|
103
111
|
- spec/controllers/schools_controller_spec.rb
|
|
104
|
-
- spec/routing/admin/admin_schools_routing_spec.rb
|
|
105
|
-
- spec/routing/schools_routing_spec.rb
|
|
106
112
|
- spec/factories/menu_elements.rb
|
|
107
113
|
- spec/factories/schools.rb
|
|
108
|
-
- spec/support/controller_macros.rb
|
|
109
|
-
- spec/models/school_spec.rb
|
|
110
|
-
- spec/models/profile_spec.rb
|
|
111
114
|
- spec/models/ability_spec.rb
|
|
115
|
+
- spec/models/profile_spec.rb
|
|
116
|
+
- spec/models/school_spec.rb
|
|
117
|
+
- spec/routing/admin/admin_schools_routing_spec.rb
|
|
118
|
+
- spec/routing/schools_routing_spec.rb
|
|
112
119
|
- spec/spec_helper.rb
|
|
120
|
+
- spec/support/controller_macros.rb
|
|
113
121
|
- MIT-LICENSE
|
|
114
122
|
- README.md
|
|
115
123
|
- Rakefile
|
|
116
124
|
- CHANGELOG
|
|
125
|
+
has_rdoc: true
|
|
117
126
|
homepage: https://github.com/phoenix-scitent/scidea-schools
|
|
118
127
|
licenses: []
|
|
128
|
+
|
|
119
129
|
post_install_message:
|
|
120
130
|
rdoc_options: []
|
|
121
|
-
|
|
131
|
+
|
|
132
|
+
require_paths:
|
|
122
133
|
- lib
|
|
123
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
requirements:
|
|
132
|
-
- -
|
|
133
|
-
- !ruby/object:Gem::Version
|
|
134
|
-
|
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - ">="
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
segments:
|
|
139
|
+
- 0
|
|
140
|
+
version: "0"
|
|
141
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - ">="
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
segments:
|
|
146
|
+
- 0
|
|
147
|
+
version: "0"
|
|
135
148
|
requirements: []
|
|
149
|
+
|
|
136
150
|
rubyforge_project:
|
|
137
|
-
rubygems_version: 1.
|
|
151
|
+
rubygems_version: 1.3.6
|
|
138
152
|
signing_key:
|
|
139
153
|
specification_version: 3
|
|
140
154
|
summary: Schools extension for the Scitent Scidea platform
|
|
141
155
|
test_files: []
|
|
156
|
+
|