diff --git a/src/main/java/org/codelibs/fess/Constants.java b/src/main/java/org/codelibs/fess/Constants.java index 5e9edc682..36c5aaf39 100644 --- a/src/main/java/org/codelibs/fess/Constants.java +++ b/src/main/java/org/codelibs/fess/Constants.java @@ -359,6 +359,10 @@ public class Constants extends CoreLibConstants { public static final String LDAP_ACCOUNT_FILTER = "ldap.account.filter"; + public static final String NOTIFICATION_LOGIN = "notification.login"; + + public static final String NOTIFICATION_SEARCH_TOP = "notification.search.top"; + public static final String MAPPING_TYPE_ARRAY = "array"; public static final String MAPPING_TYPE_STRING = "string"; diff --git a/src/main/java/org/codelibs/fess/app/web/RootAction.java b/src/main/java/org/codelibs/fess/app/web/RootAction.java index 8bb495739..8a2ca10ed 100644 --- a/src/main/java/org/codelibs/fess/app/web/RootAction.java +++ b/src/main/java/org/codelibs/fess/app/web/RootAction.java @@ -15,8 +15,11 @@ */ package org.codelibs.fess.app.web; +import org.codelibs.core.lang.StringUtil; +import org.codelibs.fess.Constants; import org.codelibs.fess.app.web.base.FessSearchAction; import org.codelibs.fess.app.web.base.SearchForm; +import org.codelibs.fess.util.RenderDataUtil; import org.lastaflute.web.Execute; import org.lastaflute.web.response.HtmlResponse; @@ -43,9 +46,12 @@ public class RootAction extends FessSearchAction { op.setup(form -> { buildLabelParams(form.fields); }); - }).renderWith(data -> { - buildInitParams(); - }); + }).renderWith( + data -> { + buildInitParams(); + RenderDataUtil.register(data, "notification", + systemProperties.getProperty(Constants.NOTIFICATION_SEARCH_TOP, StringUtil.EMPTY)); + }); } } \ No newline at end of file diff --git a/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java b/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java index 8e26db957..4ff1441a1 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/general/AdminGeneralAction.java @@ -142,6 +142,8 @@ public class AdminGeneralAction extends FessAdminAction { updateProperty(Constants.LDAP_SECURITY_PRINCIPAL, form.ldapSecurityPrincipal); updateProperty(Constants.LDAP_BASE_DN, form.ldapBaseDn); updateProperty(Constants.LDAP_ACCOUNT_FILTER, form.ldapAccountFilter); + updateProperty(Constants.NOTIFICATION_LOGIN, form.notificationLogin); + updateProperty(Constants.NOTIFICATION_SEARCH_TOP, form.notificationSearchTop); fessConfig.storeSystemProperties(); saveInfo(messages -> messages.addSuccessUpdateCrawlerParams(GLOBAL)); @@ -185,6 +187,8 @@ public class AdminGeneralAction extends FessAdminAction { form.ldapSecurityPrincipal = systemProperties.getProperty(Constants.LDAP_SECURITY_PRINCIPAL, StringUtil.EMPTY); form.ldapBaseDn = systemProperties.getProperty(Constants.LDAP_BASE_DN, StringUtil.EMPTY); form.ldapAccountFilter = systemProperties.getProperty(Constants.LDAP_ACCOUNT_FILTER, StringUtil.EMPTY); + form.notificationLogin = systemProperties.getProperty(Constants.NOTIFICATION_LOGIN, StringUtil.EMPTY); + form.notificationSearchTop = systemProperties.getProperty(Constants.NOTIFICATION_SEARCH_TOP, StringUtil.EMPTY); } private void updateProperty(final String key, final String value) { diff --git a/src/main/java/org/codelibs/fess/app/web/admin/general/EditForm.java b/src/main/java/org/codelibs/fess/app/web/admin/general/EditForm.java index 3d8460a0c..afc844f2a 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/general/EditForm.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/general/EditForm.java @@ -127,4 +127,10 @@ public class EditForm implements Serializable { @Size(max = 1000) public String ldapAccountFilter; + + @Size(max = 3000) + public String notificationLogin; + + @Size(max = 3000) + public String notificationSearchTop; } diff --git a/src/main/java/org/codelibs/fess/app/web/login/LoginAction.java b/src/main/java/org/codelibs/fess/app/web/login/LoginAction.java index 9f3a8ff2b..a108533cc 100644 --- a/src/main/java/org/codelibs/fess/app/web/login/LoginAction.java +++ b/src/main/java/org/codelibs/fess/app/web/login/LoginAction.java @@ -15,10 +15,13 @@ */ package org.codelibs.fess.app.web.login; +import org.codelibs.core.lang.StringUtil; +import org.codelibs.fess.Constants; import org.codelibs.fess.app.web.admin.dashboard.AdminDashboardAction; import org.codelibs.fess.app.web.base.FessSearchAction; import org.codelibs.fess.mylasta.action.FessUserBean; import org.codelibs.fess.util.ActivityUtil; +import org.codelibs.fess.util.RenderDataUtil; import org.lastaflute.web.Execute; import org.lastaflute.web.login.exception.LoginFailureException; import org.lastaflute.web.response.HtmlResponse; @@ -43,7 +46,9 @@ public class LoginAction extends FessSearchAction { @Execute public HtmlResponse index() { - return getHtmlResponse().useForm(LoginForm.class); + return asHtml(path_Login_IndexJsp).renderWith(data -> { + RenderDataUtil.register(data, "notification", systemProperties.getProperty(Constants.NOTIFICATION_LOGIN, StringUtil.EMPTY)); + }).useForm(LoginForm.class); } @Execute diff --git a/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java b/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java index eb81ae99c..b0fdcadaa 100644 --- a/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java +++ b/src/main/java/org/codelibs/fess/mylasta/action/FessHtmlPath.java @@ -317,6 +317,12 @@ public interface FessHtmlPath { /** The path of the HTML: /index.jsp */ HtmlNext path_IndexJsp = new HtmlNext("/index.jsp"); + /** The path of the HTML: /info/login_info.jsp */ + HtmlNext path_Info_LoginInfoJsp = new HtmlNext("/info/login_info.jsp"); + + /** The path of the HTML: /info/search_info.jsp */ + HtmlNext path_Info_SearchInfoJsp = new HtmlNext("/info/search_info.jsp"); + /** The path of the HTML: /login/footer.jsp */ HtmlNext path_Login_FooterJsp = new HtmlNext("/login/footer.jsp"); diff --git a/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java b/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java index 32eb3d089..d602532dd 100644 --- a/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java +++ b/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java @@ -2022,8 +2022,14 @@ public class FessLabels extends ActionMessages { /** The key of the message: Account Filter */ public static final String LABELS_ldap_account_filter = "{labels.ldap_account_filter}"; - /** The key of the message: Send TestMail */ - public static final String LABELS_send_testmail = "{labels.send_testmail}"; + /** The key of the message: Login page */ + public static final String LABELS_notification_login = "{labels.notification_login}"; + + /** The key of the message: Search top page */ + public static final String LABELS_notification_search_top = "{labels.notification_search_top}"; + + /** The key of the message: Notification */ + public static final String LABELS_general_menu_notification = "{labels.general_menu_notification}"; /** The key of the message: Back Up */ public static final String LABELS_backup_configuration = "{labels.backup_configuration}"; diff --git a/src/main/resources/fess_label.properties b/src/main/resources/fess_label.properties index fd563108e..5054a7520 100644 --- a/src/main/resources/fess_label.properties +++ b/src/main/resources/fess_label.properties @@ -667,10 +667,15 @@ labels.general_menu_crawler=Crawler labels.general_menu_logging=Logging labels.general_menu_suggest=Suggest labels.general_menu_ldap=LDAP +labels.general_menu_notification=Notification labels.ldap_provider_url=LDAP URL labels.ldap_security_principal=Bind DN labels.ldap_base_dn=Base DN labels.ldap_account_filter=Account Filter +labels.ldap_account_filter=Account Filter +labels.notification_login=Login page +labels.notification_search_top=Search top page +labels.general_menu_notification=Notification labels.send_testmail=Send TestMail labels.backup_configuration=Back Up labels.backup_name=Name diff --git a/src/main/resources/fess_label_en.properties b/src/main/resources/fess_label_en.properties index fd563108e..6ba8a993e 100644 --- a/src/main/resources/fess_label_en.properties +++ b/src/main/resources/fess_label_en.properties @@ -667,10 +667,13 @@ labels.general_menu_crawler=Crawler labels.general_menu_logging=Logging labels.general_menu_suggest=Suggest labels.general_menu_ldap=LDAP +labels.general_menu_notification=Notification labels.ldap_provider_url=LDAP URL labels.ldap_security_principal=Bind DN labels.ldap_base_dn=Base DN labels.ldap_account_filter=Account Filter +labels.notification_login=Login page +labels.notification_search_top=Search top page labels.send_testmail=Send TestMail labels.backup_configuration=Back Up labels.backup_name=Name diff --git a/src/main/resources/fess_label_ja.properties b/src/main/resources/fess_label_ja.properties index 765ad16de..a295ff4bd 100644 --- a/src/main/resources/fess_label_ja.properties +++ b/src/main/resources/fess_label_ja.properties @@ -654,15 +654,18 @@ labels.general_menu_system = \u30b7\u30b9\u30c6\u30e0 labels.general_menu_crawler = \u30af\u30ed\u30fc\u30e9 labels.general_menu_logging = \u30ed\u30ae\u30f3\u30b0 labels.general_menu_suggest = \u30b5\u30b8\u30a7\u30b9\u30c8 -labels.send_testmail=\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb\u306e\u9001\u4fe1 +labels.general_menu_ldap=LDAP +labels.general_menu_notification=\u304a\u77e5\u3089\u305b\u8868\u793a labels.ldapProviderUrl=LDAP URL labels.ldapSecurityPrincipal=Bind DN labels.ldapBaseDn=Base DN -labels.general_menu_ldap=LDAP labels.ldap_provider_url=LDAP URL labels.ldap_security_principal=Bind DN labels.ldap_base_dn=Base DN labels.ldapAccountFilter=\u30a2\u30ab\u30a6\u30f3\u30c8\u30d5\u30a3\u30eb\u30bf labels.ldap_account_filter=\u30a2\u30ab\u30a6\u30f3\u30c8\u30d5\u30a3\u30eb\u30bf +labels.notification_login=\u30ed\u30b0\u30a4\u30f3\u30da\u30fc\u30b8 +labels.notification_search_top=\u691c\u7d22\u30c8\u30c3\u30d7\u30da\u30fc\u30b8 +labels.send_testmail=\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb\u306e\u9001\u4fe1 labels.backup_configuration=\u30d0\u30c3\u30af\u30a2\u30c3\u30d7 labels.backup_name=\u540d\u524d diff --git a/src/main/webapp/WEB-INF/view/admin/general/admin_general.jsp b/src/main/webapp/WEB-INF/view/admin/general/admin_general.jsp index 287297185..8b1eaba00 100644 --- a/src/main/webapp/WEB-INF/view/admin/general/admin_general.jsp +++ b/src/main/webapp/WEB-INF/view/admin/general/admin_general.jsp @@ -329,6 +329,28 @@ styleClass="form-control" /> + <%-- Nortification --%> +

+
+ +
+ + +
+
+
+ +
+ + +
+