Skip to content

Commit 1efa6f7

Browse files
authored
feature-9015:Change and link text on overview order page to event page (#9066)
1 parent 684f8b1 commit 1efa6f7

File tree

4 files changed

+44
-6
lines changed

4 files changed

+44
-6
lines changed

app/components/orders/event-info.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ import Component from '@ember/component';
44
@classic
55
export default class EventInfo extends Component {
66
showBanner = true;
7+
78
}

app/controllers/orders/view.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,9 @@ export default class ViewController extends Controller {
9696
this.set('isLoadingTickets', false);
9797
});
9898
}
99+
100+
@action
101+
redirectToStartPage(identifierStartEvent) {
102+
this.router.transitionTo('public.index',identifierStartEvent);
103+
}
99104
}

app/templates/components/orders/event-info.hbs

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
</div>
99
</div>
1010
{{/if}}
11-
<div class="ui secondary segment">
12-
<h3 class="weight-400">{{t 'When & Where'}}</h3>
11+
{{#if @redirectStartPgEvent}}
12+
<div class="ui secondary segment">
13+
<h3 class="weight-400" role="button" {{action @redirectStartPgEvent this.data.event.identifier}}>
14+
{{t 'When & Where'}}
15+
</h3>
1316
</div>
14-
<div class="ui padded segment">
17+
<div class="ui padded segment" role="button" {{action @redirectStartPgEvent this.data.event.identifier}}>
1518
{{#if this.data.event.online}}
1619
{{#if this.data.event.locationName}}
1720
<strong>{{t 'Event taking place online and at'}} {{this.data.event.locationName}}</strong>
@@ -32,6 +35,34 @@
3235
<strong>{{t 'Organized By'}}:</strong> {{this.data.event.ownerName}}
3336
{{/if}}
3437
</div>
38+
{{else}}
39+
<div class="ui secondary segment">
40+
<h3 class="weight-400">
41+
{{t 'When & Where'}}
42+
</h3>
43+
</div>
44+
<div class="ui padded segment" >
45+
{{#if this.data.event.online}}
46+
{{#if this.data.event.locationName}}
47+
<strong>{{t 'Event taking place online and at'}} {{this.data.event.locationName}}</strong>
48+
{{else}}
49+
<strong>{{t 'Online Event'}}</strong>
50+
{{/if}}
51+
{{else if this.data.event.locationName}}
52+
<strong>{{t 'At'}} {{this.data.event.locationName}}</strong>
53+
{{else}}
54+
<strong>{{t 'Location or online event details to be announced'}}</strong>
55+
{{/if}}
56+
<br>
57+
<strong>{{t 'From'}}:</strong> {{general-date this.data.event.startsAt 'date-time-long'}} {{general-date this.data.event.startsAt 'tz'}}
58+
<br>
59+
<strong>{{t 'To'}}:</strong> {{general-date this.data.event.endsAt 'date-time-long'}} {{general-date this.data.event.startsAt 'tz'}}
60+
{{#if this.data.event.ownerName}}
61+
<br>
62+
<strong>{{t 'Organized By'}}:</strong> {{this.data.event.ownerName}}
63+
{{/if}}
64+
</div>
65+
{{/if}}
3566
{{#if (or (eq this.data.status 'expired') (eq this.data.status 'completed') (eq this.data.status 'placed'))}}
3667
<div class="ui padded segment">
3768
<i class="globe icon"></i>

app/templates/orders/view.hbs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<div class="ui one column container stackable doubling left grid" id="top">
2-
<div class="row print">
2+
<div class="row print " role="button" {{action 'redirectToStartPage' this.model.order.event.identifier}}>
33
<div class="column">
44
<h2>{{this.model.order.event.name}}</h2>
55
</div>
66
</div>
7-
<div class="row print">
7+
<div class="row print" role="button" {{action 'redirectToStartPage' this.model.order.event.identifier}}>
88
<div class="column">
99
<div class="ui small gray-text">
1010
{{general-date this.model.order.event.startsAt 'date-time-long'}} {{general-date this.model.order.event.startsAt 'tz'}} -
@@ -38,7 +38,8 @@
3838
</div>
3939
<div class="six wide column">
4040
<Orders::EventInfo
41-
@data={{this.model.order}} />
41+
@data={{this.model.order}}
42+
@redirectStartPgEvent={{action this.redirectToStartPage}}/>
4243
<br/>
4344
{{#if this.showTicketsButton}}
4445
<div class="d-flex">

0 commit comments

Comments
 (0)