Skip to content

Commit 9f44fca

Browse files
authored
Merge pull request #4714 from crazyserver/MOBILE-5002
Mobile 5002
2 parents f5e628b + e2f79ef commit 9f44fca

File tree

70 files changed

+453
-701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+453
-701
lines changed

src/addons/blog/pages/index/index.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,8 @@ <h1>{{ title | translate }}</h1>
3333
}
3434

3535
@if (hasOfflineDataToSync()) {
36-
<ion-card class="core-warning-card">
37-
<ion-item>
38-
<ion-icon name="fas-triangle-exclamation" slot="start" aria-hidden="true" />
39-
<ion-label>{{ 'core.hasdatatosync' | translate:{ $a: 'addon.blog.blog' | translate } }}</ion-label>
40-
</ion-item>
41-
</ion-card>
36+
<core-alert-card type="warning"
37+
[message]="'core.hasdatatosync' | translate:{ $a: 'addon.blog.blog' | translate }" />
4238
}
4339

4440
@for (entry of entries; track getEntryTemplateId(entry)) {

src/addons/calendar/pages/day/day.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,8 @@ <h2>{{ periodName }}</h2>
5454
<!-- There is data to be synchronized -->
5555
@if (day.hasOffline) {
5656
<div class="list-item-limited-width">
57-
<ion-card class="core-warning-card">
58-
<ion-item>
59-
<ion-icon name="fas-triangle-exclamation" slot="start" aria-hidden="true" />
60-
<ion-label>{{ 'core.hasdatatosync' | translate:{$a: 'core.day' | translate} }}</ion-label>
61-
</ion-item>
62-
</ion-card>
57+
<core-alert-card type="warning"
58+
[message]="'core.hasdatatosync' | translate:{$a: 'core.day' | translate}" />
6359
</div>
6460
}
6561

src/addons/calendar/pages/event/event.html

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,8 @@ <h1>
5656
</ion-item>
5757
<!-- There is data to be synchronized -->
5858
@if (hasOffline || event.deleted) {
59-
<ion-card class="core-warning-card">
60-
<ion-item>
61-
<ion-icon name="fas-triangle-exclamation" slot="start" aria-hidden="true" />
62-
<ion-label>{{ 'core.hasdatatosync' | translate:{$a: 'addon.calendar.calendarevent' | translate} }}</ion-label>
63-
</ion-item>
64-
</ion-card>
59+
<core-alert-card type="warning"
60+
[message]="'core.hasdatatosync' | translate:{$a: 'addon.calendar.calendarevent' | translate}" />
6561
}
6662
<ion-item class="ion-text-wrap">
6763
<ion-label>
@@ -148,21 +144,16 @@ <h1>
148144

149145
@if (remindersEnabled && event) {
150146
@if (!canScheduleExactAlarms && !scheduleExactWarningHidden) {
151-
<ion-card class="core-warning-card core-card-with-buttons">
152-
<ion-item class="ion-text-wrap">
153-
<ion-icon name="fas-circle-info" slot="start" aria-hidden="true" />
154-
<ion-label>
155-
<p><strong>{{ 'core.exactalarmsturnedoff' | translate }}</strong></p>
156-
<p>{{ 'core.exactalarmsturnedoffmessage' | translate }}</p>
157-
</ion-label>
158-
</ion-item>
159-
<div class="core-card-buttons">
147+
<core-alert-card type="warning"
148+
[title]="'core.exactalarmsturnedoff' | translate"
149+
[message]="'core.exactalarmsturnedoffmessage' | translate">
150+
<div buttons>
160151
<ion-button fill="clear" (click)="hideAlarmWarning()">
161152
{{ 'core.dontshowagain' | translate | coreNoPeriod }}
162153
</ion-button>
163154
<ion-button fill="outline" (click)="openAlarmSettings()">{{ 'core.turnon' | translate }}</ion-button>
164155
</div>
165-
</ion-card>
156+
</core-alert-card>
166157
}
167158

168159
<ion-card>

src/addons/calendar/pages/index/index.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,8 @@ <h1>{{ 'addon.calendar.calendar' | translate }}</h1>
3939
<!-- There is data to be synchronized -->
4040
@if (hasOffline) {
4141
<div class="list-item-limited-width">
42-
<ion-card class="core-warning-card">
43-
<ion-item>
44-
<ion-icon name="fas-triangle-exclamation" slot="start" aria-hidden="true" />
45-
<ion-label>{{ 'core.hasdatatosync' | translate:{$a: 'addon.calendar.calendar' | translate} }}</ion-label>
46-
</ion-item>
47-
</ion-card>
42+
<core-alert-card type="warning"
43+
[message]="'core.hasdatatosync' | translate:{$a: 'addon.calendar.calendar' | translate}"/>
4844
</div>
4945
}
5046

src/addons/coursecompletion/pages/report/report.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,8 @@ <h2>{{ 'addon.coursecompletion.manualselfcompletion' | translate }}</h2>
125125
</ion-item>
126126
</ion-card>
127127
} @else if (!tracked()) {
128-
<ion-card class="core-warning-card">
129-
<ion-item>
130-
<ion-icon name="fas-triangle-exclamation" slot="start" aria-hidden="true" />
131-
<ion-label>{{ 'addon.coursecompletion.nottracked' | translate }}</ion-label>
132-
</ion-item>
133-
</ion-card>
128+
<core-alert-card type="warning"
129+
[message]="'addon.coursecompletion.nottracked' | translate" />
134130
}
135131
</core-loading>
136132
</ion-content>

src/addons/messages/pages/settings/settings.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,7 @@ <h2>{{ 'core.settings.general' | translate }}</h2>
3030
</ion-card>
3131

3232
@if (warningMessage()) {
33-
<ion-card class="core-warning-card ion-margin-top">
34-
<ion-item>
35-
<ion-icon name="fas-triangle-exclamation" slot="start" aria-hidden="true" />
36-
<ion-label>{{ warningMessage() }}</ion-label>
37-
</ion-item>
38-
</ion-card>
33+
<core-alert-card type="warning" [message]="warningMessage()"/>
3934
} @else {
4035
<!-- Contactable privacy. -->
4136
<ion-card>

src/addons/mod/assign/components/index/addon-mod-assign-index.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,8 @@
143143

144144
<!-- Ungrouped users. -->
145145
@if (assign.teamsubmission && summary && summary.warnofungroupedusers) {
146-
<ion-card class="core-info-card">
147-
<ion-item>
148-
<ion-icon name="fas-circle-question" slot="start" aria-hidden="true" />
149-
<ion-label>{{ 'addon.mod_assign.'+summary.warnofungroupedusers | translate }}</ion-label>
150-
</ion-item>
151-
</ion-card>
146+
<core-alert-card type="info"
147+
[message]="'addon.mod_assign.'+summary.warnofungroupedusers | translate" />
152148
}
153149

154150
@if (!showLoading) {

src/addons/mod/assign/components/submission/addon-mod-assign-submission.html

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,8 @@
33
@if (assign) {
44
@if (timeLimitFinished && (canEdit || canSubmit)) {
55
<!-- Time limit is over. -->
6-
<ion-card class="core-danger-card">
7-
<ion-item class="ion-text-wrap">
8-
<ion-icon name="fas-triangle-exclamation" slot="start" aria-hidden="true" />
9-
<ion-label>
10-
<p>{{ 'addon.mod_assign.caneditsubmission' | translate }}</p>
11-
</ion-label>
12-
</ion-item>
13-
</ion-card>
6+
<core-alert-card type="danger"
7+
[message]="'addon.mod_assign.caneditsubmission' | translate" />
148
}
159

1610
@if (!blindMarking && user) {
@@ -452,20 +446,15 @@ <h4 class="big">{{'core.gradenoun' | translate}}</h4>
452446
</ion-button>
453447
} @else {
454448
<!-- Warning message if cannot save grades. -->
455-
<ion-card class="core-warning-card">
456-
<ion-item>
457-
<ion-icon name="fas-triangle-exclamation" slot="start" aria-hidden="true" />
458-
<ion-label>
459-
<p>{{ 'addon.mod_assign.cannotgradefromapp' | translate }}</p>
460-
@if (gradeUrl) {
461-
<ion-button expand="block" [href]="gradeUrl" core-link [showBrowserWarning]="false">
462-
{{ 'core.openinbrowser' | translate }}
463-
<ion-icon name="fas-up-right-from-square" slot="end" aria-hidden="true" />
464-
</ion-button>
465-
}
466-
</ion-label>
467-
</ion-item>
468-
</ion-card>
449+
<core-alert-card type="warning"
450+
[message]="'addon.mod_assign.cannotgradefromapp' | translate" >
451+
@if (gradeUrl) {
452+
<ion-button expand="block" [href]="gradeUrl" core-link [showBrowserWarning]="false">
453+
{{ 'core.openinbrowser' | translate }}
454+
<ion-icon name="fas-up-right-from-square" slot="end" aria-hidden="true" />
455+
</ion-button>
456+
}
457+
</core-alert-card>
469458
}
470459
}
471460
@if (canEdit) {
145 Bytes
Loading

0 commit comments

Comments
 (0)