Merge pull request #3134 from dpalou/MOBILE-3993

MOBILE-3993 groups: Add a class to group data in UI
main
Pau Ferrer Ocaña 2022-02-23 16:56:04 +01:00 committed by GitHub
commit 2cdf6612c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 25 additions and 19 deletions

View File

@ -95,7 +95,7 @@
</ion-label> </ion-label>
</ion-item> </ion-item>
<!-- Select the group. --> <!-- Select the group. -->
<ion-item class="ion-text-wrap" *ngIf="!loadingGroups && groups.length > 0"> <ion-item class="ion-text-wrap core-edit-set-group" *ngIf="!loadingGroups && groups.length > 0">
<ion-label> <ion-label>
<p class="item-heading" [core-mark-required]="true">{{ 'core.group' | translate }}</p> <p class="item-heading" [core-mark-required]="true">{{ 'core.group' | translate }}</p>
</ion-label> </ion-label>

View File

@ -84,7 +84,7 @@
</p> </p>
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item class="ion-text-wrap" *ngIf="groupName"> <ion-item class="ion-text-wrap core-groupname" *ngIf="groupName">
<ion-label> <ion-label>
<h2>{{ 'core.group' | translate}}</h2> <h2>{{ 'core.group' | translate}}</h2>
<p>{{ groupName }}</p> <p>{{ groupName }}</p>

View File

@ -20,7 +20,7 @@
<!-- User can view all submissions (teacher). --> <!-- User can view all submissions (teacher). -->
<ng-container *ngIf="assign && canViewAllSubmissions"> <ng-container *ngIf="assign && canViewAllSubmissions">
<ion-list class="core-list-align-detail-right"> <ion-list class="core-list-align-detail-right">
<ion-item class="ion-text-wrap" *ngIf="(groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector" *ngIf="(groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-assign-groupslabel"> <ion-label id="addon-assign-groupslabel">
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>

View File

@ -372,7 +372,9 @@
<!-- Template to render some data regarding the submission status. --> <!-- Template to render some data regarding the submission status. -->
<ng-template #submissionStatus> <ng-template #submissionStatus>
<ng-container *ngIf="assign && assign!.teamsubmission && lastAttempt"> <ng-container *ngIf="assign && assign!.teamsubmission && lastAttempt">
<p *ngIf="lastAttempt!.submissiongroup && lastAttempt!.submissiongroupname">{{lastAttempt!.submissiongroupname}}</p> <p *ngIf="lastAttempt!.submissiongroup && lastAttempt!.submissiongroupname" class="core-groupname">
{{lastAttempt!.submissiongroupname}}
</p>
<ng-container *ngIf="assign!.preventsubmissionnotingroup && <ng-container *ngIf="assign!.preventsubmissionnotingroup &&
!lastAttempt!.submissiongroup && !lastAttempt!.submissiongroup &&
(!lastAttempt!.usergroups || lastAttempt!.usergroups.length <= 0)"> (!lastAttempt!.usergroups || lastAttempt!.usergroups.length <= 0)">

View File

@ -25,7 +25,7 @@
</core-empty-box> </core-empty-box>
<ion-list> <ion-list>
<ion-item class="ion-text-wrap" *ngIf="(groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector" *ngIf="(groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-assign-groupslabel-list"> <ion-label id="addon-assign-groupslabel-list">
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>
@ -48,7 +48,9 @@
{{ 'addon.mod_assign.hiddenuser' | translate }}{{submission.blindid}} {{ 'addon.mod_assign.hiddenuser' | translate }}{{submission.blindid}}
</p> </p>
<p *ngIf="assign && assign!.teamsubmission"> <p *ngIf="assign && assign!.teamsubmission">
<span *ngIf="submission.groupname">{{submission.groupname}}</span> <span *ngIf="submission.groupname" class="core-groupname">
{{submission.groupname}}
</span>
<span *ngIf="assign!.preventsubmissionnotingroup && !submission.groupname && submission.noGroups <span *ngIf="assign!.preventsubmissionnotingroup && !submission.groupname && submission.noGroups
&& !submission.blindid" class="text-danger"> && !submission.blindid" class="text-danger">
{{ 'addon.mod_assign.noteam' | translate }} {{ 'addon.mod_assign.noteam' | translate }}

