mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Remove add students tab from CourseDetailsView
This commit is contained in:
parent
97cb5275c3
commit
628ed9a990
2 changed files with 0 additions and 47 deletions
|
@ -58,8 +58,6 @@ block content
|
|||
if adminMode
|
||||
li.active(role='presentation')
|
||||
a(href='#progress', aria-controls='progress', role='tab', data-toggle='tab', data-i18n="courses.progress")
|
||||
li(role='presentation')
|
||||
a(href='#invite', aria-controls='invite', role='tab', data-toggle='tab', data-i18n="courses.add_students")
|
||||
li(role='presentation')
|
||||
a(href='#levels', aria-controls='levels', role='tab', data-toggle='tab', data-i18n="nav.play")
|
||||
else
|
||||
|
@ -71,8 +69,6 @@ block content
|
|||
if adminMode
|
||||
.tab-pane.active#progress(role='tabpanel')
|
||||
+progress-tab
|
||||
.tab-pane#invite(role='tabpanel')
|
||||
+invite-tab
|
||||
.tab-pane#levels(role='tabpanel')
|
||||
+levels-tab
|
||||
else
|
||||
|
@ -261,28 +257,6 @@ mixin progress-members-popup-started(i, level)
|
|||
if adminMode
|
||||
strong(data-i18n="clans.view_solution")
|
||||
|
||||
mixin invite-tab
|
||||
p(data-i18n="courses.invite_students")
|
||||
h3(data-i18n="courses.invite_link_header")
|
||||
p(data-i18n="courses.invite_link_p_1")
|
||||
.alert.alert-info
|
||||
strong= document.location.origin + "/courses/students?_ppc=" + view.prepaid.get('code')
|
||||
p(data-i18n="courses.invite_link_p_2")
|
||||
.form
|
||||
.form-group
|
||||
textarea#invite-emails-textarea.form-control
|
||||
.help-block(data-i18n="courses.enter_emails")
|
||||
.form-group
|
||||
button#invite-btn.btn.btn-success(data-i18n="courses.send_invites")
|
||||
#invite-emails-sending-alert.alert.alert-info.hide(data-i18n="common.sending")
|
||||
#invite-emails-success-alert.alert.alert-success.hide(data-i18n="play_level.done")
|
||||
|
||||
if view.prepaid.loaded && pricePerSeat > 0
|
||||
h3 Class Capacity
|
||||
p
|
||||
span.spr(data-i18n="courses.capacity_used")
|
||||
span #{view.prepaid.get('redeemers').length} / #{view.prepaid.get('maxRedeemers')}.
|
||||
|
||||
mixin levels-tab
|
||||
table.table.table-striped.table-condensed
|
||||
thead
|
||||
|
|
|
@ -25,7 +25,6 @@ module.exports = class CourseDetailsView extends RootView
|
|||
'click .progress-level-cell': 'onClickProgressLevelCell'
|
||||
'mouseenter .progress-level-cell': 'onMouseEnterPoint'
|
||||
'mouseleave .progress-level-cell': 'onMouseLeavePoint'
|
||||
'click #invite-btn': 'onClickInviteButton'
|
||||
|
||||
constructor: (options, @courseID, @courseInstanceID) ->
|
||||
super options
|
||||
|
@ -261,26 +260,6 @@ module.exports = class CourseDetailsView extends RootView
|
|||
viewArgs: [{}, levelSlug]
|
||||
}
|
||||
|
||||
onClickInviteButton: (e) ->
|
||||
emails = @$('#invite-emails-textarea').val()
|
||||
emails = emails.split('\n')
|
||||
emails = _.filter((_.string.trim(email) for email in emails))
|
||||
if not emails.length
|
||||
return
|
||||
url = @courseInstance.url() + '/invite_students'
|
||||
@$('#invite-btn, #invite-emails-textarea').addClass('hide')
|
||||
@$('#invite-emails-sending-alert').removeClass('hide')
|
||||
|
||||
$.ajax({
|
||||
url: url
|
||||
data: {emails: emails}
|
||||
method: 'POST'
|
||||
context: @
|
||||
success: ->
|
||||
@$('#invite-emails-sending-alert').addClass('hide')
|
||||
@$('#invite-emails-success-alert').removeClass('hide')
|
||||
})
|
||||
|
||||
onMouseEnterPoint: (e) ->
|
||||
$('.progress-popup-container').hide()
|
||||
container = $(e.target).find('.progress-popup-container').show()
|
||||
|
|
Loading…
Reference in a new issue