Skip to content
Snippets Groups Projects
Commit a96bfdcb authored by kevin.dezaphi's avatar kevin.dezaphi
Browse files

FEAT #8345 fix errors and remove correctly message when it's blank

parent e8ec458d
No related branches found
No related tags found
No related merge requests found
......@@ -514,4 +514,4 @@ DELETE FROM status WHERE id = 'FRZ';
INSERT INTO status (id, label_status, is_system, img_filename, maarch_module, can_be_searched, can_be_modified) VALUES ('FRZ', 'PJ gelée', 'Y', 'fm-letter-status-inprogress', 'apps', 'Y', 'Y');
DELETE FROM parameters WHERE id = 'homepage_message';
INSERT INTO parameters (id, description, param_value_string) VALUES ('homepage_message', "Texte apparaissant dans la banière sur la page d'acceuil, laisser vide pour supprimer la banière.", 'Bienvenue dans votre <b>G</b>estion <b>E</b>lectronique du <b>C</b>ourrier.');
\ No newline at end of file
INSERT INTO parameters (id, description, param_value_string) VALUES ('homepage_message', 'Texte apparaissant dans la banière sur la page d''acceuil, laisser vide pour supprimer la banière.', 'Bienvenue dans votre <b>G</b>estion <b>E</b>lectronique du <b>C</b>ourrier.');
\ No newline at end of file
......@@ -29,7 +29,7 @@ class HomeController
$user = UserModel::getByUserId(['userId' => $GLOBALS['userId'], 'select' => ['id']]);
$homeMessage = ParameterModel::getById(['select' => ['param_value_string'], 'id'=> 'homepage_message']);
$homeMessage = $homeMessage['param_value_string'];
$homeMessage = trim($homeMessage['param_value_string']);
$redirectedBaskets = BasketModel::getRedirectedBasketsByUserId(['userId' => $GLOBALS['userId']]);
$groups = UserModel::getGroupsByUserId(['userId' => $GLOBALS['userId']]);
......
......@@ -10,12 +10,12 @@
<mat-sidenav-content id="listContent">
<mat-card class="card-app-content">
<mat-card id="viewThumbnail" style="display:none;position: absolute;z-index: 2;"><img src="{{thumbnailUrl}}"/></mat-card>
<mat-card *ngIf="homeData.homeMessage">
<mat-card *ngIf="homeMessage">
<div style="display: flex">
<div *ngIf="!mobileMode" style="text-align:center;flex: 1;background: url(static.php?filename=logo_only.svg);background-size: auto auto;height: 70px;background-size: contain;background-repeat: no-repeat;background-position: center;">
</div>
<div style="flex:10;padding-left: 10px;">
<span [innerHTML]="homeData.homeMessage"></span>
<span [innerHTML]="homeMessage"></span>
</div>
</div>
<div style="text-align: right;opacity: 0.5;">
......
......@@ -36,6 +36,7 @@ export class HomeComponent extends AutoCompletePlugin implements OnInit {
@ViewChildren(MatExpansionPanel) viewPanels: QueryList<MatExpansionPanel>;
homeData: any;
homeMessage: string;
dataSource: any;
displayedColumns: string[] = ['res_id', 'subject', 'creation_date'];
......@@ -67,6 +68,7 @@ export class HomeComponent extends AutoCompletePlugin implements OnInit {
this.http.get(this.coreUrl + "rest/home")
.subscribe((data: any) => {
this.homeData = data;
this.homeMessage = data['homeMessage']
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment