Commit f37371e3 by Muzaffar yousaf

Merge pull request #9512 from edx/muzaffar/tnl2964-breadcrumbs

Adjust create new team page breadcrumbs.
parents 28fddda4 b45ffa11
...@@ -654,7 +654,7 @@ class TeamFormActions(TeamsTabBase): ...@@ -654,7 +654,7 @@ class TeamFormActions(TeamsTabBase):
title='Create a New Team', title='Create a New Team',
description='Create a new team if you can\'t find existing teams to ' description='Create a new team if you can\'t find existing teams to '
'join, or if you would like to learn with friends you know.', 'join, or if you would like to learn with friends you know.',
breadcrumbs=self.topic['name'] breadcrumbs='All Topics {topic_name}'.format(topic_name=self.topic['name'])
) )
def verify_and_navigate_to_edit_team_page(self): def verify_and_navigate_to_edit_team_page(self):
......
...@@ -194,27 +194,31 @@ ...@@ -194,27 +194,31 @@
* Render the create new team form. * Render the create new team form.
*/ */
newTeam: function (topicID) { newTeam: function (topicID) {
var self = this; var self = this,
this.getTeamsView(topicID).done(function (teamsView) { createViewWithHeader;
self.mainView = new ViewWithHeader({ this.getTopic(topicID).done(function (topic) {
header: new HeaderView({ var view = new TeamEditView({
model: new TeamsHeaderModel({ action: 'create',
description: gettext("Create a new team if you can't find existing teams to join, or if you would like to learn with friends you know."), teamEvents: self.teamEvents,
title: gettext("Create a New Team"), teamParams: {
breadcrumbs: [ courseID: self.courseID,
{ topicID: topic.get('id'),
title: teamsView.main.teamParams.topicName, teamsUrl: self.teamsUrl,
url: '#topics/' + teamsView.main.teamParams.topicID topicName: topic.get('name'),
} languages: self.languages,
] countries: self.countries,
}) teamsDetailUrl: self.teamsDetailUrl
}), }
main: new TeamEditView({ });
action: 'create', createViewWithHeader = self.createViewWithHeader({
teamEvents: self.teamEvents, mainView: view,
teamParams: teamsView.main.teamParams subject: {
}) name: gettext("Create a New Team"),
description: gettext("Create a new team if you can't find existing teams to join, or if you would like to learn with friends you know.")
},
parentTopic: topic
}); });
self.mainView = createViewWithHeader;
self.render(); self.render();
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment