Skip to content

Commit c249e15

Browse files
fix: Separate sessions and session route (#4754)
1 parent 052b202 commit c249e15

File tree

7 files changed

+9
-4
lines changed

7 files changed

+9
-4
lines changed

app/controllers/events/view/sessions/list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default class extends Controller.extend(EmberTableControllerMixin) {
128128

129129
@action
130130
viewSession(session_id, event_id) {
131-
this.transitionToRoute('public.sessions.view', event_id, session_id);
131+
this.transitionToRoute('public.session.view', event_id, session_id);
132132
}
133133

134134
@action

app/router.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Router.map(function() {
4242
this.route('public', { path: '/e/:event_id' }, function() {
4343
this.route('sessions', function() {
4444
this.route('list', { path: '/:session_status' });
45+
});
46+
this.route('session', function() {
4547
this.route('view', { path: '/:session_id' });
4648
});
4749
this.route('cfs', { path: '/cfs/:speaker_call_hash' }, function() {

app/routes/public/sessions/list.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import moment from 'moment';
55
@classic
66
export default class ListRoute extends Route {
77
titleToken() {
8+
const defaultToken = this.l10n.t('All sessions');
9+
if (!this.params) {return defaultToken}
810
switch (this.params.session_status) {
911
case 'all':
10-
return this.l10n.t('All sessions');
12+
return defaultToken;
1113
case 'today':
1214
return this.l10n.t('Today\'s Sessions');
1315
case 'week':
@@ -71,6 +73,7 @@ export default class ListRoute extends Route {
7173
return {
7274
event : eventDetails,
7375
session : await this.infinity.model('session', {
76+
include : 'track,speakers,session-type',
7477
filter : filterOptions,
7578
perPage : 6,
7679
startingPage : 1,

app/templates/components/session-card.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<div class="event wide ui grid row">
22
{{#unless this.device.isMobile}}
33
<div class="ui card three wide computer six wide tablet column">
4-
<a class="image" href="{{href-to 'public.sessions.view' this.session.event.id this.session.id}}">
4+
<a class="image" href="{{href-to 'public.session.view' this.session.event.id this.session.id}}">
55
<Widgets::SafeImage @src={{if this.session.event.thumbnailImageUrl this.session.event.thumbnailImageUrl "assets/images/landing.jpg"}} />
66
</a>
77
</div>
88
{{/unless}}
99
<div class="ui card thirteen wide computer ten wide tablet sixteen wide mobile column">
10-
<a class="main content" href="{{href-to 'public.sessions.view' this.session.event.id this.session.id}}">
10+
<a class="main content" href="{{href-to 'public.session.view' this.session.event.id this.session.id}}">
1111
<div class="header">
1212
<span>{{this.session.title}}</span>
1313
<div class="right floated author">

0 commit comments

Comments
 (0)