Skip to content

Commit f13ab6b

Browse files
rootroot
authored andcommitted
Home - adding the contextual help directive
1 parent 073cd07 commit f13ab6b

File tree

7 files changed

+42
-4
lines changed

7 files changed

+42
-4
lines changed

src/app/home-page/recent-item-list/recent-item-list.component.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
<ng-container *ngVar="(itemRD$ | async) as itemRD">
22
<div class="mt-4" [ngClass]="placeholderFontClass" *ngIf="itemRD?.hasSucceeded && itemRD?.payload?.page.length > 0" @fadeIn>
33
<div class="d-flex flex-row border-bottom mb-4 pb-4"></div>
4-
<h2> {{'home.recent-submissions.head' | translate}}</h2>
4+
<h2>
5+
<span
6+
*dsContextHelp="{
7+
content: 'home.tooltip.recent-item-list',
8+
id: 'home-recent-item-list',
9+
iconPlacement: 'right',
10+
tooltipPlacement: ['top', 'right', 'bottom']
11+
}"
12+
>
13+
{{'home.recent-submissions.head' | translate}}
14+
</span>
15+
</h2>
516
<div class="my-4" *ngFor="let item of itemRD?.payload?.page">
617
<ds-listable-object-component-loader [object]="item" [viewMode]="viewMode" class="pb-4">
718
</ds-listable-object-component-loader>

src/app/home-page/recent-item-list/recent-item-list.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import {
3939
fadeIn,
4040
fadeInOut,
4141
} from '../../shared/animations/fade';
42+
import { ContextHelpDirective } from '../../shared/context-help.directive';
4243
import { ErrorComponent } from '../../shared/error/error.component';
4344
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
4445
import { ListableObjectComponentLoaderComponent } from '../../shared/object-collection/shared/listable-object/listable-object-component-loader.component';
@@ -61,7 +62,7 @@ import { VarDirective } from '../../shared/utils/var.directive';
6162
fadeInOut,
6263
],
6364
standalone: true,
64-
imports: [VarDirective, NgIf, NgClass, NgFor, ListableObjectComponentLoaderComponent, ErrorComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule],
65+
imports: [VarDirective, ContextHelpDirective, NgIf, NgClass, NgFor, ListableObjectComponentLoaderComponent, ErrorComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule],
6566
})
6667
export class RecentItemListComponent implements OnInit, OnDestroy {
6768
itemRD$: Observable<RemoteData<PaginatedList<Item>>>;

src/app/home-page/top-level-community-list/top-level-community-list.component.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
<ng-container *ngVar="(communitiesRD$ | async) as communitiesRD">
22
<div *ngIf="communitiesRD?.hasSucceeded ">
33
<h2>
4-
{{'home.top-level-communities.head' | translate}}
4+
<span
5+
*dsContextHelp="{
6+
content: 'home.tooltip.top-level-communities',
7+
id: 'home-top-level-community-list',
8+
iconPlacement: 'right',
9+
tooltipPlacement: ['top', 'right', 'bottom']
10+
}"
11+
>
12+
{{'home.top-level-communities.head' | translate}}
13+
</span>
514
</h2>
615
<p class="lead">{{'home.top-level-communities.help' | translate}}</p>
716
<ds-viewable-collection

src/app/home-page/top-level-community-list/top-level-community-list.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { RemoteData } from '../../core/data/remote-data';
3131
import { PaginationService } from '../../core/pagination/pagination.service';
3232
import { Community } from '../../core/shared/community.model';
3333
import { fadeInOut } from '../../shared/animations/fade';
34+
import { ContextHelpDirective } from '../../shared/context-help.directive';
3435
import { hasValue } from '../../shared/empty.util';
3536
import { ErrorComponent } from '../../shared/error/error.component';
3637
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
@@ -48,7 +49,7 @@ import { VarDirective } from '../../shared/utils/var.directive';
4849
changeDetection: ChangeDetectionStrategy.OnPush,
4950
animations: [fadeInOut],
5051
standalone: true,
51-
imports: [VarDirective, NgIf, ObjectCollectionComponent, ErrorComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule],
52+
imports: [VarDirective, ContextHelpDirective, NgIf, ObjectCollectionComponent, ErrorComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule],
5253
})
5354

