From 94d457191b15c3dcec62cf4afea474a24218aace Mon Sep 17 00:00:00 2001 From: pb Date: Sun, 9 Jun 2013 17:42:00 +0000 Subject: [PATCH] =?UTF-8?q?Anpassung=20und=20Vervollst=C3=A4ndigung=20Reso?= =?UTF-8?q?urceBundles=20sowie=20Sprachumschaltung=20abgeschlossen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@2192 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/cms/contenttypes/Job.xml | 4 +- .../cms/contenttypes/JobResources.properties | 9 +++ .../contenttypes/JobResources_de.properties | 9 +++ .../JobResources_en_GB.properties | 10 +++ .../contenttypes/JobResources_fr.properties | 10 +++ .../contenttypes/ui/JobPropertiesStep.java | 66 +++++++++++++++---- .../cms/contenttypes/ui/JobPropertyForm.java | 49 +++++++++----- 7 files changed, 125 insertions(+), 32 deletions(-) create mode 100755 ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_en_GB.properties create mode 100755 ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_fr.properties diff --git a/ccm-cms-types-job/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Job.xml b/ccm-cms-types-job/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Job.xml index 50ab3ccc1..f8f12aa66 100755 --- a/ccm-cms-types-job/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Job.xml +++ b/ccm-cms-types-job/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/Job.xml @@ -7,7 +7,9 @@ - + diff --git a/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources.properties b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources.properties index 313838eee..16a2b88d0 100755 --- a/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources.properties +++ b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources.properties @@ -1 +1,10 @@ job.authoring.basic_properties.description=Edit the title, name, grade, closing date, salary, overview, ref. no., department, job description, person specification, and release date +cms.contenttypes.ui.job.grade=Grade: +cms.contenttypes.ui.job.closing_date=Closing Date: +cms.contenttypes.ui.job.salary=Salary: +cms.contenttypes.ui.job.overview=Overview: +cms.contenttypes.ui.job.ref_number=Ref Number: +cms.contenttypes.ui.job.department=Department: +cms.contenttypes.ui.job.job_description=Detailed Job Description: +cms.contenttypes.ui.job.person_specification=Personal Requirements: +cms.contenttypes.ui.job.contact_details=Contact Details: diff --git a/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_de.properties b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_de.properties index 4d26cf760..1ca67106a 100644 --- a/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_de.properties +++ b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_de.properties @@ -1 +1,10 @@ job.authoring.basic_properties.description=Editieren der Beschreibungsdaten +cms.contenttypes.ui.job.grade=Stufe: +cms.contenttypes.ui.job.closing_date=Bewerbungsschluss: +cms.contenttypes.ui.job.salary=Gehalt: +cms.contenttypes.ui.job.overview=\u00dcbersicht: +cms.contenttypes.ui.job.ref_number=Ref. Nr.: +cms.contenttypes.ui.job.department=Abteilung: +cms.contenttypes.ui.job.job_description=Stellenbeschreibung: +cms.contenttypes.ui.job.person_specification=Pers\u00f6nliche Anforderungen: +cms.contenttypes.ui.job.contact_details=Kontaktdetails: diff --git a/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_en_GB.properties b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_en_GB.properties new file mode 100755 index 000000000..f880c01a8 --- /dev/null +++ b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_en_GB.properties @@ -0,0 +1,10 @@ +job.authoring.basic_properties.description=Edit the title, name, grade, closing date, salary, overview, ref. no., department, job description, person specification, and release date +cms.contenttypes.ui.job.grade=Grade: +cms.contenttypes.ui.job.closing_date=Closing Date: +cms.contenttypes.ui.job.salary=Salary: +cms.contenttypes.ui.job.overview=Overview: +cms.contenttypes.ui.job.ref_number=Ref Number: +cms.contenttypes.ui.job.department=Department: +cms.contenttypes.ui.job.job_description=Job Description: +cms.contenttypes.ui.job.person_specification=Personal Requirements: +cms.contenttypes.ui.job.contact_details=Contact Details: diff --git a/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_fr.properties b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_fr.properties new file mode 100755 index 000000000..a4ffe491d --- /dev/null +++ b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/JobResources_fr.properties @@ -0,0 +1,10 @@ +job.authoring.basic_properties.description=Edit the title, name, grade, closing date, salary, overview, ref. no., department, job description, person specification, and release date +cms.contenttypes.ui.job.grade=Niveau:: +cms.contenttypes.ui.job.closing_date=Date de cl\u00f4ture: +cms.contenttypes.ui.job.salary=Salaire: +cms.contenttypes.ui.job.overview=Vue d'ensemble: +cms.contenttypes.ui.job.ref_number=Num\u00e9ro de r\u00e9f\u00e9rence: +cms.contenttypes.ui.job.department=Departement: +cms.contenttypes.ui.job.job_description=Description du poste: +cms.contenttypes.ui.job.person_specification=D\u00e9tails concernant la personne: +cms.contenttypes.ui.job.contact_details=Contact: diff --git a/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/ui/JobPropertiesStep.java b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/ui/JobPropertiesStep.java index 52ad0df08..497b6929b 100755 --- a/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/ui/JobPropertiesStep.java +++ b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/ui/JobPropertiesStep.java @@ -25,6 +25,7 @@ import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.contenttypes.Job; +import com.arsdigita.cms.contenttypes.util.JobGlobalizationUtil; import com.arsdigita.domain.DomainObject; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; @@ -47,6 +48,11 @@ public class JobPropertiesStep extends SimpleEditStep { /** The name of the editing sheet added to this step */ public static String EDIT_SHEET_NAME = "edit"; + /** + * + * @param itemModel + * @param parent + */ public JobPropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) { super(itemModel, parent); @@ -55,7 +61,9 @@ public class JobPropertiesStep extends SimpleEditStep { BasicPageForm editSheet; editSheet = new JobPropertyForm(itemModel, this); - add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel), + add(EDIT_SHEET_NAME, + "Edit", + new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton()); setDisplayComponent(getJobPropertySheet(itemModel)); @@ -75,8 +83,11 @@ public class JobPropertiesStep extends SimpleEditStep { DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel); - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.name"), Job.NAME); - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.title"), Job.TITLE); + sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.title"), + Job.TITLE); + sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.name"), + Job.NAME); + if (!ContentSection.getConfig().getHideLaunchDate()) { sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.launch_date"), ContentPage.LAUNCH_DATE, @@ -89,13 +100,27 @@ public class JobPropertiesStep extends SimpleEditStep { return DateFormat.getDateInstance(DateFormat.LONG) .format(page.getLaunchDate()); } else { - return (String)GlobalizationUtil.globalize("cms.ui.unknown").localize(); + return (String)GlobalizationUtil + .globalize("cms.ui.unknown") + .localize(); } } }); } - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.grade"), Job.GRADE); - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.closing_date"), + + // Job content type currently does not use the default + // basic descriuption properties (as persisted in cms-pages and by + // default part of the object list). Would be convenient to move the + // ct specific overview property to basic description. + sheet.add( JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.overview"), + Job.BODY); + + sheet.add( JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.grade"), + Job.GRADE); + sheet.add( JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.closing_date"), Job.CLOSING_DATE, new DomainObjectPropertySheet.AttributeFormatter() { @@ -107,17 +132,30 @@ public class JobPropertiesStep extends SimpleEditStep { return DateFormat.getDateInstance(DateFormat.LONG) .format(job.getClosingDate()); } else { - return (String)GlobalizationUtil.globalize("cms.ui.unknown").localize(); + return (String)GlobalizationUtil + .globalize("cms.ui.unknown") + .localize(); } } }); - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.salary"), Job.SALARY); - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.bodyoverview"), Job.BODY); - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.ref_number"), Job.REF_NUMBER); - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.department"), Job.DEPARTMENT); - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.job_description"), Job.JOB_DESCRIPTION); - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.person_specification"), Job.PERSON_SPECIFICATION); - sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.contact_details"), Job.CONTACT_DETAILS); + sheet.add( JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.salary"), + Job.SALARY); + sheet.add( JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.ref_number"), + Job.REF_NUMBER); + sheet.add( JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.department"), + Job.DEPARTMENT); + sheet.add( JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.job_description"), + Job.JOB_DESCRIPTION); + sheet.add( JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.person_specification"), + Job.PERSON_SPECIFICATION); + sheet.add( JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.contact_details"), + Job.CONTACT_DETAILS); return sheet; } diff --git a/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/ui/JobPropertyForm.java b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/ui/JobPropertyForm.java index 18eff945e..ded4d08a8 100755 --- a/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/ui/JobPropertyForm.java +++ b/ccm-cms-types-job/src/com/arsdigita/cms/contenttypes/ui/JobPropertyForm.java @@ -26,13 +26,14 @@ import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSubmissionListener; import com.arsdigita.bebop.form.TextField; -import com.arsdigita.cms.ui.CMSDHTMLEditor; import com.arsdigita.bebop.parameters.DateParameter; import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.contenttypes.Job; +import com.arsdigita.cms.contenttypes.util.JobGlobalizationUtil; import com.arsdigita.cms.ui.authoring.BasicPageForm; +import com.arsdigita.cms.ui.CMSDHTMLEditor; import com.arsdigita.cms.util.GlobalizationUtil; @@ -45,14 +46,14 @@ public class JobPropertyForm extends BasicPageForm private JobPropertiesStep m_step; + /** body parameter name */ + public static final String BODY = "body"; /** Grade parameter name */ public static final String GRADE = "grade"; /** closing date parameter name */ public static final String CLOSING_DATE = "closingDate"; /** salary parameter name */ public static final String SALARY = "salary"; - /** body parameter name */ - public static final String BODY = "body"; /** Ref number parameter name */ public static final String REF_NUMBER = "ref_number"; /** department parameter name */ @@ -96,7 +97,20 @@ public class JobPropertyForm extends BasicPageForm protected void addWidgets() { super.addWidgets(); - add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.grade"))); + // Job content type currently does not use the default + // basic descriuption properties (as persisted in cms-pages and by + // default part of the object list). Would be convenient to move the + // ct specific overview property to basic description. + add(new Label(JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.overview"))); + ParameterModel bodyParam = new StringParameter(BODY); + CMSDHTMLEditor body = new CMSDHTMLEditor(bodyParam); + body.setCols(40); + body.setRows(10); + add(body); + + add(new Label(JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.grade"))); ParameterModel gradeParam = new StringParameter(GRADE); TextField grade = new TextField(gradeParam); @@ -104,42 +118,41 @@ public class JobPropertyForm extends BasicPageForm grade.setMaxLength(30); add(grade); - add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.closing_date"))); + add(new Label(JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.closing_date"))); ParameterModel closingDateParam = new DateParameter(CLOSING_DATE); com.arsdigita.bebop.form.Date closingDate = new com.arsdigita.bebop.form.Date(closingDateParam ); add(closingDate); - add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.salary"))); + add(new Label(JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.salary"))); ParameterModel salaryParam = new StringParameter(SALARY); CMSDHTMLEditor salary = new CMSDHTMLEditor(salaryParam); salary.setCols(40); salary.setRows(10); add(salary); - add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.bodyoverview"))); - ParameterModel bodyParam = new StringParameter(BODY); - CMSDHTMLEditor body = new CMSDHTMLEditor(bodyParam); - body.setCols(40); - body.setRows(10); - add(body); - add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.ref_number"))); + add(new Label(JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.ref_number"))); ParameterModel refNumberParam = new StringParameter(REF_NUMBER); TextField refNumber = new TextField(refNumberParam); refNumber.setSize(30); refNumber.setMaxLength(30); add(refNumber); - add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.department"))); + add(new Label(JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.department"))); ParameterModel departmentParam = new StringParameter(DEPARTMENT); TextField department = new TextField(departmentParam); department.setSize(30); department.setMaxLength(30); add(department); - add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.job_description"))); + add(new Label(JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.job_description"))); ParameterModel jobDescriptionParam = new StringParameter(JOB_DESCRIPTION); CMSDHTMLEditor jobDescription = new CMSDHTMLEditor(jobDescriptionParam); @@ -147,7 +160,8 @@ public class JobPropertyForm extends BasicPageForm jobDescription.setRows(10); add(jobDescription); - add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.person_specification"))); + add(new Label(JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.person_specification"))); ParameterModel personSpecificationParam = new StringParameter(PERSON_SPECIFICATION); CMSDHTMLEditor personSpecification = new CMSDHTMLEditor(personSpecificationParam); @@ -155,7 +169,8 @@ public class JobPropertyForm extends BasicPageForm personSpecification.setRows(10); add(personSpecification); - add(new Label(GlobalizationUtil.globalize("cms.contenttypes.ui.contact_details"))); + add(new Label(JobGlobalizationUtil + .globalize("cms.contenttypes.ui.job.contact_details"))); ParameterModel contactDetailsParam = new StringParameter(CONTACT_DETAILS); CMSDHTMLEditor contactDetails = new CMSDHTMLEditor(contactDetailsParam);