@@ -75,13 +91,7 @@ rest = context.JK.Rest()
-
- Please register here if you are currently a teacher with {this.props.school.name}, and if you plan to teach
- online music lessons for students of {this.props.school.name} using the JamKazam service. When you have registered, we
- will
- email you instructions to set up your online teacher profile, and we'll schedule a brief online training session to make sure
- you are comfortable using the service and ready to go with students in online lessons.
-
+ {explain}
{register}
@@ -111,7 +121,7 @@ rest = context.JK.Rest()
else
@createUser()
- @setState({processing:true})
+ @setState({processing: true})
createUser: () ->
$form = $('.school-signup-form')
diff --git a/web/app/assets/stylesheets/client/react-components/AccountSchoolScreen.scss b/web/app/assets/stylesheets/client/react-components/AccountSchoolScreen.scss
index 3e69ca14c..37b51ee81 100644
--- a/web/app/assets/stylesheets/client/react-components/AccountSchoolScreen.scss
+++ b/web/app/assets/stylesheets/client/react-components/AccountSchoolScreen.scss
@@ -247,6 +247,16 @@
line-height:32px;
vertical-align: middle;
display: inline-block;
+
+ }
+
+ .just-name {
+ display:block;
+ }
+ .just-email {
+ position: relative;
+ top: -14px;
+ font-size:12px;
}
.user-actions {
diff --git a/web/app/controllers/api_schools_controller.rb b/web/app/controllers/api_schools_controller.rb
index ace715949..770d4be8b 100644
--- a/web/app/controllers/api_schools_controller.rb
+++ b/web/app/controllers/api_schools_controller.rb
@@ -7,7 +7,7 @@ class ApiSchoolsController < ApiController
respond_to :json
def show
-
+ @owner_viewing = @school.owner == current_user
end
def update
diff --git a/web/app/controllers/landings_controller.rb b/web/app/controllers/landings_controller.rb
index d02161a44..c116b321f 100644
--- a/web/app/controllers/landings_controller.rb
+++ b/web/app/controllers/landings_controller.rb
@@ -400,6 +400,7 @@ class LandingsController < ApplicationController
@description = "View the profile and pick a teacher right for you from " + @school.name
@preview = !params[:preview].nil?
+ @show_approved_only = true
schoolRabl = Rabl::Renderer.json(@school, 'api_schools/show')
@page_data = {school: @school, preview: @preview, rabl: schoolRabl}
diff --git a/web/app/views/api_schools/show.rabl b/web/app/views/api_schools/show.rabl
index 56c04f92a..026079333 100644
--- a/web/app/views/api_schools/show.rabl
+++ b/web/app/views/api_schools/show.rabl
@@ -8,16 +8,42 @@ end
child :students => :students do
attributes :id, :name, :first_name, :last_name, :photo_url
+
+ if @owner_viewing
+ attributes :email
+ end
end
-child :approved_teachers => :teachers do |teacher|
- attributes :id
+if @show_approved_only
+ child :approved_teachers => :teachers do |teacher|
+ attributes :id
- child :instruments do |teacher|
- attributes :id, :description
- end
+ child :instruments do |teacher|
+ attributes :id, :description
+ end
- child :user => :user do
- attributes :id, :name, :first_name, :last_name, :photo_url, :teacher_profile_url, :resolved_photo_url
+ child :user => :user do
+ attributes :id, :name, :first_name, :last_name, :photo_url, :teacher_profile_url, :resolved_photo_url
+
+ if @owner_viewing
+ attributes :email
+ end
+ end
end
-end
\ No newline at end of file
+else
+child :teachers => :teachers do |teacher|
+ attributes :id
+
+ child :instruments do |teacher|
+ attributes :id, :description
+ end
+
+ child :user => :user do
+ attributes :id, :name, :first_name, :last_name, :photo_url, :teacher_profile_url, :resolved_photo_url
+
+ if @owner_viewing
+ attributes :email
+ end
+ end
+ end
+end