5455
export class TopLevelCommunityListComponent implements OnInit, OnDestroy {

src/assets/i18n/en.json5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6781,4 +6781,8 @@
67816781
"live-region.ordering.dropped": "{{ itemName }}, dropped at position {{ index }} of {{ length }}.",
67826782

67836783
"dynamic-form-array.sortable-list.label": "Sortable list",
6784+
6785+
"home.tooltip.top-level-communities": "Here you can view a list of the Repository communities, organized by default in alphabetical order. In the bottom corner, there is a pagination feature to display the communities and, by selecting a community, you will have access to its content and can browse through its sub-communities or collections. If you want to access the distribution feed from the home page, click on the feed button on the right.",
6786+
6787+
"home.tooltip.recent-item-list": "Here you can view the most recently published submissions. If you want to see more published items, click on the load more button.",
67846788
}

src/assets/i18n/es.json5

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10194,4 +10194,10 @@
1019410194

1019510195
// "search-facet-option.update.announcement": "The page will be reloaded. Filter {{ filter }} is selected.",
1019610196
"search-facet-option.update.announcement": "La página será recargada. Filtro {{ filter }} seleccionado.",
10197+
10198+
// "home.tooltip.top-level-communities": "Here you can view a list of the Repository communities, organized by default in alphabetical order. In the bottom corner, there is a pagination feature to display the communities and, by selecting a community, you will have access to its content and can browse through its sub-communities or collections. If you want to access the distribution feed from the home page, click on the feed button on the right.",
10199+
"home.tooltip.top-level-communities": "Aquí puedes ver una lista de las comunidades del repositorio, organizadas en orden alfabética. En la esquina inferior, hay una función de paginación para mostrar las comunidades y, al seleccionar una comunidad, tendrás acceso a su contenido y podrás navegar por sus subcomunidades o colecciones. Si deseas acceder al feed de distribución de la página de inicio, puedes hacer clic en el botón de feed que está a la derecha.",
10200+
10201+
// "home.tooltip.recent-item-list": "Here you can view the most recently published submissions. If you want to see more published items, click on the load more button.",
10202+
"home.tooltip.recent-item-list": "Aquí puedes ver los envíos publicados más recientemente. Si deseas ver más ítens publicados, haz clic en el botón de cargar más.",
1019710203
}

src/assets/i18n/pt-BR.json5

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10243,4 +10243,10 @@
1024310243

1024410244
// "search-facet-option.update.announcement": "The page will be reloaded. Filter {{ filter }} is selected.",
1024510245
"search-facet-option.update.announcement": "A página será recarregada. O filtro {{ filter }} foi selecionado.",
10246+
10247+
// "home.tooltip.top-level-communities": "Here you can view a list of the Repository communities, organized by default in alphabetical order. In the bottom corner, there is a pagination feature to display the communities and, by selecting a community, you will have access to its content and can browse through its sub-communities or collections. If you want to access the distribution feed from the home page, click on the feed button on the right.",
10248+
"home.tooltip.top-level-communities": "Aqui você pode visualizar a lista de comunidades do Repositório, organizadas por padrão em ordem alfabética. No canto inferior, há um recurso de paginação para exibir as comunidades e, ao selecionar uma comunidade, você terá acesso ao seu conteúdo e poderá navegar por suas sub-comunidades ou coleções. Caso você deseje ter acesso ao feed de distribuição da página inicial, você pode clicar no botão de feed à direita.",
10249+
10250+
// "home.tooltip.recent-item-list": "Here you can view the most recently published submissions. If you want to see more published items, click on the load more button.",
10251+
"home.tooltip.recent-item-list": "Aqui você pode visualizar as submissões publicadas mais recentemente. Se você deseja ver mais itens publicados, clique no botão carregar mais.",
1024610252
}

0 commit comments

Comments
 (0)