diff --git a/client/src/app/admin/instance/components/instance-form.component.html b/client/src/app/admin/instance/components/instance-form.component.html index d75077d65aad950d15f8946a35108f4ae4849992..ab93e4e941fc30ce776be20243dc7eec9ddcf67f 100644 --- a/client/src/app/admin/instance/components/instance-form.component.html +++ b/client/src/app/admin/instance/components/instance-form.component.html @@ -324,6 +324,58 @@ </div> </div> </accordion-group> + <accordion-group heading="Design result header" [isOpen]="false"> + <div class="form-row"> + <div class="form-group col-md-6"> + <label for="result_header_background_color_picker">Result header background color (picker)</label> + <input class="form-control" type="color" id="result_header_background_color_picker" [value]="form.value.result_header_background_color" formControlName="result_header_background_color"> + </div> + <div class="form-group col-md-6"> + <label for="result_header_background_color_input">Result header background color (value)</label> + <input type="text" class="form-control" id="result_header_background_color_input" [value]="form.value.result_header_background_color" formControlName="result_header_background_color"> + </div> + </div> + <div class="form-row"> + <div class="form-group col-md-6"> + <label for="result_header_text_color_picker">Result header text color (picker)</label> + <input class="form-control" type="color" id="result_header_text_color_picker" [value]="form.value.result_header_text_color" formControlName="result_header_text_color"> + </div> + <div class="form-group col-md-6"> + <label for="result_header_text_color_input">Result header text color (value)</label> + <input type="text" class="form-control" id="result_header_text_color_input" [value]="form.value.result_header_text_color" formControlName="result_header_text_color"> + </div> + </div> + <div class="form-row"> + <div class="form-group col-md-6"> + <label for="result_header_btn_color_picker">Result header btn color (picker)</label> + <input class="form-control" type="color" id="result_header_btn_color_picker" [value]="form.value.result_header_btn_color" formControlName="result_header_btn_color"> + </div> + <div class="form-group col-md-6"> + <label for="result_header_btn_color_input">Result header btn color (value)</label> + <input type="text" class="form-control" id="result_header_btn_color_input" [value]="form.value.result_header_btn_color" formControlName="result_header_btn_color"> + </div> + </div> + <div class="form-row"> + <div class="form-group col-md-6"> + <label for="result_header_btn_hover_color_picker">Result header btn hover color (picker)</label> + <input class="form-control" type="color" id="result_header_btn_hover_color_picker" [value]="form.value.result_header_btn_hover_color" formControlName="result_header_btn_hover_color"> + </div> + <div class="form-group col-md-6"> + <label for="result_header_btn_hover_color_input">Result header btn hover color (value)</label> + <input type="text" class="form-control" id="result_header_btn_hover_color_input" [value]="form.value.result_header_btn_hover_color" formControlName="result_header_btn_hover_color"> + </div> + </div> + <div class="form-row"> + <div class="form-group col-md-6"> + <label for="result_header_btn_text_color_picker">Result header btn text color (picker)</label> + <input class="form-control" type="color" id="result_header_btn_text_color_picker" [value]="form.value.result_header_btn_text_color" formControlName="result_header_btn_text_color"> + </div> + <div class="form-group col-md-6"> + <label for="result_header_btn_text_color_input">Result header btn text color (value)</label> + <input type="text" class="form-control" id="result_header_btn_text_color_input" [value]="form.value.result_header_btn_text_color" formControlName="result_header_btn_text_color"> + </div> + </div> + </accordion-group> <accordion-group heading="Functionalities" [isOpen]="false"> <div class="custom-control custom-switch mb-2"> <input class="custom-control-input" type="checkbox" id="samp_enabled" name="samp_enabled" formControlName="samp_enabled"> diff --git a/client/src/app/admin/instance/components/instance-form.component.ts b/client/src/app/admin/instance/components/instance-form.component.ts index cc68f071cff2bc237a348cdf7258194f11dff643..74b37c564d536049cdc61e75cc02ba1f6eca1bd6 100644 --- a/client/src/app/admin/instance/components/instance-form.component.ts +++ b/client/src/app/admin/instance/components/instance-form.component.ts @@ -63,6 +63,11 @@ export class InstanceFormComponent implements OnInit { progress_bar_circle_icon_color: new UntypedFormControl('#CCCCCC'), progress_bar_circle_icon_active_color: new UntypedFormControl('#FFFFFF'), progress_bar_text_color: new UntypedFormControl('#91B2BF'), + result_header_background_color: new UntypedFormControl('#E9ECEF'), + result_header_text_color: new UntypedFormControl('#000000'), + result_header_btn_color: new UntypedFormControl('#007BFF'), + result_header_btn_hover_color: new UntypedFormControl('#0069D9'), + result_header_btn_text_color: new UntypedFormControl('#FFFFFF'), samp_enabled: new UntypedFormControl(true), back_to_portal: new UntypedFormControl(true), user_menu_enabled: new UntypedFormControl(true), diff --git a/client/src/app/instance/instance.component.spec.ts b/client/src/app/instance/instance.component.spec.ts index 0077dad4a6167e1095fbec081f30c385ff06de5f..e0ab549d5a5eab1c78b023f1cddb8aef470cd9d4 100644 --- a/client/src/app/instance/instance.component.spec.ts +++ b/client/src/app/instance/instance.component.spec.ts @@ -112,6 +112,11 @@ describe('[Instance] InstanceComponent', () => { progress_bar_circle_icon_color: '#CCCCCC', progress_bar_circle_icon_active_color: '#FFFFFF', progress_bar_text_color: '#91B2BF', + result_header_background_color: '#E9ECEF', + result_header_text_color: '#000000', + result_header_btn_color: '#007BFF', + result_header_btn_hover_color: '#0069D9', + result_header_btn_text_color: '#FFFFFF', samp_enabled: true, back_to_portal: true, user_menu_enabled: true, diff --git a/client/src/app/instance/instance.component.ts b/client/src/app/instance/instance.component.ts index 4b89d37846542c56b0d466edbe1f9c9063b13ad9..e09af02e1ce42469705109fa0638da7609c8b865 100644 --- a/client/src/app/instance/instance.component.ts +++ b/client/src/app/instance/instance.component.ts @@ -121,6 +121,21 @@ export class InstanceComponent implements OnInit, OnDestroy { 'background-color': `${instance.family_background_color}` }); this.style.setStyle('.custom-accordion .panel-body .card', 'background-color', instance.family_background_color); + + this.style.setStyles('.anis-result-header.jumbotron', { + 'background-color': instance.result_header_background_color, + 'color': instance.result_header_text_color + }); + this.style.setStyles('.anis-result-header .btn-primary', { + 'background-color': instance.result_header_btn_color, + 'border-color': instance.result_header_btn_color, + 'color': instance.result_header_btn_text_color + }); + this.style.setStyles('.anis-result-header .btn-primary:hover', { + 'background-color': instance.result_header_btn_hover_color, + 'border-color': instance.result_header_btn_hover_color, + 'color': instance.result_header_btn_text_color + }); } } }); diff --git a/client/src/app/instance/search/components/progress-bar.component.spec.ts b/client/src/app/instance/search/components/progress-bar.component.spec.ts index 75d22c51a2054a4a98827da626cb9d75f2fc3248..86d7cf0c32c0265e5a7f5347bd8fe413ab0dfd86 100644 --- a/client/src/app/instance/search/components/progress-bar.component.spec.ts +++ b/client/src/app/instance/search/components/progress-bar.component.spec.ts @@ -85,6 +85,11 @@ describe('[Instance][Search][Component] ProgressBarComponent', () => { progress_bar_circle_icon_color: '#CCCCCC', progress_bar_circle_icon_active_color: '#FFFFFF', progress_bar_text_color: '#91B2BF', + result_header_background_color: '#E9ECEF', + result_header_text_color: '#000000', + result_header_btn_color: '#007BFF', + result_header_btn_hover_color: '#0069D9', + result_header_btn_text_color: '#FFFFFF', samp_enabled: true, back_to_portal: true, user_menu_enabled: true, @@ -142,6 +147,11 @@ describe('[Instance][Search][Component] ProgressBarComponent', () => { progress_bar_circle_icon_color: '#CCCCCC', progress_bar_circle_icon_active_color: '#FFFFFF', progress_bar_text_color: '#91B2BF', + result_header_background_color: '#E9ECEF', + result_header_text_color: '#000000', + result_header_btn_color: '#007BFF', + result_header_btn_hover_color: '#0069D9', + result_header_btn_text_color: '#FFFFFF', samp_enabled: true, back_to_portal: true, user_menu_enabled: true, diff --git a/client/src/app/instance/search/components/result/download-result.component.html b/client/src/app/instance/search/components/result/download-result.component.html index 216fd6bd0f778d8ea86c2df2d31f65a78fc21086..e208d6c0f51fb1affabd5f91939018f382e5b46a 100644 --- a/client/src/app/instance/search/components/result/download-result.component.html +++ b/client/src/app/instance/search/components/result/download-result.component.html @@ -30,7 +30,7 @@ <tr *ngIf="instance.samp_enabled"> <th>VO-SAMP </th> <td> - <button *ngIf="!sampRegistered" (click)="sampRegister.emit()" class="btn btn-primary">Try to register</button> + <button *ngIf="!sampRegistered" (click)="sampRegister.emit()" class="btn btn-primary">Register</button> <button *ngIf="sampRegistered" (click)="sampUnregister.emit()" class="btn btn-danger">SAMP Unregister</button> <button *ngIf="sampRegistered && dataset.download_vo" (click)="broadcastResult()" class="btn btn-primary" title="Broadcast samp votable"> diff --git a/client/src/app/instance/search/containers/result.component.html b/client/src/app/instance/search/containers/result.component.html index 96830586ac863638490782a9876d639c3ebd32b4..2b28026b00c5c946bc04ee17fa2a0ea649af86c4 100644 --- a/client/src/app/instance/search/containers/result.component.html +++ b/client/src/app/instance/search/containers/result.component.html @@ -19,7 +19,7 @@ </div> </div> <ng-container *ngIf="(dataLength | async) > 0"> - <div class="jumbotron row mb-4 py-4"> + <div class="anis-result-header jumbotron row mb-4 py-4"> <div class="col"> <app-result-info [instance]="instance | async" diff --git a/client/src/app/instance/store/effects/search-multiple.effects.spec.ts b/client/src/app/instance/store/effects/search-multiple.effects.spec.ts index 15f2c50f9f34a44197917f3a6bbcae03007e8e91..d96b567c1d07d5ad4fdac6fb6c3f63a6b02d6f46 100644 --- a/client/src/app/instance/store/effects/search-multiple.effects.spec.ts +++ b/client/src/app/instance/store/effects/search-multiple.effects.spec.ts @@ -167,6 +167,11 @@ describe('[Instance][Store] SearchMultipleEffects', () => { progress_bar_circle_icon_color: '#CCCCCC', progress_bar_circle_icon_active_color: '#FFFFFF', progress_bar_text_color: '#91B2BF', + result_header_background_color: '#E9ECEF', + result_header_text_color: '#000000', + result_header_btn_color: '#007BFF', + result_header_btn_hover_color: '#0069D9', + result_header_btn_text_color: '#FFFFFF', samp_enabled: true, back_to_portal: true, user_menu_enabled: true, @@ -267,6 +272,11 @@ describe('[Instance][Store] SearchMultipleEffects', () => { progress_bar_circle_icon_color: '#CCCCCC', progress_bar_circle_icon_active_color: '#FFFFFF', progress_bar_text_color: '#91B2BF', + result_header_background_color: '#E9ECEF', + result_header_text_color: '#000000', + result_header_btn_color: '#007BFF', + result_header_btn_hover_color: '#0069D9', + result_header_btn_text_color: '#FFFFFF', samp_enabled: true, back_to_portal: true, user_menu_enabled: true, diff --git a/client/src/app/metamodel/models/instance.model.ts b/client/src/app/metamodel/models/instance.model.ts index edfb3f2021e01bc3d89298a33bb44473ae0dabc6..9af4a6bedf9b9e8adaa37964f239ad361754560e 100644 --- a/client/src/app/metamodel/models/instance.model.ts +++ b/client/src/app/metamodel/models/instance.model.ts @@ -50,6 +50,11 @@ export interface Instance { progress_bar_circle_icon_color: string; progress_bar_circle_icon_active_color: string; progress_bar_text_color: string; + result_header_background_color: string, + result_header_text_color: string, + result_header_btn_color: string, + result_header_btn_hover_color: string, + result_header_btn_text_color: string, samp_enabled: boolean; back_to_portal: boolean; user_menu_enabled: boolean; diff --git a/client/src/test-data.ts b/client/src/test-data.ts index 344eef7113e859f2882eda7a0aa84380eba82066..50e232f2a15e1f69d96de2e7ca1c7504eedf256f 100644 --- a/client/src/test-data.ts +++ b/client/src/test-data.ts @@ -82,6 +82,11 @@ export const INSTANCE_LIST: Instance[] = [ progress_bar_circle_icon_color: '#CCCCCC', progress_bar_circle_icon_active_color: '#FFFFFF', progress_bar_text_color: '#91B2BF', + result_header_background_color: '#E9ECEF', + result_header_text_color: '#000000', + result_header_btn_color: '#007BFF', + result_header_btn_hover_color: '#0069D9', + result_header_btn_text_color: '#FFFFFF', samp_enabled: true, back_to_portal: true, user_menu_enabled: true, @@ -133,6 +138,11 @@ export const INSTANCE_LIST: Instance[] = [ progress_bar_circle_icon_color: '#CCCCCC', progress_bar_circle_icon_active_color: '#FFFFFF', progress_bar_text_color: '#91B2BF', + result_header_background_color: '#E9ECEF', + result_header_text_color: '#000000', + result_header_btn_color: '#007BFF', + result_header_btn_hover_color: '#0069D9', + result_header_btn_text_color: '#FFFFFF', samp_enabled: true, back_to_portal: true, user_menu_enabled: true, @@ -186,6 +196,11 @@ export const INSTANCE: Instance = { progress_bar_circle_icon_color: '#CCCCCC', progress_bar_circle_icon_active_color: '#FFFFFF', progress_bar_text_color: '#91B2BF', + result_header_background_color: '#E9ECEF', + result_header_text_color: '#000000', + result_header_btn_color: '#007BFF', + result_header_btn_hover_color: '#0069D9', + result_header_btn_text_color: '#FFFFFF', samp_enabled: true, back_to_portal: true, user_menu_enabled: true, diff --git a/conf-dev/create-db.sh b/conf-dev/create-db.sh index 4a326c6c652e59735bda99662792347767c53d4f..cbb6f608e1525d2b62444a4e737b18d2125e5cef 100644 --- a/conf-dev/create-db.sh +++ b/conf-dev/create-db.sh @@ -8,7 +8,7 @@ set -e curl -d '{"label":"Test","dbname":"anis_test","dbtype":"pdo_pgsql","dbhost":"db","dbport":5432,"dblogin":"anis","dbpassword":"anis"}' --header 'Content-Type: application/json' -X POST http://localhost/database # Add default instance -curl -d '{"name":"default","label":"Default instance","description":"Instance for the test","scientific_manager":"M. Durand","instrument":"Multiple","wavelength_domain":"Visible imaging / Spectroscopy","display":10,"data_path":"\/DEFAULT","files_path":"\/INSTANCE_FILES","public":true,"portal_logo":"","design_color":"#7AC29A","design_background_color":"#ffffff","design_logo":"/logo.png","design_favicon":"/favicon.ico","navbar_background_color":"#F8F9FA","navbar_border_bottom_color":"#DEE2E6","navbar_color_href":"#000000","footer_background_color":"#F8F9FA","footer_border_top_color":"#DEE2E6","footer_text_color":"#000000","family_border_color":"#DFDFDF","family_header_background_color":"#F7F7F7","family_title_color":"#007BFF","family_title_bold":false,"family_background_color":"#FFFFFF","family_color":"#212529","progress_bar_title":"Dataset search","progress_bar_title_color":"#000000","progress_bar_subtitle":"Select a dataset, add criteria, select output columns and display the result.","progress_bar_subtitle_color":"#6C757D","progress_bar_color":"#E9ECEF","progress_bar_active_color":"#7AC29A","progress_bar_circle_color":"#FFFFFF","progress_bar_circle_icon_color":"#CCCCCC","progress_bar_circle_icon_active_color":"#FFFFFF","progress_bar_text_color":"#91B2BF","samp_enabled":true,"back_to_portal":true,"user_menu_enabled":true,"search_by_criteria_allowed":true,"search_by_criteria_label":"Search","search_multiple_allowed":false,"search_multiple_label":"Search multiple","search_multiple_all_datasets_selected":false,"documentation_allowed":false,"documentation_label":"Documentation"}' --header 'Content-Type: application/json' -X POST http://localhost/instance +curl -d '{"name":"default","label":"Default instance","description":"Instance for the test","scientific_manager":"M. Durand","instrument":"Multiple","wavelength_domain":"Visible imaging / Spectroscopy","display":10,"data_path":"\/DEFAULT","files_path":"\/INSTANCE_FILES","public":true,"portal_logo":"","design_color":"#7AC29A","design_background_color":"#ffffff","design_logo":"/logo.png","design_favicon":"/favicon.ico","navbar_background_color":"#F8F9FA","navbar_border_bottom_color":"#DEE2E6","navbar_color_href":"#000000","footer_background_color":"#F8F9FA","footer_border_top_color":"#DEE2E6","footer_text_color":"#000000","family_border_color":"#DFDFDF","family_header_background_color":"#F7F7F7","family_title_color":"#007BFF","family_title_bold":false,"family_background_color":"#FFFFFF","family_color":"#212529","progress_bar_title":"Dataset search","progress_bar_title_color":"#000000","progress_bar_subtitle":"Select a dataset, add criteria, select output columns and display the result.","progress_bar_subtitle_color":"#6C757D","progress_bar_color":"#E9ECEF","progress_bar_active_color":"#7AC29A","progress_bar_circle_color":"#FFFFFF","progress_bar_circle_icon_color":"#CCCCCC","progress_bar_circle_icon_active_color":"#FFFFFF","progress_bar_text_color":"#91B2BF","result_header_background_color":"#E9ECEF","result_header_text_color":"#000000","result_header_btn_color":"#007BFF","result_header_btn_hover_color":"#0069D9","result_header_btn_text_color":"#FFFFFF","samp_enabled":true,"back_to_portal":true,"user_menu_enabled":true,"search_by_criteria_allowed":true,"search_by_criteria_label":"Search","search_multiple_allowed":false,"search_multiple_label":"Search multiple","search_multiple_all_datasets_selected":false,"documentation_allowed":false,"documentation_label":"Documentation"}' --header 'Content-Type: application/json' -X POST http://localhost/instance # Add dataset families curl -d '{"label":"Default dataset family","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/instance/default/dataset-family diff --git a/server/doctrine-proxy/__CG__AppEntityInstance.php b/server/doctrine-proxy/__CG__AppEntityInstance.php index 3ea80270ace6d5e5d31eca9ef422404da4223160..567a7eaa0564580bf9d0283f6dfedb3ce56daff1 100644 --- a/server/doctrine-proxy/__CG__AppEntityInstance.php +++ b/server/doctrine-proxy/__CG__AppEntityInstance.php @@ -67,10 +67,10 @@ class Instance extends \App\Entity\Instance implements \Doctrine\ORM\Proxy\Proxy public function __sleep() { if ($this->__isInitialized__) { - return ['__isInitialized__', 'name', 'label', 'description', 'scientificManager', 'instrument', 'wavelengthDomain', 'display', 'dataPath', 'filesPath', 'public', 'portalLogo', 'designColor', 'designBackgroundColor', 'designLogo', 'designFavicon', 'navbarBackgroundColor', 'navbarBorderBottomColor', 'navbarColorHref', 'footerBackgroundColor', 'footerBorderTopColor', 'footerTextColor', 'familyBorderColor', 'familyHeaderBackgroundColor', 'familyTitleColor', 'familyTitleBold', 'familyBackgroundColor', 'familyColor', 'progressBarTitle', 'progressBarTitleColor', 'progressBarSubtitle', 'progressBarSubtitleColor', 'progressBarColor', 'progressBarActiveColor', 'progressBarCircleColor', 'progressBarCircleIconColor', 'progressBarCircleIconActiveColor', 'progressBarTextColor', 'sampEnabled', 'backToPortal', 'userMenuEnabled', 'searchByCriteriaAllowed', 'searchByCriteriaLabel', 'searchMultipleAllowed', 'searchMultipleLabel', 'searchMultipleAllDatasetsSelected', 'documentationAllowed', 'documentationLabel', 'datasetFamilies']; + return ['__isInitialized__', 'name', 'label', 'description', 'scientificManager', 'instrument', 'wavelengthDomain', 'display', 'dataPath', 'filesPath', 'public', 'portalLogo', 'designColor', 'designBackgroundColor', 'designLogo', 'designFavicon', 'navbarBackgroundColor', 'navbarBorderBottomColor', 'navbarColorHref', 'footerBackgroundColor', 'footerBorderTopColor', 'footerTextColor', 'familyBorderColor', 'familyHeaderBackgroundColor', 'familyTitleColor', 'familyTitleBold', 'familyBackgroundColor', 'familyColor', 'progressBarTitle', 'progressBarTitleColor', 'progressBarSubtitle', 'progressBarSubtitleColor', 'progressBarColor', 'progressBarActiveColor', 'progressBarCircleColor', 'progressBarCircleIconColor', 'progressBarCircleIconActiveColor', 'progressBarTextColor', 'resultHeaderBackgroundColor', 'resultHeaderTextColor', 'resultHeaderBtnColor', 'resultHeaderBtnHoverColor', 'resultHeaderBtnTextColor', 'sampEnabled', 'backToPortal', 'userMenuEnabled', 'searchByCriteriaAllowed', 'searchByCriteriaLabel', 'searchMultipleAllowed', 'searchMultipleLabel', 'searchMultipleAllDatasetsSelected', 'documentationAllowed', 'documentationLabel', 'datasetFamilies']; } - return ['__isInitialized__', 'name', 'label', 'description', 'scientificManager', 'instrument', 'wavelengthDomain', 'display', 'dataPath', 'filesPath', 'public', 'portalLogo', 'designColor', 'designBackgroundColor', 'designLogo', 'designFavicon', 'navbarBackgroundColor', 'navbarBorderBottomColor', 'navbarColorHref', 'footerBackgroundColor', 'footerBorderTopColor', 'footerTextColor', 'familyBorderColor', 'familyHeaderBackgroundColor', 'familyTitleColor', 'familyTitleBold', 'familyBackgroundColor', 'familyColor', 'progressBarTitle', 'progressBarTitleColor', 'progressBarSubtitle', 'progressBarSubtitleColor', 'progressBarColor', 'progressBarActiveColor', 'progressBarCircleColor', 'progressBarCircleIconColor', 'progressBarCircleIconActiveColor', 'progressBarTextColor', 'sampEnabled', 'backToPortal', 'userMenuEnabled', 'searchByCriteriaAllowed', 'searchByCriteriaLabel', 'searchMultipleAllowed', 'searchMultipleLabel', 'searchMultipleAllDatasetsSelected', 'documentationAllowed', 'documentationLabel', 'datasetFamilies']; + return ['__isInitialized__', 'name', 'label', 'description', 'scientificManager', 'instrument', 'wavelengthDomain', 'display', 'dataPath', 'filesPath', 'public', 'portalLogo', 'designColor', 'designBackgroundColor', 'designLogo', 'designFavicon', 'navbarBackgroundColor', 'navbarBorderBottomColor', 'navbarColorHref', 'footerBackgroundColor', 'footerBorderTopColor', 'footerTextColor', 'familyBorderColor', 'familyHeaderBackgroundColor', 'familyTitleColor', 'familyTitleBold', 'familyBackgroundColor', 'familyColor', 'progressBarTitle', 'progressBarTitleColor', 'progressBarSubtitle', 'progressBarSubtitleColor', 'progressBarColor', 'progressBarActiveColor', 'progressBarCircleColor', 'progressBarCircleIconColor', 'progressBarCircleIconActiveColor', 'progressBarTextColor', 'resultHeaderBackgroundColor', 'resultHeaderTextColor', 'resultHeaderBtnColor', 'resultHeaderBtnHoverColor', 'resultHeaderBtnTextColor', 'sampEnabled', 'backToPortal', 'userMenuEnabled', 'searchByCriteriaAllowed', 'searchByCriteriaLabel', 'searchMultipleAllowed', 'searchMultipleLabel', 'searchMultipleAllDatasetsSelected', 'documentationAllowed', 'documentationLabel', 'datasetFamilies']; } /** @@ -984,6 +984,116 @@ class Instance extends \App\Entity\Instance implements \Doctrine\ORM\Proxy\Proxy return parent::setProgressBarTextColor($progressBarTextColor); } + /** + * {@inheritDoc} + */ + public function getResultHeaderBackgroundColor() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getResultHeaderBackgroundColor', []); + + return parent::getResultHeaderBackgroundColor(); + } + + /** + * {@inheritDoc} + */ + public function setResultHeaderBackgroundColor($resultHeaderBackgroundColor) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setResultHeaderBackgroundColor', [$resultHeaderBackgroundColor]); + + return parent::setResultHeaderBackgroundColor($resultHeaderBackgroundColor); + } + + /** + * {@inheritDoc} + */ + public function getResultHeaderTextColor() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getResultHeaderTextColor', []); + + return parent::getResultHeaderTextColor(); + } + + /** + * {@inheritDoc} + */ + public function setResultHeaderTextColor($resultHeaderTextColor) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setResultHeaderTextColor', [$resultHeaderTextColor]); + + return parent::setResultHeaderTextColor($resultHeaderTextColor); + } + + /** + * {@inheritDoc} + */ + public function getResultHeaderBtnColor() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getResultHeaderBtnColor', []); + + return parent::getResultHeaderBtnColor(); + } + + /** + * {@inheritDoc} + */ + public function setResultHeaderBtnColor($resultHeaderBtnColor) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setResultHeaderBtnColor', [$resultHeaderBtnColor]); + + return parent::setResultHeaderBtnColor($resultHeaderBtnColor); + } + + /** + * {@inheritDoc} + */ + public function getResultHeaderBtnHoverColor() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getResultHeaderBtnHoverColor', []); + + return parent::getResultHeaderBtnHoverColor(); + } + + /** + * {@inheritDoc} + */ + public function setResultHeaderBtnHoverColor($resultHeaderBtnHoverColor) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setResultHeaderBtnHoverColor', [$resultHeaderBtnHoverColor]); + + return parent::setResultHeaderBtnHoverColor($resultHeaderBtnHoverColor); + } + + /** + * {@inheritDoc} + */ + public function getResultHeaderBtnTextColor() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getResultHeaderBtnTextColor', []); + + return parent::getResultHeaderBtnTextColor(); + } + + /** + * {@inheritDoc} + */ + public function setResultHeaderBtnTextColor($resultHeaderBtnTextColor) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setResultHeaderBtnTextColor', [$resultHeaderBtnTextColor]); + + return parent::setResultHeaderBtnTextColor($resultHeaderBtnTextColor); + } + /** * {@inheritDoc} */ diff --git a/server/src/Action/InstanceAction.php b/server/src/Action/InstanceAction.php index 845251ce4ddcb40feb0adf8dd12eec8246e92074..74fa080451a0245ab8df3475c7537a645608fc5d 100644 --- a/server/src/Action/InstanceAction.php +++ b/server/src/Action/InstanceAction.php @@ -100,6 +100,11 @@ final class InstanceAction extends AbstractAction 'progress_bar_circle_icon_color', 'progress_bar_circle_icon_active_color', 'progress_bar_text_color', + 'result_header_background_color', + 'result_header_text_color', + 'result_header_btn_color', + 'result_header_btn_hover_color', + 'result_header_btn_text_color', 'samp_enabled', 'back_to_portal', 'user_menu_enabled', @@ -181,6 +186,11 @@ final class InstanceAction extends AbstractAction $instance->setProgressBarCircleIconColor($parsedBody['progress_bar_circle_icon_color']); $instance->setProgressBarCircleIconActiveColor($parsedBody['progress_bar_circle_icon_active_color']); $instance->setProgressBarTextColor($parsedBody['progress_bar_text_color']); + $instance->setResultHeaderBackgroundColor($parsedBody['result_header_background_color']); + $instance->setResultHeaderTextColor($parsedBody['result_header_text_color']); + $instance->setResultHeaderBtnColor($parsedBody['result_header_btn_color']); + $instance->setResultHeaderBtnHoverColor($parsedBody['result_header_btn_hover_color']); + $instance->setResultHeaderBtnTextColor($parsedBody['result_header_btn_text_color']); $instance->setSampEnabled($parsedBody['samp_enabled']); $instance->setUserMenuEnabled($parsedBody['user_menu_enabled']); $instance->setBackToPortal($parsedBody['back_to_portal']); diff --git a/server/src/Action/InstanceListAction.php b/server/src/Action/InstanceListAction.php index e8299dac0101acac825894a9a08e9272889bb7b0..fdcd7f3eed9628d0121950f763d60dfdc30cb27d 100644 --- a/server/src/Action/InstanceListAction.php +++ b/server/src/Action/InstanceListAction.php @@ -100,6 +100,11 @@ final class InstanceListAction extends AbstractAction 'progress_bar_circle_icon_color', 'progress_bar_circle_icon_active_color', 'progress_bar_text_color', + 'result_header_background_color', + 'result_header_text_color', + 'result_header_btn_color', + 'result_header_btn_hover_color', + 'result_header_btn_text_color', 'samp_enabled', 'back_to_portal', 'user_menu_enabled', @@ -175,6 +180,11 @@ final class InstanceListAction extends AbstractAction $instance->setProgressBarCircleIconColor($parsedBody['progress_bar_circle_icon_color']); $instance->setProgressBarCircleIconActiveColor($parsedBody['progress_bar_circle_icon_active_color']); $instance->setProgressBarTextColor($parsedBody['progress_bar_text_color']); + $instance->setResultHeaderBackgroundColor($parsedBody['result_header_background_color']); + $instance->setResultHeaderTextColor($parsedBody['result_header_text_color']); + $instance->setResultHeaderBtnColor($parsedBody['result_header_btn_color']); + $instance->setResultHeaderBtnHoverColor($parsedBody['result_header_btn_hover_color']); + $instance->setResultHeaderBtnTextColor($parsedBody['result_header_btn_text_color']); $instance->setSampEnabled($parsedBody['samp_enabled']); $instance->setBackToPortal($parsedBody['back_to_portal']); $instance->setUserMenuEnabled($parsedBody['user_menu_enabled']); diff --git a/server/src/Entity/Instance.php b/server/src/Entity/Instance.php index 3f3b2fe34bc774d476c374986f2d08c865434188..8bdee7d7dedc43333bba393d1706b1db88bb46b8 100644 --- a/server/src/Entity/Instance.php +++ b/server/src/Entity/Instance.php @@ -287,6 +287,41 @@ class Instance implements \JsonSerializable */ protected $progressBarTextColor; + /** + * @var string + * + * @Column(type="string", name="result_header_background_color", nullable=false, options={"default" : "#E9ECEF"}) + */ + protected $resultHeaderBackgroundColor; + + /** + * @var string + * + * @Column(type="string", name="result_header_text_color", nullable=false, options={"default" : "#000000"}) + */ + protected $resultHeaderTextColor; + + /** + * @var string + * + * @Column(type="string", name="result_header_btn_color", nullable=false, options={"default" : "#007BFF"}) + */ + protected $resultHeaderBtnColor; + + /** + * @var string + * + * @Column(type="string", name="result_header_btn_hover_color", nullable=false, options={"default" : "#0069D9"}) + */ + protected $resultHeaderBtnHoverColor; + + /** + * @var string + * + * @Column(type="string", name="result_header_btn_text_color", nullable=false, options={"default" : "#FFFFFF"}) + */ + protected $resultHeaderBtnTextColor; + /** * @var bool * @@ -736,6 +771,56 @@ class Instance implements \JsonSerializable $this->progressBarTextColor = $progressBarTextColor; } + public function getResultHeaderBackgroundColor() + { + return $this->resultHeaderBackgroundColor; + } + + public function setResultHeaderBackgroundColor($resultHeaderBackgroundColor) + { + $this->resultHeaderBackgroundColor = $resultHeaderBackgroundColor; + } + + public function getResultHeaderTextColor() + { + return $this->resultHeaderTextColor; + } + + public function setResultHeaderTextColor($resultHeaderTextColor) + { + $this->resultHeaderTextColor = $resultHeaderTextColor; + } + + public function getResultHeaderBtnColor() + { + return $this->resultHeaderBtnColor; + } + + public function setResultHeaderBtnColor($resultHeaderBtnColor) + { + $this->resultHeaderBtnColor = $resultHeaderBtnColor; + } + + public function getResultHeaderBtnHoverColor() + { + return $this->resultHeaderBtnHoverColor; + } + + public function setResultHeaderBtnHoverColor($resultHeaderBtnHoverColor) + { + $this->resultHeaderBtnHoverColor = $resultHeaderBtnHoverColor; + } + + public function getResultHeaderBtnTextColor() + { + return $this->resultHeaderBtnTextColor; + } + + public function setResultHeaderBtnTextColor($resultHeaderBtnTextColor) + { + $this->resultHeaderBtnTextColor = $resultHeaderBtnTextColor; + } + public function getSampEnabled() { return $this->sampEnabled; @@ -890,6 +975,11 @@ class Instance implements \JsonSerializable 'progress_bar_circle_icon_color' => $this->getProgressBarCircleIconColor(), 'progress_bar_circle_icon_active_color' => $this->getProgressBarCircleIconActiveColor(), 'progress_bar_text_color' => $this->getProgressBarTextColor(), + 'result_header_background_color' => $this->getResultHeaderBackgroundColor(), + 'result_header_text_color' => $this->getResultHeaderTextColor(), + 'result_header_btn_color' => $this->getResultHeaderBtnColor(), + 'result_header_btn_hover_color' => $this->getResultHeaderBtnHoverColor(), + 'result_header_btn_text_color' => $this->getResultHeaderBtnTextColor(), 'samp_enabled' => $this->getSampEnabled(), 'back_to_portal' => $this->getBackToPortal(), 'user_menu_enabled' => $this->getUserMenuEnabled(), diff --git a/server/tests/Action/InstanceActionTest.php b/server/tests/Action/InstanceActionTest.php index 604ca345d77da83995ff07a48f6d5ca4b185d793..f5e3465d984a6c9b87ab5420cb5c1f817c86b865 100644 --- a/server/tests/Action/InstanceActionTest.php +++ b/server/tests/Action/InstanceActionTest.php @@ -114,6 +114,11 @@ final class InstanceActionTest extends TestCase 'progress_bar_circle_icon_color' => '#CCCCCC', 'progress_bar_circle_icon_active_color' => '#FFFFFF', 'progress_bar_text_color' => '#91B2BF', + 'result_header_background_color' => '#E9ECEF', + 'result_header_text_color' => '#000000', + 'result_header_btn_color' => '#007BFF', + 'result_header_btn_hover_color' => '#0069D9', + 'result_header_btn_text_color' => '#FFFFFF', 'samp_enabled' => true, 'back_to_portal' => true, 'user_menu_enabled' => true, diff --git a/server/tests/Action/InstanceListActionTest.php b/server/tests/Action/InstanceListActionTest.php index afa42d02efdc58b9189a27dff51163f9427359bd..32eab1473df79d025339312fba4947a775ca7478 100644 --- a/server/tests/Action/InstanceListActionTest.php +++ b/server/tests/Action/InstanceListActionTest.php @@ -98,6 +98,11 @@ final class InstanceListActionTest extends TestCase 'progress_bar_circle_icon_color' => '#CCCCCC', 'progress_bar_circle_icon_active_color' => '#FFFFFF', 'progress_bar_text_color' => '#91B2BF', + 'result_header_background_color' => '#E9ECEF', + 'result_header_text_color' => '#000000', + 'result_header_btn_color' => '#007BFF', + 'result_header_btn_hover_color' => '#0069D9', + 'result_header_btn_text_color' => '#FFFFFF', 'home_component' => 'WelcomeComponent', 'home_component_config' => '{}', 'samp_enabled' => true,