svnno****@sourc*****
svnno****@sourc*****
2008年 11月 27日 (木) 15:31:38 JST
Revision: 1449 http://svn.sourceforge.jp/view?root=pal&view=rev&rev=1449 Author: shinsuke Date: 2008-11-27 15:31:38 +0900 (Thu, 27 Nov 2008) Log Message: ----------- i18ned title, updated css, checked owner for data. Modified Paths: -------------- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/admin/CompanyAction.java addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/admin/PersonAction.java addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/user/CompanyAction.java addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/user/PersonAction.java addresslist/trunk/src/main/java/jp/sf/pal/addresslist/dxo/CompanyDxo.java addresslist/trunk/src/main/java/jp/sf/pal/addresslist/dxo/PersonDxo.java addresslist/trunk/src/main/java/jp/sf/pal/addresslist/form/admin/PersonForm.java addresslist/trunk/src/main/java/jp/sf/pal/addresslist/form/user/PersonForm.java addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/CompanyService.java addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/PersonService.java addresslist/trunk/src/main/resources/application.properties addresslist/trunk/src/main/resources/application_ja.properties addresslist/trunk/src/main/webapp/WEB-INF/portlet.xml addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/confirm.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/edit.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/error.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/index.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/confirm.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/edit.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/error.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/index.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/config/index.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/confirm.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/edit.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/error.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/index.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/confirm.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/edit.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/error.jsp addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/index.jsp addresslist/trunk/src/main/webapp/css/pal-extension.css Added Paths: ----------- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/UserInfoService.java addresslist/trunk/src/main/resources/jp/ addresslist/trunk/src/main/resources/jp/sf/ addresslist/trunk/src/main/resources/jp/sf/pal/ addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/ addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/ addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListConfig.properties addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListConfig_ja.properties addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListEditor.properties addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListEditor_ja.properties addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListManager.properties addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListManager_ja.properties -------------- next part -------------- Modified: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/admin/CompanyAction.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/admin/CompanyAction.java 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/admin/CompanyAction.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -10,12 +10,15 @@ import jp.sf.pal.addresslist.common.util.ConfigUtil; import jp.sf.pal.addresslist.common.util.SAStrutsUtil; import jp.sf.pal.addresslist.db.exentity.Company; +import jp.sf.pal.addresslist.db.exentity.UserInfo; import jp.sf.pal.addresslist.dxo.CompanyDxo; -import jp.sf.pal.addresslist.form.user.CompanyForm; +import jp.sf.pal.addresslist.form.admin.CompanyForm; import jp.sf.pal.addresslist.pager.CompanyPager; import jp.sf.pal.addresslist.service.CompanyService; +import jp.sf.pal.addresslist.service.UserInfoService; import jp.sf.pal.addresslist.util.AddressListUtil; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.seasar.struts.annotation.ActionForm; @@ -34,11 +37,15 @@ // for edit/confirm/delete + public UserInfo userInfo; + @ActionForm private CompanyForm companyForm; private CompanyService companyService; + private UserInfoService userInfoService; + private CompanyPager companyPager; private PagerDxo pagerDxo; @@ -249,7 +256,7 @@ private void loadCompany() { Long id = Long.parseLong(companyForm.id); - Company company = companyService.getCompany(id, null); + Company company = companyService.getCompany(id, null, false); if (company == null) { // throw an exception throw new ActionMessagesException("errors.could_not_find_company", @@ -257,6 +264,7 @@ } companyDxo.convertFromCompanyToForm(company, companyForm); + userInfo = company.getUserInfo(); } private Company createCompany() { @@ -264,7 +272,7 @@ Company company; if (companyForm.mode == CommonConstants.EDIT_MODE) { Long id = Long.parseLong(companyForm.id); - company = companyService.getCompany(id, null); + company = companyService.getCompany(id, null, false); if (company == null) { // throw an exception throw new ActionMessagesException( @@ -287,6 +295,9 @@ } private void loadDetailsPageParameters() { + if (!StringUtils.isEmpty(companyForm.userId) && userInfo == null) { + userInfo = userInfoService.getUserInfo(companyForm.userId); + } } /** @@ -343,4 +354,12 @@ this.companyDxo = companyDxo; } + public UserInfoService getUserInfoService() { + return userInfoService; + } + + public void setUserInfoService(UserInfoService userInfoService) { + this.userInfoService = userInfoService; + } + } Modified: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/admin/PersonAction.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/admin/PersonAction.java 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/admin/PersonAction.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -11,11 +11,13 @@ import jp.sf.pal.addresslist.common.util.SAStrutsUtil; import jp.sf.pal.addresslist.db.exentity.Company; import jp.sf.pal.addresslist.db.exentity.Person; +import jp.sf.pal.addresslist.db.exentity.UserInfo; import jp.sf.pal.addresslist.dxo.PersonDxo; -import jp.sf.pal.addresslist.form.user.PersonForm; +import jp.sf.pal.addresslist.form.admin.PersonForm; import jp.sf.pal.addresslist.pager.PersonPager; import jp.sf.pal.addresslist.service.CompanyService; import jp.sf.pal.addresslist.service.PersonService; +import jp.sf.pal.addresslist.service.UserInfoService; import jp.sf.pal.addresslist.util.AddressListUtil; import org.apache.commons.lang.StringUtils; @@ -38,6 +40,8 @@ // for edit/confirm/delete public Company company; + public UserInfo userInfo; + @ActionForm private PersonForm personForm; @@ -45,6 +49,8 @@ private CompanyService companyService; + private UserInfoService userInfoService; + private PersonPager personPager; private PagerDxo pagerDxo; @@ -256,7 +262,7 @@ private void loadPerson() { Long id = Long.parseLong(personForm.id); - Person person = personService.getPerson(id, null); + Person person = personService.getPerson(id, null, false); if (person == null) { // throw an exception throw new ActionMessagesException("errors.could_not_find_person", @@ -265,6 +271,7 @@ personDxo.convertFromPersonToForm(person, personForm); company = person.getCompany(); + userInfo = person.getUserInfo(); } private Person createPerson() { @@ -272,21 +279,22 @@ Person person; if (personForm.mode == CommonConstants.EDIT_MODE) { Long id = Long.parseLong(personForm.id); - person = personService.getPerson(id, null); + person = personService.getPerson(id, null, false); if (person == null) { // throw an exception throw new ActionMessagesException( "errors.could_not_find_person", new Object[] { personForm.id }); } + personDxo.convertFromFormToPerson(personForm, person); person.setUpdatedBy(userId); } else { person = new Person(); + personDxo.convertFromFormToPerson(personForm, person); person.setUserId(userId); person.setUpdatedBy(userId); person.setCreatedBy(userId); } - personDxo.convertFromFormToPerson(personForm, person); return person; } @@ -295,16 +303,17 @@ } private void loadDetailsPageParameters() { - if (!StringUtils.isEmpty(personForm.companyId)) { - String userId = AddressListUtil.getUserId(request); + if (!StringUtils.isEmpty(personForm.companyId) && company == null) { Long companyId = Long.parseLong(personForm.companyId); - company = companyService.getCompany(companyId, userId); + company = companyService.getCompany(companyId, null, false); } + if (!StringUtils.isEmpty(personForm.userId) && userInfo == null) { + userInfo = userInfoService.getUserInfo(personForm.userId); + } } public List<Company> getCompanyItems() { - String userId = AddressListUtil.getUserId(request); - return companyService.getCompanyList(userId); + return companyService.getCompanyList(null); } /** @@ -369,4 +378,12 @@ this.companyService = companyService; } + public UserInfoService getUserInfoService() { + return userInfoService; + } + + public void setUserInfoService(UserInfoService userInfoService) { + this.userInfoService = userInfoService; + } + } Modified: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/user/CompanyAction.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/user/CompanyAction.java 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/user/CompanyAction.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -10,12 +10,15 @@ import jp.sf.pal.addresslist.common.util.ConfigUtil; import jp.sf.pal.addresslist.common.util.SAStrutsUtil; import jp.sf.pal.addresslist.db.exentity.Company; +import jp.sf.pal.addresslist.db.exentity.UserInfo; import jp.sf.pal.addresslist.dxo.CompanyDxo; import jp.sf.pal.addresslist.form.user.CompanyForm; import jp.sf.pal.addresslist.pager.CompanyPager; import jp.sf.pal.addresslist.service.CompanyService; +import jp.sf.pal.addresslist.service.UserInfoService; import jp.sf.pal.addresslist.util.AddressListUtil; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.seasar.struts.annotation.ActionForm; @@ -34,11 +37,15 @@ // for edit/confirm/delete + public UserInfo userInfo; + @ActionForm private CompanyForm companyForm; private CompanyService companyService; + private UserInfoService userInfoService; + private CompanyPager companyPager; private PagerDxo pagerDxo; @@ -251,7 +258,7 @@ private void loadCompany() { String userId = AddressListUtil.getUserId(request); Long id = Long.parseLong(companyForm.id); - Company company = companyService.getCompany(id, userId); + Company company = companyService.getCompany(id, userId, true); if (company == null) { // throw an exception throw new ActionMessagesException("errors.could_not_find_company", @@ -259,6 +266,7 @@ } companyDxo.convertFromCompanyToForm(company, companyForm); + userInfo = company.getUserInfo(); } private Company createCompany() { @@ -266,15 +274,22 @@ Company company; if (companyForm.mode == CommonConstants.EDIT_MODE) { Long id = Long.parseLong(companyForm.id); - company = companyService.getCompany(id, userId); + company = companyService.getCompany(id, userId, false); + if (company == null) { + // throw an exception + throw new ActionMessagesException( + "errors.could_not_find_company", + new Object[] { companyForm.id }); + } + companyDxo.convertFromFormToCompany(companyForm, company); company.setUpdatedBy(userId); } else { company = new Company(); + companyDxo.convertFromFormToCompany(companyForm, company); company.setUserId(userId); company.setUpdatedBy(userId); company.setCreatedBy(userId); } - companyDxo.convertFromFormToCompany(companyForm, company); return company; } @@ -283,8 +298,15 @@ } private void loadDetailsPageParameters() { + if (!StringUtils.isEmpty(companyForm.userId) && userInfo == null) { + userInfo = userInfoService.getUserInfo(companyForm.userId); + } } + public String getCurrentUserId() { + return AddressListUtil.getUserId(request); + } + /** * @return the request */ @@ -339,4 +361,12 @@ this.companyDxo = companyDxo; } + public UserInfoService getUserInfoService() { + return userInfoService; + } + + public void setUserInfoService(UserInfoService userInfoService) { + this.userInfoService = userInfoService; + } + } Modified: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/user/PersonAction.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/user/PersonAction.java 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/action/user/PersonAction.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -11,11 +11,13 @@ import jp.sf.pal.addresslist.common.util.SAStrutsUtil; import jp.sf.pal.addresslist.db.exentity.Company; import jp.sf.pal.addresslist.db.exentity.Person; +import jp.sf.pal.addresslist.db.exentity.UserInfo; import jp.sf.pal.addresslist.dxo.PersonDxo; import jp.sf.pal.addresslist.form.user.PersonForm; import jp.sf.pal.addresslist.pager.PersonPager; import jp.sf.pal.addresslist.service.CompanyService; import jp.sf.pal.addresslist.service.PersonService; +import jp.sf.pal.addresslist.service.UserInfoService; import jp.sf.pal.addresslist.util.AddressListUtil; import org.apache.commons.lang.StringUtils; @@ -38,6 +40,8 @@ // for edit/confirm/delete public Company company; + public UserInfo userInfo; + @ActionForm private PersonForm personForm; @@ -45,6 +49,8 @@ private CompanyService companyService; + private UserInfoService userInfoService; + private PersonPager personPager; private PagerDxo pagerDxo; @@ -258,7 +264,7 @@ private void loadPerson() { String userId = AddressListUtil.getUserId(request); Long id = Long.parseLong(personForm.id); - Person person = personService.getPerson(id, userId); + Person person = personService.getPerson(id, userId, true); if (person == null) { // throw an exception throw new ActionMessagesException("errors.could_not_find_person", @@ -267,6 +273,7 @@ personDxo.convertFromPersonToForm(person, personForm); company = person.getCompany(); + userInfo = person.getUserInfo(); } private Person createPerson() { @@ -274,21 +281,22 @@ Person person; if (personForm.mode == CommonConstants.EDIT_MODE) { Long id = Long.parseLong(personForm.id); - person = personService.getPerson(id, userId); + person = personService.getPerson(id, userId, false); if (person == null) { // throw an exception throw new ActionMessagesException( "errors.could_not_find_person", new Object[] { personForm.id }); } + personDxo.convertFromFormToPerson(personForm, person); person.setUpdatedBy(userId); } else { person = new Person(); + personDxo.convertFromFormToPerson(personForm, person); person.setUserId(userId); person.setUpdatedBy(userId); person.setCreatedBy(userId); } - personDxo.convertFromFormToPerson(personForm, person); return person; } @@ -297,11 +305,14 @@ } private void loadDetailsPageParameters() { - if (!StringUtils.isEmpty(personForm.companyId)) { + if (!StringUtils.isEmpty(personForm.companyId) && company == null) { String userId = AddressListUtil.getUserId(request); Long companyId = Long.parseLong(personForm.companyId); - company = companyService.getCompany(companyId, userId); + company = companyService.getCompany(companyId, userId, false); } + if (!StringUtils.isEmpty(personForm.userId) && userInfo == null) { + userInfo = userInfoService.getUserInfo(personForm.userId); + } } public List<Company> getCompanyItems() { @@ -309,6 +320,10 @@ return companyService.getCompanyList(userId); } + public String getCurrentUserId() { + return AddressListUtil.getUserId(request); + } + /** * @return the request */ @@ -371,4 +386,12 @@ this.companyService = companyService; } + public UserInfoService getUserInfoService() { + return userInfoService; + } + + public void setUserInfoService(UserInfoService userInfoService) { + this.userInfoService = userInfoService; + } + } Modified: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/dxo/CompanyDxo.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/dxo/CompanyDxo.java 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/dxo/CompanyDxo.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -70,4 +70,64 @@ ) public void convertFromFormToCompany(CompanyForm form, Company company); + @ExcludeNull + @DatePattern("yyyy/MM/dd") + @TimestampPattern("yyyy/MM/dd HH:mm:ss") + @ConversionRule("id : id" // + + ", userId : userId" // + + ", name : name" // + + ", nameDesc : nameDesc" // + + ", department : department" // + + ", building : building" // + + ", street : street" // + + ", city : city" // + + ", state : state" // + + ", postalCode : postalCode" // + + ", country : country" // + + ", telephone1 : telephone1" // + + ", telephone2 : telephone2" // + + ", fax1 : fax1" // + + ", fax2 : fax2" // + + ", url : url" // + + ", isPublic : isPublic" // + + ", createdTime : createdTime" // + + ", createdBy : createdBy" // + + ", updatedTime : updatedTime" // + + ", updatedBy : updatedBy" // + + ", deletedTime : deletedTime" // + + ", deletedBy : deletedBy" // + // + ", versionno : versionno" // + ) + public void convertFromCompanyToForm(Company company, + jp.sf.pal.addresslist.form.admin.CompanyForm form); + + @ExcludeNull + @TimestampPattern("yyyy/MM/dd HH:mm:ss") + @ConversionRule(// + "name : name" // + + ", nameDesc : nameDesc" // + + ", department : department" // + + ", building : building" // + + ", street : street" // + + ", city : city" // + + ", state : state" // + + ", postalCode : postalCode" // + + ", country : country" // + + ", telephone1 : telephone1" // + + ", telephone2 : telephone2" // + + ", fax1 : fax1" // + + ", fax2 : fax2" // + + ", url : url" // + + ", isPublic : isPublic" // + // + ", createdTime : createdTime" // + // + ", createdBy : createdBy" // + // + ", updatedTime : updatedTime" // + // + ", updatedBy : updatedBy" // + // + ", deletedTime : deletedTime" // + // + ", deletedBy : deletedBy" // + // + ", versionno : versionno" // + ) + public void convertFromFormToCompany( + jp.sf.pal.addresslist.form.admin.CompanyForm form, Company company); + } Modified: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/dxo/PersonDxo.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/dxo/PersonDxo.java 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/dxo/PersonDxo.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -16,6 +16,7 @@ @DatePattern("yyyy/MM/dd") @TimestampPattern("yyyy/MM/dd HH:mm:ss") @ConversionRule("id : id" // + + ", userId : userId" // + ", familyName : familyName" // + ", familyNameDesc : familyNameDesc" // + ", givenName : givenName" // @@ -99,4 +100,94 @@ ) public void convertFromFormToPerson(PersonForm form, Person person); + @ExcludeNull + @DatePattern("yyyy/MM/dd") + @TimestampPattern("yyyy/MM/dd HH:mm:ss") + @ConversionRule("id : id" // + + ", userId : userId" // + + ", familyName : familyName" // + + ", familyNameDesc : familyNameDesc" // + + ", givenName : givenName" // + + ", givenNameDesc : givenNameDesc" // + + ", middleName : middleName" // + + ", namePrefix : namePrefix" // + + ", nameSuffix : nameSuffix" // + + ", nickname : nickname" // + + ", jobTitle : jobTitle" // + + ", isPublic : isPublic" // + + ", homeTelephone : homeTelephone" // + + ", homeCellphone : homeCellphone" // + + ", homeEmailPC : homeEmailPC" // + + ", homeEmailMobile : homeEmailMobile" // + + ", homeFax : homeFax" // + + ", businessTelephone : businessTelephone" // + + ", businessCellphone : businessCellphone" // + + ", businessEmailPC : businessEmailPC" // + + ", businessEmailMobile : businessEmailMobile" // + + ", businessFax : businessFax" // + + ", postalCode : postalCode" // + + ", state : state" // + + ", city : city" // + + ", street : street" // + + ", building : building" // + + ", companyId : companyId" // + + ", customData1 : customData1" // + + ", customData2 : customData2" // + + ", customData3 : customData3" // + + ", customData4 : customData4" // + + ", createdTime : createdTime" // + + ", createdBy : createdBy" // + + ", updatedTime : updatedTime" // + + ", updatedBy : updatedBy" // + + ", deletedTime : deletedTime" // + + ", deletedBy : deletedBy" // + // + ", versionno : versionno" // + ) + public void convertFromPersonToForm(Person person, + jp.sf.pal.addresslist.form.admin.PersonForm form); + + @ExcludeNull + @TimestampPattern("yyyy/MM/dd HH:mm:ss") + @ConversionRule(// + "familyName : familyName" // + + ", familyNameDesc : familyNameDesc" // + + ", givenName : givenName" // + + ", givenNameDesc : givenNameDesc" // + + ", middleName : middleName" // + + ", namePrefix : namePrefix" // + + ", nameSuffix : nameSuffix" // + + ", nickname : nickname" // + + ", jobTitle : jobTitle" // + + ", isPublic : isPublic" // + + ", homeTelephone : homeTelephone" // + + ", homeCellphone : homeCellphone" // + + ", homeEmailPC : homeEmailPC" // + + ", homeEmailMobile : homeEmailMobile" // + + ", homeFax : homeFax" // + + ", businessTelephone : businessTelephone" // + + ", businessCellphone : businessCellphone" // + + ", businessEmailPC : businessEmailPC" // + + ", businessEmailMobile : businessEmailMobile" // + + ", businessFax : businessFax" // + + ", postalCode : postalCode" // + + ", state : state" // + + ", city : city" // + + ", street : street" // + + ", building : building" // + + ", companyId : companyId" // + + ", customData1 : customData1" // + + ", customData2 : customData2" // + + ", customData3 : customData3" // + + ", customData4 : customData4" // + // + ", createdTime : createdTime" // + // + ", createdBy : createdBy" // + // + ", updatedTime : updatedTime" // + // + ", updatedBy : updatedBy" // + // + ", deletedTime : deletedTime" // + // + ", deletedBy : deletedBy" // + // + ", versionno : versionno" // + ) + public void convertFromFormToPerson( + jp.sf.pal.addresslist.form.admin.PersonForm form, Person person); + } Modified: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/form/admin/PersonForm.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/form/admin/PersonForm.java 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/form/admin/PersonForm.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -21,6 +21,10 @@ @LongType public String id; + @Required(target = "update,delete") + @Maxbytelength(maxbytelength = 255) + public String userId; + @Maxbytelength(maxbytelength = 100) public String familyName; @@ -135,6 +139,7 @@ public void initialize() { id = null; + userId = null; familyName = null; familyNameDesc = null; givenName = null; Modified: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/form/user/PersonForm.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/form/user/PersonForm.java 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/form/user/PersonForm.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -21,6 +21,10 @@ @LongType public String id; + @Required(target = "update,delete") + @Maxbytelength(maxbytelength = 255) + public String userId; + @Maxbytelength(maxbytelength = 100) public String familyName; @@ -135,6 +139,7 @@ public void initialize() { id = null; + userId = null; familyName = null; familyNameDesc = null; givenName = null; Modified: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/CompanyService.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/CompanyService.java 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/CompanyService.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -30,6 +30,8 @@ private PagerDxo pagerDxo; + private PersonService personService; + private void initUserInfo(String userId) { UserInfoCB cb = new UserInfoCB(); cb.query().setUserId_Equal(userId); @@ -57,6 +59,7 @@ cb.fetchPage(companyPager.getCurrentPageNumber()); // setup + cb.setupSelect_UserInfo(); cb.query().setDeletedBy_IsNull(); if (userId != null) { @@ -94,22 +97,46 @@ cb.query().setDeletedBy_IsNull(); if (userId != null) { cb.query().setUserId_Equal(userId); + cb.query().setIsPublic_Equal(CommonConstants.FALSE); + cb.unionAll(new UnionQuery<CompanyCB>() { + public void query(CompanyCB unionCB) { + unionCB.query().setIsPublic_Equal(CommonConstants.TRUE); + unionCB.query().setDeletedBy_IsNull(); + } + }); } cb.query().addOrderBy_NameDesc_Asc(); return companyBhv.selectList(cb); } - public Company getCompany(Long id, String userId) { + public Company getCompany(Long id, String userId, boolean fallback) { CompanyCB cb = new CompanyCB(); // setup + cb.setupSelect_UserInfo(); + cb.query().setDeletedBy_IsNull(); cb.query().setId_Equal(id); if (userId != null) { cb.query().setUserId_Equal(userId); } - return companyBhv.selectEntity(cb); + Company company = companyBhv.selectEntity(cb); + + if (fallback) { + if (company == null) { + cb = new CompanyCB(); + // setup + cb.setupSelect_UserInfo(); + + cb.query().setDeletedBy_IsNull(); + cb.query().setId_Equal(id); + cb.query().setIsPublic_Equal(CommonConstants.TRUE); + company = companyBhv.selectEntity(cb); + } + } + + return company; } public void store(Company company) { @@ -139,6 +166,8 @@ company.setDeletedBy(name); company.setDeletedTime(new Timestamp(new Date().getTime())); companyBhv.update(company); + + personService.removeCompanyId(id); } public CompanyBhv getCompanyBhv() { @@ -165,4 +194,12 @@ this.userInfoBhv = userInfoBhv; } + public PersonService getPersonService() { + return personService; + } + + public void setPersonService(PersonService personService) { + this.personService = personService; + } + } Modified: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/PersonService.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/PersonService.java 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/PersonService.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -72,6 +72,9 @@ // setup cb.setupSelect_Company(); cb.specify().specifyCompany().columnName(); + cb.specify().specifyCompany().columnUserId(); + cb.specify().specifyCompany().columnIsPublic(); + cb.setupSelect_UserInfo(); cb.query().setDeletedBy_IsNull(); if (userId != null) { @@ -98,12 +101,13 @@ return personList; } - public Person getPerson(Long id, String userId) { + public Person getPerson(Long id, String userId, boolean fallback) { PersonCB cb = new PersonCB(); // setup cb.setupSelect_Company(); cb.setupSelect_PostalAsOne(); + cb.setupSelect_UserInfo(); cb.query().setId_Equal(id); if (userId != null) { @@ -111,6 +115,24 @@ } Person person = personBhv.selectEntity(cb); + + // fallback + if (fallback) { + if (person == null) { + cb = new PersonCB(); + + // setup + cb.setupSelect_Company(); + cb.setupSelect_PostalAsOne(); + cb.setupSelect_UserInfo(); + + cb.query().setId_Equal(id); + cb.query().setIsPublic_Equal(CommonConstants.TRUE); + + person = personBhv.selectEntity(cb); + } + } + if (person == null) { return null; } @@ -169,6 +191,15 @@ personBhv.update(person); } + public void removeCompanyId(Long companyId) { + Person person = new Person(); + person.setCompanyId(null); + + PersonCB cb = new PersonCB(); + cb.query().setCompanyId_Equal(companyId); + personBhv.queryUpdate(person, cb); + } + public PersonBhv getPersonBhv() { return personBhv; } Added: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/UserInfoService.java =================================================================== --- addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/UserInfoService.java (rev 0) +++ addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/UserInfoService.java 2008-11-27 06:31:38 UTC (rev 1449) @@ -0,0 +1,23 @@ +package jp.sf.pal.addresslist.service; + +import jp.sf.pal.addresslist.db.cbean.UserInfoCB; +import jp.sf.pal.addresslist.db.exbhv.UserInfoBhv; +import jp.sf.pal.addresslist.db.exentity.UserInfo; + +public class UserInfoService { + private transient UserInfoBhv userInfoBhv; + + public UserInfo getUserInfo(String userId) { + UserInfoCB cb = new UserInfoCB(); + cb.query().setUserId_Equal(userId); + return userInfoBhv.selectEntity(cb); + } + + public UserInfoBhv getUserInfoBhv() { + return userInfoBhv; + } + + public void setUserInfoBhv(UserInfoBhv userInfoBhv) { + this.userInfoBhv = userInfoBhv; + } +} Property changes on: addresslist/trunk/src/main/java/jp/sf/pal/addresslist/service/UserInfoService.java ___________________________________________________________________ Name: svn:eol-style + native Modified: addresslist/trunk/src/main/resources/application.properties =================================================================== --- addresslist/trunk/src/main/resources/application.properties 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/resources/application.properties 2008-11-27 06:31:38 UTC (rev 1449) @@ -47,15 +47,15 @@ errors.failed_to_create_userInfo=Failed to create a new user information. errors.failed_to_update_userInfo=Failed to update the user information. errors.failed_to_delete_userInfo=Failed to delete the user information. -errors.could_not_find_userInfo=Could not find the user information({0}). +errors.could_not_find_userInfo=Could not find the user information(ID:{0}). errors.failed_to_create_company=Failed to create a new company information. errors.failed_to_update_company=Failed to update the company information. errors.failed_to_delete_company=Failed to delete the company information. -errors.could_not_find_company=Could not find the company information({0}). +errors.could_not_find_company=Could not find the company information(ID:{0}). errors.failed_to_create_person=Failed to create a new person information. errors.failed_to_update_person=Failed to update the person information. errors.failed_to_delete_person=Failed to delete the person information. -errors.could_not_find_person=Could not find the person information({0}). +errors.could_not_find_person=Could not find the person information(ID:{0}). labels.detail=Detail labels.create=Create @@ -132,4 +132,7 @@ labels.none=None -labels.configuration=Configuration \ No newline at end of file +labels.configuration=Configuration + +labels.createdBy=Created By + Modified: addresslist/trunk/src/main/resources/application_ja.properties =================================================================== --- addresslist/trunk/src/main/resources/application_ja.properties 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/resources/application_ja.properties 2008-11-27 06:31:38 UTC (rev 1449) @@ -40,15 +40,15 @@ errors.failed_to_create_userInfo=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 errors.failed_to_update_userInfo=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 errors.failed_to_delete_userInfo=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u306e\u524a\u9664\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -errors.could_not_find_userInfo=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831 {0} \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 +errors.could_not_find_userInfo=\u30e6\u30fc\u30b6\u30fc\u60c5\u5831 (ID:{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 errors.failed_to_create_company=\u4f1a\u793e\u60c5\u5831\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 errors.failed_to_update_company=\u4f1a\u793e\u60c5\u5831\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 errors.failed_to_delete_company=\u4f1a\u793e\u60c5\u5831\u306e\u524a\u9664\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -errors.could_not_find_company=\u4f1a\u793e\u60c5\u5831 {0} \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 +errors.could_not_find_company=\u4f1a\u793e\u60c5\u5831 (ID:{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 errors.failed_to_create_person=\u500b\u4eba\u60c5\u5831\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 errors.failed_to_update_person=\u500b\u4eba\u60c5\u5831\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 errors.failed_to_delete_person=\u500b\u4eba\u60c5\u5831\u306e\u524a\u9664\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -errors.could_not_find_person=\u500b\u4eba\u60c5\u5831 {0} \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 +errors.could_not_find_person=\u500b\u4eba\u60c5\u5831 (ID:{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 labels.detail=\u8a73\u7d30 labels.create=\u4f5c\u6210 @@ -125,4 +125,6 @@ labels.none=\u306a\u3057 -labels.configuration=\u8a2d\u5b9a \ No newline at end of file +labels.configuration=\u8a2d\u5b9a + +labels.createdBy=\u767b\u9332\u8005 Added: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListConfig.properties =================================================================== Property changes on: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListConfig.properties ___________________________________________________________________ Name: svn:eol-style + native Added: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListConfig_ja.properties =================================================================== --- addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListConfig_ja.properties (rev 0) +++ addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListConfig_ja.properties 2008-11-27 06:31:38 UTC (rev 1449) @@ -0,0 +1,4 @@ +# portlet info +javax.portlet.title=\u30a2\u30c9\u30ec\u30b9\u5e33\u8a2d\u5b9a +javax.portlet.short-title=\u30a2\u30c9\u30ec\u30b9\u5e33\u8a2d\u5b9a +javax.portlet.keywords=\u8a2d\u5b9a Property changes on: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListConfig_ja.properties ___________________________________________________________________ Name: svn:eol-style + native Added: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListEditor.properties =================================================================== Property changes on: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListEditor.properties ___________________________________________________________________ Name: svn:eol-style + native Added: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListEditor_ja.properties =================================================================== --- addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListEditor_ja.properties (rev 0) +++ addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListEditor_ja.properties 2008-11-27 06:31:38 UTC (rev 1449) @@ -0,0 +1,4 @@ +# portlet info +javax.portlet.title=\u30a2\u30c9\u30ec\u30b9\u5e33 +javax.portlet.short-title=\u30a2\u30c9\u30ec\u30b9\u5e33 +javax.portlet.keywords=\u30a2\u30c9\u30ec\u30b9\u5e33 Property changes on: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListEditor_ja.properties ___________________________________________________________________ Name: svn:eol-style + native Added: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListManager.properties =================================================================== Property changes on: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListManager.properties ___________________________________________________________________ Name: svn:eol-style + native Added: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListManager_ja.properties =================================================================== --- addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListManager_ja.properties (rev 0) +++ addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListManager_ja.properties 2008-11-27 06:31:38 UTC (rev 1449) @@ -0,0 +1,4 @@ +# portlet info +javax.portlet.title=\u30a2\u30c9\u30ec\u30b9\u5e33\u7ba1\u7406 +javax.portlet.short-title=\u30a2\u30c9\u30ec\u30b9\u5e33\u7ba1\u7406 +javax.portlet.keywords=\u7ba1\u7406 Property changes on: addresslist/trunk/src/main/resources/jp/sf/pal/addresslist/resources/AddressListManager_ja.properties ___________________________________________________________________ Name: svn:eol-style + native Modified: addresslist/trunk/src/main/webapp/WEB-INF/portlet.xml =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/portlet.xml 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/portlet.xml 2008-11-27 06:31:38 UTC (rev 1449) @@ -18,7 +18,7 @@ </supports> <supported-locale>en</supported-locale> <supported-locale>ja</supported-locale> -<!-- resource-bundle></resource-bundle --> + <resource-bundle>jp.sf.pal.addresslist.resources.AddressListConfig</resource-bundle> <portlet-info> <title>AddressList Config</title> <short-title>Config</short-title> @@ -43,7 +43,7 @@ </supports> <supported-locale>en</supported-locale> <supported-locale>ja</supported-locale> -<!-- resource-bundle></resource-bundle --> + <resource-bundle>jp.sf.pal.addresslist.resources.AddressListEditor</resource-bundle> <portlet-info> <title>Address List</title> <short-title>AddressLists</short-title> @@ -68,7 +68,7 @@ </supports> <supported-locale>en</supported-locale> <supported-locale>ja</supported-locale> -<!-- resource-bundle></resource-bundle --> + <resource-bundle>jp.sf.pal.addresslist.resources.AddressListManager</resource-bundle> <portlet-info> <title>AddressList Manager</title> <short-title>AddressLists</short-title> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/confirm.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/confirm.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/confirm.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -37,6 +37,7 @@ <s:form> <html:hidden property="id"/> + <html:hidden property="userId"/> <html:hidden property="mode"/> <div class="form-table" style="margin-top:3px;"> <table> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/edit.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/edit.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/edit.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -37,6 +37,7 @@ <s:form> <html:hidden property="id"/> + <html:hidden property="userId"/> <html:hidden property="mode"/> <div class="form-table" style="margin-top:3px;"> <table> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/error.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/error.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/error.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -19,7 +19,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/index.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/index.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/admin/company/index.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -44,6 +44,8 @@ <tr> <th style="width:200px;text-align: center;"><bean:message key="labels.name"/></th> <th style="width:200px;text-align: center;"><bean:message key="labels.department"/></th> + <th style="width:100px;text-align: center;"><bean:message key="labels.createdBy"/></th> + <th style="width:80px;text-align: center;"><bean:message key="labels.public"/></th> <th style="width:100px;text-align: center;"> </th> </tr> </thead> @@ -52,7 +54,12 @@ <tr class="${s.index %2 == 0 ? 'row1' : 'row2'}"> <td><s:link href="confirmpage/4/${f:u(c.id)}">${f:h(c.name)}</s:link></td> <td>${f:h(c.department)}</td> + <td><bean:message key="display.name" arg0="${f:h(c.userInfo.nameArg0)}" arg1="${f:h(c.userInfo.nameArg1)}" arg2="${f:h(c.userInfo.nameArg2)}"/></td> <td align="center"> +<c:if test="${c.isPublic=='T'}"><bean:message key="labels.yes"/></c:if> +<c:if test="${c.isPublic=='F'}"><bean:message key="labels.no"/></c:if> + </td> + <td align="center"> <s:link href="editpage/2/${f:u(c.id)}"><bean:message key="labels.edit"/></s:link> <s:link href="deletepage/3/${f:u(c.id)}"><bean:message key="labels.delete"/></s:link> </td> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/confirm.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/confirm.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/confirm.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -37,6 +37,7 @@ <s:form> <html:hidden property="id"/> +<html:hidden property="userId"/> <html:hidden property="mode"/> <div class="form-table" style="margin-top:3px;"> <table> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/edit.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/edit.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/edit.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -37,6 +37,7 @@ <s:form> <html:hidden property="id"/> +<html:hidden property="userId"/> <html:hidden property="mode"/> <div class="form-table" style="margin-top:3px;"> <table> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/error.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/error.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/error.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -19,7 +19,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/index.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/index.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/admin/person/index.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -44,6 +44,8 @@ <tr> <th style="width:150px;text-align: center;"><bean:message key="labels.name"/></th> <th style="width:200px;text-align: center;"><bean:message key="labels.company"/></th> + <th style="width:100px;text-align: center;"><bean:message key="labels.createdBy"/></th> + <th style="width:80px;text-align: center;"><bean:message key="labels.public"/></th> <th style="width:100px;text-align: center;"> </th> </tr> </thead> @@ -51,8 +53,13 @@ <c:forEach var="p" varStatus="s" items="${personItems}"> <tr class="${s.index %2 == 0 ? 'row1' : 'row2'}"> <td><s:link href="confirmpage/4/${f:u(p.id)}"><bean:message key="display.name" arg0="${f:h(p.nameArg0)}" arg1="${f:h(p.nameArg1)}" arg2="${f:h(p.nameArg2)}"/></s:link></td> - <td>${f:h(p.company.name)}</td> + <td><c:if test="${p.company!=null}">${f:h(p.company.name)}</c:if></td> + <td><bean:message key="display.name" arg0="${f:h(p.userInfo.nameArg0)}" arg1="${f:h(p.userInfo.nameArg1)}" arg2="${f:h(p.userInfo.nameArg2)}"/></td> <td align="center"> +<c:if test="${p.isPublic=='T'}"><bean:message key="labels.yes"/></c:if> +<c:if test="${p.isPublic=='F'}"><bean:message key="labels.no"/></c:if> + </td> + <td align="center"> <s:link href="editpage/2/${f:u(p.id)}"><bean:message key="labels.edit"/></s:link> <s:link href="deletepage/3/${f:u(p.id)}"><bean:message key="labels.delete"/></s:link> </td> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/config/index.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/config/index.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/config/index.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> <div class="form-table"> <s:form> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/confirm.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/confirm.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/confirm.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -37,6 +37,7 @@ <s:form> <html:hidden property="id"/> + <html:hidden property="userId"/> <html:hidden property="mode"/> <div class="form-table" style="margin-top:3px;"> <table> @@ -120,8 +121,10 @@ </c:if> <c:if test="${mode == 4}"> <input type="submit" name="back" value="<bean:message key="labels.back"/>"/> +<c:if test="${userId==currentUserId}"> <input type="submit" name="editpagefromconfirm" value="<bean:message key="labels.edit"/>"/> <input type="submit" name="deletepagefromconfirm" value="<bean:message key="labels.delete"/>"/> +</c:if> </c:if> </td> </tr> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/edit.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/edit.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/edit.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -37,6 +37,7 @@ <s:form> <html:hidden property="id"/> + <html:hidden property="userId"/> <html:hidden property="mode"/> <div class="form-table" style="margin-top:3px;"> <table> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/error.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/error.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/error.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -19,7 +19,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/index.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/index.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/user/company/index.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -44,6 +44,8 @@ <tr> <th style="width:200px;text-align: center;"><bean:message key="labels.name"/></th> <th style="width:200px;text-align: center;"><bean:message key="labels.department"/></th> + <th style="width:100px;text-align: center;"><bean:message key="labels.createdBy"/></th> + <th style="width:80px;text-align: center;"><bean:message key="labels.public"/></th> <th style="width:100px;text-align: center;"> </th> </tr> </thead> @@ -52,9 +54,16 @@ <tr class="${s.index %2 == 0 ? 'row1' : 'row2'}"> <td><s:link href="confirmpage/4/${f:u(c.id)}">${f:h(c.name)}</s:link></td> <td>${f:h(c.department)}</td> + <td><bean:message key="display.name" arg0="${f:h(c.userInfo.nameArg0)}" arg1="${f:h(c.userInfo.nameArg1)}" arg2="${f:h(c.userInfo.nameArg2)}"/></td> <td align="center"> +<c:if test="${c.isPublic=='T'}"><bean:message key="labels.yes"/></c:if> +<c:if test="${c.isPublic=='F'}"><bean:message key="labels.no"/></c:if> + </td> + <td align="center"> +<c:if test="${c.userId==currentUserId}"> <s:link href="editpage/2/${f:u(c.id)}"><bean:message key="labels.edit"/></s:link> <s:link href="deletepage/3/${f:u(c.id)}"><bean:message key="labels.delete"/></s:link> +</c:if> </td> </tr> </c:forEach> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/confirm.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/confirm.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/confirm.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -37,6 +37,7 @@ <s:form> <html:hidden property="id"/> +<html:hidden property="userId"/> <html:hidden property="mode"/> <div class="form-table" style="margin-top:3px;"> <table> @@ -91,6 +92,12 @@ <html:hidden property="isPublic"/> </td> </tr> + <tr> + <th><bean:message key="labels.createdBy"/></th> + <td> +<c:if test="${userInfo!=null}"><bean:message key="display.name" arg0="${f:h(userInfo.nameArg0)}" arg1="${f:h(userInfo.nameArg1)}" arg2="${f:h(userInfo.nameArg2)}"/></c:if> + </td> + </tr> </tbody> </table> </td> @@ -288,8 +295,10 @@ </c:if> <c:if test="${mode == 4}"> <input type="submit" name="back" value="<bean:message key="labels.back"/>"/> +<c:if test="${userId==currentUserId}"> <input type="submit" name="editpagefromconfirm" value="<bean:message key="labels.edit"/>"/> <input type="submit" name="deletepagefromconfirm" value="<bean:message key="labels.delete"/>"/> +</c:if> </c:if> </td> </tr> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/edit.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/edit.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/edit.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -37,6 +37,7 @@ <s:form> <html:hidden property="id"/> +<html:hidden property="userId"/> <html:hidden property="mode"/> <div class="form-table" style="margin-top:3px;"> <table> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/error.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/error.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/error.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -19,7 +19,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> Modified: addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/index.jsp =================================================================== --- addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/index.jsp 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/WEB-INF/view/user/person/index.jsp 2008-11-27 06:31:38 UTC (rev 1449) @@ -20,7 +20,7 @@ } // --> </script> -<div class="pal-portlet" style="padding:3px;"> +<div class="addresslist-portlet" style="padding:3px;"> <!-- tab: BEGIN --> <div class="tab-nav"> <ul> @@ -44,6 +44,8 @@ <tr> <th style="width:150px;text-align: center;"><bean:message key="labels.name"/></th> <th style="width:200px;text-align: center;"><bean:message key="labels.company"/></th> + <th style="width:100px;text-align: center;"><bean:message key="labels.createdBy"/></th> + <th style="width:80px;text-align: center;"><bean:message key="labels.public"/></th> <th style="width:100px;text-align: center;"> </th> </tr> </thead> @@ -51,10 +53,21 @@ <c:forEach var="p" varStatus="s" items="${personItems}"> <tr class="${s.index %2 == 0 ? 'row1' : 'row2'}"> <td><s:link href="confirmpage/4/${f:u(p.id)}"><bean:message key="display.name" arg0="${f:h(p.nameArg0)}" arg1="${f:h(p.nameArg1)}" arg2="${f:h(p.nameArg2)}"/></s:link></td> - <td>${f:h(p.company.name)}</td> <td align="center"> +<c:if test="${p.company!=null}"> + <c:if test="${p.company.userId==currentUserId||p.company.isPublic=='T'}">${f:h(p.company.name)}</c:if> +</c:if> + </td> + <td><bean:message key="display.name" arg0="${f:h(p.userInfo.nameArg0)}" arg1="${f:h(p.userInfo.nameArg1)}" arg2="${f:h(p.userInfo.nameArg2)}"/></td> + <td align="center"> +<c:if test="${p.isPublic=='T'}"><bean:message key="labels.yes"/></c:if> +<c:if test="${p.isPublic=='F'}"><bean:message key="labels.no"/></c:if> + </td> + <td align="center"> +<c:if test="${p.userId==currentUserId}"> <s:link href="editpage/2/${f:u(p.id)}"><bean:message key="labels.edit"/></s:link> <s:link href="deletepage/3/${f:u(p.id)}"><bean:message key="labels.delete"/></s:link> +</c:if> </td> </tr> </c:forEach> Modified: addresslist/trunk/src/main/webapp/css/pal-extension.css =================================================================== --- addresslist/trunk/src/main/webapp/css/pal-extension.css 2008-11-26 09:06:07 UTC (rev 1448) +++ addresslist/trunk/src/main/webapp/css/pal-extension.css 2008-11-27 06:31:38 UTC (rev 1449) @@ -17,13 +17,13 @@ /* ---------------- */ /* Form Table */ /* ---------------- */ -.pal-portlet .form-table table { +.addresslist-portlet .form-table table { border-top: 1px solid #cccccc; border-left: 1px solid #cccccc; border-collapse:collapse; } -.pal-portlet .form-table caption { +.addresslist-portlet .form-table caption { border-top: 1px solid #cccccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; @@ -35,22 +35,22 @@ color:#003366; } -.pal-portlet .form-table thead { +.addresslist-portlet .form-table thead { margin:0; padding:0; } -.pal-portlet .form-table tbody { +.addresslist-portlet .form-table tbody { margin:0; padding:0; } -.pal-portlet .form-table tfoot { +.addresslist-portlet .form-table tfoot { margin:0; padding:0; } -.pal-portlet .form-table th { +.addresslist-portlet .form-table th { border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; padding: 5px; @@ -59,14 +59,14 @@ empty-cells: show; } -.pal-portlet .form-table td { +.addresslist-portlet .form-table td { border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; padding:3px; empty-cells: show; } -.pal-portlet .form-table tfoot tr td { +.addresslist-portlet .form-table tfoot tr td { padding:10px; text-align: center; empty-cells: show; @@ -75,13 +75,13 @@ /* ---------------- */ /* List Table */ /* ---------------- */ -.pal-portlet .list-table table { +.addresslist-portlet .list-table table { border-top: 1px solid #cccccc; border-left: 1px solid #cccccc; border-collapse:collapse; } -.pal-portlet .list-table caption { +.addresslist-portlet .list-table caption { border-top: 1px solid #cccccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; @@ -93,30 +93,30 @@ color:#003366; } -.pal-portlet .list-table thead { +.addresslist-portlet .list-table thead { margin:0; padding:0; } -.pal-portlet .list-table tbody { +.addresslist-portlet .list-table tbody { margin:0; padding:0; } -.pal-portlet .list-table tfoot { +.addresslist-portlet .list-table tfoot { margin:0; padding:0; } -.pal-portlet .list-table .row1 { +.addresslist-portlet .list-table .row1 { background-color: #ffffff; } -.pal-portlet .list-table .row2 { +.addresslist-portlet .list-table .row2 { background-color: #fffff8; } -.pal-portlet .list-table th { +.addresslist-portlet .list-table th { border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; padding: 5px; @@ -125,7 +125,7 @@ empty-cells: show; } -.pal-portlet .list-table td { +.addresslist-portlet .list-table td { border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; padding:3px; @@ -136,7 +136,7 @@ /* ---------------- */ /* Tab */ /* ---------------- */ -.pal-portlet .tab-nav div { +.addresslist-portlet .tab-nav div { height:25px; line-height:23px; margin:0; @@ -144,13 +144,13 @@ width:100%; } -.pal-portlet .tab-nav ul { +.addresslist-portlet .tab-nav ul { margin:0; padding:0; width:100%; } -.pal-portlet .tab-nav ul li { +.addresslist-portlet .tab-nav ul li { float:left; height:25px; line-height:23px; @@ -159,23 +159,23 @@ list-style-type:none; } -.pal-portlet .tab-nav ul li a:visited { +.addresslist-portlet .tab-nav ul li a:visited { color:#0000EE; } -.pal-portlet .tab-nav ul li.first { +.addresslist-portlet .tab-nav ul li.first { border-bottom:1px solid #A9A9A9; width:10px; } -.pal-portlet .tab-nav ul li.last { +.addresslist-portlet .tab-nav ul li.last { border-bottom:1px solid #A9A9A9; float:none; padding-right:10px; text-align:right; } -.pal-portlet .tab-nav ul li.selected { +.addresslist-portlet .tab-nav ul li.selected { border-color:#A9A9A9 #A9A9A9 #FFFFFF; border-style:solid; border-width:1px; @@ -184,26 +184,26 @@ _margin-top: 0px; } -.pal-portlet .tab-nav ul li.selected span { +.addresslist-portlet .tab-nav ul li.selected span { display:inline; padding:0 10px; white-space:pre; } -.pal-portlet .tab-nav ul li.selectable { +.addresslist-portlet .tab-nav ul li.selectable { background-color:#DCDCDC; border:1px solid #A9A9A9; display:block; height:24px; } -.pal-portlet .tab-nav ul li.selectable { +.addresslist-portlet .tab-nav ul li.selectable { display:inline; padding:0 10px; white-space:pre; } -.pal-portlet .tab-nav ul li.spacer { +.addresslist-portlet .tab-nav ul li.spacer { border-bottom:1px solid #A9A9A9; width:5px; }