fix #177
This commit is contained in:
parent
ab8dde4505
commit
7a59ed715a
20 changed files with 546 additions and 2 deletions
|
@ -16,6 +16,8 @@
|
|||
|
||||
package jp.sf.fess.action.admin.dict;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
@ -27,6 +29,7 @@ import jp.sf.fess.crud.CommonConstants;
|
|||
import jp.sf.fess.crud.CrudMessageException;
|
||||
import jp.sf.fess.crud.util.SAStrutsUtil;
|
||||
import jp.sf.fess.dict.DictionaryExpiredException;
|
||||
import jp.sf.fess.dict.synonym.SynonymFile;
|
||||
import jp.sf.fess.dict.synonym.SynonymItem;
|
||||
import jp.sf.fess.form.admin.dict.SynonymForm;
|
||||
import jp.sf.fess.helper.SystemHelper;
|
||||
|
@ -43,6 +46,7 @@ import org.seasar.framework.beans.util.Beans;
|
|||
import org.seasar.struts.annotation.ActionForm;
|
||||
import org.seasar.struts.annotation.Execute;
|
||||
import org.seasar.struts.exception.ActionMessagesException;
|
||||
import org.seasar.struts.util.ResponseUtil;
|
||||
|
||||
public class SynonymAction {
|
||||
|
||||
|
@ -63,6 +67,8 @@ public class SynonymAction {
|
|||
|
||||
public List<SynonymItem> synonymItemItems;
|
||||
|
||||
public String filename;
|
||||
|
||||
public String getHelpLink() {
|
||||
return systemHelper.getHelpLink("dict");
|
||||
}
|
||||
|
@ -305,6 +311,72 @@ public class SynonymAction {
|
|||
}
|
||||
}
|
||||
|
||||
@Token(save = true, validate = false)
|
||||
@Execute(validator = false, input = "downloadpage")
|
||||
public String downloadpage() {
|
||||
SynonymFile synonymFile = synonymService
|
||||
.getSynonymFile(synonymForm.dictId);
|
||||
if (synonymFile == null) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.synonym_file_is_not_found");
|
||||
}
|
||||
filename = synonymFile.getSimpleName();
|
||||
return "download.jsp";
|
||||
}
|
||||
|
||||
@Token(save = true, validate = true)
|
||||
@Execute(validator = false, input = "downloadpage")
|
||||
public String download() {
|
||||
SynonymFile synonymFile = synonymService
|
||||
.getSynonymFile(synonymForm.dictId);
|
||||
if (synonymFile == null) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.synonym_file_is_not_found");
|
||||
}
|
||||
try (InputStream in = synonymFile.getInputStream()) {
|
||||
ResponseUtil.download(synonymFile.getSimpleName(), in);
|
||||
} catch (IOException e) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.failed_to_download_synonym_file");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Token(save = true, validate = false)
|
||||
@Execute(validator = false, input = "uploadpage")
|
||||
public String uploadpage() {
|
||||
SynonymFile synonymFile = synonymService
|
||||
.getSynonymFile(synonymForm.dictId);
|
||||
if (synonymFile == null) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.synonym_file_is_not_found");
|
||||
}
|
||||
filename = synonymFile.getName();
|
||||
return "upload.jsp";
|
||||
}
|
||||
|
||||
@Token(save = false, validate = true)
|
||||
@Execute(validator = true, input = "uploadpage")
|
||||
public String upload() {
|
||||
SynonymFile synonymFile = synonymService
|
||||
.getSynonymFile(synonymForm.dictId);
|
||||
if (synonymFile == null) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.synonym_file_is_not_found");
|
||||
}
|
||||
try (InputStream in = synonymForm.synonymFile.getInputStream()) {
|
||||
synonymFile.update(in);
|
||||
} catch (IOException e) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.failed_to_upload_synonym_file");
|
||||
}
|
||||
|
||||
SAStrutsUtil.addSessionMessage("success.upload_synonym_file");
|
||||
|
||||
return "uploadpage?dictId=" + synonymForm.dictId + "&redirect=true";
|
||||
}
|
||||
|
||||
protected void loadSynonym() {
|
||||
|
||||
final SynonymItem synonymItem = synonymService.getSynonym(
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
package jp.sf.fess.action.admin.dict;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -26,6 +28,7 @@ import jp.sf.fess.crud.CommonConstants;
|
|||
import jp.sf.fess.crud.CrudMessageException;
|
||||
import jp.sf.fess.crud.util.SAStrutsUtil;
|
||||
import jp.sf.fess.dict.DictionaryExpiredException;
|
||||
import jp.sf.fess.dict.userdict.UserDictFile;
|
||||
import jp.sf.fess.dict.userdict.UserDictItem;
|
||||
import jp.sf.fess.form.admin.dict.UserDictForm;
|
||||
import jp.sf.fess.helper.SystemHelper;
|
||||
|
@ -41,6 +44,7 @@ import org.seasar.framework.beans.util.Beans;
|
|||
import org.seasar.struts.annotation.ActionForm;
|
||||
import org.seasar.struts.annotation.Execute;
|
||||
import org.seasar.struts.exception.ActionMessagesException;
|
||||
import org.seasar.struts.util.ResponseUtil;
|
||||
|
||||
public class UserDictAction {
|
||||
|
||||
|
@ -61,6 +65,8 @@ public class UserDictAction {
|
|||
|
||||
public List<UserDictItem> userDictItemItems;
|
||||
|
||||
public String filename;
|
||||
|
||||
public String getHelpLink() {
|
||||
return systemHelper.getHelpLink("dict");
|
||||
}
|
||||
|
@ -303,6 +309,72 @@ public class UserDictAction {
|
|||
}
|
||||
}
|
||||
|
||||
@Token(save = true, validate = false)
|
||||
@Execute(validator = false, input = "downloadpage")
|
||||
public String downloadpage() {
|
||||
UserDictFile userdictFile = userDictService
|
||||
.getUserDictFile(userDictForm.dictId);
|
||||
if (userdictFile == null) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.userdict_file_is_not_found");
|
||||
}
|
||||
filename = userdictFile.getSimpleName();
|
||||
return "download.jsp";
|
||||
}
|
||||
|
||||
@Token(save = true, validate = true)
|
||||
@Execute(validator = false, input = "downloadpage")
|
||||
public String download() {
|
||||
UserDictFile userdictFile = userDictService
|
||||
.getUserDictFile(userDictForm.dictId);
|
||||
if (userdictFile == null) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.userdict_file_is_not_found");
|
||||
}
|
||||
try (InputStream in = userdictFile.getInputStream()) {
|
||||
ResponseUtil.download(userdictFile.getSimpleName(), in);
|
||||
} catch (IOException e) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.failed_to_download_userdict_file");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Token(save = true, validate = false)
|
||||
@Execute(validator = false, input = "uploadpage")
|
||||
public String uploadpage() {
|
||||
UserDictFile userdictFile = userDictService
|
||||
.getUserDictFile(userDictForm.dictId);
|
||||
if (userdictFile == null) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.userdict_file_is_not_found");
|
||||
}
|
||||
filename = userdictFile.getName();
|
||||
return "upload.jsp";
|
||||
}
|
||||
|
||||
@Token(save = false, validate = true)
|
||||
@Execute(validator = true, input = "uploadpage")
|
||||
public String upload() {
|
||||
UserDictFile userdictFile = userDictService
|
||||
.getUserDictFile(userDictForm.dictId);
|
||||
if (userdictFile == null) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.userdict_file_is_not_found");
|
||||
}
|
||||
try (InputStream in = userDictForm.userDictFile.getInputStream()) {
|
||||
userdictFile.update(in);
|
||||
} catch (IOException e) {
|
||||
throw new SSCActionMessagesException(
|
||||
"errors.failed_to_upload_userdict_file");
|
||||
}
|
||||
|
||||
SAStrutsUtil.addSessionMessage("success.upload_userdict_file");
|
||||
|
||||
return "uploadpage?dictId=" + userDictForm.dictId + "&redirect=true";
|
||||
}
|
||||
|
||||
protected void loadUserDict() {
|
||||
|
||||
final UserDictItem userDictItem = userDictService.getUserDict(
|
||||
|
|
|
@ -16,12 +16,15 @@
|
|||
|
||||
package jp.sf.fess.dict.synonym;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
|
@ -36,6 +39,8 @@ import jp.sf.fess.dict.DictionaryFile;
|
|||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.codelibs.core.util.StringUtil;
|
||||
import org.seasar.framework.util.FileUtil;
|
||||
import org.seasar.robot.util.StreamUtil;
|
||||
|
||||
public class SynonymFile extends DictionaryFile<SynonymItem> {
|
||||
private static final String SYNONYM = "synonym";
|
||||
|
@ -382,4 +387,16 @@ public class SynonymFile extends DictionaryFile<SynonymItem> {
|
|||
}
|
||||
}
|
||||
|
||||
public String getSimpleName() {
|
||||
return file.getName();
|
||||
}
|
||||
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return new BufferedInputStream(new FileInputStream(file));
|
||||
}
|
||||
|
||||
public void update(InputStream in) throws IOException {
|
||||
StreamUtil.drain(in, file);
|
||||
reload(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,12 +16,14 @@
|
|||
|
||||
package jp.sf.fess.dict.userdict;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
|
@ -37,6 +39,7 @@ import org.apache.commons.io.FileUtils;
|
|||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.lucene.analysis.ja.util.CSVUtil;
|
||||
import org.codelibs.core.util.StringUtil;
|
||||
import org.seasar.robot.util.StreamUtil;
|
||||
|
||||
public class UserDictFile extends DictionaryFile<UserDictItem> {
|
||||
private static final String USERDICT = "userDict";
|
||||
|
@ -309,4 +312,16 @@ public class UserDictFile extends DictionaryFile<UserDictItem> {
|
|||
}
|
||||
}
|
||||
|
||||
public String getSimpleName() {
|
||||
return file.getName();
|
||||
}
|
||||
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return new BufferedInputStream(new FileInputStream(file));
|
||||
}
|
||||
|
||||
public void update(InputStream in) throws IOException {
|
||||
StreamUtil.drain(in, file);
|
||||
reload(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ package jp.sf.fess.form.admin.dict;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.struts.upload.FormFile;
|
||||
import org.seasar.struts.annotation.IntegerType;
|
||||
import org.seasar.struts.annotation.LongType;
|
||||
import org.seasar.struts.annotation.Maxbytelength;
|
||||
|
@ -52,6 +53,9 @@ public class SynonymForm {
|
|||
@Maxbytelength(maxbytelength = 1000)
|
||||
public String outputs;
|
||||
|
||||
@Required(target = "upload")
|
||||
public FormFile synonymFile;
|
||||
|
||||
public void initialize() {
|
||||
id = null;
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ package jp.sf.fess.form.admin.dict;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.struts.upload.FormFile;
|
||||
import org.seasar.struts.annotation.IntegerType;
|
||||
import org.seasar.struts.annotation.LongType;
|
||||
import org.seasar.struts.annotation.Maxbytelength;
|
||||
|
@ -60,6 +61,9 @@ public class UserDictForm {
|
|||
@Maxbytelength(maxbytelength = 1000)
|
||||
public String pos;
|
||||
|
||||
@Required(target = "upload")
|
||||
public FormFile userDictFile;
|
||||
|
||||
public void initialize() {
|
||||
id = null;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public class SynonymService {
|
|||
|
||||
}
|
||||
|
||||
protected SynonymFile getSynonymFile(final String dictId) {
|
||||
public SynonymFile getSynonymFile(final String dictId) {
|
||||
final DictionaryFile<?> dictionaryFile = dictionaryManager
|
||||
.getDictionaryFile(dictId);
|
||||
if (dictionaryFile instanceof SynonymFile) {
|
||||
|
|
|
@ -56,7 +56,7 @@ public class UserDictService {
|
|||
|
||||
}
|
||||
|
||||
protected UserDictFile getUserDictFile(final String dictId) {
|
||||
public UserDictFile getUserDictFile(final String dictId) {
|
||||
final DictionaryFile<?> dictionaryFile = dictionaryManager
|
||||
.getDictionaryFile(dictId);
|
||||
if (dictionaryFile instanceof UserDictFile) {
|
||||
|
|
|
@ -73,6 +73,12 @@ errors.failed_to_start_job=Failed to start job {0}.
|
|||
errors.failed_to_stop_job=Failed to stop job {0}.
|
||||
errors.expired_dict_id=Expired dictionary information. Please reload it.
|
||||
errors.failed_to_create_cache=Failed to create a cache reponse for ID:{0}.
|
||||
errors.synonym_file_is_not_found=Synonym file is not found
|
||||
errors.failed_to_download_synonym_file=Failed to download the Synonym file.
|
||||
errors.failed_to_upload_synonym_file=Failed to upload the Synonym file.
|
||||
errors.userdict_file_is_not_found=Synonym file is not found
|
||||
errors.failed_to_download_userdict_file=Failed to download the UserDict file.
|
||||
errors.failed_to_upload_userdict_file=Failed to upload the UserDict file.
|
||||
|
||||
errors.invalid_query_unknown=The given query is invalid.
|
||||
errors.invalid_query_quoted=An invalid quote character is used.
|
||||
|
@ -106,6 +112,8 @@ success.user_info_delete_all=Deleted user information.
|
|||
success.job_started=Started job {0}.
|
||||
success.job_stopped=Stopped job {0}.
|
||||
success.joblog_delete_all=Deleted job logs.
|
||||
success.upload_synonym_file=Uploaded Synonym file.
|
||||
success.upload_userdict_file=Uploaded UserDict file.
|
||||
|
||||
# labels
|
||||
labels.authRealm=Realm
|
||||
|
@ -273,6 +281,8 @@ labels.startTime=Start Time
|
|||
labels.target=Target
|
||||
labels.token=Token
|
||||
labels.useAclAsRole=Use ACL as Role
|
||||
labels.synonymFile=Synonym File
|
||||
labels.userDictFile=UserDict File
|
||||
|
||||
# view/common/common.jsp
|
||||
|
||||
|
@ -1250,6 +1260,8 @@ labels.dict_synonym_link_create=Create New
|
|||
labels.dict_synonym_link_update=Edit
|
||||
labels.dict_synonym_link_delete=Delete
|
||||
labels.dict_synonym_link_confirm=Confirm
|
||||
labels.dict_synonym_link_download=Download
|
||||
labels.dict_synonym_link_upload=Upload
|
||||
labels.dict_synonym_source=Source
|
||||
labels.dict_synonym_target=Target
|
||||
labels.dict_synonym_button_create=Create
|
||||
|
@ -1258,6 +1270,9 @@ labels.dict_synonym_button_confirm=Confirm
|
|||
labels.dict_synonym_button_edit=Edit
|
||||
labels.dict_synonym_button_delete=Delete
|
||||
labels.dict_synonym_button_update=Update
|
||||
labels.dict_synonym_button_download=Download
|
||||
labels.dict_synonym_button_upload=Upload
|
||||
labels.dict_synonym_file=Synonym File
|
||||
|
||||
# userdict
|
||||
labels.dict_userdict_configuration=UserDict List
|
||||
|
@ -1267,6 +1282,8 @@ labels.dict_userdict_link_create=Create New
|
|||
labels.dict_userdict_link_update=Edit
|
||||
labels.dict_userdict_link_delete=Delete
|
||||
labels.dict_userdict_link_confirm=Confirm
|
||||
labels.dict_userdict_link_download=Download
|
||||
labels.dict_userdict_link_upload=Upload
|
||||
labels.dict_userdict_token=Token
|
||||
labels.dict_userdict_segmentation=Segmentation
|
||||
labels.dict_userdict_reading=Reading
|
||||
|
@ -1277,6 +1294,9 @@ labels.dict_userdict_button_confirm=Confirm
|
|||
labels.dict_userdict_button_edit=Edit
|
||||
labels.dict_userdict_button_delete=Delete
|
||||
labels.dict_userdict_button_update=Update
|
||||
labels.dict_userdict_button_download=Download
|
||||
labels.dict_userdict_button_upload=Upload
|
||||
labels.dict_userdict_file=UserDict File
|
||||
|
||||
# CRUD PROPERTIES: BEGIN
|
||||
errors.crud_invalid_mode=Invalid mode(expected value is {0}, but it's {1}).
|
||||
|
|
|
@ -73,6 +73,12 @@ errors.failed_to_start_job=\u30b8\u30e7\u30d6 {0} \u306e\u958b\u59cb\u306b\u5931
|
|||
errors.failed_to_stop_job=\u30b8\u30e7\u30d6 {0} \u306e\u958b\u59cb\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
errors.expired_dict_id=\u8f9e\u66f8\u60c5\u5831\u304c\u671f\u9650\u5207\u308c\u3067\u3059\u3002\u518d\u5ea6\u8aad\u307f\u306a\u304a\u3057\u3066\u304f\u3060\u3055\u3044\u3002
|
||||
errors.failed_to_create_cache=ID:{0}\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u751f\u6210\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002
|
||||
errors.synonym_file_is_not_found=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
|
||||
errors.failed_to_download_synonym_file=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
errors.failed_to_upload_synonym_file=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
errors.userdict_file_is_not_found=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
|
||||
errors.failed_to_download_userdict_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
errors.failed_to_upload_userdict_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
|
||||
errors.invalid_query_unknown=\u691c\u7d22\u30af\u30a8\u30ea\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002
|
||||
errors.invalid_query_quoted=\u30af\u30aa\u30fc\u30c8\u6587\u5b57(")\u306e\u5229\u7528\u65b9\u6cd5\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002
|
||||
|
@ -106,6 +112,8 @@ success.user_info_delete_all= \u5229\u7528\u8005\u60c5\u5831\u3092\u524a\u9664\u
|
|||
success.job_started=\u30b8\u30e7\u30d6 {0} \u3092\u958b\u59cb\u3057\u307e\u3057\u305f\u3002
|
||||
success.job_stopped=\u30b8\u30e7\u30d6 {0} \u3092\u505c\u6b62\u3057\u307e\u3057\u305f\u3002
|
||||
success.joblog_delete_all=\u30b8\u30e7\u30d6\u30ed\u30b0\u3092\u524a\u9664\u3057\u307e\u3057\u305f\u3002
|
||||
success.upload_synonym_file=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3057\u305f\u3002
|
||||
success.upload_userdict_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3057\u305f\u3002
|
||||
|
||||
# labels
|
||||
labels.authRealm=\u8a8d\u8a3c\u30ec\u30eb\u30e0
|
||||
|
@ -273,6 +281,8 @@ labels.startTime=\u958b\u59cb\u6642\u523b
|
|||
labels.target=\u5bfe\u8c61
|
||||
labels.token=\u30c8\u30fc\u30af\u30f3
|
||||
labels.useAclAsRole=ACL\u3092\u30ed\u30fc\u30eb\u306b\u5229\u7528
|
||||
labels.synonymFile=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb
|
||||
labels.userDictFile=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb
|
||||
|
||||
# view/common/common.jsp
|
||||
|
||||
|
@ -1250,6 +1260,8 @@ labels.dict_synonym_link_create=\u65b0\u898f\u4f5c\u6210
|
|||
labels.dict_synonym_link_update=\u7de8\u96c6
|
||||
labels.dict_synonym_link_delete=\u524a\u9664
|
||||
labels.dict_synonym_link_confirm=\u78ba\u8a8d
|
||||
labels.dict_synonym_link_download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
|
||||
labels.dict_synonym_link_upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
|
||||
labels.dict_synonym_source=\u5909\u63db\u5143
|
||||
labels.dict_synonym_target=\u5909\u63db\u5f8c
|
||||
labels.dict_synonym_button_create=\u4f5c\u6210
|
||||
|
@ -1258,6 +1270,9 @@ labels.dict_synonym_button_confirm=\u78ba\u8a8d
|
|||
labels.dict_synonym_button_edit=\u7de8\u96c6
|
||||
labels.dict_synonym_button_delete=\u524a\u9664
|
||||
labels.dict_synonym_button_update=\u66f4\u65b0
|
||||
labels.dict_synonym_button_download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
|
||||
labels.dict_synonym_button_upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
|
||||
labels.dict_synonym_file=\u540c\u7fa9\u8a9e\u30d5\u30a1\u30a4\u30eb
|
||||
|
||||
# userdict
|
||||
labels.dict_userdict_configuration=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u4e00\u89a7
|
||||
|
@ -1267,6 +1282,8 @@ labels.dict_userdict_link_create=\u65b0\u898f\u4f5c\u6210
|
|||
labels.dict_userdict_link_update=\u7de8\u96c6
|
||||
labels.dict_userdict_link_delete=\u524a\u9664
|
||||
labels.dict_userdict_link_confirm=\u78ba\u8a8d
|
||||
labels.dict_userdict_link_download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
|
||||
labels.dict_userdict_link_upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
|
||||
labels.dict_userdict_token=\u30c8\u30fc\u30af\u30f3
|
||||
labels.dict_userdict_segmentation=\u5206\u5272
|
||||
labels.dict_userdict_reading=\u8aad\u307f
|
||||
|
@ -1277,6 +1294,9 @@ labels.dict_userdict_button_confirm=\u78ba\u8a8d
|
|||
labels.dict_userdict_button_edit=\u7de8\u96c6
|
||||
labels.dict_userdict_button_delete=\u524a\u9664
|
||||
labels.dict_userdict_button_update=\u66f4\u65b0
|
||||
labels.dict_userdict_button_download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
|
||||
labels.dict_userdict_button_upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
|
||||
labels.dict_userdict_file=\u30e6\u30fc\u30b6\u30fc\u8f9e\u66f8\u30d5\u30a1\u30a4\u30eb
|
||||
|
||||
# CRUD PROPERTIES: BEGIN
|
||||
errors.crud_invalid_mode=\u30e2\u30fc\u30c9\u304c\u9055\u3044\u307e\u3059\u3002(\u6b63\u3057\u3044\u5024\u306f {0} \u3067\u3059\u304c\u3001\u5165\u529b\u3055\u308c\u305f\u5024\u306f {1} \u306b\u306a\u3063\u3066\u3044\u307e\u3059)
|
||||
|
|
|
@ -47,6 +47,12 @@
|
|||
<li class="active"><a href="#"><bean:message
|
||||
key="labels.dict_synonym_link_confirm" /></a></li>
|
||||
</c:if>
|
||||
<li><s:link href="downloadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_download" />
|
||||
</s:link></li>
|
||||
<li><s:link href="uploadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_upload" />
|
||||
</s:link></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
66
src/main/webapp/WEB-INF/view/admin/dict/synonym/download.jsp
Normal file
66
src/main/webapp/WEB-INF/view/admin/dict/synonym/download.jsp
Normal file
|
@ -0,0 +1,66 @@
|
|||
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><tiles:insert template="/WEB-INF/view/common/admin/layout.jsp"
|
||||
flush="true">
|
||||
<tiles:put name="title">
|
||||
<bean:message key="labels.dict_synonym_configuration" />
|
||||
</tiles:put>
|
||||
<tiles:put name="header" value="/WEB-INF/view/common/admin/header.jsp" />
|
||||
<tiles:put name="footer" value="/WEB-INF/view/common/admin/footer.jsp" />
|
||||
<tiles:put name="menu" value="/WEB-INF/view/common/admin/menu.jsp" />
|
||||
<tiles:put name="menuType" value="dict" />
|
||||
<tiles:put name="headerScript" type="string"></tiles:put>
|
||||
<tiles:put name="body" type="string">
|
||||
|
||||
<h3>
|
||||
<bean:message key="labels.dict_synonym_title" />
|
||||
</h3>
|
||||
|
||||
<%-- Message: BEGIN --%>
|
||||
<div>
|
||||
<html:messages id="msg" message="true">
|
||||
<div class="alert-message info"><bean:write name="msg" ignore="true" /></div>
|
||||
</html:messages>
|
||||
<html:errors />
|
||||
</div>
|
||||
<%-- Message: END --%>
|
||||
|
||||
<div>
|
||||
<ul class="pills">
|
||||
<li><s:link href="../index">
|
||||
<bean:message key="labels.dict_list_link" />
|
||||
</s:link></li>
|
||||
<li><s:link href="index?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_list_link" />
|
||||
</s:link></li>
|
||||
<li><s:link href="createpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_create" />
|
||||
</s:link></li>
|
||||
<li class="active"><a href="#">
|
||||
<bean:message key="labels.dict_synonym_link_download" />
|
||||
</a></li>
|
||||
<li><s:link href="uploadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_upload" />
|
||||
</s:link></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<%-- Edit Form: BEGIN --%>
|
||||
<s:form>
|
||||
<div>
|
||||
<html:hidden property="dictId" />
|
||||
<table class="bordered-table zebra-striped" style="width: 500px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="vertical-align: middle;">${f:h(filename)}</th>
|
||||
<td style="width: 150px;text-align: center;"><input type="submit"
|
||||
class="btn small" name="download"
|
||||
value="<bean:message key="labels.dict_synonym_button_download"/>" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</s:form>
|
||||
<%-- Edit Form: BEGIN --%>
|
||||
|
||||
</tiles:put>
|
||||
</tiles:insert>
|
|
@ -47,6 +47,12 @@
|
|||
<li class="active"><a href="#"><bean:message
|
||||
key="labels.dict_synonym_link_confirm" /></a></li>
|
||||
</c:if>
|
||||
<li><s:link href="downloadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_download" />
|
||||
</s:link></li>
|
||||
<li><s:link href="uploadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_upload" />
|
||||
</s:link></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -35,6 +35,12 @@
|
|||
<li><s:link href="createpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_create" />
|
||||
</s:link></li>
|
||||
<li><s:link href="downloadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_download" />
|
||||
</s:link></li>
|
||||
<li><s:link href="uploadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_upload" />
|
||||
</s:link></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
76
src/main/webapp/WEB-INF/view/admin/dict/synonym/upload.jsp
Normal file
76
src/main/webapp/WEB-INF/view/admin/dict/synonym/upload.jsp
Normal file
|
@ -0,0 +1,76 @@
|
|||
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><tiles:insert template="/WEB-INF/view/common/admin/layout.jsp"
|
||||
flush="true">
|
||||
<tiles:put name="title">
|
||||
<bean:message key="labels.dict_synonym_configuration" />
|
||||
</tiles:put>
|
||||
<tiles:put name="header" value="/WEB-INF/view/common/admin/header.jsp" />
|
||||
<tiles:put name="footer" value="/WEB-INF/view/common/admin/footer.jsp" />
|
||||
<tiles:put name="menu" value="/WEB-INF/view/common/admin/menu.jsp" />
|
||||
<tiles:put name="menuType" value="dict" />
|
||||
<tiles:put name="headerScript" type="string"></tiles:put>
|
||||
<tiles:put name="body" type="string">
|
||||
|
||||
<h3>
|
||||
<bean:message key="labels.dict_synonym_title" />
|
||||
</h3>
|
||||
|
||||
<%-- Message: BEGIN --%>
|
||||
<div>
|
||||
<html:messages id="msg" message="true">
|
||||
<div class="alert-message info"><bean:write name="msg" ignore="true" /></div>
|
||||
</html:messages>
|
||||
<html:errors />
|
||||
</div>
|
||||
<%-- Message: END --%>
|
||||
|
||||
<div>
|
||||
<ul class="pills">
|
||||
<li><s:link href="../index">
|
||||
<bean:message key="labels.dict_list_link" />
|
||||
</s:link></li>
|
||||
<li><s:link href="index?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_list_link" />
|
||||
</s:link></li>
|
||||
<li><s:link href="createpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_create" />
|
||||
</s:link></li>
|
||||
<li><s:link href="downloadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_synonym_link_download" />
|
||||
</s:link></li>
|
||||
<li class="active"><a href="#">
|
||||
<bean:message key="labels.dict_synonym_link_upload" />
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<%-- Edit Form: BEGIN --%>
|
||||
<s:form action="upload" enctype="multipart/form-data">
|
||||
<div>
|
||||
<html:hidden property="dictId" />
|
||||
<table class="bordered-table zebra-striped" style="width: 500px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="2">${f:h(filename)}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 150px;"><bean:message
|
||||
key="labels.dict_synonym_file" /></th>
|
||||
<td><input type="file"
|
||||
name="synonymFile" style="width: 98%;" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="submit" class="btn small" name="upload"
|
||||
value="<bean:message key="labels.dict_synonym_button_upload"/>" />
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</s:form>
|
||||
<%-- Edit Form: BEGIN --%>
|
||||
|
||||
</tiles:put>
|
||||
</tiles:insert>
|
|
@ -47,6 +47,12 @@
|
|||
<li class="active"><a href="#"><bean:message
|
||||
key="labels.dict_userdict_link_confirm" /></a></li>
|
||||
</c:if>
|
||||
<li><s:link href="downloadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_download" />
|
||||
</s:link></li>
|
||||
<li><s:link href="uploadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_upload" />
|
||||
</s:link></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><tiles:insert template="/WEB-INF/view/common/admin/layout.jsp"
|
||||
flush="true">
|
||||
<tiles:put name="title">
|
||||
<bean:message key="labels.dict_userdict_configuration" />
|
||||
</tiles:put>
|
||||
<tiles:put name="header" value="/WEB-INF/view/common/admin/header.jsp" />
|
||||
<tiles:put name="footer" value="/WEB-INF/view/common/admin/footer.jsp" />
|
||||
<tiles:put name="menu" value="/WEB-INF/view/common/admin/menu.jsp" />
|
||||
<tiles:put name="menuType" value="dict" />
|
||||
<tiles:put name="headerScript" type="string"></tiles:put>
|
||||
<tiles:put name="body" type="string">
|
||||
|
||||
<h3>
|
||||
<bean:message key="labels.dict_userdict_title" />
|
||||
</h3>
|
||||
|
||||
<%-- Message: BEGIN --%>
|
||||
<div>
|
||||
<html:messages id="msg" message="true">
|
||||
<div class="alert-message info"><bean:write name="msg" ignore="true" /></div>
|
||||
</html:messages>
|
||||
<html:errors />
|
||||
</div>
|
||||
<%-- Message: END --%>
|
||||
|
||||
<div>
|
||||
<ul class="pills">
|
||||
<li><s:link href="../index">
|
||||
<bean:message key="labels.dict_list_link" />
|
||||
</s:link></li>
|
||||
<li><s:link href="index?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_list_link" />
|
||||
</s:link></li>
|
||||
<li><s:link href="createpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_create" />
|
||||
</s:link></li>
|
||||
<li class="active"><a href="#">
|
||||
<bean:message key="labels.dict_userdict_link_download" />
|
||||
</a></li>
|
||||
<li><s:link href="uploadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_upload" />
|
||||
</s:link></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<%-- Edit Form: BEGIN --%>
|
||||
<s:form>
|
||||
<div>
|
||||
<html:hidden property="dictId" />
|
||||
<table class="bordered-table zebra-striped" style="width: 500px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="vertical-align: middle;">${f:h(filename)}</th>
|
||||
<td style="width: 150px;text-align: center;"><input type="submit"
|
||||
class="btn small" name="download"
|
||||
value="<bean:message key="labels.dict_userdict_button_download"/>" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</s:form>
|
||||
<%-- Edit Form: BEGIN --%>
|
||||
|
||||
</tiles:put>
|
||||
</tiles:insert>
|
|
@ -47,6 +47,12 @@
|
|||
<li class="active"><a href="#"><bean:message
|
||||
key="labels.dict_userdict_link_confirm" /></a></li>
|
||||
</c:if>
|
||||
<li><s:link href="downloadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_download" />
|
||||
</s:link></li>
|
||||
<li><s:link href="uploadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_upload" />
|
||||
</s:link></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -35,6 +35,12 @@
|
|||
<li><s:link href="createpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_create" />
|
||||
</s:link></li>
|
||||
<li><s:link href="downloadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_download" />
|
||||
</s:link></li>
|
||||
<li><s:link href="uploadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_upload" />
|
||||
</s:link></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
76
src/main/webapp/WEB-INF/view/admin/dict/userDict/upload.jsp
Normal file
76
src/main/webapp/WEB-INF/view/admin/dict/userDict/upload.jsp
Normal file
|
@ -0,0 +1,76 @@
|
|||
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><tiles:insert template="/WEB-INF/view/common/admin/layout.jsp"
|
||||
flush="true">
|
||||
<tiles:put name="title">
|
||||
<bean:message key="labels.dict_userdict_configuration" />
|
||||
</tiles:put>
|
||||
<tiles:put name="header" value="/WEB-INF/view/common/admin/header.jsp" />
|
||||
<tiles:put name="footer" value="/WEB-INF/view/common/admin/footer.jsp" />
|
||||
<tiles:put name="menu" value="/WEB-INF/view/common/admin/menu.jsp" />
|
||||
<tiles:put name="menuType" value="dict" />
|
||||
<tiles:put name="headerScript" type="string"></tiles:put>
|
||||
<tiles:put name="body" type="string">
|
||||
|
||||
<h3>
|
||||
<bean:message key="labels.dict_userdict_title" />
|
||||
</h3>
|
||||
|
||||
<%-- Message: BEGIN --%>
|
||||
<div>
|
||||
<html:messages id="msg" message="true">
|
||||
<div class="alert-message info"><bean:write name="msg" ignore="true" /></div>
|
||||
</html:messages>
|
||||
<html:errors />
|
||||
</div>
|
||||
<%-- Message: END --%>
|
||||
|
||||
<div>
|
||||
<ul class="pills">
|
||||
<li><s:link href="../index">
|
||||
<bean:message key="labels.dict_list_link" />
|
||||
</s:link></li>
|
||||
<li><s:link href="index?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_list_link" />
|
||||
</s:link></li>
|
||||
<li><s:link href="createpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_create" />
|
||||
</s:link></li>
|
||||
<li><s:link href="downloadpage?dictId=${f:u(dictId)}">
|
||||
<bean:message key="labels.dict_userdict_link_download" />
|
||||
</s:link></li>
|
||||
<li class="active"><a href="#">
|
||||
<bean:message key="labels.dict_userdict_link_upload" />
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<%-- Edit Form: BEGIN --%>
|
||||
<s:form action="upload" enctype="multipart/form-data">
|
||||
<div>
|
||||
<html:hidden property="dictId" />
|
||||
<table class="bordered-table zebra-striped" style="width: 500px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colspan="2">${f:h(filename)}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 150px;"><bean:message
|
||||
key="labels.dict_userdict_file" /></th>
|
||||
<td><input type="file"
|
||||
name="userDictFile" style="width: 98%;" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="submit" class="btn small" name="upload"
|
||||
value="<bean:message key="labels.dict_userdict_button_upload"/>" />
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</s:form>
|
||||
<%-- Edit Form: BEGIN --%>
|
||||
|
||||
</tiles:put>
|
||||
</tiles:insert>
|
Loading…
Add table
Reference in a new issue