Merge pull request #4187 from alfonso-salces/MOBILE-4505
MOBILE-4505 course: Avoid show two info icons in navbarmain
commit
890b1e9a9a
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
@ -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"
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -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. -->
|
||||
|
|
|
@ -10,11 +10,19 @@
|
|||
</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>
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
<!-- Buttons to add to the header. -->
|
||||
<core-navbar-buttons slot="end">
|
||||
<ion-button fill="clear" (click)="openModuleSummary()" [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>
|
||||
|
||||
<!-- Activity info. -->
|
||||
|
|
|
@ -12,10 +12,11 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { Component, OnInit, OnDestroy, Input, ViewChild, HostBinding } from '@angular/core';
|
||||
import { Component, OnInit, OnDestroy, Input, ViewChild, HostBinding, Optional } from '@angular/core';
|
||||
|
||||
import { CoreSiteWSPreSets } from '@classes/sites/authenticated-site';
|
||||
import { CoreCourseModuleSummaryResult } from '@features/course/components/module-summary/module-summary';
|
||||
import { CoreCourseContentsPage } from '@features/course/pages/contents/contents';
|
||||
import { CoreCourse } from '@features/course/services/course';
|
||||
import { CoreCourseModuleData } from '@features/course/services/course-helper';
|
||||
import {
|
||||
|
@ -71,6 +72,8 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C
|
|||
|
||||
jsData?: Record<string, unknown>; // Data to pass to the component.
|
||||
|
||||
constructor(@Optional() public courseContentsPage?: CoreCourseContentsPage) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue