diff --git a/docs-core/src/main/resources/db/update/dbupdate-017-0.sql b/docs-core/src/main/resources/db/update/dbupdate-017-0.sql
index abd20826..06b83121 100644
--- a/docs-core/src/main/resources/db/update/dbupdate-017-0.sql
+++ b/docs-core/src/main/resources/db/update/dbupdate-017-0.sql
@@ -1,2 +1,7 @@
insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_ENABLED', 'false');
+insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_HOSTNAME', '');
+insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_PORT', '');
+insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_USERNAME', '');
+insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_PASSWORD', '');
+insert into T_CONFIG(CFG_ID_C, CFG_VALUE_C) values('INBOX_TAG', '');
update T_CONFIG set CFG_VALUE_C = '17' where CFG_ID_C = 'DB_VERSION';
diff --git a/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsInbox.js b/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsInbox.js
index cc7a5ec2..7d3a6b54 100644
--- a/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsInbox.js
+++ b/docs-web/src/main/webapp/src/app/docs/controller/settings/SettingsInbox.js
@@ -4,82 +4,29 @@
* Settings inbox page controller.
*/
angular.module('docs').controller('SettingsInbox', function($scope, $rootScope, Restangular) {
- // Get the app configuration
- Restangular.one('app').get().then(function (data) {
- $rootScope.app = data;
- $scope.general = {
- default_language: data.default_language
- }
+ // Get the inbox configuration
+ Restangular.one('app/config_inbox').get().then(function (data) {
+ $scope.inbox = data;
});
- // Enable/disable guest login
- $scope.changeGuestLogin = function (enabled) {
- Restangular.one('app').post('guest_login', {
- enabled: enabled
- }).then(function () {
- $scope.app.guest_login = enabled;
- });
- };
-
- // Fetch the current theme configuration
- Restangular.one('theme').get().then(function (data) {
- $scope.theme = data;
- $rootScope.appName = $scope.theme.name;
+ // Get the tags
+ Restangular.one('tag/list').get().then(function(data) {
+ $scope.tags = data.tags;
});
- // Update the theme
- $scope.update = function () {
- $scope.theme.name = $scope.theme.name.length === 0 ? 'Sismics Docs' : $scope.theme.name;
- Restangular.one('theme').post('', $scope.theme).then(function () {
- var stylesheet = $('#theme-stylesheet')[0];
- stylesheet.href = stylesheet.href.replace(/\?.*|$/, '?' + new Date().getTime());
- $rootScope.appName = $scope.theme.name;
- });
+ // Save the inbox configuration
+ $scope.editInboxConfig = function () {
+ return Restangular.one('app').post('config_inbox', $scope.inbox);
};
-
- // Send an image
- $scope.sendingImage = false;
- $scope.sendImage = function (type, image) {
- // Build the payload
- var formData = new FormData();
- formData.append('image', image);
- // Send the file
- var done = function() {
- $scope.$apply(function() {
- $scope.sendingImage = false;
- $scope[type] = null;
+ $scope.testInboxConfig = function () {
+ $scope.testLoading = true;
+ $scope.testResult = undefined;
+ $scope.editInboxConfig().then(function () {
+ Restangular.one('app').post('test_inbox').then(function (data) {
+ $scope.testResult = data;
+ $scope.testLoading = false;
});
- };
- $scope.sendingImage = true;
- $.ajax({
- type: 'PUT',
- url: '../api/theme/image/' + type,
- data: formData,
- cache: false,
- contentType: false,
- processData: false,
- success: function() {
- done();
- },
- error: function() {
- done();
- }
});
};
-
- // Load SMTP config
- Restangular.one('app/config_smtp').get().then(function (data) {
- $scope.smtp = data;
- });
-
- // Edit SMTP config
- $scope.editSmtpConfig = function () {
- Restangular.one('app').post('config_smtp', $scope.smtp);
- };
-
- // Edit general config
- $scope.editGeneralConfig = function () {
- Restangular.one('app').post('config', $scope.general);
- };
});
\ No newline at end of file
diff --git a/docs-web/src/main/webapp/src/locale/en.json b/docs-web/src/main/webapp/src/locale/en.json
index 428fabb0..ba2e90d7 100644
--- a/docs-web/src/main/webapp/src/locale/en.json
+++ b/docs-web/src/main/webapp/src/locale/en.json
@@ -361,6 +361,20 @@
"smtp_password": "SMTP password",
"smtp_updated": "SMTP configuration updated successfully"
},
+ "inbox": {
+ "title": "Inbox scanning",
+ "message": "By enabling this feature, the system while periodically scan the specified inbox for new emails and automatically import them.",
+ "enabled": "Enable inbox scanning",
+ "hostname": "IMAP hostname",
+ "port": "IMAP port (143 or 993)",
+ "username": "IMAP username",
+ "password": "IMAP password",
+ "tag": "Tag added to imported documents",
+ "test": "Test the parameters",
+ "last_sync": "Last synchronization: {{ data.date | date }}, {{ data.count }} message{{ data.count > 1 ? 's' : '' }} imported",
+ "test_success": "The connection to the inbox is successful ({{ count }} message{{ count > 1 ? 's' : '' }})",
+ "test_fail": "An error occurred while connecting to the inbox, please check the parameters"
+ },
"log": {
"title": "Server logs",
"date": "Date",
diff --git a/docs-web/src/main/webapp/src/locale/fr.json b/docs-web/src/main/webapp/src/locale/fr.json
index b684e403..ed15936b 100644
--- a/docs-web/src/main/webapp/src/locale/fr.json
+++ b/docs-web/src/main/webapp/src/locale/fr.json
@@ -245,9 +245,10 @@
"menu_groups": "Groupes",
"menu_vocabularies": "Vocabulaires",
"menu_configuration": "Configuration",
+ "menu_inbox": "Scanning de boîte de réception",
"menu_server_logs": "Logs serveur",
"user": {
- "title": "Gestion des utilisateurs",
+ "title": "Gestion des utilisateurs",
"add_user": "Ajouter un utilisateur",
"username": "Nom d'utilisateur",
"create_date": "Date de création",
@@ -257,8 +258,8 @@
"delete_user_message": "Etes-vous sûr de vouloir supprimer cet utilisateur ? Tous les documents, fichiers et tags associés seront supprimés",
"edit_user_failed_title": "Cet utilisateur existe déjà",
"edit_user_failed_message": "Ce nom d'utilisateur est déjà pris par un autre utilisateur",
- "edit_user_title": "Modifier \"{{ username }}\"",
- "add_user_title": "Ajouter un utilisateur",
+ "edit_user_title": "Modifier \"{{ username }}\"",
+ "add_user_title": "Ajouter un utilisateur",
"username": "Nom d'utilisateur",
"email": "E-mail",
"groups": "Groupes",
@@ -273,15 +274,15 @@
}
},
"workflow": {
- "title": "Configuration des workflows",
+ "title": "Configuration des workflows",
"add_workflow": "Ajouter un workflow",
"name": "Nom",
"create_date": "Date de création",
"edit": {
"delete_workflow_title": "Supprimer le workflow",
"delete_workflow_message": "Voulez-vous vraiment supprimer ce workflow ? Les workflows en cours d'exécution ne seront pas supprimés",
- "edit_workflow_title": "Modifier \"{{ name }}\"",
- "add_workflow_title": "Ajouter un workflow",
+ "edit_workflow_title": "Modifier \"{{ name }}\"",
+ "add_workflow_title": "Ajouter un workflow",
"name": "Nom",
"name_placeholder": "Nom de l'étape ou description",
"drag_help": "Glisser et déplacer pour réordonner les étapes",
@@ -296,7 +297,7 @@
"security": {
"enable_totp": "Activer l'authentification en deux étapes",
"enable_totp_message": "Assurez-vous d'avoir une application compatible TOTP sur votre téléphone prête à être configurée",
- "title": "Authentification en deux étapes",
+ "title": "Authentification en deux étapes",
"message_1": "L'authentification en deux étapes vous permet d'ajouter une couche de sécurité supplémentaire sur votre compte {{ appName }}.
Avant d'activer cette fonctionnalité, assurez-vous d'avoir une application compatible TOTP sur votre téléphone :",
"message_google_authenticator": "Pour Android, iOS, et Blackberry: Google Authenticator",
"message_duo_mobile": "Pour Android et iOS: Duo Mobile",
@@ -313,7 +314,7 @@
}
},
"group": {
- "title": "Gestion des groupes",
+ "title": "Gestion des groupes",
"add_group": "Ajouter un groupe",
"name": "Nom",
"edit": {
@@ -321,8 +322,8 @@
"delete_group_message": "Etes-vous sûr de vouloir supprimer ce groupe ?",
"edit_group_failed_title": "Ce groupe existe déjà",
"edit_group_failed_message": "Ce nom de groupe est déjà pris par un autre groupe",
- "edit_group_title": "Modifier \"{{ name }}\"",
- "add_group_title": "Ajouter un groupe",
+ "edit_group_title": "Modifier \"{{ name }}\"",
+ "add_group_title": "Ajouter un groupe",
"name": "Nom",
"parent_group": "Groupe parent",
"search_group": "Rechercher un groupe",
@@ -332,17 +333,19 @@
}
},
"account": {
- "title": "Compte utilisateur",
+ "title": "Compte utilisateur",
"password": "Mot de passe",
"password_confirm": "Mot de passe (confirmation)",
"updated": "Compte mis à jour avec succès"
},
"config": {
- "title_guest_access": "Accès invité",
+ "title_guest_access": "Accès invité",
"message_guest_access": "L'accès invité est un mode dans lequel quiconque peut accéder à {{ appName }} sans mot de passe.
Comme un utilisateur normal, l'invité ne pourra accéder qu'aux documents auquel il a accès via les permissions.
",
"enable_guest_access": "Activer l'accès invité",
"disable_guest_access": "Désactiver l'accès invité",
- "title_theme": "Personnalisation de l'interface",
+ "title_theme": "Personnalisation de l'interface",
+ "title_general": "Configuration générale",
+ "default_language": "Langage par défaut pour les nouveaux documents",
"application_name": "Nom de l'application",
"main_color": "Couleur principale",
"custom_css": "CSS personnalisée",
@@ -350,7 +353,7 @@
"logo": "Logo (Taille carrée)",
"background_image": "Image de fond",
"uploading_image": "Envoi de l'image...",
- "title_smtp": "Configuration email",
+ "title_smtp": "Configuration email",
"smtp_hostname": "Hôte SMTP",
"smtp_port": "Port SMTP",
"smtp_from": "Email d'envoi",
@@ -358,14 +361,28 @@
"smtp_password": "Mot de passe SMTP",
"smtp_updated": "Configuration SMTP mise à jour avec succès"
},
+ "inbox": {
+ "title": "Scanning de boîte de réception",
+ "message": "En activant cette fonctionnalité, le système scanne périodiquement la boîte de réception spécifiée pour rechercher de nouveaux messages et les importer automatiquement.",
+ "enabled": "Activer le scan de boîte de réception",
+ "hostname": "Nom d'hôte IMAP",
+ "port": "Port IMAP (143 ou 993)",
+ "username": "Nom d'utilisateur IMAP",
+ "password": "Mot de passe IMAP",
+ "tag": "Tag ajouté aux documents importés",
+ "test": "Tester les paramètres",
+ "last_sync": "Dernière synchronisation : {{ data.date | date }}, {{ data.count }} message{{ data.count> 1 ? 's' : '' }} importé{{ data.count> 1 ? 's' : '' }}",
+ "test_success": "La connexion à la boîte de réception est réussie ({{ count }} message{{ count> 1 ? 's' : '' }})",
+ "test_fail": "Une erreur est survenue lors de la connexion à la boîte de réception, veuillez vérifier les paramètres"
+ },
"log": {
- "title": "Logs serveur",
+ "title": "Logs serveur",
"date": "Date",
"tag": "Tag",
"message": "Message"
},
"session": {
- "title": "Sessions ouvertes",
+ "title": "Sessions ouvertes",
"created_date": "Date de création",
"last_connection_date": "Date de dernière connexion",
"user_agent": "Depuis",
@@ -375,7 +392,7 @@
"clear": "Fermeture des autres sessions"
},
"vocabulary": {
- "title": "Entrées de vocabulaire",
+ "title": "Entrées de vocabulaire",
"choose_vocabulary": "Choisissez un vocabulaire à modifier",
"type": "Type",
"coverage": "Couverture",
diff --git a/docs-web/src/main/webapp/src/locale/ru.json b/docs-web/src/main/webapp/src/locale/ru.json
index 781c890f..51744d81 100644
--- a/docs-web/src/main/webapp/src/locale/ru.json
+++ b/docs-web/src/main/webapp/src/locale/ru.json
@@ -49,6 +49,7 @@
"search_clear": "Очистить",
"any_language": "Любой язык",
"add_document": "Добавить документ",
+ "import_eml": "Импорт из электронной почты (формат EML)",
"tags": "Теги",
"no_tags": "Нет тегов",
"no_documents": "В базе данных нет документа",
@@ -244,6 +245,7 @@
"menu_groups": "Группы",
"menu_vocabularies": "Словари",
"menu_configuration": "Конфигурация",
+ "menu_inbox": "Входящие сканирования",
"menu_server_logs": "Журналы сервера",
"user": {
"title": "Управление пользователями",
@@ -342,6 +344,8 @@
"enable_guest_access": "Включить гостевой доступ",
"disable_guest_access": "Отключить гостевой доступ",
"title_theme": "Настройка темы",
+ "title_general": "Общая конфигурация",
+ "default_language": "Язык по умолчанию для новых документов",
"application_name": "Имя приложения",
"main_color": "Основной цвет",
"custom_css": "Пользовательские CSS",
@@ -357,6 +361,20 @@
"smtp_password": "Пароль SMTP",
"smtp_updated": "Конфигурация SMTP успешно обновлена"
},
+ "inbox": {
+ "title": "Входящие сканирования",
+ "message": "Включив эту функцию, система периодически проверяет указанный почтовый ящик для новых писем и автоматически импортирует их.",
+ "enabled": "Включить сканирование входящих сообщений",
+ "hostname": "Имя хоста IMAP",
+ "port": "Порт IMAP (143 или 993)",
+ "username": "Имя пользователя IMAP",
+ "password": "Пароль IMAP",
+ "tag": "Тег добавлен в импортированные документы",
+ "test": "Проверить параметры",
+ "last_sync": "Последняя синхронизация: {{data.date | date}}, {{data.count}} импортировано",
+ "test_success": "Соединение с почтовым ящиком успешное ({{count}} сообщение)",
+ "test_fail": "При подключении к папке «Входящие» произошла ошибка, проверьте параметры"
+ },
"log": {
"title": "Cерверные журналы",
"date": "Дата",
@@ -390,6 +408,11 @@
"sent_title": "Обратная связь отправлена",
"sent_message": "Спасибо за ваш отзыв! Это поможет нам улучшить работу Sismics Docs."
},
+ "import": {
+ "title": "Импорт",
+ "error_quota": "Достигнутый предел квоты, обратитесь к администратору, чтобы увеличить свою квоту",
+ "error_general": "При попытке импортировать файл произошла ошибка, убедитесь, что он является допустимым файлом EML"
+ },
"app_share": {
"main": "Запросить ссылку на общий документ для доступа",
"403": {
@@ -415,7 +438,8 @@
"Group": "Группа",
"Tag": "Тег",
"User": "Пользователь",
- "RouteModel": "Workflow"
+ "RouteModel": "Модель рабочего процесса",
+ "Route": "Workflow"
},
"selectrelation": {
"typeahead": "Введите название документа"
diff --git a/docs-web/src/main/webapp/src/locale/zh_CN.json b/docs-web/src/main/webapp/src/locale/zh_CN.json
index d7d798ee..cc157156 100644
--- a/docs-web/src/main/webapp/src/locale/zh_CN.json
+++ b/docs-web/src/main/webapp/src/locale/zh_CN.json
@@ -245,6 +245,7 @@
"menu_groups": "群组",
"menu_vocabularies": "词条",
"menu_configuration": "配置",
+ "menu_inbox": "收件箱扫描",
"menu_server_logs": "服务器日志",
"user": {
"title": "用户 管理",
@@ -343,6 +344,8 @@
"enable_guest_access": "激活游客权限",
"disable_guest_access": "不激活游客权限",
"title_theme": "主题 定制",
+ "title_general": "一般配置",
+ "default_language": "新文档的默认语言",
"application_name": "申请名",
"main_color": "主颜色",
"custom_css": "用户样式表",
@@ -358,6 +361,20 @@
"smtp_password": "SMTP密码",
"smtp_updated": "SMTP组态更新成功"
},
+ "inbox": {
+ "title": "收件箱扫描",
+ "message": "通过启用此功能,系统会定期扫描指定收件箱中的新电子邮件并自动导入它们。",
+ "enabled": "启用收件箱扫描",
+ "hostname": "IMAP主机名",
+ "port": "IMAP端口(143或993)",
+ "username": "IMAP用户名",
+ "password": "IMAP密码",
+ "tag": "标签添加到导入的文档",
+ "test": "测试参数",
+ "last_sync": "上次同步:{{ data.date | date }},{{ data.count }}消息导入",
+ "test_success": "与收件箱的连接成功({{count}}消息)",
+ "test_fail": "连接到收件箱时发生错误,请检查参数"
+ },
"log": {
"title": "服务器 日志",
"date": "日期",
diff --git a/docs-web/src/main/webapp/src/locale/zh_TW.json b/docs-web/src/main/webapp/src/locale/zh_TW.json
index acb07432..9b6dc8fe 100644
--- a/docs-web/src/main/webapp/src/locale/zh_TW.json
+++ b/docs-web/src/main/webapp/src/locale/zh_TW.json
@@ -245,6 +245,7 @@
"menu_groups": "群組",
"menu_vocabularies": "詞條",
"menu_configuration": "配置",
+ "menu_inbox": "收件箱掃描",
"menu_server_logs": "服務器日誌",
"user": {
"title": "用戶 管理",
@@ -343,6 +344,8 @@
"enable_guest_access": "激活遊客權限",
"disable_guest_access": "不激活遊客權限",
"title_theme": "主題 定制",
+ "title_general": "一般配置",
+ "default_language": "新文檔的默認語言",
"application_name": "申請名",
"main_color": "主顏色",
"custom_css": "用戶樣式表",
@@ -358,6 +361,20 @@
"smtp_password": "SMTP密碼",
"smtp_updated": "SMTP配置已成功更新"
},
+ "inbox": {
+ "title": "收件箱掃描",
+ "message": "通過啟用此功能,系統會定期掃描指定收件箱中的新電子郵件並自動導入它們。",
+ "enabled": "啟用收件箱掃描",
+ "hostname": "IMAP主機名",
+ "port": "IMAP端口(143或993)",
+ "username": "IMAP用戶名",
+ "password": "IMAP密碼",
+ "tag": "標籤添加到導入的文檔",
+ "test": "測試參數",
+ "last_sync": "上次同步:{{ data.date | date }},{{data.count}}消息導入",
+ "test_success": "與收件箱的連接成功({{ count }} 消息)",
+ "test_fail": "連接到收件箱時發生錯誤,請檢查參數"
+ },
"log": {
"title": "服務器 日誌",
"date": "日期",
diff --git a/docs-web/src/main/webapp/src/partial/docs/settings.inbox.html b/docs-web/src/main/webapp/src/partial/docs/settings.inbox.html
index 8276ce9b..3117e59a 100644
--- a/docs-web/src/main/webapp/src/partial/docs/settings.inbox.html
+++ b/docs-web/src/main/webapp/src/partial/docs/settings.inbox.html
@@ -1,145 +1,76 @@
-
-{{ inbox.last_sync.error }}
- -