View File

@ -21,7 +21,7 @@
</ion-item> </ion-item>
</ion-card> </ion-card>
<ion-item class="ion-text-wrap"> <ion-item class="ion-text-wrap core-group-selector">
<ion-label id="addon-bigbluebuttonbn-groupslabel"> <ion-label id="addon-bigbluebuttonbn-groupslabel">
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>

View File

@ -14,7 +14,7 @@
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content> <ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
</ion-refresher> </ion-refresher>
<core-loading [hideUntil]="sessions.loaded"> <core-loading [hideUntil]="sessions.loaded">
<ion-item class="ion-text-wrap" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-chat-groupslabel"> <ion-label id="addon-chat-groupslabel">
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>

View File

@ -25,7 +25,7 @@
[courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings"> [courseId]="courseId" [hasDataToSync]="hasOffline || hasOfflineRatings">
</core-course-module-info> </core-course-module-info>
<ion-item class="ion-text-wrap" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-data-groupslabel"> <ion-label id="addon-data-groupslabel">
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>

View File

@ -18,7 +18,7 @@
</ion-header> </ion-header>
<ion-content> <ion-content>
<core-loading [hideUntil]="loaded"> <core-loading [hideUntil]="loaded">
<ion-item class="ion-text-wrap" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-data-groupslabel"> <ion-label id="addon-data-groupslabel">
<ng-container *ngIf="groupInfo.separateGroups">{{ 'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.separateGroups">{{ 'core.groupsvisible' | translate }}</ng-container>
<ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsseparate' | translate }}</ng-container>

View File

@ -25,7 +25,7 @@
</ion-item> </ion-item>
</ion-card> </ion-card>
<ion-item class="ion-text-wrap" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-data-groupslabel"> <ion-label id="addon-data-groupslabel">
<ng-container *ngIf="groupInfo.separateGroups">{{ 'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.separateGroups">{{ 'core.groupsvisible' | translate }}</ng-container>
<ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{ 'core.groupsseparate' | translate }}</ng-container>

View File

@ -40,7 +40,7 @@
<ng-template #basicInfo> <ng-template #basicInfo>
<ion-list *ngIf="access && access.canviewanalysis && !access.isempty"> <ion-list *ngIf="access && access.canviewanalysis && !access.isempty">
<ion-item class="ion-text-wrap" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-feedback-groupslabel"> <ion-label id="addon-feedback-groupslabel">
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>

View File

@ -15,7 +15,8 @@
</ion-refresher> </ion-refresher>
<core-loading [hideUntil]="attempts && attempts.loaded"> <core-loading [hideUntil]="attempts && attempts.loaded">
<ion-list class="ion-no-margin"> <ion-list class="ion-no-margin">
<ion-item class="ion-text-wrap" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector"
*ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-feedback-groupslabel"> <ion-label id="addon-feedback-groupslabel">
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>

View File

@ -14,7 +14,7 @@
</ion-refresher> </ion-refresher>
<core-loading [hideUntil]="loaded"> <core-loading [hideUntil]="loaded">
<ion-list class="ion-no-margin"> <ion-list class="ion-no-margin">
<ion-item class="ion-text-wrap" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-feedback-groupslabel"> <ion-label id="addon-feedback-groupslabel">
<ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container> <ng-container *ngIf="groupInfo.separateGroups">{{'core.groupsseparate' | translate }}</ng-container>
<ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container> <ng-container *ngIf="groupInfo.visibleGroups">{{'core.groupsvisible' | translate }}</ng-container>

View File

@ -67,7 +67,7 @@
</core-user-avatar> </core-user-avatar>
<div class="addon-mod-forum-discussion-author"> <div class="addon-mod-forum-discussion-author">
<span *ngIf="discussion.userfullname">{{discussion.userfullname}}</span> <span *ngIf="discussion.userfullname">{{discussion.userfullname}}</span>
<p *ngIf="discussion.groupname"> <p *ngIf="discussion.groupname" class="core-groupname">
<ion-icon name="fas-users" [attr.aria-label]="'addon.mod_forum.group' | translate"> <ion-icon name="fas-users" [attr.aria-label]="'addon.mod_forum.group' | translate">
</ion-icon> {{ discussion.groupname }} </ion-icon> {{ discussion.groupname }}
</p> </p>

View File

@ -31,7 +31,7 @@
</core-user-avatar> </core-user-avatar>
<div class="addon-mod-forum-post-author"> <div class="addon-mod-forum-post-author">
<span *ngIf="post.author && post.author.fullname">{{post.author.fullname}}</span> <span *ngIf="post.author && post.author.fullname">{{post.author.fullname}}</span>
<p *ngIf="post.author && post.author.groups"> <p *ngIf="post.author && post.author.groups" class="core-groupname">
<ng-container *ngFor="let group of post.author.groups"> <ng-container *ngFor="let group of post.author.groups">
<ion-icon name="fas-users" [attr.aria-label]="'addon.mod_forum.group' | translate"> <ion-icon name="fas-users" [attr.aria-label]="'addon.mod_forum.group' | translate">
</ion-icon> {{ group.name }} </ion-icon> {{ group.name }}

View File

@ -45,7 +45,7 @@
<ion-label>{{ 'addon.mod_forum.posttomygroups' | translate }}</ion-label> <ion-label>{{ 'addon.mod_forum.posttomygroups' | translate }}</ion-label>
<ion-toggle [(ngModel)]="newDiscussion.postToAllGroups" name="postallgroups"></ion-toggle> <ion-toggle [(ngModel)]="newDiscussion.postToAllGroups" name="postallgroups"></ion-toggle>
</ion-item> </ion-item>
<ion-item *ngIf="showGroups"> <ion-item *ngIf="showGroups" class="core-edit-set-group">
<ion-label id="addon-mod-forum-groupslabel">{{ 'addon.mod_forum.group' | translate }}</ion-label> <ion-label id="addon-mod-forum-groupslabel">{{ 'addon.mod_forum.group' | translate }}</ion-label>
<ion-select [(ngModel)]="newDiscussion.groupId" [disabled]="newDiscussion.postToAllGroups" <ion-select [(ngModel)]="newDiscussion.groupId" [disabled]="newDiscussion.postToAllGroups"
aria-labelledby="addon-mod-forum-groupslabel" interface="action-sheet" name="groupid" aria-labelledby="addon-mod-forum-groupslabel" interface="action-sheet" name="groupid"

View File

@ -126,7 +126,8 @@
<ng-template> <ng-template>
<core-loading [hideUntil]="reportLoaded"> <core-loading [hideUntil]="reportLoaded">
<!-- Group selector if the activity uses groups. --> <!-- Group selector if the activity uses groups. -->
<ion-item class="ion-text-wrap" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector"
*ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-mod_lesson-groupslabel"> <ion-label id="addon-mod_lesson-groupslabel">
<span *ngIf="groupInfo.separateGroups">{{ 'core.groupsseparate' | translate }}</span> <span *ngIf="groupInfo.separateGroups">{{ 'core.groupsseparate' | translate }}</span>
<span *ngIf="groupInfo.visibleGroups">{{ 'core.groupsvisible' | translate }}</span> <span *ngIf="groupInfo.visibleGroups">{{ 'core.groupsvisible' | translate }}</span>

View File

@ -192,7 +192,7 @@
<h2 *ngIf="workshop!.phase > PHASE_SUBMISSION">{{ 'addon.mod_workshop.gradesreport' | translate }}</h2> <h2 *ngIf="workshop!.phase > PHASE_SUBMISSION">{{ 'addon.mod_workshop.gradesreport' | translate }}</h2>
</ion-label> </ion-label>
</ion-item-divider> </ion-item-divider>
<ion-item class="ion-text-wrap" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)"> <ion-item class="ion-text-wrap core-group-selector" *ngIf="groupInfo && (groupInfo.separateGroups || groupInfo.visibleGroups)">
<ion-label id="addon-workshop-groupslabel" *ngIf="groupInfo.separateGroups"> <ion-label id="addon-workshop-groupslabel" *ngIf="groupInfo.separateGroups">
{{ 'core.groupsseparate' | translate }} {{ 'core.groupsseparate' | translate }}
</ion-label> </ion-label>