UI Improvements
This commit is contained in:
parent
7d0896957c
commit
20ea26aa69
|
@ -1,6 +1,6 @@
|
||||||
<div class="input-group flex-nowrap">
|
<div class="input-group flex-nowrap">
|
||||||
<span class="input-group-text" id="addon-wrapping" translate>select_date_range</span>
|
<span class="input-group-text" id="dateRangeLabel" (click)="dp.show()" translate>select_date_range</span>
|
||||||
<input type="text" [disabled]="disabled" [placeholder]="'select_date_range'|translate" class="form-control" placement="bottom"
|
<input type="text" [disabled]="disabled" [placeholder]="'select_date_range'|translate" class="form-control" placement="bottom"
|
||||||
bsDaterangepicker [bsConfig]="dateRangePickerOptions" [maxDate]="maxDate" [(bsValue)]="range" (bsValueChange)="updateValue($event)">
|
bsDaterangepicker [bsConfig]="dateRangePickerOptions" [maxDate]="maxDate" [(bsValue)]="range" (bsValueChange)="updateValue($event)" #dp="bsDaterangepicker">
|
||||||
<button class="btn btn-outline-secondary" type="button" (click)="resetRange()" translate>remove_date_filters</button>
|
<button class="btn btn-outline-secondary" type="button" (click)="resetRange()" translate>remove_date_filters</button>
|
||||||
</div>
|
</div>
|
|
@ -1,3 +1,10 @@
|
||||||
.date-picker {
|
.date-picker {
|
||||||
width: 85%
|
width: 85%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hide #dateRangeLabel on mobile */
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
#dateRangeLabel {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
|
|
||||||
<ng-container *ngIf="sourceType && enablePaginationTypes.includes(sourceType)">
|
<ng-container *ngIf="sourceType && enablePaginationTypes.includes(sourceType)">
|
||||||
<div class="row mt-5">
|
<div class="row mt-5">
|
||||||
<div class="col-xs-12 col-12">
|
<div class="col-xs-12 col-12 pagination-parent">
|
||||||
<pagination
|
<pagination
|
||||||
[totalItems]="totalElements"
|
[totalItems]="totalElements"
|
||||||
[(ngModel)]="currentPage"
|
[(ngModel)]="currentPage"
|
||||||
|
|
|
@ -32,3 +32,8 @@ img {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
color: #0d6efd;
|
color: #0d6efd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pagination-parent {
|
||||||
|
overflow-y: scroll !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
<button type="button" class="btn btn-primary" (click)="addService()">{{ 'add'|translate|ftitlecase }} {{ 'service'|translate }}</button>
|
<button type="button" class="btn btn-primary" (click)="addService()">{{ 'add'|translate|ftitlecase }} {{ 'service'|translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class="alert alert-primary mt-4" role="alert">
|
<div class="alert alert-primary mt-4" role="alert" (click)="goToStats()" translate>open_services_stats</div>
|
||||||
Per visualizzare statistiche e mappa degli interventi, <a routerLinkActive="active" routerLink="/stats/services">vai alla sezione "Statistiche > Interventi"</a>.
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<app-table [sourceType]="'services'" [refreshInterval]="1200000"></app-table>
|
<app-table [sourceType]="'services'" [refreshInterval]="1200000"></app-table>
|
||||||
|
|
|
@ -17,4 +17,8 @@ export class ServicesComponent implements OnInit {
|
||||||
this.router.navigate(['services', 'new']);
|
this.router.navigate(['services', 'new']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
goToStats() {
|
||||||
|
this.router.navigate(['stats', 'services']);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<a routerLinkActive="active" (click)="menuButtonClicked = false" routerLink="/services" translate>menu.services</a>
|
<a routerLinkActive="active" (click)="menuButtonClicked = false" routerLink="/services" translate>menu.services</a>
|
||||||
<a routerLinkActive="active" (click)="menuButtonClicked = false" routerLink="/trainings" translate>menu.trainings</a>
|
<a routerLinkActive="active" (click)="menuButtonClicked = false" routerLink="/trainings" translate>menu.trainings</a>
|
||||||
<a routerLinkActive="active" (click)="menuButtonClicked = false" routerLink="/logs" translate>menu.logs</a>
|
<a routerLinkActive="active" (click)="menuButtonClicked = false" routerLink="/logs" translate>menu.logs</a>
|
||||||
|
<a routerLinkActive="active" (click)="menuButtonClicked = false" routerLink="/stats/services" translate>menu.stats</a>
|
||||||
<a *ngIf="auth.profile.can('admin-read')" routerLinkActive="active" (click)="menuButtonClicked = false" routerLink="/admin" translate>menu.admin</a>
|
<a *ngIf="auth.profile.can('admin-read')" routerLinkActive="active" (click)="menuButtonClicked = false" routerLink="/admin" translate>menu.admin</a>
|
||||||
<a style="float: right;" id="logout" routerLinkActive="active" [routerLink]="auth.profile.profilePageLink">{{ 'menu.hi'|translate|ftitlecase }}, {{ auth.profile.name }}. <b id="logout-text" (click)="logout($event)" translate *ngIf="!auth.profile.impersonating_user">menu.logout</b><b id="logout-text" (click)="auth.logout()" translate *ngIf="auth.profile.impersonating_user">menu.stop_impersonating</b></a>
|
<a style="float: right;" id="logout" routerLinkActive="active" [routerLink]="auth.profile.profilePageLink">{{ 'menu.hi'|translate|ftitlecase }}, {{ auth.profile.name }}. <b id="logout-text" (click)="logout($event)" translate *ngIf="!auth.profile.impersonating_user">menu.logout</b><b id="logout-text" (click)="auth.logout()" translate *ngIf="auth.profile.impersonating_user">menu.stop_impersonating</b></a>
|
||||||
<a class="icon" id="menuButton" (click)="menuButtonClicked = !menuButtonClicked">☰</a>
|
<a class="icon" id="menuButton" (click)="menuButtonClicked = !menuButtonClicked">☰</a>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
background-color: red;
|
background-color: red;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
|
z-index: 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Style the links inside the navigation bar */
|
/* Style the links inside the navigation bar */
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"services": "Services",
|
"services": "Services",
|
||||||
"trainings": "Trainings",
|
"trainings": "Trainings",
|
||||||
"logs": "Logs",
|
"logs": "Logs",
|
||||||
|
"stats": "Stats",
|
||||||
"admin": "Admin",
|
"admin": "Admin",
|
||||||
"logout": "Logout",
|
"logout": "Logout",
|
||||||
"stop_impersonating": "Stop impersonating",
|
"stop_impersonating": "Stop impersonating",
|
||||||
|
@ -298,6 +299,7 @@
|
||||||
"never": "never",
|
"never": "never",
|
||||||
"optional": "optional",
|
"optional": "optional",
|
||||||
"not_enough_permissions": "You don't have enough permissions to access this page.",
|
"not_enough_permissions": "You don't have enough permissions to access this page.",
|
||||||
|
"open_services_stats": "To view the statistics, go to the \"Stats\" page.",
|
||||||
"error_title": "Error",
|
"error_title": "Error",
|
||||||
"success_title": "Success",
|
"success_title": "Success",
|
||||||
"select_date_range": "Select date range",
|
"select_date_range": "Select date range",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"services": "Interventi",
|
"services": "Interventi",
|
||||||
"trainings": "Esercitazioni",
|
"trainings": "Esercitazioni",
|
||||||
"logs": "Logs",
|
"logs": "Logs",
|
||||||
|
"stats": "Statistiche",
|
||||||
"admin": "Amministrazione",
|
"admin": "Amministrazione",
|
||||||
"logout": "Logout",
|
"logout": "Logout",
|
||||||
"stop_impersonating": "Torna al vero account",
|
"stop_impersonating": "Torna al vero account",
|
||||||
|
@ -298,6 +299,7 @@
|
||||||
"never": "mai",
|
"never": "mai",
|
||||||
"optional": "opzionale",
|
"optional": "opzionale",
|
||||||
"not_enough_permissions": "Non hai i permessi necessari per accedere a questa pagina.",
|
"not_enough_permissions": "Non hai i permessi necessari per accedere a questa pagina.",
|
||||||
|
"open_services_stats": "Per visualizzare statistiche e mappa degli interventi, vai alla sezione \"Statistiche\".",
|
||||||
"error_title": "Errore",
|
"error_title": "Errore",
|
||||||
"success_title": "Successo",
|
"success_title": "Successo",
|
||||||
"select_date_range": "Seleziona un intervallo di date",
|
"select_date_range": "Seleziona un intervallo di date",
|
||||||
|
|
Loading…
Reference in New Issue