Skip to content

Commit 890b1e9

Browse files
authored
Merge pull request #4187 from alfonso-salces/MOBILE-4505
MOBILE-4505 course: Avoid show two info icons in navbar
2 parents 4c9b698 + 9cedee3 commit 890b1e9

File tree

25 files changed

+180
-5
lines changed

25 files changed

+180
-5
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<!-- Buttons to add to the header. -->
22
<core-navbar-buttons slot="end">
3+
@if (!courseContentsPage) {
34
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
45
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
56
</ion-button>
7+
} @else {
8+
<core-context-menu>
9+
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
10+
iconAction="fas-circle-info" />
11+
</core-context-menu>
12+
}
613
</core-navbar-buttons>
714

815
<!-- Content. -->

src/addons/mod/bigbluebuttonbn/components/index/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<!-- Buttons to add to the header. -->
22
<core-navbar-buttons slot="end">
3+
@if (!courseContentsPage) {
34
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
45
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
56
</ion-button>
7+
} @else {
8+
<core-context-menu>
9+
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
10+
iconAction="fas-circle-info" />
11+
</core-context-menu>
12+
}
613
</core-navbar-buttons>
714

815
<!-- Content. -->

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<!-- Buttons to add to the header. -->
22
<core-navbar-buttons slot="end">
3+
@if (!courseContentsPage) {
34
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
45
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
56
</ion-button>
7+
} @else {
8+
<core-context-menu>
9+
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
10+
iconAction="fas-circle-info" />
11+
</core-context-menu>
12+
}
613
</core-navbar-buttons>
714

815
<!-- Content. -->

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<!-- Buttons to add to the header. -->
22
<core-navbar-buttons slot="end">
3+
@if (!courseContentsPage) {
34
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
45
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
56
</ion-button>
7+
} @else {
8+
<core-context-menu>
9+
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
10+
iconAction="fas-circle-info" />
11+
</core-context-menu>
12+
}
613
</core-navbar-buttons>
714

815
<!-- Content. -->

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<!-- Buttons to add to the header. -->
22
<core-navbar-buttons slot="end">
3+
@if (!courseContentsPage) {
34
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
45
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
56
</ion-button>
7+
} @else {
8+
<core-context-menu>
9+
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
10+
iconAction="fas-circle-info" />
11+
</core-context-menu>
12+
}
613
</core-navbar-buttons>
714

815
<!-- Content. -->

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@
88
(action)="gotoAddEntry()" />
99
<core-context-menu-item [priority]="400" *ngIf="firstEntry" [content]="'addon.mod_data.single' | translate" iconAction="fas-file"
1010
(action)="gotoEntry(firstEntry)" />
11+
12+
@if (courseContentsPage) {
13+
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
14+
iconAction="fas-circle-info" />
15+
}
1116
</core-context-menu>
1217

18+
@if (!courseContentsPage) {
1319
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
1420
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
1521
</ion-button>
22+
}
1623
</core-navbar-buttons>
1724

1825
<!-- Content. -->

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<!-- Buttons to add to the header. -->
22
<core-navbar-buttons slot="end">
3+
@if (!courseContentsPage) {
34
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
45
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
56
</ion-button>
7+
} @else {
8+
<core-context-menu>
9+
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
10+
iconAction="fas-circle-info" />
11+
</core-context-menu>
12+
}
613
</core-navbar-buttons>
714

815
<!-- Content. -->
@@ -161,8 +168,9 @@
161168
<ion-item class="ion-text-wrap core-analysis" *ngFor="let item of items">
162169
<ion-label>
163170
<p class="item-heading">
164-
{{item.num}}. <core-format-text [component]="component" [componentId]="componentId" [text]="item.name"
165-
contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId" />
171+
{{item.num}}.
172+
<core-format-text [component]="component" [componentId]="componentId" [text]="item.name" contextLevel="module"
173+
[contextInstanceId]="module.id" [courseId]="courseId" />
166174
</p>
167175
<p>
168176
<core-format-text [component]="component" [componentId]="componentId" [text]="item.label" contextLevel="module"

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<!-- Buttons to add to the header. -->
22
<core-navbar-buttons slot="end">
3+
@if (!courseContentsPage) {
34
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
45
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
56
</ion-button>
7+
} @else {
8+
<core-context-menu>
9+
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
10+
iconAction="fas-circle-info" />
11+
</core-context-menu>
12+
}
613
</core-navbar-buttons>
714

815
<!-- Content. -->

src/addons/mod/forum/components/index/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,20 @@
33
<ion-button fill="clear" *ngIf="showSearch" (click)="openSearch()" [ariaLabel]="'core.search' | translate">
44
<ion-icon name="fas-magnifying-glass" slot="icon-only" aria-hidden="true" />
55
</ion-button>
6+
7+
@if (!courseContentsPage) {
68
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
79
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
810
</ion-button>
11+
912
<!-- Add an empty context menu so split view pages can add items, otherwise the menu disappears in some cases. -->
1013
<core-context-menu />
14+
} @else {
15+
<core-context-menu>
16+
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
17+
iconAction="fas-circle-info" />
18+
</core-context-menu>
19+
}
1120
</core-navbar-buttons>
1221

1322
<!-- Content. -->

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@
99
<ion-icon name="fas-magnifying-glass" slot="icon-only" aria-hidden="true" />
1010
</ion-button>
1111

12-
<ion-button *ngIf="!showLoading" fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
12+
@if (!courseContentsPage) {
13+
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
1314
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
1415
</ion-button>
16+
} @else {
17+
<core-context-menu>
18+
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
19+
iconAction="fas-circle-info" />
20+
</core-context-menu>
21+
}
1522
</core-navbar-buttons>
1623

1724
<!-- Content. -->

0 commit comments

Comments
 (0)