Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOBILE-4505 course: Avoid show two info icons in navbar #4187

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
7 changes: 7 additions & 0 deletions src/addons/mod/bigbluebuttonbn/components/index/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
(action)="gotoAddEntry()" />
<core-context-menu-item [priority]="400" *ngIf="firstEntry" [content]="'addon.mod_data.single' | translate" iconAction="fas-file"
(action)="gotoEntry(firstEntry)" />

@if (courseContentsPage) {
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
}
</core-context-menu>

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

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down Expand Up @@ -161,8 +168,9 @@
<ion-item class="ion-text-wrap core-analysis" *ngFor="let item of items">
<ion-label>
<p class="item-heading">
{{item.num}}. <core-format-text [component]="component" [componentId]="componentId" [text]="item.name"
contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId" />
{{item.num}}.
<core-format-text [component]="component" [componentId]="componentId" [text]="item.name" contextLevel="module"
[contextInstanceId]="module.id" [courseId]="courseId" />
</p>
<p>
<core-format-text [component]="component" [componentId]="componentId" [text]="item.label" contextLevel="module"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
9 changes: 9 additions & 0 deletions src/addons/mod/forum/components/index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@
<ion-button fill="clear" *ngIf="showSearch" (click)="openSearch()" [ariaLabel]="'core.search' | translate">
<ion-icon name="fas-magnifying-glass" slot="icon-only" aria-hidden="true" />
</ion-button>

@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>

<!-- Add an empty context menu so split view pages can add items, otherwise the menu disappears in some cases. -->
<core-context-menu />
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@
<ion-icon name="fas-magnifying-glass" slot="icon-only" aria-hidden="true" />
</ion-button>

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

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@
iconAction="fas-chart-bar" />
<core-context-menu-item *ngIf="canViewAllAttempts" [priority]="1000" [content]="'addon.mod_h5pactivity.attempts_report' | translate"
(action)="viewAllAttempts()" iconAction="fas-chart-bar" />

@if (courseContentsPage) {
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
}
</core-context-menu>

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

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
7 changes: 7 additions & 0 deletions src/addons/mod/lti/components/index/addon-mod-lti-index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
7 changes: 7 additions & 0 deletions src/addons/mod/url/components/index/addon-mod-url-index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@
iconAction="fas-pen" (action)="goToEditPage()" />
<core-context-menu-item *ngIf="canEdit" [priority]="580" [content]="'addon.mod_wiki.createpage' | translate" iconAction="fas-plus"
(action)="goToNewPage()" />

@if (courseContentsPage) {
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
}
</core-context-menu>

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

<!-- Content. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<!-- Buttons to add to the header. -->
<core-navbar-buttons slot="end">
@if (!courseContentsPage) {
<ion-button fill="clear" (click)="openModuleSummary()" aria-haspopup="true" [ariaLabel]="'core.info' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>
} @else {
<core-context-menu>
<core-context-menu-item [priority]="5000" [content]="'core.info' | translate" (action)="openModuleSummary()"
iconAction="fas-circle-info" />
</core-context-menu>
}
</core-navbar-buttons>

<!-- Content. -->
Expand Down
8 changes: 8 additions & 0 deletions src/core/features/course/pages/index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,19 @@ <h1>
</ion-title>

<ion-buttons slot="end">
@if (course?.format !== 'singleactivity') {
<ion-button fill="clear" (click)="openCourseSummary()" [ariaLabel]="'core.course.coursesummary' | translate">
<ion-icon name="fas-circle-info" slot="icon-only" aria-hidden="true" />
</ion-button>

<!-- Add an empty context menu so tab pages can add items, otherwise the menu disappears in some cases. -->
<core-context-menu />
} @else {
<core-context-menu>
<core-context-menu-item [priority]="1" [content]="'core.course.coursesummary' | translate" (action)="openCourseSummary()"
iconAction="fas-graduation-cap" />
</core-context-menu>
}
</ion-buttons>
</ion-toolbar>
</ion-header>
Expand Down
Loading