1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00

admin interface to customize privacy policy page

This commit is contained in:
Sylvain 2019-04-18 12:30:00 +02:00
parent 5bdaebb2f2
commit 8fae8b104d
9 changed files with 47 additions and 0 deletions

View File

@ -52,6 +52,8 @@ Application.Controllers.controller('SettingsController', ['$scope', 'Setting', '
$scope.twitterSetting = { name: 'twitter_name', value: settingsPromise.twitter_name };
$scope.aboutTitleSetting = { name: 'about_title', value: settingsPromise.about_title };
$scope.aboutBodySetting = { name: 'about_body', value: settingsPromise.about_body };
$scope.privacyBodySetting = { name: 'privacy_body', value: settingsPromise.privacy_body };
$scope.privacyDpoSetting = { name: 'privacy_dpo', value: settingsPromise.privacy_dpo };
$scope.aboutContactsSetting = { name: 'about_contacts', value: settingsPromise.about_contacts };
$scope.homeBlogpostSetting = { name: 'home_blogpost', value: settingsPromise.home_blogpost };
$scope.machineExplicationsAlert = { name: 'machine_explications_alert', value: settingsPromise.machine_explications_alert };

View File

@ -1047,6 +1047,8 @@ angular.module('application.router', ['ui.router'])
names: `['twitter_name', \
'about_title', \
'about_body', \
'privacy_body', \
'privacy_dpo', \
'about_contacts', \
'home_blogpost', \
'machine_explications_alert', \

View File

@ -31,6 +31,11 @@
<uib-tab heading="{{ 'settings.about' | translate }}">
<ng-include src="'<%= asset_path 'admin/settings/about.html' %>'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'settings.privacy.title' | translate }}">
<ng-include src="'<%= asset_path 'admin/settings/privacy.html' %>'"></ng-include>
</uib-tab>
<uib-tab heading="{{ 'settings.reservations' | translate }}">
<ng-include src="'<%= asset_path 'admin/settings/reservations.html' %>'"></ng-include>
</uib-tab>

View File

@ -0,0 +1,27 @@
<div class="panel panel-default m-t-md">
<div class="panel-body">
<div class="row">
<div class="col-md-4 col-md-offset-1">
<div class="text-justify" ng-model="privacyBodySetting.value" medium-editor options='{"placeholder": "{{ "settings.input_the_main_content" | translate }}",
"buttons": ["bold", "italic", "anchor", "header1", "header2" ]
}'>
</div>
<span class="help-block text-info text-xs"><i class="fa fa-lightbulb-o"></i> {{ 'settings.drag_and_drop_to_insert_images' | translate }}</span>
<button name="button" class="btn btn-warning" ng-click="save(privacyBodySetting)" translate>{{ 'save' }}</button>
</div>
<div class="col-md-4 col-md-offset-2">
<div ng-model="privacyDpoSetting.value" medium-editor options='{"placeholder": "{{ "settings.privacy.input_the_dpo" | translate }}",
"buttons": ["bold", "italic", "anchor", "header1", "header2" ]
}'>
</div>
<span class="help-block text-info text-xs"><i class="fa fa-lightbulb-o"></i> {{ 'settings.shift_enter_to_force_carriage_return' | translate }}</span>
<button name="button" class="btn btn-warning" ng-click="save(privacyDpoSetting)" translate>{{ 'save' }}</button>
</div>
</div>
</div>
</div>

View File

@ -4,6 +4,8 @@ class Setting < ActiveRecord::Base
{ in: %w[about_title
about_body
about_contacts
privacy_body
privacy_dpo
twitter_name
home_blogpost
machine_explications_alert

View File

@ -712,6 +712,8 @@ en:
name: "Name"
created_at: "Creation date"
updated_at: "Last update date"
privacy:
title: "Privacy policy"
open_api_clients:
add_new_client: "Create new API client"

View File

@ -712,6 +712,8 @@ es:
name: "Nombre"
created_at: "Fecha de creación"
updated_at: "Fecha de actualización"
privacy:
title: "Política de privacidad"
open_api_clients:
add_new_client: "Crear un nuevo cliente de API"

View File

@ -712,6 +712,9 @@ fr:
name: "Nom"
created_at: "Date de création"
updated_at: "Date de mise à jour"
privacy:
title: "Politique de confidentialité"
input_the_dpo: "Saisir le contact du Délégué à la protection des données"
open_api_clients:
add_new_client: "Créer un compte client"

View File

@ -712,6 +712,8 @@ pt:
name: "Nome"
created_at: "TODO"
updated_at: "TODO"
privacy:
title: "Política de privacidade"
open_api_clients:
add_new_client: "Criar novo cliente de API"