diff --git a/ccm-cms-types-agenda/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Agenda.xml b/ccm-cms-types-agenda/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Agenda.xml index b6ae1e84c..4b660292c 100755 --- a/ccm-cms-types-agenda/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Agenda.xml +++ b/ccm-cms-types-agenda/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Agenda.xml @@ -5,9 +5,9 @@ diff --git a/ccm-cms-types-article/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Article.xml b/ccm-cms-types-article/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Article.xml index a30814203..ac38585c7 100755 --- a/ccm-cms-types-article/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Article.xml +++ b/ccm-cms-types-article/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Article.xml @@ -8,9 +8,9 @@ diff --git a/ccm-cms-types-contact/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Contact.xml b/ccm-cms-types-contact/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Contact.xml index f2723004a..35eaef135 100644 --- a/ccm-cms-types-contact/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Contact.xml +++ b/ccm-cms-types-contact/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Contact.xml @@ -15,9 +15,9 @@ diff --git a/ccm-cms-types-event/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Event.xml b/ccm-cms-types-event/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Event.xml index b12852f8a..1cd8d816b 100755 --- a/ccm-cms-types-event/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Event.xml +++ b/ccm-cms-types-event/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Event.xml @@ -15,7 +15,7 @@ diff --git a/ccm-cms-types-faqitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/FAQItem.xml b/ccm-cms-types-faqitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/FAQItem.xml index caff69c00..a5b9cb636 100755 --- a/ccm-cms-types-faqitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/FAQItem.xml +++ b/ccm-cms-types-faqitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/FAQItem.xml @@ -9,7 +9,7 @@ diff --git a/ccm-cms-types-formitem/src/WEB-INF/content-types/com/arsdigita/cms/formbuilder/FormItem.xml b/ccm-cms-types-formitem/src/WEB-INF/content-types/com/arsdigita/cms/formbuilder/FormItem.xml index 996d8b257..fe15fda10 100755 --- a/ccm-cms-types-formitem/src/WEB-INF/content-types/com/arsdigita/cms/formbuilder/FormItem.xml +++ b/ccm-cms-types-formitem/src/WEB-INF/content-types/com/arsdigita/cms/formbuilder/FormItem.xml @@ -4,9 +4,9 @@ diff --git a/ccm-cms-types-healthCareFacility/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HealthCareFacility.xml b/ccm-cms-types-healthCareFacility/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HealthCareFacility.xml index 8edfc601f..40fd708bb 100644 --- a/ccm-cms-types-healthCareFacility/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HealthCareFacility.xml +++ b/ccm-cms-types-healthCareFacility/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HealthCareFacility.xml @@ -15,9 +15,9 @@ diff --git a/ccm-cms-types-htmlform/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml b/ccm-cms-types-htmlform/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml index cdcb5dc92..be4cd1d68 100755 --- a/ccm-cms-types-htmlform/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml +++ b/ccm-cms-types-htmlform/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/HTMLForm.xml @@ -4,9 +4,9 @@ diff --git a/ccm-cms-types-job/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Job.xml b/ccm-cms-types-job/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Job.xml index a0ca86860..de9d364a5 100755 --- a/ccm-cms-types-job/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Job.xml +++ b/ccm-cms-types-job/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Job.xml @@ -4,7 +4,7 @@ diff --git a/ccm-cms-types-legalnotice/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/LegalNotice.xml b/ccm-cms-types-legalnotice/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/LegalNotice.xml index 265ed555c..ebda29295 100755 --- a/ccm-cms-types-legalnotice/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/LegalNotice.xml +++ b/ccm-cms-types-legalnotice/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/LegalNotice.xml @@ -5,7 +5,7 @@ diff --git a/ccm-cms-types-member/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Member.xml b/ccm-cms-types-member/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Member.xml index 5c8e8f144..44e7a9e9c 100644 --- a/ccm-cms-types-member/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Member.xml +++ b/ccm-cms-types-member/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Member.xml @@ -15,9 +15,9 @@ diff --git a/ccm-cms-types-minutes/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Minutes.xml b/ccm-cms-types-minutes/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Minutes.xml index 39f327977..28f9ab246 100755 --- a/ccm-cms-types-minutes/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Minutes.xml +++ b/ccm-cms-types-minutes/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Minutes.xml @@ -5,7 +5,7 @@ diff --git a/ccm-cms-types-mparticle/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/MultiPartArticle.xml b/ccm-cms-types-mparticle/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/MultiPartArticle.xml index 9a3fc07c4..033d8edaa 100755 --- a/ccm-cms-types-mparticle/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/MultiPartArticle.xml +++ b/ccm-cms-types-mparticle/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/MultiPartArticle.xml @@ -13,14 +13,14 @@ diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java index 69331080a..8035c41d3 100755 --- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java +++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java @@ -35,7 +35,6 @@ import com.arsdigita.cms.contenttypes.MultiPartArticle; import com.arsdigita.cms.dispatcher.XMLGenerator; import com.arsdigita.dispatcher.DispatcherHelper; import com.arsdigita.util.UncheckedWrapperException; -import com.arsdigita.web.Web; import com.arsdigita.xml.Element; import java.io.IOException; diff --git a/ccm-cms-types-newsitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/NewsItem.xml b/ccm-cms-types-newsitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/NewsItem.xml index 815e620b2..3395f584f 100755 --- a/ccm-cms-types-newsitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/NewsItem.xml +++ b/ccm-cms-types-newsitem/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/NewsItem.xml @@ -15,7 +15,7 @@ diff --git a/ccm-cms-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Organization.xml b/ccm-cms-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Organization.xml index be3490821..8f5aee759 100755 --- a/ccm-cms-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Organization.xml +++ b/ccm-cms-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Organization.xml @@ -9,9 +9,9 @@ diff --git a/ccm-cms-types-pressrelease/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/PressRelease.xml b/ccm-cms-types-pressrelease/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/PressRelease.xml index eb5042fbc..bd2b2ae32 100755 --- a/ccm-cms-types-pressrelease/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/PressRelease.xml +++ b/ccm-cms-types-pressrelease/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/PressRelease.xml @@ -6,7 +6,7 @@ diff --git a/ccm-cms-types-service/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Service.xml b/ccm-cms-types-service/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Service.xml index 55fd5f0cd..f95d38eff 100755 --- a/ccm-cms-types-service/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Service.xml +++ b/ccm-cms-types-service/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Service.xml @@ -4,7 +4,7 @@ diff --git a/ccm-cms-types-siteproxy/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SiteProxy.xml b/ccm-cms-types-siteproxy/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SiteProxy.xml index 3f004567b..60c69fed1 100755 --- a/ccm-cms-types-siteproxy/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SiteProxy.xml +++ b/ccm-cms-types-siteproxy/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SiteProxy.xml @@ -13,9 +13,9 @@ diff --git a/ccm-cms-types-survey/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Survey.xml b/ccm-cms-types-survey/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Survey.xml index 1ee1901d4..7149c9390 100644 --- a/ccm-cms-types-survey/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Survey.xml +++ b/ccm-cms-types-survey/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/Survey.xml @@ -15,9 +15,9 @@ diff --git a/ccm-cms/pdl/com/arsdigita/content-types/GenericOrganizationalUnit.pdl b/ccm-cms/pdl/com/arsdigita/content-types/GenericOrganizationalUnit.pdl index aa2cef8d9..0d4b1b325 100644 --- a/ccm-cms/pdl/com/arsdigita/content-types/GenericOrganizationalUnit.pdl +++ b/ccm-cms/pdl/com/arsdigita/content-types/GenericOrganizationalUnit.pdl @@ -64,15 +64,7 @@ association { to cms_persons.person_id; // Additional attributes for the association - String[0..1] role_name = cms_organizationalunits_person_map.role_name VARCHAR(100); + String[0..1] role_name = cms_organizationalunits_person_map.role_name VARCHAR(100); + String[0..1] status = cms_organizationalunits_person_map.status VARCHAR(100); -} - -//object type GenericOrganizationalUnitPersonAssociation extends ACSObject { -// -// GenericPerson[0..1] person = join cms_organizationalunit_person_assoc.person_id -// to cms_persons.person_id; -// String[0..1] roleName = cms_organizationalunit_person_assoc.role_name VARCHAR(100); -// -// reference key (cms_organizationalunit_person_assoc.assoc_id); -//} +} \ No newline at end of file diff --git a/ccm-cms/src/WEB-INF/content-types/GenericPerson.xml b/ccm-cms/src/WEB-INF/content-types/GenericPerson.xml index d92ce537a..7f3a63187 100644 --- a/ccm-cms/src/WEB-INF/content-types/GenericPerson.xml +++ b/ccm-cms/src/WEB-INF/content-types/GenericPerson.xml @@ -15,9 +15,9 @@ diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties index 616ad2eed..938a86394 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties @@ -4,3 +4,4 @@ cms.ui.lifecycles=Lifecycles cms.ui.unknownRole= cms.ui.unknownStatus=Unknown status cms.contenttypes.ui.genericorgaunit.persons.status=Status +cms.contenttypes.shared.basic_properties.title= diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties index 67fc3dba1..78ae77247 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties @@ -1,16 +1,16 @@ # Package com.arsdigita.cms # ========================= -cms.attributeset_is_already_locked=L'ensemble attribut est déjà bloqué -cms.attributeset_is_locked=L'ensemble attribut est bloqué -cms.cannot_create_xml_document=Erreur : impossible de créer un document XML -cms.cant_promote_folders=Impossible de remonter le répertoire +cms.attributeset_is_already_locked=L'ensemble attribut est d\u00e9j\u00e0 bloqu\u00e9 +cms.attributeset_is_locked=L'ensemble attribut est bloqu\u00e9 +cms.cannot_create_xml_document=Erreur : impossible de cr\u00e9er un document XML +cms.cant_promote_folders=Impossible de remonter le r\u00e9pertoire cms.classnotfoundexception=Erreur : classe introuvable -cms.illegalaccessexception=Erreur : accès interdit -cms.image.erroneous_jpeg_marker_length=Extension JPEG erronnée -cms.image.expected_soi_marker_first=Nécéssite le marqueur SOI en premier +cms.illegalaccessexception=Erreur : acc\u00e8s interdit +cms.image.erroneous_jpeg_marker_length=Extension JPEG erronn\u00e9e +cms.image.expected_soi_marker_first=N\u00e9c\u00e9ssite le marqueur SOI en premier cms.image.not_a_jpeg_file=Ceci n'est pas un fichier JPEG cms.instantiationexception=Erreur : instanciation impossible -cms.nosuchmethodexception=Erreur : pas de méthode trouvée +cms.nosuchmethodexception=Erreur : pas de m\u00e9thode trouv\u00e9e cms.templates=Gabarits @@ -18,53 +18,53 @@ cms.templates=Gabarits # ====================================== cms.contenttypes.coudlnt_retrieve_text=Impossible d'afficher le texte cms.contenttypes.installer.article_section=Repertoire article -cms.contenttypes.installer.article_section_for_a_multipart_article=Répertoire article pour un article à plusieurs parties -cms.contenttypes.job_type_not_registered=Type de poste non enregistré -cms.contenttypes.legalnotice_type_not_registered=Type de mentions légales non enregistrées -cms.contenttypes.minutes_type_not_registered=Type de réunion non enregistré -cms.contenttypes.newsitem_type_not_registered=Type d'élement d'information non enregistré -cms.contenttypes.no_content_section=Pas de répertoire de contenu +cms.contenttypes.installer.article_section_for_a_multipart_article=R\u00e9pertoire article pour un article \u00e0 plusieurs parties +cms.contenttypes.job_type_not_registered=Type de poste non enregistr\u00e9 +cms.contenttypes.legalnotice_type_not_registered=Type de mentions l\u00e9gales non enregistr\u00e9es +cms.contenttypes.minutes_type_not_registered=Type de r\u00e9union non enregistr\u00e9 +cms.contenttypes.newsitem_type_not_registered=Type d'\u00e9lement d'information non enregistr\u00e9 +cms.contenttypes.no_content_section=Pas de r\u00e9pertoire de contenu cms.contenttypes.no_section=Pas de repertoire -cms.contenttypes.pressrelease_type_not_registered=Type de PresserRelâcher non enregistré -cms.contenttypes.service_type_not_registered=Type de service non enregistré +cms.contenttypes.pressrelease_type_not_registered=Type de PresserRel\u00e2cher non enregistr\u00e9 +cms.contenttypes.service_type_not_registered=Type de service non enregistr\u00e9 # Package com.arsdigita.cms.contenttypes.ui # ========================================= -cms.contenttypes.ui.action_item=Action de l'élément +cms.contenttypes.ui.action_item=Action de l'\u00e9l\u00e9ment cms.contenttypes.ui.address=Addresse cms.contenttypes.ui.agenda_date_and_time=Date et heure de l'agenda cms.contenttypes.ui.attendees=Participants cms.contenttypes.ui.bodyoverview=Corps / Vue d'ensemble -cms.contenttypes.ui.closing_date=Date de clôture +cms.contenttypes.ui.closing_date=Date de cl\u00f4ture cms.contenttypes.ui.contact_details=Contact cms.contenttypes.ui.contact_info=Contact cms.contenttypes.ui.contacts=Contacts -cms.contenttypes.ui.cost=Coût +cms.contenttypes.ui.cost=Co\u00fbt cms.contenttypes.ui.date=Date cms.contenttypes.ui.department=Departement cms.contenttypes.ui.description=Description -cms.contenttypes.ui.description_of_minutes=Description de la réunion -cms.contenttypes.ui.government_uid=Identifiant département +cms.contenttypes.ui.description_of_minutes=Description de la r\u00e9union +cms.contenttypes.ui.government_uid=Identifiant d\u00e9partement cms.contenttypes.ui.grade=Niveau cms.contenttypes.ui.homepage=Accueil cms.contenttypes.ui.job_description=Description du poste cms.contenttypes.ui.lead=Fil conducteur -cms.contenttypes.ui.lead_line=Ligne de tête +cms.contenttypes.ui.lead_line=Ligne de t\u00eate cms.contenttypes.ui.link_to_map=Lien vers la carte cms.contenttypes.ui.name=Nom cms.contenttypes.ui.opening_times=Heures d'ouverture -cms.contenttypes.ui.person_specification=Détails concernant la personne -cms.contenttypes.ui.ref_code=Code de référence -cms.contenttypes.ui.ref_number=Numéro de référence -cms.contenttypes.ui.reference=Réference -cms.contenttypes.ui.reference_code=Code de réference +cms.contenttypes.ui.person_specification=D\u00e9tails concernant la personne +cms.contenttypes.ui.ref_code=Code de r\u00e9f\u00e9rence +cms.contenttypes.ui.ref_number=Num\u00e9ro de r\u00e9f\u00e9rence +cms.contenttypes.ui.reference=R\u00e9ference +cms.contenttypes.ui.reference_code=Code de r\u00e9ference cms.contenttypes.ui.salary=Salaire -cms.contenttypes.ui.services_provided=Services proposés -cms.contenttypes.ui.summary=Résumé -cms.contenttypes.ui.summary=Résumé -cms.contenttypes.ui.there_are_no_events=Il n'y a aucun évenement +cms.contenttypes.ui.services_provided=Services propos\u00e9s +cms.contenttypes.ui.summary=R\u00e9sum\u00e9 +cms.contenttypes.ui.summary=R\u00e9sum\u00e9 +cms.contenttypes.ui.there_are_no_events=Il n'y a aucun \u00e9venement cms.contenttypes.ui.title=Titre cms.contenttypes.ui.view_image=voir l'image @@ -73,14 +73,14 @@ cms.contenttypes.ui.view_image=voir l'image cms.dispatcher.cannot_find_domain_object=Impossible de trouver le domaine objet cms.dispatcher.could_not_find_imageasset=Impossible de trouver ImageAsset cms.dispatcher.failed_to_retrieve_imageasset=Echec pour afficher ImageAsset -cms.dispatcher.no_permission_to_access_resource=Vous n'avez pas la permission d'accèder à cette ressource -cms.dispatcher.not_implemented=Non implémenté +cms.dispatcher.no_permission_to_access_resource=Vous n'avez pas la permission d'acc\u00e8der \u00e0 cette ressource +cms.dispatcher.not_implemented=Non impl\u00e9ment\u00e9 cms.dispatcher.unknown_context=Contexte inconnu # Package com.arsdigita.cms.formbuilder # ===================================== -cms.formbuilder.cannot_create_acsobject=Impossible de créer l'ACSObject +cms.formbuilder.cannot_create_acsobject=Impossible de cr\u00e9er l'ACSObject cms.formbuilder.cannot_instantiate_object=Impossible d'instancier l'objet cms.formbuilder.no_such_form=Pas de formulaire cms.formbuilder.roll_me_back=TRANSLATE THIS: Roll me back (cms.formbuilder.roll_me_back) @@ -96,15 +96,15 @@ cms.installer.cannot_find_cms_package_type=Impossible de trouver le type package cms.installer.cannot_find_content_type=Impossible de trouver le type de contenu cms.installer.cannot_find_file=Impossible de trouver le fichier cms.installer.cannot_find_group_for_email=Impossible de trouver le groupe pour l'email -cms.installer.cannot_read_line_of_data=Impossible de lire la ligne de données +cms.installer.cannot_read_line_of_data=Impossible de lire la ligne de donn\u00e9es cms.installer.cannot_set_template_text=Impossible de mettre le texte du gabarit cms.installer.could_not_load_section=Could not load ContentSection named '{0}' -cms.installer.deploy=Déploier -cms.installer.failed_to_update_the_default_content_section=Echec dans la mise à jour du repertoire de contenu par défaut +cms.installer.deploy=D\u00e9ploier +cms.installer.failed_to_update_the_default_content_section=Echec dans la mise \u00e0 jour du repertoire de contenu par d\u00e9faut cms.installer.formbuilder.form=Formulaire -cms.installer.formbuilder.form_section=Répertoire Formulaire -cms.installer.production_workflow=Déroulement des opérations de Production -cms.installer.root_folder=Répertoire racine +cms.installer.formbuilder.form_section=R\u00e9pertoire Formulaire +cms.installer.production_workflow=D\u00e9roulement des op\u00e9rations de Production +cms.installer.root_folder=R\u00e9pertoire racine cms.installer.root_site_node_missing=Lien vers la racine du site manquant cms.installer.simple_publication=Publication simple cms.installer.template=Gabarit @@ -113,160 +113,160 @@ cms.installer.template=Gabarit # Package com.arsdigita.cms.lifecycle # =================================== cms.lifecycle.could_not_fetch_lifecycle=Impossible de trouver le cycle de vie -cms.lifecycle.could_not_fetch_phase=Impossible de trouver l'étape +cms.lifecycle.could_not_fetch_phase=Impossible de trouver l'\u00e9tape # Package com.arsdigita.cms.publishToFile # ======================================= cms.publishToFile.cannot_find_file=Impossible de trouver le fichier -cms.publishToFile.cannot_find_item_class=Impossible de trouver la classe de l'élément +cms.publishToFile.cannot_find_item_class=Impossible de trouver la classe de l'\u00e9l\u00e9ment cms.publishToFile.cannot_find_server=Impossible de trouver le serveur -cms.publishToFile.cannot_get_sequence_value=Impossible de trouver la valeur de la séquence +cms.publishToFile.cannot_get_sequence_value=Impossible de trouver la valeur de la s\u00e9quence cms.publishToFile.cannot_read_template_text=Impossible de lire le texte du gabarit cms.publishToFile.could_not_get_object_for_oid=Impossible de trouver l'objet pour cet identifiant -cms.publishToFile.error_executing=Erreur d'exécution '{0}' -cms.publishToFile.exit_value_was=La valeur de sortie était +cms.publishToFile.error_executing=Erreur d'ex\u00e9cution '{0}' +cms.publishToFile.exit_value_was=La valeur de sortie \u00e9tait cms.publishToFile.interrupted_when_doing=Interrompu pendant '{0}' -cms.publishToFile.invalid_brokenlinkaction=Lien cassé invalide -cms.publishToFile.invalid_reference_target_type=Type de cible de référence invalide +cms.publishToFile.invalid_brokenlinkaction=Lien cass\u00e9 invalide +cms.publishToFile.invalid_reference_target_type=Type de cible de r\u00e9f\u00e9rence invalide cms.publishToFile.malformed_url=URL incorrecte cms.publishToFile.not_found_in_servers_list=Introuvable dans la liste des serveurs -cms.publishToFile.publish_to_file_listener_could_not_be_created=La publication du fichier d'écoute ne peut pas être créée -cms.publishToFile.publish_to_file_setlocalrequestpassword_could_not_be_created=La publication du fichier pour la demande de mot de passe ne peut pas être créée -cms.publishToFile.publishsource_sourcebase_must_end_in_=L'édition source doit se terminer par '/' +cms.publishToFile.publish_to_file_listener_could_not_be_created=La publication du fichier d'\u00e9coute ne peut pas \u00eatre cr\u00e9\u00e9e +cms.publishToFile.publish_to_file_setlocalrequestpassword_could_not_be_created=La publication du fichier pour la demande de mot de passe ne peut pas \u00eatre cr\u00e9\u00e9e +cms.publishToFile.publishsource_sourcebase_must_end_in_=L'\u00e9dition source doit se terminer par '/' cms.publishToFile.server=Server cms.publishToFile.unable_to_find_closing_for_tag=Impossible de trouver '>' pour la fermeture du tag -cms.publishToFile.unable_to_get_contentitem=Impossible de trouve le contenu de l'élément +cms.publishToFile.unable_to_get_contentitem=Impossible de trouve le contenu de l'\u00e9l\u00e9ment # Package com.arsdigita.cms.ui # ============================ cms.ui.actions=actions -cms.ui.all_items=tous les éléments -cms.ui.assigned_categories=Rubriques assignées +cms.ui.all_items=tous les \u00e9l\u00e9ments +cms.ui.assigned_categories=Rubriques assign\u00e9es cms.ui.available_categories=Rubriques disponibles cms.ui.browse=parcourir -cms.ui.browse_items_by_category=Voir les élements par rubrique +cms.ui.browse_items_by_category=Voir les \u00e9lements par rubrique cms.ui.cancel=annuler cms.ui.cancel_hit=Abandonner -cms.ui.cancelled=Annulé -cms.ui.categories=catégories -cms.ui.choose_target_folder=choisir le répertoire de destination +cms.ui.cancelled=Annul\u00e9 +cms.ui.categories=cat\u00e9gories +cms.ui.choose_target_folder=choisir le r\u00e9pertoire de destination cms.ui.content_center=Centre de contenu cms.ui.content_section=Repertoire de contenu -cms.ui.content_section_configuration=

Configuration du répertoire de contenu

+cms.ui.content_section_configuration=

Configuration du r\u00e9pertoire de contenu

cms.ui.content_types=types de contenu cms.ui.contents_for=contenus pour  -cms.ui.create=créer +cms.ui.create=cr\u00e9er cms.ui.default_locale=TRANSLATE THIS: Default Locale: (cms.ui.default_locale) cms.ui.edit=modifier -cms.ui.edit_folder=renomer le répertoire -cms.ui.enter_a_keyword=Entrer un mot clé -cms.ui.enter_first_name_last_name_andor_email_address=Entrer le prénom, le nom et/ou le nom du groupe -cms.ui.enter_first_name_last_name_email_address_andor_group_name=Entrer le prénom, le nom, l'email et/ou le nom du groupe +cms.ui.edit_folder=renomer le r\u00e9pertoire +cms.ui.enter_a_keyword=Entrer un mot cl\u00e9 +cms.ui.enter_first_name_last_name_andor_email_address=Entrer le pr\u00e9nom, le nom et/ou le nom du groupe +cms.ui.enter_first_name_last_name_email_address_andor_group_name=Entrer le pr\u00e9nom, le nom, l'email et/ou le nom du groupe cms.ui.finish=Finir -cms.ui.folder_browser=Répertoire de navigation +cms.ui.folder_browser=R\u00e9pertoire de navigation cms.ui.for=pour cms.ui.help=Aide cms.ui.help=Aide cms.ui.history.history=Historique cms.ui.history.no_history=Pas d'historique -cms.ui.history.preview=Prévisualiser +cms.ui.history.preview=Pr\u00e9visualiser cms.ui.history.rollback=Baisse de prix -cms.ui.insufficient_privileges=Droits d'accès insufisant +cms.ui.insufficient_privileges=Droits d'acc\u00e8s insufisant -cms.ui.invalid_item_id=Identifiant d'élément : {0} invalide +cms.ui.invalid_item_id=Identifiant d'\u00e9l\u00e9ment : {0} invalide -cms.ui.label_prompt=libellé: +cms.ui.label_prompt=libell\u00e9: cms.ui.lifecycles=cycles de vie cms.ui.locales=TRANSLATE THIS: Locales: (cms.ui.locales) -cms.ui.logout_failed=La deconnexon a échoué +cms.ui.logout_failed=La deconnexon a \u00e9chou\u00e9 cms.ui.matches=Resultats -cms.ui.matches=Résultats +cms.ui.matches=R\u00e9sultats cms.ui.max_launch=date de lancement maximum cms.ui.min_launch=date de lancement minimum cms.ui.my_workspace=Mon espace de travail cms.ui.my_workspace=Mon espace de travail cms.ui.name=Nom cms.ui.name_prompt=nom: -cms.ui.new_folder=nouveau répertoire -cms.ui.new_item=nouvel élément -cms.ui.no_content_section_for_page=Pas de répertoire de contenu pour cette page -cms.ui.no_items_matched_the_search=Pas d'élément trouvé dans la recherche +cms.ui.new_folder=nouveau r\u00e9pertoire +cms.ui.new_item=nouvel \u00e9l\u00e9ment +cms.ui.no_content_section_for_page=Pas de r\u00e9pertoire de contenu pour cette page +cms.ui.no_items_matched_the_search=Pas d'\u00e9l\u00e9ment trouv\u00e9 dans la recherche # Package com.arsdigita.cms.ui.authoring # ====================================== -cms.ui.authoring.an_item_with_this_name_already_exists=Un élément de ce nom existe déjà +cms.ui.authoring.an_item_with_this_name_already_exists=Un \u00e9l\u00e9ment de ce nom existe d\u00e9j\u00e0 cms.ui.authoring.bad_getblob_datatype=TRANSLATE THIS: Bad getBlob datatype (cms.ui.authoring.bad_getblob_datatype) cms.ui.authoring.bad_getclob_datatype=TRANSLATE THIS: Bad getClob datatype (cms.ui.authoring.bad_getclob_datatype) cms.ui.authoring.body=Corsp de la page -cms.ui.authoring.caption=Légende +cms.ui.authoring.caption=L\u00e9gende cms.ui.authoring.content_type=Type de contenu -cms.ui.authoring.couldnt_create_contentpage=Impossible de créer une page de contenu +cms.ui.authoring.couldnt_create_contentpage=Impossible de cr\u00e9er une page de contenu cms.ui.authoring.edit_body_text=Modifier le corps de la page -cms.ui.authoring.edit_caption=Modifier la légende +cms.ui.authoring.edit_caption=Modifier la l\u00e9gende cms.ui.authoring.file_action=Action du fichier cms.ui.authoring.file_action=Action du fichier cms.ui.authoring.image_action=Action de l'image cms.ui.authoring.image_action=Action de l'image cms.ui.authoring.invalid_create_component=TRANSLATE THIS: Creation component for parent content type is invalid. (cms.ui.authoring.invalid_create_component) cms.ui.authoring.missing_content_type=Type de contenu manquant -cms.ui.authoring.missing_item_id=Identifiant de l'élément manquant +cms.ui.authoring.missing_item_id=Identifiant de l'\u00e9l\u00e9ment manquant cms.ui.authoring.name=Nom cms.ui.authoring.name_url=Nom (URL) cms.ui.authoring.no_asset=TRANSLATE THIS: No asset (cms.ui.authoring.no_asset) -cms.ui.authoring.no_content_types_were_found=Pas de type de contenu trouvé +cms.ui.authoring.no_content_types_were_found=Pas de type de contenu trouv\u00e9 cms.ui.authoring.no_current_wizard=TRANSLATE THIS: No current wizard (cms.ui.authoring.no_current_wizard) -cms.ui.authoring.not_implemented=Non Implémenté +cms.ui.authoring.not_implemented=Non Impl\u00e9ment\u00e9 cms.ui.authoring.page_launch_date=Date de lancement cms.ui.authoring.page_title=Titre de la page cms.ui.authoring.remove_image=Supprimer l'image -cms.ui.authoring.select_an_existing_image=Sélectionner une image existante -cms.ui.authoring.sql_error_in_getting_byte_content=Erreur SQL en récupérant le contenu +cms.ui.authoring.select_an_existing_image=S\u00e9lectionner une image existante +cms.ui.authoring.sql_error_in_getting_byte_content=Erreur SQL en r\u00e9cup\u00e9rant le contenu cms.ui.authoring.sqle=TRANSLATE THIS: SQLE (cms.ui.authoring.sqle) -cms.ui.authoring.submission_cancelled=Soumission annulée +cms.ui.authoring.submission_cancelled=Soumission annul\u00e9e cms.ui.authoring.text_type=Type de texte cms.ui.authoring.this_article_does_not_have_an_image=Cet article n'a pas d'illustation. cms.ui.authoring.title=Titre cms.ui.authoring.unable_to_load_file=Impossible de charger le fichier -cms.ui.authoring.upload_a_new_image=Télécharger une nouvelle image -cms.ui.authoring.upload_image=Télécharger l'image +cms.ui.authoring.upload_a_new_image=T\u00e9l\u00e9charger une nouvelle image +cms.ui.authoring.upload_image=T\u00e9l\u00e9charger l'image cms.ui.authoring.workflow=TRANSLATE THIS: Select a Workflow (cms.ui.authoring.workflow) # Package com.arsdigita.cms.ui.authoringkit # ========================================= -cms.ui.authoringkit.authoring_kit_for=Kit d'écriture pour +cms.ui.authoringkit.authoring_kit_for=Kit d'\u00e9criture pour cms.ui.authoringkit.component=Composant cms.ui.authoringkit.content_type_id=Type de contenu ID# -cms.ui.authoringkit.create_component=Créer le composant -cms.ui.authoringkit.createcomponent=Créer le composant +cms.ui.authoringkit.create_component=Cr\u00e9er le composant +cms.ui.authoringkit.createcomponent=Cr\u00e9er le composant cms.ui.authoringkit.current_row_does_not_exists=La ligne en cours n'exsite pas cms.ui.authoringkit.description=Description -cms.ui.authoringkit.do_you_really_want_to_delete_this_authoring_step=Etes-vous sur de vouloir effacer cette étape d'écriture ? +cms.ui.authoringkit.do_you_really_want_to_delete_this_authoring_step=Etes-vous sur de vouloir effacer cette \u00e9tape d'\u00e9criture ? cms.ui.authoringkit.label=Etiquette cms.ui.authoringkit.ordering=Commande -cms.ui.authoringkit.submission_cancelled=Soumission annulée +cms.ui.authoringkit.submission_cancelled=Soumission annul\u00e9e # Package com.arsdigita.cms.ui.category # ===================================== cms.ui.category.add_a_subcategory=Ajouter une sous-rubrique cms.ui.category.add_index_item=Mettre la page d'accueil -cms.ui.category.assigned_purposes=Objectifs assignés +cms.ui.category.assigned_purposes=Objectifs assign\u00e9s cms.ui.category.available_purposes=Objectifs disponibles cms.ui.category.back= (retour)  cms.ui.category.batch_categorized_objects=Groupe d'ordre des objets de cette rubrique -cms.ui.category.batch_order_objects_order=Priorité +cms.ui.category.batch_order_objects_order=Priorit\u00e9 cms.ui.category.batch_order_objects_title=Titre cms.ui.category.categorized_objects=Ordonner les objets de cette rubrique cms.ui.category.category_information=Rubrique d'information cms.ui.category.category_purposes=Objectifs de la rubrique cms.ui.category.change_index_item=Changer la page d'accueil -cms.ui.category.content_item=Elément de contenu +cms.ui.category.content_item=El\u00e9ment de contenu cms.ui.category.current_category=Rubrique en cours cms.ui.category.delete_category=Effacer la rubrique cms.ui.category.descriptionn=Description:\n @@ -275,24 +275,24 @@ cms.ui.category.edit=Modifier cms.ui.category.edit_a_category=Modifier une rubrique cms.ui.category.edit_links=Modifier les liens cms.ui.category.edit_purposes=Modifier les objectifs -cms.ui.category.extreme_actions=Actoins extrêmes +cms.ui.category.extreme_actions=Actoins extr\u00eames cms.ui.category.is_abstract=TRANSLATE THIS: Can you place objects in this category? (cms.ui.category.is_abstract) cms.ui.category.labeln=Etiquette:\n cms.ui.category.labeln=Etiquette:\n -cms.ui.category.linked_categories=Rubriques liées -cms.ui.category.no_categorized_objects=Il n'y a pas d'objet classé +cms.ui.category.linked_categories=Rubriques li\u00e9es +cms.ui.category.no_categorized_objects=Il n'y a pas d'objet class\u00e9 cms.ui.category.no_category_purposes=Pas d'objectif -cms.ui.category.no_linked_categories=Pas de rubrique liée +cms.ui.category.no_linked_categories=Pas de rubrique li\u00e9e cms.ui.category.no_subcategories=Pas de sous-rubrique cms.ui.category.no_subcategories=Pas de sous-rubrique -cms.ui.category.restore_default_permissions=Remettre les droits par défaut -cms.ui.category.return_to_category_info=Retourner à la rubrique d'information -cms.ui.category.select_index_item=Sélectionnez la page d'accueil de la rubrique +cms.ui.category.restore_default_permissions=Remettre les droits par d\u00e9faut +cms.ui.category.return_to_category_info=Retourner \u00e0 la rubrique d'information +cms.ui.category.select_index_item=S\u00e9lectionnez la page d'accueil de la rubrique cms.ui.category.subcategories=Sous-rubriques cms.ui.category.subcategories=Sous-rubriques -cms.ui.category.there_are_no_items_in_this_category=Il n'y a pas d'élément dans cette rubrique +cms.ui.category.there_are_no_items_in_this_category=Il n'y a pas d'\u00e9l\u00e9ment dans cette rubrique cms.ui.category.url=URL -# cms.ui.category.use_custom_permissions=Utiliser les droits personnalisés +# cms.ui.category.use_custom_permissions=Utiliser les droits personnalis\u00e9s # Package com.arsdigita.cms.ui.cse @@ -308,10 +308,10 @@ cms.ui.cse.endDateTime=Live Until # Package com.arsdigita.cms.ui.folder # =================================== -cms.ui.folder.cancelled=Annulé -cms.ui.folder.cannot_find_a_root_folder=Impossible de trouver le répertoire racine +cms.ui.folder.cancelled=Annul\u00e9 +cms.ui.folder.cannot_find_a_root_folder=Impossible de trouver le r\u00e9pertoire racine cms.ui.folder.na=N/A -cms.ui.folder.no_source_items_specified=Pas d'élément source spécifié +cms.ui.folder.no_source_items_specified=Pas d'\u00e9l\u00e9ment source sp\u00e9cifi\u00e9 cms.ui.folder.parent=Parent Folder cms.ui.folder.rename=Rename folder @@ -326,51 +326,51 @@ cms.ui.formbuilder.title=Titre # Package com.arsdigita.cms.ui.item # ================================= -cms.ui.item.access_denied=Accès refusé +cms.ui.item.access_denied=Acc\u00e8s refus\u00e9 cms.ui.item.apply_a_lifecycle=Appliquer un cycle de vie cms.ui.item.current_row_does_not_exist=La ligne en cours n'exsite pas cms.ui.item.edit_lifecycle=Modifier le cycle de vie cms.ui.item.end_date=Date de fin   cms.ui.item.end_time=Heure de fin   -cms.ui.item.end_time_incomplete=Heure de fin incomplète +cms.ui.item.end_time_incomplete=Heure de fin incompl\u00e8te cms.ui.item.invalid_end_date_please_try_again=Date de fin invalide, veuillez en choisir une autre -cms.ui.item.invalid_start_date_please_try_again=Date de début invalide, veuillez en choisir une autre +cms.ui.item.invalid_start_date_please_try_again=Date de d\u00e9but invalide, veuillez en choisir une autre cms.ui.item.lifecycle=Cycle de vie cms.ui.item.reapply_a_lifecycle=Appliquer un autre cycle de vie cms.ui.item.republish=Republier -cms.ui.item.start_date=Date de début -cms.ui.item.start_time=Heure de début -cms.ui.item.start_time_incomplete=Heure de début incomplète -cms.ui.item.submission_cancelled=Soumission abandonnée +cms.ui.item.start_date=Date de d\u00e9but +cms.ui.item.start_time=Heure de d\u00e9but +cms.ui.item.start_time_incomplete=Heure de d\u00e9but incompl\u00e8te +cms.ui.item.submission_cancelled=Soumission abandonn\u00e9e cms.ui.item.the_current_row_does_not_exists=La ligne en cours n'exsite pas -cms.ui.item.unpublish=Dépublier +cms.ui.item.unpublish=D\u00e9publier # Package com.arsdigita.cms.ui.lifecycle # ====================================== cms.ui.lifecycle.add=Create new lifecycle -cms.ui.lifecycle.add_a_phase=Ajouter une étape -cms.ui.lifecycle.add_phase=Ajouter une étape -cms.ui.lifecycle.create_a_lifecycle=Créer un cycle de vie +cms.ui.lifecycle.add_a_phase=Ajouter une \u00e9tape +cms.ui.lifecycle.add_phase=Ajouter une \u00e9tape +cms.ui.lifecycle.create_a_lifecycle=Cr\u00e9er un cycle de vie cms.ui.lifecycle.days=Jours cms.ui.lifecycle.delete_prompt=Please translate: Are you sure you want to delete this lifecycle? cms.ui.lifecycle.delete=Effacer le cycle de vie cms.ui.lifecycle.description=Description cms.ui.lifecycle.details=Please translate: Lifecycle details -cms.ui.lifecycle.duration=Durée +cms.ui.lifecycle.duration=Dur\u00e9e cms.ui.lifecycle.edit=Modifier # cms.ui.lifecycle.edit_a_lifecycle=Modifier un cycle de vie -# cms.ui.lifecycle.edit_a_phase=Modifier une étape -# cms.ui.lifecycle.extreme_actions=Actions extrêmes -# cms.ui.lifecycle.failed_to_generate_new_phase_id=Echec dans la génération de l'identifiant de la nouvelle étape +# cms.ui.lifecycle.edit_a_phase=Modifier une \u00e9tape +# cms.ui.lifecycle.extreme_actions=Actions extr\u00eames +# cms.ui.lifecycle.failed_to_generate_new_phase_id=Echec dans la g\u00e9n\u00e9ration de l'identifiant de la nouvelle \u00e9tape cms.ui.lifecycle.hours=Heures -# cms.ui.lifecycle.insufficient_privileges=Droits d'accès insuffisant +# cms.ui.lifecycle.insufficient_privileges=Droits d'acc\u00e8s insuffisant cms.ui.lifecycle.label=Etiquette cms.ui.lifecycle.lifecycle_information=Information sur le cycle de vie cms.ui.lifecycle.mins=Minutes -cms.ui.lifecycle.no_lifecycles_defined_for_this_section=Pas de cycle de vie défini pour ce répertoire +cms.ui.lifecycle.no_lifecycles_defined_for_this_section=Pas de cycle de vie d\u00e9fini pour ce r\u00e9pertoire cms.ui.lifecycle.phases=Etapes -cms.ui.lifecycle.start_delay=Délai de début +cms.ui.lifecycle.start_delay=D\u00e9lai de d\u00e9but # Package com.arsdigita.cms.ui.permissions @@ -381,25 +381,25 @@ cms.ui.permissions.cannot_retrieve_party=Impossible de trouver la partie cms.ui.permissions.column_index=Colonne d'index cms.ui.permissions.could_not_find_this_object=Impossible de trouver cet objet cms.ui.permissions.current_object_is_null=L'objet en cours est nul -cms.ui.permissions.no_users_were_selected=Pas d'utilisateur séléctionné +cms.ui.permissions.no_users_were_selected=Pas d'utilisateur s\u00e9l\u00e9ctionn\u00e9 cms.ui.permissions.not_an_object_adminstrator=Ce n'est pas un administrateur d'objet cms.ui.permissions.out_of_bounds=En dehors de la plage cms.ui.permissions.remove=Effacer -cms.ui.permissions.return_to_object_info=Retourner à l'information de l'objet -cms.ui.permissions.these_are_the_current_permissions_for_this_folder=Voici les droits personnalisés qui ont été accordés pour cet répertoire -cms.ui.permissions.these_are_the_custom_permissions_that_have_been_granted_on_this_object=Voici les droits personnalisés qui ont été accordés pour cet objet +cms.ui.permissions.return_to_object_info=Retourner \u00e0 l'information de l'objet +cms.ui.permissions.these_are_the_current_permissions_for_this_folder=Voici les droits personnalis\u00e9s qui ont \u00e9t\u00e9 accord\u00e9s pour cet r\u00e9pertoire +cms.ui.permissions.these_are_the_custom_permissions_that_have_been_granted_on_this_object=Voici les droits personnalis\u00e9s qui ont \u00e9t\u00e9 accord\u00e9s pour cet objet cms.ui.permissions=Droits utilisateurs -cms.ui.preview=Prévisualiser +cms.ui.preview=Pr\u00e9visualiser cms.ui.remove=retirer -cms.ui.restore_default_permissions=Remettre les droits par défaut -cms.ui.roles=rôles +cms.ui.restore_default_permissions=Remettre les droits par d\u00e9faut +cms.ui.roles=r\u00f4les cms.ui.save=enregistrer cms.ui.search=rechercher cms.ui.search_to_add_new_members=Recherche pour ajouter de nouveaux membres cms.ui.search_to_add_new_members=Recherche pour ajouter de nouveaux membres -cms.ui.sign_out=se déconnecter -cms.ui.submission_cancelled=Soumission abandonnée +cms.ui.sign_out=se d\u00e9connecter +cms.ui.submission_cancelled=Soumission abandonn\u00e9e cms.ui.staff.add_administrator=Ajouter un administrateur cms.ui.staff.back=Retour @@ -407,64 +407,64 @@ cms.ui.staff.cancel_hit=Abandonner cms.ui.staff.cannot_add_user=Impossible d'ajouter un utilisateur cms.ui.staff.cannot_retrieve_party=Impossible de trouver la partie cms.ui.staff.column_index=Colonne d'index -cms.ui.staff.create_a_role=Créer un rôle +cms.ui.staff.create_a_role=Cr\u00e9er un r\u00f4le cms.ui.staff.current_party_is_not_a_user=La partie en cours n'est pas un utilisateur -cms.ui.staff.delete_role=Effacer le rôle +cms.ui.staff.delete_role=Effacer le r\u00f4le cms.ui.staff.description=Description cms.ui.staff.description=Description -cms.ui.staff.edit_a_role=Modifier Un rôle -cms.ui.staff.invalid_role=Rôle invalide +cms.ui.staff.edit_a_role=Modifier Un r\u00f4le +cms.ui.staff.invalid_role=R\u00f4le invalide cms.ui.staff.label=Etiquette cms.ui.staff.label=Etiquette -cms.ui.staff.no_roles_defined_for_this_section=Pas de rôle affecté à ce repertoire -cms.ui.staff.no_users_were_selected=Pas d'utilisateur séléctionné -cms.ui.staff.no_usersgroups_were_selected=Pas d'utilisateur/groupe séléctionné -cms.ui.staff.not_a_role_adminstrator=Pas d'administrateur de rôle -cms.ui.staff.not_an_administrator_for_roles=pas un administrateur pour les rôles -cms.ui.staff.not_an_administrator_for_this_role=pas un administrateur pour ce rôle +cms.ui.staff.no_roles_defined_for_this_section=Pas de r\u00f4le affect\u00e9 \u00e0 ce repertoire +cms.ui.staff.no_users_were_selected=Pas d'utilisateur s\u00e9l\u00e9ctionn\u00e9 +cms.ui.staff.no_usersgroups_were_selected=Pas d'utilisateur/groupe s\u00e9l\u00e9ctionn\u00e9 +cms.ui.staff.not_a_role_adminstrator=Pas d'administrateur de r\u00f4le +cms.ui.staff.not_an_administrator_for_roles=pas un administrateur pour les r\u00f4les +cms.ui.staff.not_an_administrator_for_this_role=pas un administrateur pour ce r\u00f4le cms.ui.staff.out_of_bounds=En dehors de la plage -cms.ui.staff.privileges=Droits accordés -cms.ui.staff.privileges=Droits accordés +cms.ui.staff.privileges=Droits accord\u00e9s +cms.ui.staff.privileges=Droits accord\u00e9s cms.ui.staff.remove=Effacer cms.ui.staff.remove=effacer -cms.ui.staff.return_to_role_info=Retourner à l'information du rôle -cms.ui.staff.role_details=Détail du rôle -cms.ui.staff.there_are_no_administrators_for_this_role=Il n'y a pas d'administrateur pour ce rôle -cms.ui.staff.there_are_no_roles_to_display=Il n'y a pas de rôle à afficher +cms.ui.staff.return_to_role_info=Retourner \u00e0 l'information du r\u00f4le +cms.ui.staff.role_details=D\u00e9tail du r\u00f4le +cms.ui.staff.there_are_no_administrators_for_this_role=Il n'y a pas d'administrateur pour ce r\u00f4le +cms.ui.staff.there_are_no_roles_to_display=Il n'y a pas de r\u00f4le \u00e0 afficher -cms.ui.templates.assign_a_template_to=Assigner un gabarit à +cms.ui.templates.assign_a_template_to=Assigner un gabarit \u00e0 cms.ui.templates.assign_template=Assigner un gabarit cms.ui.templates.assign_this_template=Assigner ce gabarit -cms.ui.templates.assigned_templates=Gabarits assignés +cms.ui.templates.assigned_templates=Gabarits assign\u00e9s cms.ui.templates.default=Defaut cms.ui.templates.dummy=TRANSLATE THIS: dummy (cms.ui.templates.dummy) cms.ui.templates.label=Etiquette cms.ui.templates.name=Nom cms.ui.templates.no_templates=Pas de gabarit -cms.ui.templates.not_implemented=Non implémenté -cms.ui.templates.preview=Prévisualiser +cms.ui.templates.not_implemented=Non impl\u00e9ment\u00e9 +cms.ui.templates.preview=Pr\u00e9visualiser cms.ui.templates.remove=Supprimer -cms.ui.templates.set_as_default=Mettre par défaut +cms.ui.templates.set_as_default=Mettre par d\u00e9faut cms.ui.templates.use_context=TRANSLATE THIS: Use Context: (cms.ui.templates.use_context) -cms.ui.the_model_is_empty=Le modèle est vide -cms.ui.there_are_no_items=Il n'y a pas d'élement -cms.ui.there_was_no_one_matching_the_search_criteria=Il n'y a aucun résultat avec ce critère de recherche -cms.ui.there_was_no_one_matching_the_search_criteria=Il n'y a aucun résultat avec ce critère de recherche +cms.ui.the_model_is_empty=Le mod\u00e8le est vide +cms.ui.there_are_no_items=Il n'y a pas d'\u00e9lement +cms.ui.there_was_no_one_matching_the_search_criteria=Il n'y a aucun r\u00e9sultat avec ce crit\u00e8re de recherche +cms.ui.there_was_no_one_matching_the_search_criteria=Il n'y a aucun r\u00e9sultat avec ce crit\u00e8re de recherche cms.ui.this_should_never_happen=Ceci ne se produira jamais -cms.ui.type.access_denied=Accès refusé +cms.ui.type.access_denied=Acc\u00e8s refus\u00e9 cms.ui.type.add_a_template=Ajouter un gabarit cms.ui.type.association_content_type=Association au type de contenu cms.ui.type.available_content_types=Types de contenu disponibles cms.ui.type.class_name=Nom de la classe -cms.ui.type.content_type_already_exists_for_this_content_section_please_choose_a_different_name=Le type de contenu "{0}" exist déjà pour ce répertoire de contenu, veuillez choisir un nom différent. +cms.ui.type.content_type_already_exists_for_this_content_section_please_choose_a_different_name=Le type de contenu "{0}" exist d\u00e9j\u00e0 pour ce r\u00e9pertoire de contenu, veuillez choisir un nom diff\u00e9rent. cms.ui.type.current_row_does_not_exist=La ligne en cours n'existe pas -cms.ui.type.data_entry_method=Saisie de données -cms.ui.type.default_lifecycle=Cycle de vie par défaut -cms.ui.type.default_lifecycle=Cycle de vie par défaut -cms.ui.type.default_lifecycle=Cycle de vie par défaut -cms.ui.type.default_workflow=Déroulement des opérations par défaut -cms.ui.type.default_workflow=Déroulement des opérations par défaut -cms.ui.type.define_a_new_content_type=Définir un nouveau type de contenu +cms.ui.type.data_entry_method=Saisie de donn\u00e9es +cms.ui.type.default_lifecycle=Cycle de vie par d\u00e9faut +cms.ui.type.default_lifecycle=Cycle de vie par d\u00e9faut +cms.ui.type.default_lifecycle=Cycle de vie par d\u00e9faut +cms.ui.type.default_workflow=D\u00e9roulement des op\u00e9rations par d\u00e9faut +cms.ui.type.default_workflow=D\u00e9roulement des op\u00e9rations par d\u00e9faut +cms.ui.type.define_a_new_content_type=D\u00e9finir un nouveau type de contenu cms.ui.type.description=Description cms.ui.type.description=Description cms.ui.type.description=Description @@ -472,7 +472,7 @@ cms.ui.type.edit=Modifier cms.ui.type.element_type=Format de contenu cms.ui.type.foo_me_=TRANSLATE THIS: Foo Me ! (cms.ui.type.foo_me_) cms.ui.type.from=De -cms.ui.type.if_yes_please_choose_a_default_date=Si oui, veuillez choisir une date par défaut +cms.ui.type.if_yes_please_choose_a_default_date=Si oui, veuillez choisir une date par d\u00e9faut cms.ui.type.invalid_content_type=Type de contenu invalide cms.ui.type.is_a_value_required=Est-ce que la valeur est requise ? cms.ui.type.is_a_value_required=Est-ce que la valeur est requise ? @@ -483,64 +483,65 @@ cms.ui.type.maximum_length=Dimension maximum cms.ui.type.maximum_value=Valeur maximum cms.ui.type.minimum_number_of_values_bigger_than_maximum_number_of_values=Le nombre minimum de valeurs est plus grand que le nombre maximum de valeurs cms.ui.type.minimum_value=Valeur minimum -cms.ui.type.minimummaximum_number_of_values_cannot_be_negative=Le rapport entre le nombre minimum et le nombre maximum de valeurs ne peut pas être négatif +cms.ui.type.minimummaximum_number_of_values_cannot_be_negative=Le rapport entre le nombre minimum et le nombre maximum de valeurs ne peut pas \u00eatre n\u00e9gatif cms.ui.type.name=Nom cms.ui.type.name=Nom -cms.ui.type.not_implemented=Non implémenté -cms.ui.type.number_of_decimal_places=Nombre de positions décimales +cms.ui.type.not_implemented=Non impl\u00e9ment\u00e9 +cms.ui.type.number_of_decimal_places=Nombre de positions d\u00e9cimales cms.ui.type.object_type=Type d'objet cms.ui.type.parent_content_type=Parent du type de contenu -cms.ui.type.please_enter_a_4_digit_year_between_1900__2000=Veuillez entrer les 4 chiffre de l'année entre 1900 et 2000 -cms.ui.type.please_fill_in_both_start_and_end_years=Veuillez remplir l'année de début et de fin -cms.ui.type.please_select_a_content_type_to_view_its_details=Veuillez séléctionner un type de contenu pour en voir le détail -cms.ui.type.please_select_a_year_range_yyyy_=Veuillez selectionner une année (aaaa) +cms.ui.type.please_enter_a_4_digit_year_between_1900__2000=Veuillez entrer les 4 chiffre de l'ann\u00e9e entre 1900 et 2000 +cms.ui.type.please_fill_in_both_start_and_end_years=Veuillez remplir l'ann\u00e9e de d\u00e9but et de fin +cms.ui.type.please_select_a_content_type_to_view_its_details=Veuillez s\u00e9l\u00e9ctionner un type de contenu pour en voir le d\u00e9tail +cms.ui.type.please_select_a_year_range_yyyy_=Veuillez selectionner une ann\u00e9e (aaaa) cms.ui.type.remove=Effacer -cms.ui.type.submission_cancelled=Soumission annulée -cms.ui.type.the_name_of_the_content_type_must_be_alphanumeric=Le nom de ce type de contenu doit être alphanumerique +cms.ui.type.submission_cancelled=Soumission annul\u00e9e +cms.ui.type.the_name_of_the_content_type_must_be_alphanumeric=Le nom de ce type de contenu doit \u00eatre alphanumerique cms.ui.type.the_name_of_the_content_type_must_not_include_whitespace=Le nom de ce type de contenu ne doit pas contenir d'espaces -cms.ui.type.the_range_is_too_wide_to_be_displayed=La gamme est trop grande pour pouvoir être affichée -cms.ui.type.the_start_year_cant_be_after_the_end_year=L'année de début ne peut pas être supérieure à l'année de fin -cms.ui.type.the_years_can_not_be_negative=Les années ne peuvent pas être négatives +cms.ui.type.the_range_is_too_wide_to_be_displayed=La gamme est trop grande pour pouvoir \u00eatre affich\u00e9e +cms.ui.type.the_start_year_cant_be_after_the_end_year=L'ann\u00e9e de d\u00e9but ne peut pas \u00eatre sup\u00e9rieure \u00e0 l'ann\u00e9e de fin +cms.ui.type.the_years_can_not_be_negative=Les ann\u00e9es ne peuvent pas \u00eatre n\u00e9gatives cms.ui.type.title=Titre -cms.ui.type.to=à -cms.ui.upload_new_content=Transférer un nouveau contenu sur le site -cms.ui.use_custom_permissions=Utiliser les droits personnalisés +cms.ui.type.to=\u00e0 +cms.ui.upload_new_content=Transf\u00e9rer un nouveau contenu sur le site +cms.ui.use_custom_permissions=Utiliser les droits personnalis\u00e9s cms.ui.util.=  -cms.ui.view_all_enabled_tasks=Voir toutes les tâches activées -cms.ui.view_all_enabled_tasks=Voir toutes les tâches {0} disponibles -cms.ui.view_tasks_sorted_by_due_date=Voir les tâches classées par date +cms.ui.view_all_enabled_tasks=Voir toutes les t\u00e2ches activ\u00e9es +cms.ui.view_all_enabled_tasks=Voir toutes les t\u00e2ches {0} disponibles +cms.ui.view_tasks_sorted_by_due_date=Voir les t\u00e2ches class\u00e9es par date cms.ui.viewers=lecteurs -cms.ui.workflow.add_a_new_task_to=Ajouter une nouvelles tâche à -cms.ui.workflow.add_task=Ajouter une tâche +cms.ui.workflow.add_a_new_task_to=Ajouter une nouvelles t\u00e2che \u00e0 +cms.ui.workflow.add_task=Ajouter une t\u00e2che cms.ui.workflow.approve_this_content=Valider ce contenu ? -cms.ui.workflow.assign_roles_for=Assigner les rôles pour +cms.ui.workflow.assign_roles_for=Assigner les r\u00f4les pour cms.ui.workflow.cancel_hit= Abandonner cms.ui.workflow.comment=Commentaire cms.ui.workflow.comment=Commentaire cms.ui.workflow.delete_user=Supprimer cet utilisateur -cms.ui.workflow.delete_workflow=Effacer le déroulement des opérations -cms.ui.workflow.depends_on=Dépendant de +cms.ui.workflow.delete_workflow=Effacer le d\u00e9roulement des op\u00e9rations +cms.ui.workflow.depends_on=D\u00e9pendant de cms.ui.workflow.description=Description cms.ui.workflow.description=Description -cms.ui.workflow.edit_task_in=Modifier la tâche dans -cms.ui.workflow.extreme_actions=Actions extrêmes -cms.ui.workflow.insufficient_privileges=Droits d'accès insuffisants +cms.ui.workflow.edit_task_in=Modifier la t\u00e2che dans +cms.ui.workflow.extreme_actions=Actions extr\u00eames +cms.ui.workflow.insufficient_privileges=Droits d'acc\u00e8s insuffisants cms.ui.workflow.name=Nom cms.ui.workflow.name=Nom -cms.ui.workflow.no_users_were_selected=Pas d'utilisateur séléctioné -cms.ui.workflow.restart_stopped_workflow=reprendre le déroulement des opérations -cms.ui.workflow.roles=Rôles -cms.ui.workflow.stop_workflow=Arrêter le déroulement des opérations -cms.ui.workflow.task=Tâches -cms.ui.workflow.tasks=Tâches -cms.ui.workflow.workflow_information=Information sur le déroulement des opérations -cms.ui.workflow.workflow_information=Information sur le déroulement des opérations -cms.ui.workflow.you_are_assigned_to_this_item=Vous êtes assigné à cet élément -cms.ui.workflow.your_active_tasks=Vos tâches actives +cms.ui.workflow.no_users_were_selected=Pas d'utilisateur s\u00e9l\u00e9ction\u00e9 +cms.ui.workflow.restart_stopped_workflow=reprendre le d\u00e9roulement des op\u00e9rations +cms.ui.workflow.roles=R\u00f4les +cms.ui.workflow.stop_workflow=Arr\u00eater le d\u00e9roulement des op\u00e9rations +cms.ui.workflow.task=T\u00e2ches +cms.ui.workflow.tasks=T\u00e2ches +cms.ui.workflow.workflow_information=Information sur le d\u00e9roulement des op\u00e9rations +cms.ui.workflow.workflow_information=Information sur le d\u00e9roulement des op\u00e9rations +cms.ui.workflow.you_are_assigned_to_this_item=Vous \u00eates assign\u00e9 \u00e0 cet \u00e9l\u00e9ment +cms.ui.workflow.your_active_tasks=Vos t\u00e2ches actives cms.ui.workflows=Workflows -cms.ui.you_do_not_have_sufficient_privileges_to_access_this_page=Vous n'êtes pas autorisé à voir cette page. +cms.ui.you_do_not_have_sufficient_privileges_to_access_this_page=Vous n'\u00eates pas autoris\u00e9 \u00e0 voir cette page. no=Non yes=Oui cms.contenttypes.ui.address.uri=URL (TRANSLATE THIS cms.contenttypes.ui.address.uri) cms.contenttypes.ui.address.email.desc=Means of contacting someone at this address (TRANSLATE THIS cms.contenttypes.ui.address.email.desc) cms.contenttypes.ui.address.uri.desc=A URL to find more information about this Address (TRANSLATE THIS cms.contenttypes.ui.address.uri.desc) +cms.contenttypes.shared.basic_properties.title= diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties b/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties index 53c3b2d3c..547ba47e6 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources.properties @@ -117,3 +117,14 @@ sciorganization.ui.department.project.confirm_remove=Are you sure to remove this cms.ui.unknownRole=Unknown role cms.ui.unknownStatus=Unknown status Status=Status +cms.contenttypes.ui.genericorgaunit.person.status=Status +#Basic properties +cms.contenttypes.shared.basic_properties.title=Basic properties +cms.contenttypes.ui.person_contact.up=Up +#Down +cms.contenttypes.ui.person_contact.down=Down +cms.contenttypes.ui.person.contact.type=Contact type +#Contact +cms.contenttypes.ui.person.contact.title=Contact +#L\u00f6schen +cms.contenttypes.ui.person.contact.del=Delete diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties b/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties index 25367b1c0..7dba40169 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ContenttypesResources_de.properties @@ -128,3 +128,14 @@ cms.contenttypes.ui.contact.contactEntry.key.im=Instant Messanger cms.contenttypes.ui.contact.contactEntry.key.www=Homepage cms.ui.unknownStatus=Unkannter Status Status=Status +cms.contenttypes.ui.genericorgaunit.person.status=Status +#Basic properties +cms.contenttypes.shared.basic_properties.title=Basiseigenschaften +cms.contenttypes.ui.person_contact.up=Hoch +#Down +cms.contenttypes.ui.person_contact.down=Runter +cms.contenttypes.ui.person.contact.type=Kontakttyp +#Contact +cms.contenttypes.ui.person.contact.title=Kontakt +#L\u00f6schen +cms.contenttypes.ui.person.contact.del=L\u00f6schen diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnit.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnit.java index 193d2b71a..f32a774c8 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnit.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnit.java @@ -50,6 +50,7 @@ public class GenericOrganizationalUnit extends ContentPage { public final static String CONTACT_ORDER = "contact_order"; public final static String PERSONS = "persons"; public final static String ROLE = "role_name"; + public final static String STATUS = "status"; public final static String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.GenericOrganizationalUnit"; @@ -115,12 +116,13 @@ public class GenericOrganizationalUnit extends ContentPage { return new GenericOrganizationalUnitPersonCollection(dataColl); } - public void addPerson(GenericPerson person, String role) { + public void addPerson(GenericPerson person, String role, String status) { Assert.exists(person, GenericPerson.class); DataObject link = add(PERSONS, person); link.set(ROLE, role); + link.set(STATUS, status); link.save(); } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitPersonCollection.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitPersonCollection.java index 9666964a3..db07a5e24 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitPersonCollection.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnitPersonCollection.java @@ -19,6 +19,7 @@ package com.arsdigita.cms.contenttypes; import com.arsdigita.domain.DomainCollection; +import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.persistence.DataCollection; /** @@ -29,6 +30,7 @@ import com.arsdigita.persistence.DataCollection; public class GenericOrganizationalUnitPersonCollection extends DomainCollection { public static final String PERSON_ROLE = "link.role_name"; + public static final String STATUS = "link.status"; public GenericOrganizationalUnitPersonCollection( DataCollection dataCollection) { @@ -45,7 +47,12 @@ public class GenericOrganizationalUnitPersonCollection extends DomainCollection return (String) m_dataCollection.get(PERSON_ROLE); } + public String getStatus() { + return (String) m_dataCollection.get(STATUS); + } + public GenericPerson getPerson() { - return new GenericPerson(m_dataCollection.getDataObject()); + return (GenericPerson) DomainObjectFactory.newInstance(m_dataCollection. + getDataObject()); } } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPersonContactCollection.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPersonContactCollection.java index 9abfd63e7..74817551a 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPersonContactCollection.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericPersonContactCollection.java @@ -1,16 +1,8 @@ -/* - * HealthCareFacilityContactCollection.java - * - * Created on 26. Juli 2009, 15:30 - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - package com.arsdigita.cms.contenttypes; import com.arsdigita.domain.DomainCollection; import com.arsdigita.persistence.DataCollection; +import com.arsdigita.persistence.DataObject; import java.math.BigDecimal; /** @@ -18,38 +10,134 @@ import java.math.BigDecimal; * @author quasi */ public class GenericPersonContactCollection extends DomainCollection { - - public static final String ORDER = "link." + GenericPerson.CONTACTS_ORDER + " asc"; - public static final String CONTACTS_KEY = "link." + GenericPerson.CONTACTS_KEY; - public static final String CONTACTS_ORDER = "link." + GenericPerson.CONTACTS_ORDER; - + + public static final String ORDER = "link." + GenericPerson.CONTACTS_ORDER + + " asc"; + public static final String CONTACTS_KEY = "link." + + GenericPerson.CONTACTS_KEY; + public static final String CONTACTS_ORDER = "link." + + GenericPerson.CONTACTS_ORDER; + /** * Creates a new instance of GenericPersonContactCollection */ public GenericPersonContactCollection(DataCollection dataCollection) { super(dataCollection); - + m_dataCollection.addOrder(ORDER); } - + // Get the contact type of the link public String getContactType() { return (String) m_dataCollection.get(CONTACTS_KEY); } - + // Get the contact order of the link public String getContactOrder() { - String retVal = ((BigDecimal) m_dataCollection.get(CONTACTS_ORDER)).toString(); - - if(retVal == null || retVal.isEmpty()) { + String retVal = ((BigDecimal) m_dataCollection.get(CONTACTS_ORDER)). + toString(); + + if (retVal == null || retVal.isEmpty()) { retVal = String.valueOf(this.getPosition()); } - + return retVal; } - + + public void setContactOrder(BigDecimal order) { + DataObject link = (DataObject) this.get("link"); + + link.set(CONTACTS_ORDER, order); + } + + public void swapWithNext(GenericContact contact) { + int currentPos = 0; + int currentIndex = 0; + int nextIndex = 0; + + this.rewind(); + while (this.next()) { + currentPos = this.getPosition(); + currentIndex = Integer.parseInt(this.getContactOrder()); + if (this.getContact().equals(contact)) { + break; + } + } + + if (currentPos == 0) { + throw new IllegalArgumentException( + String.format( + "The provided contact is not " + + "part of this collection.")); + } + + if (this.next()) { + nextIndex = Integer.parseInt(this.getContactOrder()); + } else { + throw new IllegalArgumentException( + "The provided contact is the last " + + "in the collection, so there is no next object " + + "to swap with."); + } + + this.rewind(); + + while (this.getPosition() != currentPos) { + this.next(); + } + + this.setContactOrder(new BigDecimal(nextIndex)); + this.next(); + this.setContactOrder(new BigDecimal(currentIndex)); + this.rewind(); + } + + public void swapWithPrevious(GenericContact contact) { + int previousPos = 0; + int previousIndex = 0; + int currentPos = 0; + int currentIndex = 0; + + this.rewind(); + while (this.next()) { + currentPos = this.getPosition(); + currentIndex = Integer.parseInt(this.getContactOrder()); + + if (this.getContact().equals(contact)) { + break; + } + + previousPos = currentPos; + previousIndex = currentIndex; + } + + if (currentPos == 0) { + throw new IllegalArgumentException( + String.format( + "The provided contact is not " + + "part of this collection.")); + } + + if (previousPos == 0) { + throw new IllegalArgumentException( + String.format( + "The provided contact is the first one in this " + + "collection, so there is no previous one to switch " + + "with.")); + } + + this.rewind(); + while (this.getPosition() != previousPos) { + this.next(); + } + + this.setContactOrder(new BigDecimal(currentIndex)); + this.next(); + this.setContactOrder(new BigDecimal(previousIndex)); + this.rewind(); + } + public GenericContact getContact() { return new GenericContact(m_dataCollection.getDataObject()); } - } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/CompoundContentItemPanel.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/CompoundContentItemPanel.java new file mode 100644 index 000000000..bc2f54f04 --- /dev/null +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/CompoundContentItemPanel.java @@ -0,0 +1,346 @@ +/* + * Copyright (c) 2010 Jens Pelzetter, + * for the Center of Social Politics of the University of Bremen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.Page; +import com.arsdigita.bebop.PageState; +import com.arsdigita.bebop.SimpleComponent; +import com.arsdigita.bebop.parameters.IntegerParameter; +import com.arsdigita.bebop.parameters.StringParameter; +import com.arsdigita.cms.CMS; +import com.arsdigita.cms.CMSContext; +import com.arsdigita.cms.ContentBundle; +import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.ContentSection; +import com.arsdigita.cms.ExtraXMLGenerator; +import com.arsdigita.cms.dispatcher.XMLGenerator; +import com.arsdigita.dispatcher.DispatcherHelper; +import com.arsdigita.web.ParameterMap; +import com.arsdigita.web.URL; +import com.arsdigita.web.Web; +import com.arsdigita.xml.Element; +import java.util.Iterator; +import org.apache.log4j.Logger; + +/** + * + * @author Jens Pelzetter + */ +public abstract class CompoundContentItemPanel + extends SimpleComponent + implements ExtraXMLGenerator { + + private static final Logger s_log = Logger.getLogger( + CompoundContentItemPanel.class); + /** + * Item to show (if injected) + */ + private ContentItem m_item = null; + /** + * Constant for the show parameter + */ + private static final String SHOW_PARAM = "show"; + /** + * Parameter which indicates which page to show + */ + protected StringParameter m_show; + private static final String PAGE_NUMBER = "pageNumber"; + /** + * Parameter for a paginator + */ + protected IntegerParameter m_pageNumber; + /** + * PageSize for the a paginator + */ + private long m_pageSize = 3; + + public CompoundContentItemPanel() { + super(); + + m_show = new StringParameter(SHOW_PARAM); + m_pageNumber = new IntegerParameter(PAGE_NUMBER); + } + + @Override + public void register(Page p) { + super.register(p); + + addGlobalStateParams(p); + } + + @Override + public void addGlobalStateParams(Page p) { + p.addGlobalStateParam(m_show); + p.addGlobalStateParam(m_pageNumber); + } + + protected XMLGenerator getXMLGenerator(PageState state, ContentItem item) { + ContentSection section = null; + + try { + section = CMS.getContext().getContentSection(); + } catch (Exception ex) { + } + if (section == null) { + if (s_log.isDebugEnabled()) { + s_log.debug("Item id ; " + item.getOID() + " - " + item. + getContentSection() + " - " + item); + } + section = item.getContentSection(); + CMS.getContext().setContentSection(section); + } + + return section.getXMLGenerator(); + } + + /** + * Retrieves the the content item to show. If a item was injected via + * {@link #setContentItem(com.arsdigita.cms.ContentItem)}, this item is + * used. Otherwise, the item is retrieved from the CMSContext. + * + * @param state The current page state + * @return The content item to show. + */ + protected ContentItem getContentItem(PageState state) { + if (m_item == null) { + CMSContext context = CMS.getContext(); + + if (!context.hasContentItem()) { + return null; + } + return context.getContentItem(); + } else { + return m_item; + } + } + + /** + * Injects the content item to show. Very helpful when the CMSContext is not + * available, for example in index pages. + * + * @param item The item to show by this panel. + */ + public void setContentItem(final ContentItem item) { + if (item instanceof ContentBundle) { + ContentBundle bundle; + ContentItem resolved = null; + + bundle = (ContentBundle) item; + + resolved = bundle.getInstance(DispatcherHelper.getNegotiatedLocale(). + getLanguage()); + + if (resolved == null) { + resolved = bundle.getPrimaryInstance(); + } + + m_item = resolved; + } else { + m_item = item; + } + } + + public long getPageSize() { + return m_pageSize; + } + + public void setPageSize(final long pageSize) { + m_pageSize = pageSize; + } + + protected long getPageCount(final long objectCount) { + return (long) Math.ceil((double) objectCount / (double) m_pageSize); + } + + protected long normalizePageNumber(final long pageCount, + final long pageNumber) { + long num; + num = pageNumber; + if (num < 1) { + num = 1; + } + if (num > pageCount) { + if (pageCount == 0) { + num = 1; + } else { + num = pageCount; + } + } + + return num; + } + + protected long getPaginatorBegin(final long pageNumber) { + return (pageNumber - 1) * m_pageSize; + } + + protected long getPaginatorCount(final long begin, + final long objectCount) { + return Math.min(m_pageSize, (objectCount - begin)); + } + + protected long getPaginatorEnd(final long begin, final long count) { + return begin + count; + } + + protected void createPaginatorElement(final Element parent, + final long pageNumber, + final long pageCount, + final long begin, + final long end, + final long count) { + Element paginator; + paginator = + parent.newChildElement("nav:paginator", + "http://ccm.redhat.com/london/navigation"); + + URL requestURL = Web.getContext().getRequestURL(); + + ParameterMap map = new ParameterMap(); + + if (requestURL.getParameterMap() != null) { + Iterator current = requestURL.getParameterMap().keySet(). + iterator(); + while (current.hasNext()) { + String key = (String) current.next(); + if (key.equals("pageNumber")) { + continue; + } + map.setParameterValues(key, requestURL.getParameterValues( + key)); + } + } + + paginator.addAttribute("pageParam", "pageNumber"); + paginator.addAttribute("baseURL", URL.there(requestURL.getPathInfo(), + map).toString()); + paginator.addAttribute("pageNumber", Long.toString(pageNumber)); + paginator.addAttribute("pageCount", Long.toString(pageCount)); + paginator.addAttribute("pageSize", Long.toString(m_pageSize)); + paginator.addAttribute("objectBegin", Long.toString(begin)); + paginator.addAttribute("objectEnd", Long.toString(end)); + paginator.addAttribute("objectCount", Long.toString(count)); + } + + /** + * The default value for the show parameter. + * + * @return Default value for the show parameter. + */ + protected abstract String getDefaultForShowParam(); + + protected String getShowParam(final PageState state) { + String show; + try { + show = (String) state.getValue(m_show); + } catch (IllegalArgumentException ex) { + // probably viewing an index item on a category, + // get the parameter from the request and set it + String value = state.getRequest().getParameter(SHOW_PARAM); + if (value == null) { + value = getDefaultForShowParam(); + } + show = value; + state.setValue(m_show, value); + } + if (show == null) { + show = getDefaultForShowParam(); + } + + return show; + } + + protected long getPageNumber(final PageState state) { + int pageNumber = 1; + + s_log.info("Checking page state..."); + if (state == null) { + s_log.warn("PageState is null!!!"); + } + + try { + Object value = state.getValue(m_pageNumber); + if (value == null) { + pageNumber = 1; + } else { + pageNumber = (Integer) value; + } + } catch (IllegalArgumentException ex) { + String value = state.getRequest().getParameter(PAGE_NUMBER); + if (value != null) { + try { + pageNumber = Integer.parseInt(value); + } catch (NumberFormatException ex1) { + s_log.warn("Invalid page number"); + } + state.setValue(m_pageNumber, pageNumber); + } + } + + return (long) pageNumber; + } + + /** + * Returns the class of the item which can be displayed by this panel. + * + * @return The class which objects can be displayed using this panel + */ + protected abstract Class getAllowedClass(); + + protected Element generateBaseXML(ContentItem item, + Element parent, + PageState state) { + Element content = parent.newChildElement( + String.format("cms:%sData", getAllowedClass().getSimpleName()), + CMS.CMS_XML_NS); + + exportAttributes(content); + + return content; + } + + /** + * This method is called by CCM the start the rendering process. + * It uses the returned value of {@link #getAllowedClass()} to check if + * the item is of the correct type. + * + * @param state + * @param parent + */ + @Override + public void generateXML(final PageState state, final Element parent) { + ContentItem item = getContentItem(state); + + if (!isVisible(state) + || (item == null) + || !(item.getClass().equals(getAllowedClass()))) { + s_log.debug("Skipping generate XML isVisible: " + isVisible( + state) + " item " + + (item == null ? null : item.getOID())); + return; + } + + if (state == null) { + s_log.warn("No page state provided!"); + } + + generateXML(item, parent, state); + } +} diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitContactTable.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitContactTable.java index 9579823f6..18d74aad7 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitContactTable.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitContactTable.java @@ -22,6 +22,7 @@ package com.arsdigita.cms.contenttypes.ui; import com.arsdigita.bebop.Component; import com.arsdigita.bebop.ControlLink; import com.arsdigita.bebop.Label; +import com.arsdigita.bebop.Link; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.Table; import com.arsdigita.bebop.event.TableActionEvent; @@ -32,6 +33,8 @@ import com.arsdigita.bebop.table.TableColumnModel; import com.arsdigita.bebop.table.TableModel; import com.arsdigita.bebop.table.TableModelBuilder; import com.arsdigita.bebop.util.GlobalizationUtil; +import com.arsdigita.cms.CMS; +import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.SecurityManager; import com.arsdigita.cms.contenttypes.GenericContact; @@ -39,8 +42,10 @@ import com.arsdigita.cms.contenttypes.GenericContactTypeCollection; import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit; import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitContactCollection; import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; +import com.arsdigita.cms.dispatcher.ItemResolver; import com.arsdigita.cms.dispatcher.Utilities; import com.arsdigita.dispatcher.DispatcherHelper; +import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.util.LockableImpl; import java.math.BigDecimal; import org.apache.log4j.Logger; @@ -77,7 +82,8 @@ public class GenericOrganizationalUnitContactTable extends Table implements tabModel.add(new TableColumn( 1, ContenttypesGlobalizationUtil.globalize( - "cms.contenttypes.ui.genericorgaunit.contact.title").localize())); + "cms.contenttypes.ui.genericorgaunit.contact.title").localize(), + TABLE_COL_EDIT)); tabModel.add(new TableColumn( 2, ContenttypesGlobalizationUtil.globalize( @@ -101,6 +107,8 @@ public class GenericOrganizationalUnitContactTable extends Table implements tabModel.get(2).setCellRenderer(new DeleteCellRenderer()); tabModel.get(3).setCellRenderer(new UpCellRenderer()); tabModel.get(3).setCellRenderer(new DownCellRenderer()); + + addTableActionListener(this); } private class GenericOrganizationalUnitTableModelBuilder @@ -212,7 +220,20 @@ public class GenericOrganizationalUnitContactTable extends Table implements SecurityManager.EDIT_ITEM, orgaunit); if (canEdit) { - ControlLink link = new ControlLink(value.toString()); + GenericContact contact; + try { + contact = new GenericContact((BigDecimal) key); + } catch (DataObjectNotFoundException ex) { + return new Label(value.toString()); + } + ContentSection section = CMS.getContext().getContentSection(); + ItemResolver resolver = section.getItemResolver(); + Link link = + new Link(value.toString(), + resolver.generateItemURL(state, + contact, + section, + contact.getVersion())); return link; } else { return new Label(value.toString()); diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPanel.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPanel.java new file mode 100644 index 000000000..963c0ba0c --- /dev/null +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPanel.java @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2010 Jens Pelzetter, + * for the Center of Social Politics of the University of Bremen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.PageState; +import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.contenttypes.GenericAddress; +import com.arsdigita.cms.contenttypes.GenericContact; +import com.arsdigita.cms.contenttypes.GenericContactEntry; +import com.arsdigita.cms.contenttypes.GenericContactEntryCollection; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitContactCollection; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitPersonCollection; +import com.arsdigita.cms.contenttypes.GenericPerson; +import com.arsdigita.cms.contenttypes.GenericPersonContactCollection; +import com.arsdigita.xml.Element; + +/** + * + * @author Jens Pelzetter + */ +public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel { + + public static final String SHOW_CONTACTS = "contacts"; + public static final String SHOW_MEMBERS = "members"; + + @Override + protected String getDefaultForShowParam() { + return SHOW_CONTACTS; + } + + @Override + protected Class getAllowedClass() { + return GenericOrganizationalUnit.class; + } + + protected void generateContactsXML(GenericOrganizationalUnit orga, + Element parent, PageState state) { + GenericOrganizationalUnitContactCollection contacts; + contacts = orga.getContacts(); + + long pageNumber = getPageNumber(state); + + long pageCount = getPageCount(contacts.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, contacts.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + contacts.setRange((int) begin, (int) end); + createPaginatorElement(parent, pageNumber, pageCount, begin, end, + count); + + Element contactsElem = parent.newChildElement("contacts"); + while (contacts.next()) { + GenericContact contact; + contact = contacts.getContact(); + + generateContactXML(contact, + contactsElem, + state, + Integer.toString(contacts.getContactOrder()), + true); + } + } + + protected void generateMembersXML(GenericOrganizationalUnit orga, + Element parent, PageState state) { + GenericOrganizationalUnitPersonCollection persons; + persons = orga.getPersons(); + long pageNumber = getPageNumber(state); + + Element personsElem = parent.newChildElement("members"); + + long pageCount = getPageCount(persons.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, persons.size()); + long end = getPaginatorEnd(begin, persons.size()); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + persons.setRange((int) begin, (int) end); + createPaginatorElement(parent, pageNumber, pageCount, begin, end, + count); + + while (persons.next()) { + GenericPerson person; + person = persons.getPerson(); + + Element personElem = personsElem.newChildElement("member"); + Element title = personElem.newChildElement("title"); + title.setText(person.getTitle()); + + if ((person.getTitlePre() != null) + && !person.getTitlePre().isEmpty()) { + Element titlePre = personElem.newChildElement("titlePre"); + titlePre.setText(person.getTitlePre()); + } + + Element surname = personElem.newChildElement("surname"); + surname.setText(person.getSurname()); + + Element givenName = personElem.newChildElement("givenname"); + givenName.setText(person.getGivenName()); + + if ((person.getTitlePost() != null) + && !person.getTitlePost().isEmpty()) { + Element titlePost = personElem.newChildElement("titlePost"); + titlePost.setText(person.getTitlePost()); + } + + GenericPersonContactCollection contacts = person.getContacts(); + if ((contacts != null) && (contacts.size() > 0)) { + Element contactsElem = + personElem.newChildElement("contacts"); + while (contacts.next()) { + GenericContact contact = contacts.getContact(); + + generateContactXML(contact, contactsElem, state, contacts. + getContactOrder(), false); + } + } + } + } + + protected void generateContactXML(final GenericContact contact, + final Element parent, + final PageState state, + final String order, + final boolean withPerson) { + Element contactElem = parent.newChildElement("contact"); + contactElem.addAttribute("order", order); + + Element title = contactElem.newChildElement("title"); + title.setText(contact.getTitle()); + + Element typeElem = contactElem.newChildElement("type"); + typeElem.setText(contact.getContactType()); + + if (withPerson) { + GenericPerson person = contact.getPerson(); + if (person != null) { + Element personElem = contactElem.newChildElement("person"); + if ((person.getTitlePre() != null) && !person.getTitlePre(). + isEmpty()) { + Element titlePre = + personElem.newChildElement("titlePre"); + titlePre.setText(person.getTitlePre()); + } + + Element givenName = contactElem.newChildElement("givenname"); + givenName.setText(person.getGivenName()); + + Element surname = contactElem.newChildElement("surname"); + surname.setText(person.getSurname()); + + if ((person.getTitlePost() != null) + && !person.getTitlePost().isEmpty()) { + Element titlePost = contactElem.newChildElement( + "titlePost"); + titlePost.setText(person.getTitlePost()); + } + } + } + + GenericContactEntryCollection contactEntries = + contact.getContactEntries(); + if ((contactEntries != null) + && (contactEntries.size() > 0)) { + Element contactEntriesElem = + contactElem.newChildElement("contactEntries"); + while (contactEntries.next()) { + GenericContactEntry contactEntry = + contactEntries.getContactEntry(); + Element contactEntryElem = + contactEntriesElem.newChildElement( + "contactEntry"); + contactEntryElem.addAttribute("key", + contactEntry.getKey()); + Element valueElem = contactEntryElem.newChildElement( + "value"); + valueElem.setText(contactEntry.getValue()); + + if ((contactEntry.getDescription() != null) + && !contactEntry.getDescription().isEmpty()) { + Element descElem = contactEntryElem.newChildElement( + "description"); + descElem.setText(contactEntry.getDescription()); + } + } + } + + GenericAddress address = contact.getAddress(); + if (address != null) { + Element addressElem = contactElem.newChildElement( + "address"); + Element postalCode = addressElem.newChildElement( + "postalCode"); + postalCode.setText(address.getPostalCode()); + Element data = addressElem.newChildElement("data"); + data.setText(address.getAddress()); + Element country = addressElem.newChildElement("country"); + country.setText(address.getIsoCountryCode()); + Element theState = addressElem.newChildElement("state"); + theState.setText(address.getState()); + } + } + + @Override + public void generateXML(ContentItem item, Element element, + PageState state) { + Element content = generateBaseXML(item, element, state); + + Element availableData = content.newChildElement("availableData"); + + GenericOrganizationalUnit orga = (GenericOrganizationalUnit) item; + + if ((orga.getContacts() != null) + && (orga.getContacts().size() > 0)) { + availableData.newChildElement("contacts"); + } + if ((orga.getPersons() != null) + && (orga.getPersons().size() > 0)) { + availableData.newChildElement("members"); + } + + String show = getShowParam(state); + if (SHOW_CONTACTS.equals(show)) { + generateContactsXML(orga, content, state); + } else if (SHOW_MEMBERS.equals(show)) { + generateMembersXML(orga, content, state); + } + } +} diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java index f57b2e216..8d6b864c6 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonAddForm.java @@ -26,6 +26,7 @@ import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.form.Option; import com.arsdigita.bebop.form.SingleSelect; +import com.arsdigita.bebop.parameters.NotEmptyValidationListener; import com.arsdigita.bebop.parameters.NotNullValidationListener; import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.StringParameter; @@ -72,8 +73,8 @@ public class GenericOrganizationalUnitPersonAddForm extends BasicItemForm { add(new Label(ContenttypesGlobalizationUtil.globalize( "cms.contenttypes.ui.genericorgaunit.person.role"))); ParameterModel roleParam = - new StringParameter( - GenericOrganizationalUnitPersonCollection.PERSON_ROLE); + new StringParameter( + GenericOrganizationalUnitPersonCollection.PERSON_ROLE); SingleSelect roleSelect = new SingleSelect(roleParam); roleSelect.addValidationListener(new NotNullValidationListener()); roleSelect.addOption( @@ -89,12 +90,29 @@ public class GenericOrganizationalUnitPersonAddForm extends BasicItemForm { role = roles.getRelationAttribute(); roleSelect.addOption(new Option(role.getKey(), role.getName())); } - add(roleSelect); - /*TextField role = new TextField(roleParam); - role.addValidationListener(new NotNullValidationListener()); - add(role);*/ + add(new Label(ContenttypesGlobalizationUtil.globalize( + "cms.contenttypes.ui.genericorgaunit.person.status"))); + ParameterModel statusModel = + new StringParameter( + GenericOrganizationalUnitPersonCollection.STATUS); + SingleSelect statusSelect = new SingleSelect(statusModel); + statusSelect.addValidationListener(new NotNullValidationListener()); + statusSelect.addOption(new Option("", + new Label((String) ContenttypesGlobalizationUtil. + globalize("cms.ui.select_one").localize()))); + RelationAttributeCollection statusColl = new RelationAttributeCollection( + getStatusAttributeName()); + statusColl.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). + getLanguage()); + while (statusColl.next()) { + RelationAttribute status; + status = statusColl.getRelationAttribute(); + statusSelect.addOption(new Option(status.getKey(), status.getName())); + } + add(statusSelect); + } @Override @@ -120,8 +138,10 @@ public class GenericOrganizationalUnitPersonAddForm extends BasicItemForm { getFullName())); } orga.addPerson((GenericPerson) data.get(ITEM_SEARCH), - (String) data.get( - GenericOrganizationalUnitPersonCollection.PERSON_ROLE)); + (String) data.get( + GenericOrganizationalUnitPersonCollection.PERSON_ROLE), + (String) data.get( + GenericOrganizationalUnitPersonCollection.STATUS)); } init(fse); @@ -132,6 +152,10 @@ public class GenericOrganizationalUnitPersonAddForm extends BasicItemForm { } protected String getRoleAttributeName() { - return "GenericOrganizationRole"; + return "GenericOrganizationalUnitRole"; + } + + protected String getStatusAttributeName() { + return "GenericOrganizationalUnitMemberStatus"; } } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonsTable.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonsTable.java index 1e0337c74..ad6bf348a 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonsTable.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonsTable.java @@ -33,7 +33,6 @@ import com.arsdigita.bebop.table.TableColumnModel; import com.arsdigita.bebop.table.TableModel; import com.arsdigita.bebop.table.TableModelBuilder; import com.arsdigita.cms.CMS; -import com.arsdigita.cms.ContentItem; import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.RelationAttributeCollection; @@ -59,6 +58,7 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements private final static Logger s_log = Logger.getLogger( GenericOrganizationalUnitPersonsTable.class); private final String TABLE_COL_EDIT = "table_col_edit"; + private final String TABLE_COL_EDIT_LINK = "table_col_edit_link"; private final String TABLE_COL_DEL = "table_col_del"; private ItemSelectionModel m_itemModel; @@ -83,14 +83,19 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements new TableColumn( 2, ContenttypesGlobalizationUtil.globalize( + "cms.contenttypes.ui.genericorgaunit.persons.status").localize())); + tabModel.add( + new TableColumn( + 3, + ContenttypesGlobalizationUtil.globalize( "cms.contenttypes.ui.genericorgaunit.persons.delete").localize(), TABLE_COL_DEL)); setModelBuilder( new GenericOrganizationalUnitTableModelBuilder(itemModel)); - tabModel.get(0).setCellRenderer(new EditCellRenderer()); - tabModel.get(2).setCellRenderer(new DeleteCellRenderer()); + tabModel.get(0).setCellRenderer(new EditCellRenderer()); + tabModel.get(3).setCellRenderer(new DeleteCellRenderer()); addTableActionListener(this); } @@ -163,9 +168,19 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements return role.getName(); } else { return ContenttypesGlobalizationUtil.globalize( - "cms.ui.unknownRole").localize(); + "cms.ui.unknownRole").localize(); } case 2: + RelationAttributeCollection status = new RelationAttributeCollection( + getStatusAttributeName(), + m_personsCollection.getStatus()); + if (status.next()) { + return status.getName(); + } else { + return ContenttypesGlobalizationUtil.globalize( + "cms.ui.unknownStatus").localize(); + } + case 3: return ContenttypesGlobalizationUtil.globalize( "cms.ui.delete").localize(); default: @@ -207,14 +222,15 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements key), ex); return new Label(value.toString()); - } + } ContentSection section = CMS.getContext().getContentSection(); ItemResolver resolver = section.getItemResolver(); - Link link = new Link(value.toString(), - resolver.generateItemURL(state, - person, - section, - person.getVersion())); + Link link = + new Link(value.toString(), + resolver.generateItemURL(state, + person, + section, + person.getVersion())); return link; } else { @@ -222,7 +238,7 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements } } } - + private class DeleteCellRenderer extends LockableImpl implements TableCellRenderer { @@ -272,14 +288,10 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements TableColumn col = getColumnModel().get(event.getColumn().intValue()); - - if (col.getHeaderKey().toString().equals(TABLE_COL_EDIT)) { } else if (col.getHeaderKey().toString().equals(TABLE_COL_DEL)) { s_log.debug("Removing person assoc..."); orga.removePerson(person); - - } } @@ -292,6 +304,9 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements protected String getRoleAttributeName() { return "GenericOrganizationalUnitRole"; + } + protected String getStatusAttributeName() { + return "GenericOrganizationalUnitMemberStatus"; } } diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonContactTable.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonContactTable.java index c97890c78..2682ec7be 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonContactTable.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericPersonContactTable.java @@ -21,6 +21,7 @@ package com.arsdigita.cms.contenttypes.ui; import com.arsdigita.bebop.Component; import com.arsdigita.bebop.ControlLink; import com.arsdigita.bebop.Label; +import com.arsdigita.bebop.Link; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.Table; import com.arsdigita.bebop.event.TableActionEvent; @@ -30,6 +31,8 @@ import com.arsdigita.bebop.table.TableColumn; import com.arsdigita.bebop.table.TableColumnModel; import com.arsdigita.bebop.table.TableModel; import com.arsdigita.bebop.table.TableModelBuilder; +import com.arsdigita.cms.CMS; +import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.SecurityManager; import com.arsdigita.cms.contenttypes.GenericContact; @@ -37,65 +40,91 @@ import com.arsdigita.cms.contenttypes.GenericContactTypeCollection; import com.arsdigita.cms.contenttypes.GenericPersonContactCollection; import com.arsdigita.cms.contenttypes.GenericPerson; import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; +import com.arsdigita.cms.dispatcher.ItemResolver; import com.arsdigita.cms.dispatcher.Utilities; import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.dispatcher.DispatcherHelper; +import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.util.LockableImpl; import java.math.BigDecimal; +import org.apache.log4j.Logger; /** * Lists all existing contact entries for a selected contact. * * @author Sören Bernstein (quasimodo) quasi@barkhof.uni-bremen.de */ -public class GenericPersonContactTable extends Table implements TableActionListener { +public class GenericPersonContactTable extends Table implements + TableActionListener { - private final String TABLE_COL_EDIT = "table_col_edit"; - private final String TABLE_COL_DEL = "table_col_del"; + private final static Logger s_log = Logger.getLogger( + GenericPersonContactTable.class); + private final static String TABLE_COL_EDIT = "table_col_edit"; + private final static String TABLE_COL_DEL = "table_col_del"; + private final static String TABLE_COL_UP = "table_col_up"; + private final static String TABLE_COL_DOWN = "table_col_down"; private ItemSelectionModel m_itemModel; /** * Creates a new instance of GenericPersonGenericPersonTable */ public GenericPersonContactTable(final ItemSelectionModel itemModel) { - super(); + s_log.debug("Constructor begin..."); this.m_itemModel = itemModel; // if table is empty: - setEmptyView(new Label(ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.contacts.none"))); + setEmptyView(new Label(ContenttypesGlobalizationUtil.globalize( + "cms.contenttypes.ui.person.contacts.none"))); TableColumnModel tab_model = getColumnModel(); - // define columns - tab_model.add(new TableColumn(0, ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.contact.order").localize(), TABLE_COL_EDIT)); - tab_model.add(new TableColumn(1, ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.contact.type").localize())); - tab_model.add(new TableColumn(2, ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.contact.title").localize())); - tab_model.add(new TableColumn(3, ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.contact.action").localize(), TABLE_COL_DEL)); + tab_model.add(new TableColumn(0, ContenttypesGlobalizationUtil.globalize( + "cms.contenttypes.ui.person.contact.type").localize())); + tab_model.add(new TableColumn(1, ContenttypesGlobalizationUtil.globalize( + "cms.contenttypes.ui.person.contact.title").localize(), + TABLE_COL_EDIT)); + tab_model.add(new TableColumn(2, ContenttypesGlobalizationUtil.globalize( + "cms.contenttypes.ui.person.contact.del").localize(), + TABLE_COL_DEL)); + tab_model.add(new TableColumn(3, ContenttypesGlobalizationUtil.globalize( + "cms.contenttypes.ui.person_contact.up").localize(), + TABLE_COL_UP)); + tab_model.add(new TableColumn(4, ContenttypesGlobalizationUtil.globalize( + "cms.contenttypes.ui.person_contact.down").localize(), + TABLE_COL_DOWN)); setModelBuilder(new GenericPersonTableModelBuilder(itemModel)); - tab_model.get(2).setCellRenderer(new EditCellRenderer()); - tab_model.get(3).setCellRenderer(new DeleteCellRenderer()); + tab_model.get(1).setCellRenderer(new EditCellRenderer()); + tab_model.get(2).setCellRenderer(new DeleteCellRenderer()); + tab_model.get(3).setCellRenderer(new UpCellRenderer()); + tab_model.get(4).setCellRenderer(new DownCellRenderer()); addTableActionListener(this); - + s_log.debug("Constructor finished."); } /** * XXXX * */ - private class GenericPersonTableModelBuilder extends LockableImpl implements TableModelBuilder { + private class GenericPersonTableModelBuilder extends LockableImpl implements + TableModelBuilder { private ItemSelectionModel m_itemModel; public GenericPersonTableModelBuilder(ItemSelectionModel itemModel) { + s_log.debug("Creating table model builder..."); m_itemModel = itemModel; + s_log.debug("Created table model builder."); } public TableModel makeModel(Table table, PageState state) { + s_log.debug("Making model..."); table.getRowSelectionModel().clearSelection(state); - GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject(state); + GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject( + state); + s_log.debug("Made model..."); return new GenericPersonTableModel(table, state, person); } } @@ -110,11 +139,15 @@ public class GenericPersonContactTable extends Table implements TableActionListe private Table m_table; private GenericPersonContactCollection m_contactCollection; private GenericContact m_contact; - private GenericContactTypeCollection contacttypes = new GenericContactTypeCollection(); + private GenericContactTypeCollection contacttypes = + new GenericContactTypeCollection(); - private GenericPersonTableModel(Table t, PageState ps, GenericPerson person) { + private GenericPersonTableModel(Table t, PageState ps, + GenericPerson person) { + s_log.debug("Creating table model..."); m_table = t; m_contactCollection = person.getContacts(); + s_log.debug("Created table model..."); } public int getColumnCount() { @@ -125,18 +158,17 @@ public class GenericPersonContactTable extends Table implements TableActionListe * Check collection for the existence of another row. * * If exists, fetch the value of current GenericPersonEntryCollection object - * into m_comntact class variable. + * into m_contact class variable. */ public boolean nextRow() { - + s_log.debug("Next row?"); if (m_contactCollection != null && m_contactCollection.next()) { m_contact = m_contactCollection.getContact(); + s_log.debug("Yes."); return true; - } else { - + s_log.debug("No."); return false; - } } @@ -145,15 +177,26 @@ public class GenericPersonContactTable extends Table implements TableActionListe * @see com.arsdigita.bebop.table.TableModel#getElementAt(int) */ public Object getElementAt(int columnIndex) { + s_log.debug(String.format("Getting element at %d...", + columnIndex)); switch (columnIndex) { case 0: - return m_contactCollection.getContactOrder(); + s_log.debug(String.format( + "Getting human readable contact type for contact type \"%s\"...", + m_contactCollection.getContactType())); + s_log.debug(String.format( + "Human readable contact type is: \"%s\"...", + contacttypes.getRelationAttribute( + m_contactCollection.getContactType(), + DispatcherHelper.getNegotiatedLocale(). + getLanguage()))); + return contacttypes.getRelationAttribute(m_contactCollection. + getContactType(), + DispatcherHelper. + getNegotiatedLocale().getLanguage()).getName(); case 1: - return contacttypes.getRelationAttribute(m_contactCollection.getContactType(), - DispatcherHelper.getNegotiatedLocale().getLanguage()).getName(); - case 2: return m_contact.getTitle(); - case 3: + case 2: return GlobalizationUtil.globalize("cms.ui.delete").localize(); default: return null; @@ -173,20 +216,35 @@ public class GenericPersonContactTable extends Table implements TableActionListe * Check for the permissions to edit item and put either a Label or * a ControlLink accordingly. */ - private class EditCellRenderer extends LockableImpl implements TableCellRenderer { + private class EditCellRenderer extends LockableImpl implements + TableCellRenderer { public Component getComponent(Table table, PageState state, Object value, - boolean isSelected, Object key, - int row, int column) { + boolean isSelected, Object key, + int row, int column) { SecurityManager sm = Utilities.getSecurityManager(state); - GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject(state); + GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject( + state); boolean canEdit = sm.canAccess(state.getRequest(), - SecurityManager.EDIT_ITEM, - person); + SecurityManager.EDIT_ITEM, + person); if (canEdit) { - ControlLink link = new ControlLink(value.toString()); + GenericContact contact; + try { + contact = new GenericContact((BigDecimal) key); + } catch (DataObjectNotFoundException ex) { + return new Label(value.toString()); + } + ContentSection section = CMS.getContext().getContentSection(); + ItemResolver resolver = section.getItemResolver(); + Link link = + new Link(value.toString(), + resolver.generateItemURL(state, + contact, + section, + contact.getVersion())); return link; } else { return new Label(value.toString()); @@ -198,21 +256,25 @@ public class GenericPersonContactTable extends Table implements TableActionListe * Check for the permissions to delete item and put either a Label or * a ControlLink accordingly. */ - private class DeleteCellRenderer extends LockableImpl implements TableCellRenderer { + private class DeleteCellRenderer extends LockableImpl implements + TableCellRenderer { public Component getComponent(Table table, PageState state, Object value, - boolean isSelected, Object key, - int row, int column) { + boolean isSelected, Object key, + int row, int column) { SecurityManager sm = Utilities.getSecurityManager(state); - GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject(state); + GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject( + state); boolean canDelete = sm.canAccess(state.getRequest(), - SecurityManager.DELETE_ITEM, - person); + SecurityManager.DELETE_ITEM, + person); if (canDelete) { ControlLink link = new ControlLink(value.toString()); - link.setConfirmation((String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.confirm_delete").localize()); + link.setConfirmation((String) ContenttypesGlobalizationUtil. + globalize("cms.contenttypes.ui.person.confirm_delete"). + localize()); return link; } else { return new Label(value.toString()); @@ -220,6 +282,56 @@ public class GenericPersonContactTable extends Table implements TableActionListe } } + private class UpCellRenderer extends LockableImpl implements + TableCellRenderer { + + @Override + public Component getComponent( + Table table, + PageState state, + Object value, + boolean isSelected, + Object key, + int row, + int col) { + + if (0 == row) { + s_log.debug("Row is first row in table, don't show up-link"); + return new Label(""); + } else { + ControlLink link = new ControlLink("up"); + return link; + } + + } + } + + private class DownCellRenderer extends LockableImpl implements + TableCellRenderer { + + @Override + public Component getComponent( + Table table, + PageState state, + Object value, + boolean isSelected, + Object key, + int row, + int col) { + + GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject( + state); + GenericPersonContactCollection contacts = person.getContacts(); + if ((contacts.size() - 1) == row) { + s_log.debug("Row is last row in table, don't show down-link"); + return new Label(""); + } else { + ControlLink link = new ControlLink("down"); + return link; + } + } + } + /** * Provide implementation to TableActionListener method. * Code that comes into picture when a link on the table is clicked. @@ -230,23 +342,28 @@ public class GenericPersonContactTable extends Table implements TableActionListe PageState state = evt.getPageState(); // Get selected GenericContact - GenericContact contact = new GenericContact(new BigDecimal(evt.getRowKey().toString())); + GenericContact contact = new GenericContact(new BigDecimal(evt.getRowKey(). + toString())); // Get GenericPerson - GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject(state); + GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject( + state); + + GenericPersonContactCollection contacts = person.getContacts(); // Get selected column TableColumn col = getColumnModel().get(evt.getColumn().intValue()); // Edit if (col.getHeaderKey().toString().equals(TABLE_COL_EDIT)) { - } - - // Delete - if (col.getHeaderKey().toString().equals(TABLE_COL_DEL)) { + } // Delete + else if (col.getHeaderKey().toString().equals(TABLE_COL_DEL)) { person.removeContact(contact); + } else if (col.getHeaderKey().toString().equals(TABLE_COL_UP)) { + contacts.swapWithPrevious(contact); + } else if (col.getHeaderKey().toString().equals(TABLE_COL_DOWN)) { + contacts.swapWithNext(contact); } - } /** diff --git a/ccm-core/src/com/arsdigita/runtime/ConfigRegistry.java b/ccm-core/src/com/arsdigita/runtime/ConfigRegistry.java index 06870d815..6de5b7a72 100755 --- a/ccm-core/src/com/arsdigita/runtime/ConfigRegistry.java +++ b/ccm-core/src/com/arsdigita/runtime/ConfigRegistry.java @@ -78,11 +78,9 @@ import org.apache.log4j.Logger; * @version $Revision: #15 $ $Date: 2004/08/16 $ * @version $Id: ConfigRegistry.java 736 2005-09-01 10:46:05Z sskracic $ **/ - public class ConfigRegistry { private static final Logger s_log = Logger.getLogger(ConfigRegistry.class); - /** * Base url for registry location(s). * (i.e. $CATALINA_HOME/webapps/$context/WEB-INF/conf/registry in a @@ -90,7 +88,6 @@ public class ConfigRegistry { */ private URL m_url; private ClassLoader m_loader; - private List m_packages = new ArrayList(); private List m_contexts = new ArrayList(); private Map m_storage = new HashMap(); @@ -106,7 +103,6 @@ public class ConfigRegistry { * @param loader The ClassLoader to use for retrieving registry * configuration files. **/ - public ConfigRegistry(URL url, ClassLoader loader) { m_url = url; m_loader = loader; @@ -122,7 +118,6 @@ public class ConfigRegistry { * * @see Thread#getContextClassLoader() **/ - public ConfigRegistry(URL url) { this(url, Thread.currentThread().getContextClassLoader()); } @@ -135,7 +130,6 @@ public class ConfigRegistry { * @param loader The ClassLoader to use when searching for * registry configuration files. **/ - public ConfigRegistry(ClassLoader loader) { this(CCMResourceManager.getConfigURL(), loader); } @@ -156,7 +150,7 @@ public class ConfigRegistry { */ private void initialize(URL url, ErrorList errs) { - ClassLoader ldr = new URLClassLoader(new URL[] {url}, null); + ClassLoader ldr = new URLClassLoader(new URL[]{url}, null); RegistryConfig rc = new RegistryConfig(); load(rc, errs, ldr); @@ -181,6 +175,7 @@ public class ConfigRegistry { * This method is not supported API. */ public final void initialize(String key) { + s_log.debug(String.format("Initalizing for key '%s'", key)); if (m_packages.contains(key)) { throw new IllegalArgumentException("already loaded: " + key); } @@ -205,7 +200,6 @@ public class ConfigRegistry { * * @return A list of package keys represented as Strings. **/ - public List getPackages() { return m_packages; } @@ -215,7 +209,6 @@ public class ConfigRegistry { * * @return A list of Class objects. **/ - public List getContexts() { return m_contexts; } @@ -232,18 +225,20 @@ public class ConfigRegistry { * @throws IllegalArgumentException if this ConfigRegistry does * not contain a mapping for context **/ - public String getStorage(Class context) { if (!m_contexts.contains(context)) { - throw new IllegalArgumentException - ("no such context: " + context + - "; available contexts=" + m_contexts + - "; context->storage map: " + m_storage); + throw new IllegalArgumentException("no such context: " + context + + "; available contexts=" + + m_contexts + + "; context->storage map: " + + m_storage); } return (String) m_storage.get(context); } private void addContext(Class context, String storage) { + s_log.debug(String.format("Adding context '%s', storage '%s'...", + context.getName(), storage)); m_contexts.add(context); m_storage.put(context, storage); } @@ -258,7 +253,6 @@ public class ConfigRegistry { * @return true iff this ConfigRegistry contains a mapping for * context **/ - public boolean isConfigured(Class context) { return m_contexts.contains(context); } @@ -275,9 +269,8 @@ public class ConfigRegistry { * @throws IllegalArgumentException if this ConfigRegistry does * not contain a mapping for ctx.getClass() **/ - public void load(ParameterContext ctx, ErrorList errs) { - for (Iterator it = m_loaders.iterator(); it.hasNext(); ) { + for (Iterator it = m_loaders.iterator(); it.hasNext();) { ClassLoader ldr = (ClassLoader) it.next(); load(ctx, errs, ldr); } @@ -300,7 +293,9 @@ public class ConfigRegistry { for (int i = m_loaders.size() - 1; i >= 0; i--) { ClassLoader ldr = (ClassLoader) m_loaders.get(i); InputStream is = ldr.getResourceAsStream(resource); - if (is != null) { return is; } + if (is != null) { + return is; + } } return m_loader.getResourceAsStream(resource); @@ -316,12 +311,14 @@ public class ConfigRegistry { Properties props = new Properties(); InputStream is = ldr.getResourceAsStream(resource); if (is != null) { - try { props.load(is); } - catch (IOException e) { + try { + props.load(is); + } catch (IOException e) { throw new UncheckedWrapperException(e); } finally { - try { is.close(); } - catch (IOException e) { + try { + is.close(); + } catch (IOException e) { throw new UncheckedWrapperException(e); } } @@ -330,6 +327,7 @@ public class ConfigRegistry { } private class ConfigRegistryParser extends DefaultHandler { + public void startElement(String uri, String localName, String qn, Attributes attrs) { if (localName.equals("config")) { @@ -338,8 +336,8 @@ public class ConfigRegistry { // XXX: Is there a better way to handle errors that // includes line number information? if (klass == null || storage == null) { - throw new IllegalArgumentException - ("class and storage attributes are required"); + throw new IllegalArgumentException( + "class and storage attributes are required"); } Class context = Classes.loadClass(klass); @@ -347,5 +345,4 @@ public class ConfigRegistry { } } } - } diff --git a/ccm-core/src/com/arsdigita/web/URL.java b/ccm-core/src/com/arsdigita/web/URL.java index 8bb38723c..51f09bdad 100755 --- a/ccm-core/src/com/arsdigita/web/URL.java +++ b/ccm-core/src/com/arsdigita/web/URL.java @@ -133,34 +133,26 @@ import org.apache.log4j.Logger; public class URL { private static final Logger s_log = Logger.getLogger(URL.class); - private static final String INTERNAL_DIR = "/__ccm__"; - /** * The standard location for JSP files. */ public static final String JSP_DIR = INTERNAL_DIR + "/jsp"; - /** * The standard location for static files. */ public static final String STATIC_DIR = INTERNAL_DIR + "/static"; - /** * The standard location for XSL files. */ public static final String XSL_DIR = INTERNAL_DIR + "/xsl"; - /** * The standard location for servlets. */ public static final String SERVLET_DIR = INTERNAL_DIR + "/servlet"; - private static final ThreadLocal s_empty = new EmptyParameterMap(); - private StringBuffer m_url; private ParameterMap m_params; - private int m_schemeEnd = -1; private int m_serverNameEnd = -1; private int m_serverPortEnd = -1; @@ -182,28 +174,27 @@ public class URL { if (Assert.isEnabled()) { Assert.exists(scheme, "String scheme"); Assert.isTrue(!scheme.equals(""), - "The scheme cannot be an empty string"); + "The scheme cannot be an empty string"); Assert.exists(serverName, "String serverName"); Assert.isTrue(serverPort > 0, - "The serverPort must be greater than 0; " + - "I got " + serverPort); + "The serverPort must be greater than 0; " + "I got " + + serverPort); Assert.exists(contextPath, "String contextPath"); if (contextPath.startsWith("/")) { - Assert.isTrue - (!contextPath.endsWith("/"), - "A contextPath starting with '/' must not end in '/'; " + - "I got '" + contextPath + "'"); + Assert.isTrue(!contextPath.endsWith("/"), + "A contextPath starting with '/' must not end in '/'; " + + "I got '" + contextPath + "'"); } Assert.exists(servletPath, "String servletPath"); if (pathInfo != null) { Assert.isTrue(pathInfo.startsWith("/"), - "I expected a pathInfo starting with '/' " + - "and got '" + pathInfo + "' instead"); + "I expected a pathInfo starting with '/' " + + "and got '" + pathInfo + "' instead"); } } @@ -292,8 +283,8 @@ public class URL { final String pathInfo, final ParameterMap params) { HttpServletRequest req = Web.getRequest(); - String dispatcherPrefix = req == null ? null : - DispatcherHelper.getDispatcherPrefix(req); + String dispatcherPrefix = req == null ? null : DispatcherHelper. + getDispatcherPrefix(req); init(scheme, serverName, @@ -314,7 +305,7 @@ public class URL { private URL(final HttpServletRequest sreq, final ParameterMap params) { final String dispatcherPrefix = - DispatcherHelper.getDispatcherPrefix(sreq); + DispatcherHelper.getDispatcherPrefix(sreq); final HttpHost host = new HttpHost(sreq); init(sreq.getScheme(), @@ -346,17 +337,11 @@ public class URL { * @return a debugging representation of this URL */ public final String toDebugString() { - return super.toString() + " " + - "[" + - getScheme() + "," + - getServerName() + "," + - getServerPort() + "," + - getContextPath() + "," + - getServletPath() + "," + - getDispatcherPrefix() + "," + - getPathInfo() + "," + - getQueryString() + - "]"; + return super.toString() + " " + "[" + getScheme() + "," + + getServerName() + "," + getServerPort() + "," + + getContextPath() + "," + getServletPath() + "," + + getDispatcherPrefix() + "," + getPathInfo() + "," + + getQueryString() + "]"; } /** @@ -606,14 +591,13 @@ public class URL { public static final URL root() { final WebConfig config = Web.getConfig(); - URL url = new URL - (config.getDefaultScheme(), - config.getServer().getName(), - config.getServer().getPort(), - "", - "/", - null, - null); + URL url = new URL(config.getDefaultScheme(), + config.getServer().getName(), + config.getServer().getPort(), + "", + "/", + null, + null); return url; } @@ -641,16 +625,15 @@ public class URL { // If the URL is being generated outside of a WebContext, // use the request to fill out the URL. - return new URL( sreq, params ); + return new URL(sreq, params); } else { - return new URL - (url.getScheme(), - url.getServerName(), - url.getServerPort(), - url.getContextPath(), - url.getServletPath(), - url.getPathInfo(), - params); + return new URL(url.getScheme(), + url.getServerName(), + url.getServerPort(), + url.getContextPath(), + url.getServletPath(), + url.getPathInfo(), + params); } } @@ -682,14 +665,13 @@ public class URL { final HttpHost host = new HttpHost(sreq); - return new URL - (sreq.getScheme(), - host.getName(), - host.getPort(), - config.getDispatcherContextPath(), - config.getDispatcherServletPath(), - path, - params); + return new URL(sreq.getScheme(), + host.getName(), + host.getPort(), + config.getDispatcherContextPath(), + config.getDispatcherServletPath(), + path, + params); } /** @@ -705,8 +687,8 @@ public class URL { * @return a URL with a path to dispatch to */ public static final URL dynamicHostThere(final HttpServletRequest sreq, - final String path, - final ParameterMap params) { + final String path, + final ParameterMap params) { final WebConfig config = Web.getConfig(); DynamicHostProvider provider = Web.getConfig().getDynamicHostProvider(); @@ -753,14 +735,13 @@ public class URL { final HttpHost host = new HttpHost(sreq); - return new URL - (sreq.getScheme(), - host.getName(), - host.getPort(), - config.getDispatcherContextPath(), - config.getDispatcherServletPath(), - path, - (ParameterMap) s_empty.get()); + return new URL(sreq.getScheme(), + host.getName(), + host.getPort(), + config.getDispatcherContextPath(), + config.getDispatcherServletPath(), + path, + (ParameterMap) s_empty.get()); } /** @@ -783,8 +764,7 @@ public class URL { final ParameterMap params) { if (Assert.isEnabled() && pathInfo != null) { Assert.isTrue(pathInfo.startsWith("/"), - "pathInfo, if not null, must " + - "start with a slash"); + "pathInfo, if not null, must " + "start with a slash"); } if (pathInfo == null) { @@ -810,8 +790,7 @@ public class URL { final String pathInfo) { if (Assert.isEnabled() && pathInfo != null) { Assert.isTrue(pathInfo.startsWith("/"), - "pathInfo, if not null, must " + - "start with a slash"); + "pathInfo, if not null, must " + "start with a slash"); } if (pathInfo == null) { @@ -832,14 +811,13 @@ public class URL { final ParameterMap params) { final WebConfig config = Web.getConfig(); - return new URL - (config.getDefaultScheme(), - config.getServer().getName(), - config.getServer().getPort(), - config.getDispatcherContextPath(), - config.getDispatcherServletPath(), - path, - params); + return new URL(config.getDefaultScheme(), + config.getServer().getName(), + config.getServer().getPort(), + config.getDispatcherContextPath(), + config.getDispatcherServletPath(), + path, + params); } /** @@ -914,7 +892,13 @@ public class URL { if (m_params == null) { return m_url.substring(m_serverPortEnd); } else { - return m_url.substring(m_serverPortEnd) + m_params; + String str = m_url.substring(m_serverPortEnd); + if (str.contains("?")) { + return String.format("%s%s", m_url.substring(m_serverPortEnd), + m_params.toString().replace('?', '&')); + } else { + return m_url.substring(m_serverPortEnd) + m_params; + } } } @@ -939,6 +923,7 @@ public class URL { } private static class EmptyParameterMap extends InternalRequestLocal { + protected final Object initialValue() { return new ParameterMap(); } diff --git a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciMember.pdl b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciMember.pdl index 271b78fec..6f0128001 100644 --- a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciMember.pdl +++ b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciMember.pdl @@ -3,10 +3,6 @@ model com.arsdigita.cms.contenttypes; import com.arsdigita.kernel.ACSObject; import com.arsdigita.cms.*; -object type SciMember extends GenericPerson { - - Boolean[0..1] formerMember = ct_sciorga_members.formerMember BIT; - Boolean[0..1] associatedMember = ct_sciorga_members.associatedMember BIT; - +object type SciMember extends GenericPerson { reference key ( ct_sciorga_members.member_id ); } \ No newline at end of file diff --git a/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciMember.xml b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciMember.xml index ba484e2fd..d9d1004f1 100644 --- a/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciMember.xml +++ b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciMember.xml @@ -14,9 +14,9 @@ diff --git a/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/scidepartment-item.jsp b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/scidepartment-item.jsp new file mode 100644 index 000000000..6ce025674 --- /dev/null +++ b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/scidepartment-item.jsp @@ -0,0 +1,44 @@ + + + + + + NavigationModel model = new CMSNavigationModel(); + + + + + + + ((com.arsdigita.london.navigation.ui.category.Path)categoryPath) + .setModel(model); + + + + ((com.arsdigita.london.navigation.ui.category.Menu)categoryMenu) + .setModel(model); + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/sciorganization-item.jsp b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/sciorganization-item.jsp new file mode 100644 index 000000000..18e3477d9 --- /dev/null +++ b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/sciorganization-item.jsp @@ -0,0 +1,44 @@ + + + + + + NavigationModel model = new CMSNavigationModel(); + + + + + + + ((com.arsdigita.london.navigation.ui.category.Path)categoryPath) + .setModel(model); + + + + ((com.arsdigita.london.navigation.ui.category.Menu)categoryMenu) + .setModel(model); + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/sciproject-item.jsp b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/sciproject-item.jsp new file mode 100644 index 000000000..a421312fe --- /dev/null +++ b/ccm-sci-types-organization/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/sciproject-item.jsp @@ -0,0 +1,44 @@ + + + + + + NavigationModel model = new CMSNavigationModel(); + + + + + + + ((com.arsdigita.london.navigation.ui.category.Path)categoryPath) + .setModel(model); + + + + ((com.arsdigita.london.navigation.ui.category.Menu)categoryMenu) + .setModel(model); + + + + + + + + + + + + + \ No newline at end of file diff --git a/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciOrganization.xml b/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciOrganization.xml index 52a4e35c4..510e97c5c 100644 --- a/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciOrganization.xml +++ b/ccm-sci-types-organization/src/WEB-INF/traversal-adapters/com/arsdigita/cms/contenttypes/SciOrganization.xml @@ -10,7 +10,10 @@ - + + + + diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentLoader.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentLoader.java index 373f342b8..e379e206a 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentLoader.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciDepartmentLoader.java @@ -19,6 +19,14 @@ */ package com.arsdigita.cms.contenttypes; +import com.arsdigita.cms.ContentSection; +import com.arsdigita.cms.ContentType; +import com.arsdigita.cms.lifecycle.LifecycleDefinition; +import com.arsdigita.util.parameter.Parameter; +import com.arsdigita.util.parameter.ResourceParameter; +import com.arsdigita.workflow.simple.WorkflowTemplate; +import java.io.InputStream; + /** * Loader for {@link SciDepartment}. * @@ -26,12 +34,40 @@ package com.arsdigita.cms.contenttypes; */ public class SciDepartmentLoader extends AbstractContentTypeLoader { + private ResourceParameter m_template; private static final String[] TYPES = { "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciDepartment.xml" }; + public SciDepartmentLoader() { + super(); + + m_template = new ResourceParameter( + "com.arsdigita.cms.contenttypes.SciDepartmentTemplate", + Parameter.REQUIRED, + "/WEB-INF/content-types/com/arsdigita/" + + "cms/contenttypes/scidepartment-item.jsp"); + + register(m_template); + } + public String[] getTypes() { return TYPES; } + @Override + protected void prepareSection(final ContentSection section, + final ContentType type, + final LifecycleDefinition lifecycle, + final WorkflowTemplate workflow) { + super.prepareSection(section, type, lifecycle, workflow); + + setDefaultTemplate("SciDepartment Item", + "scidepartment-item", + (InputStream) get(m_template), + section, + type, + lifecycle, + workflow); + } } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciMember.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciMember.java index 03c42046a..01f08766a 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciMember.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciMember.java @@ -39,9 +39,7 @@ import java.math.BigDecimal; * @author Jens Pelzetter */ public class SciMember extends GenericPerson { - - public static final String ASSOCIATED_MEMBER = "associatedMember"; - public static final String FORMER_MEMBER = "formerMember"; + public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.SciMember"; private static final SciOrganizationConfig s_config = @@ -73,21 +71,5 @@ public class SciMember extends GenericPerson { public static SciOrganizationConfig getConfig() { return s_config; - } - - public Boolean isFormerMember() { - return (Boolean )get(FORMER_MEMBER); - } - - public void setFormerMember(Boolean formerMember) { - set(FORMER_MEMBER, formerMember); - } - - public Boolean isAssociatedMember() { - return (Boolean) get(ASSOCIATED_MEMBER); - } - - public void setAssociatedMember(Boolean associatedMember) { - set(ASSOCIATED_MEMBER, associatedMember); - } + } } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationConfig.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationConfig.java index dff58d5d0..41f6b6dc6 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationConfig.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationConfig.java @@ -15,6 +15,10 @@ public class SciOrganizationConfig extends AbstractConfig { private final Parameter m_organizationAddDepartmentHide; private final Parameter m_organizationAddProjectHide; private final Parameter m_organizationAddContactHide; + private final Parameter m_organizationMembersAllInOne; + private final Parameter m_organizationMembersMerge; + private final Parameter m_organizationProjectsAllInOne; + private final Parameter m_organizationProjectsMerge; private final Parameter m_departmentAddPersonHide; private final Parameter m_departmentAddSubDepartmentHide; private final Parameter m_departmentAddProjectHide; @@ -33,6 +37,8 @@ public class SciOrganizationConfig extends AbstractConfig { private final Parameter m_projectFundingHide; private final Parameter m_projectFundingDhtml; private final Parameter m_projectMaterialsHide; + private final Parameter m_projectMembersAllInOne; + private final Parameter m_projectMembersMerge; public SciOrganizationConfig() { @@ -52,6 +58,22 @@ public class SciOrganizationConfig extends AbstractConfig { "com.arsdigita.cms.contenttypes.sciorganization.add_contact_hide", Parameter.REQUIRED, Boolean.FALSE); + m_organizationMembersAllInOne = new BooleanParameter( + "com.arsdigita.cms.contenttypes.sciorganization.members_all_in_one", + Parameter.REQUIRED, + Boolean.FALSE); + m_organizationMembersMerge = new BooleanParameter( + "com.arsdigita.cms.contenttypes.sciorganization.members_merge", + Parameter.REQUIRED, + Boolean.TRUE); + m_organizationProjectsAllInOne = new BooleanParameter( + "com.arsdigita.cms.contenttypes.sciorganization.projects_all_in_one", + Parameter.REQUIRED, + Boolean.FALSE); + m_organizationProjectsMerge = new BooleanParameter( + "com.arsdigita.cms.contenttypes.sciorganization.projects_merge", + Parameter.REQUIRED, + Boolean.TRUE); m_departmentAddPersonHide = new BooleanParameter( "com.arsdigita.cms.contenttypes.scidepartment.add_person_hide", Parameter.REQUIRED, @@ -59,7 +81,7 @@ public class SciOrganizationConfig extends AbstractConfig { m_departmentAddSubDepartmentHide = new BooleanParameter( "com.arsdigita.cms.contenttypes.scidepartment.add_subdepartment_hide", Parameter.REQUIRED, - Boolean.FALSE); + Boolean.TRUE); m_departmentAddProjectHide = new BooleanParameter( "com.arsdigita.cms.contenttypes.scidepartment.add_project_hide", Parameter.REQUIRED, @@ -71,7 +93,7 @@ public class SciOrganizationConfig extends AbstractConfig { m_departmentSetSuperDepartmentHide = new BooleanParameter( "com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide", Parameter.REQUIRED, - Boolean.FALSE); + Boolean.TRUE); m_departmentAddContactHide = new BooleanParameter( "com.arsdigita.cms.contenttypes.scidepartment.add_contact_hide", Parameter.REQUIRED, @@ -91,11 +113,11 @@ public class SciOrganizationConfig extends AbstractConfig { m_projectAddSubProjectHide = new BooleanParameter( "com.arsdigita.cms.contenttypes.sciproject.add_subproject_hide", Parameter.REQUIRED, - Boolean.FALSE); + Boolean.TRUE); m_projectSetSuperProjectHide = new BooleanParameter( "com.arsdigita.cms.contenttypes.sciproject.set_superproject_hide", Parameter.REQUIRED, - Boolean.FALSE); + Boolean.TRUE); m_projectAddContactHide = new BooleanParameter( "com.arsdigita.cms.contenttypes.sciorganization.add_project_hide", Parameter.REQUIRED, @@ -126,22 +148,39 @@ public class SciOrganizationConfig extends AbstractConfig { Parameter.REQUIRED, Boolean.FALSE); + m_projectMembersAllInOne = new BooleanParameter( + "com.arsdigita.cms.contenttypes.sciproject.members_all_in_one", + Parameter.REQUIRED, + Boolean.TRUE); + m_projectMembersMerge = new BooleanParameter( + "com.arsdigita.cms.contenttypes.sciproject.members_merge", + Parameter.REQUIRED, + Boolean.FALSE); + register(m_organizationAddPersonHide); register(m_organizationAddDepartmentHide); register(m_organizationAddProjectHide); + register(m_organizationMembersAllInOne); + register(m_organizationMembersMerge); + register(m_organizationProjectsAllInOne); + register(m_organizationProjectsMerge); + register(m_departmentAddPersonHide); register(m_departmentAddSubDepartmentHide); register(m_departmentAddProjectHide); register(m_departmentSetOrganizationHide); register(m_departmentSetSuperDepartmentHide); + register(m_projectAddPersonHide); register(m_projectAddOrganizationHide); register(m_projectAddDepartmentHide); register(m_projectAddSubProjectHide); register(m_projectSetSuperProjectHide); + register(m_organizationDescriptionDhtml); register(m_departmentDescriptionDhtml); register(m_projectDescriptionDhtml); + register(m_organizationAddContactHide); register(m_departmentAddContactHide); register(m_projectAddContactHide); @@ -150,6 +189,9 @@ public class SciOrganizationConfig extends AbstractConfig { register(m_projectFundingDhtml); register(m_projectMaterialsHide); + register(m_projectMembersAllInOne); + register(m_projectMembersMerge); + loadInfo(); } @@ -169,6 +211,22 @@ public class SciOrganizationConfig extends AbstractConfig { return (Boolean) get(m_organizationAddContactHide); } + public final boolean getOrganizationMembersAllInOne() { + return (Boolean) get(m_organizationMembersAllInOne); + } + + public final boolean getOrganizationMembersMerge() { + return (Boolean) get(m_organizationMembersMerge); + } + + public final boolean getOrganizationProjectsAllInOne() { + return (Boolean) get(m_organizationProjectsAllInOne); + } + + public final boolean getOrganizationProjectsMerge() { + return (Boolean) get(m_organizationProjectsMerge); + } + public final boolean getDepartmentAddPersonHide() { return (Boolean) get(m_departmentAddPersonHide); } @@ -240,4 +298,12 @@ public class SciOrganizationConfig extends AbstractConfig { public final boolean getProjectMaterialsHide() { return (Boolean) get(m_projectMaterialsHide); } + + public final boolean getProjectMembersAllInOne() { + return (Boolean) get(m_projectMembersAllInOne); + } + + public final boolean getProjectMembersMerge() { + return (Boolean) get(m_projectMembersMerge); + } } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationConfig_parameter.properties b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationConfig_parameter.properties index 45451ca62..9793d2c3e 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationConfig_parameter.properties +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationConfig_parameter.properties @@ -18,6 +18,26 @@ com.arsdigita.cms.contenttypes.sciorganization.add_contact_hide.purpose = Hide t com.arsdigita.cms.contenttypes.sciorganization.add_contact_hide.example = false com.arsdigita.cms.contenttypes.sciorganization.add_contact_hide.format = [boolean] +com.arsdigita.cms.contenttypes.sciorganization.members_all_in_one.title = Members All-in-one +com.arsdigita.cms.contenttypes.sciorganization.members_all_in_one.purpose = Show all members (active, associated and former) in one instead in three seprated lists +com.arsdigita.cms.contenttypes.sciorganization.members_all_in_one.example = false +com.arsdigita.cms.contenttypes.sciorganization.members_all_in_one.format = [boolean] + +com.arsdigita.cms.contenttypes.sciorganization.members_merge.title = Merge members +com.arsdigita.cms.contenttypes.sciorganization.members_merge.purpose = Merge members from all departments and the organization into one list (or three list, for each status) +com.arsdigita.cms.contenttypes.sciorganization.members_merge.example = true +com.arsdigita.cms.contenttypes.sciorganization.members_merge.format = [boolean] + +com.arsdigita.cms.contenttypes.sciorganization.projects_all_in_one.title = Project All-in-one +com.arsdigita.cms.contenttypes.sciorganization.projects_all_in_one.purpose = Show all projects (ongoing and finished) in one instead of two seperated lists. +com.arsdigita.cms.contenttypes.sciorganization.projects_all_in_one.example = false +com.arsdigita.cms.contenttypes.sciorganization.projects_all_in_one.format = [boolean] + +com.arsdigita.cms.contenttypes.sciorganization.projects_merge.title = Merge projects +com.arsdigita.cms.contenttypes.sciorganization.projects_merge.purpose = Merge all projects from the organization and its departments into one list (or two list for ongoing and finished projects) +com.arsdigita.cms.contenttypes.sciorganization.projects_merge.examle = true +com.arsdigita.cms.contenttypes.sciorganization.projects_merge.format = [boolean] + com.arsdigita.cms.contenttypes.scidepartment.add_person_hide.title = Hide the person add step of SciDepartment com.arsdigita.cms.contenttypes.scidepartment.add_person_hide.purpose = Hide the person add step of SciDepartment com.arsdigita.cms.contenttypes.scidepartment.add_person_hide.example = false @@ -25,7 +45,7 @@ com.arsdigita.cms.contenttypes.scidepartment.add_person_hide.format = [boolean] com.arsdigita.cms.contenttypes.scidepartment.add_subdepartment_hide.title = Hide the subdepartment add step of SciDepartment com.arsdigita.cms.contenttypes.scidepartment.add_subdepartment_hide.purpose = Hide the subdepartment add step of SciDepartment -com.arsdigita.cms.contenttypes.scidepartment.add_subdepartment_hide.example = false +com.arsdigita.cms.contenttypes.scidepartment.add_subdepartment_hide.example = true com.arsdigita.cms.contenttypes.scidepartment.add_subdepartment_hide.format = [boolean] com.arsdigita.cms.contenttypes.scidepartment.set_organization_hide.title = Hide the organization set step of SciDepartment @@ -35,7 +55,7 @@ com.arsdigita.cms.contenttypes.scidepartment.set_organization_hide.format = [boo com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide.title = Hide the superdepartment set step of SciDepartment com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide.purpose = Hide the superdepartment set step of SciDepartment -com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide.example = false +com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide.example = true com.arsdigita.cms.contenttypes.scidepartment.set_superdepartment_hide.format = [boolean] com.arsdigita.cms.contenttypes.scidepartment.add_contact_hide.title = Hide the contact add step of Scidepartment @@ -60,12 +80,12 @@ com.arsdigita.cms.contenttypes.sciproject.add_department_hide = [boolean] com.arsdigita.cms.contenttypes.sciproject.add_subproject_hide.title = Hide the subproject add step of SciProject com.arsdigita.cms.contenttypes.sciproject.add_subproject_hide.purpose = Hide the subproject add step of SciProject -com.arsdigita.cms.contenttypes.sciproject.add_subproject_hide.example = false +com.arsdigita.cms.contenttypes.sciproject.add_subproject_hide.example = true com.arsdigita.cms.contenttypes.sciproject.add_subproject_hide.format = [boolean] com.arsdigita.cms.contenttypes.sciproject.set_superproject_hide.title = Hide the superproject add step of SciProject com.arsdigita.cms.contenttypes.sciproject.set_superproject_hide.purpose = Hide the superprojecft add step of SciProject -com.arsdigita.cms.contenttypes.sciproject.set_superproject_hide.example = false +com.arsdigita.cms.contenttypes.sciproject.set_superproject_hide.example = true com.arsdigita.cms.contenttypes.sciproject.set_superproject_hide.format = [boolean] com.arsdigita.cms.contenttypes.sciorganization.description_dhtml.title = Toggles the DHTML for the description of SciOrganization @@ -103,3 +123,13 @@ com.arsdigita.cms.contenttypes.sciproject.materials_hide.purpose = Hides the ste com.arsdigita.cms.contenttypes.sciproject.materials_hide.example = false com.arsdigita.cms.contenttypes.sciproject.materials_hide.format = [boolean] +com.arsdigita.cms.contenttypes.sciproject.members_all_in_one.title = Members All-in-one +com.arsdigita.cms.contenttypes.sciproject.members_all_in_one.purpose = Show all members (active, associated and former) in one instead in three separated lists +com.arsdigita.cms.contenttypes.sciproject.members_all_in_one.example = true +com.arsdigita.cms.contenttypes.sciproject.members_all_in_one.format = [boolean] + +com.arsdigita.cms.contenttypes.sciorganization.members_merge.title = Merge members +com.arsdigita.cms.contenttypes.sciorganization.members_merge.purpose = Merge members from all subproject into one list (or three list, for each status) +com.arsdigita.cms.contenttypes.sciorganization.members_merge.example = false +com.arsdigita.cms.contenttypes.sciorganization.members_merge.format = [boolean] + diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationLoader.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationLoader.java index 31504ab77..f6ea5a8a7 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationLoader.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciOrganizationLoader.java @@ -19,6 +19,14 @@ */ package com.arsdigita.cms.contenttypes; +import com.arsdigita.cms.ContentSection; +import com.arsdigita.cms.ContentType; +import com.arsdigita.cms.lifecycle.LifecycleDefinition; +import com.arsdigita.util.parameter.Parameter; +import com.arsdigita.util.parameter.ResourceParameter; +import com.arsdigita.workflow.simple.WorkflowTemplate; +import java.io.InputStream; + /** * Loader for {@link SciOrganization} * @@ -26,15 +34,21 @@ package com.arsdigita.cms.contenttypes; */ public class SciOrganizationLoader extends AbstractContentTypeLoader { + private ResourceParameter m_template; + public SciOrganizationLoader() { super(); - /* Template.create("SciOrganization Description Only", - "Display only the description of a SciOrganization", - "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/" - + "SciOrganizationDescription.jsp");*/ + m_template = new ResourceParameter( + "com.arsdigita.cms.contenttypes.SciOrganizationTemplate", + Parameter.REQUIRED, + "/WEB-INF/content-types/com/arsdigita/" + + "cms/contenttypes/sciorganization-item.jsp"); + + register(m_template); } + private static final String[] TYPES = { "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/" + "SciOrganization.xml" @@ -44,4 +58,20 @@ public class SciOrganizationLoader extends AbstractContentTypeLoader { public String[] getTypes() { return TYPES; } + + @Override + protected void prepareSection(final ContentSection section, + final ContentType type, + final LifecycleDefinition lifecycle, + final WorkflowTemplate workflow) { + super.prepareSection(section, type, lifecycle, workflow); + + setDefaultTemplate("SciOrganization Item", + "sciorganization-item", + (InputStream) get(m_template), + section, + type, + lifecycle, + workflow); + } } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectLoader.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectLoader.java index 906072a37..7f9339dc8 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectLoader.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/SciProjectLoader.java @@ -19,6 +19,14 @@ */ package com.arsdigita.cms.contenttypes; +import com.arsdigita.cms.ContentSection; +import com.arsdigita.cms.ContentType; +import com.arsdigita.cms.lifecycle.LifecycleDefinition; +import com.arsdigita.util.parameter.Parameter; +import com.arsdigita.util.parameter.ResourceParameter; +import com.arsdigita.workflow.simple.WorkflowTemplate; +import java.io.InputStream; + /** * Loader for {@link SciProject} * @@ -26,12 +34,41 @@ package com.arsdigita.cms.contenttypes; */ public class SciProjectLoader extends AbstractContentTypeLoader { + private ResourceParameter m_template; private static final String[] TYPES = { "/WEB-INF/content-types/com/arsdigita/cms/contenttypes/SciProject.xml" }; + public SciProjectLoader() { + super(); + + m_template = new ResourceParameter( + "com.arsdigita.cms.contenttypes.SciProjectTemplate", + Parameter.REQUIRED, + "/WEB-INF/content-types/com/arsdigita/" + + "cms/contenttypes/sciproject-item.jsp"); + + register(m_template); + } + + @Override public String[] getTypes() { return TYPES; } + @Override + protected void prepareSection(final ContentSection section, + final ContentType type, + final LifecycleDefinition lifecycle, + final WorkflowTemplate workflow) { + super.prepareSection(section, type, lifecycle, workflow); + + setDefaultTemplate("SciProject Item", + "sciproject-item", + (InputStream) get(m_template), + section, + type, + lifecycle, + workflow); + } } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPanel.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPanel.java new file mode 100644 index 000000000..37aad0682 --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPanel.java @@ -0,0 +1,478 @@ +/* + * Copyright (c) 2010 Jens Pelzetter, + * for the Center of Social Politics of the University of Bremen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.PageState; +import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitContactCollection; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitPersonCollection; +import com.arsdigita.cms.contenttypes.GenericPerson; +import com.arsdigita.cms.contenttypes.SciDepartment; +import com.arsdigita.cms.contenttypes.SciDepartmentProjectsCollection; +import com.arsdigita.cms.contenttypes.SciDepartmentSubDepartmentsCollection; +import com.arsdigita.cms.contenttypes.SciOrganizationConfig; +import com.arsdigita.cms.contenttypes.SciProject; +import com.arsdigita.xml.Element; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import org.apache.log4j.Logger; + +/** + * + * @author Jens Pelzetter + */ +public class SciDepartmentPanel extends SciOrganizationBasePanel { + + private static final Logger s_log = Logger.getLogger( + SciDepartmentPanel.class); + public static final String SHOW_DESCRIPTION = "description"; + public static final String SHOW_MEMBERS_ACTIVE = "membersActive"; + public static final String SHOW_MEMBERS_ASSOCIATED = "membersAssociated"; + public static final String SHOW_MEMBERS_FORMER = "membersFormer"; + public static final String SHOW_SUBDEPARTMENTS = "subdepartments"; + public static final String SHOW_PROJECTS = "projects"; + public static final String SHOW_PROJECTS_ONGOING = "projectsOngoing"; + public static final String SHOW_PROJECTS_FINISHED = "projectsFinished"; + + @Override + protected String getDefaultForShowParam() { + return SHOW_DESCRIPTION; + } + + @Override + protected Class getAllowedClass() { + return SciDepartment.class; + } + + protected boolean hasMembers(final SciDepartment department, + final List filters) { + if (department.getPersons() != null) { + GenericOrganizationalUnitPersonCollection persons; + persons = department.getPersons(); + for (String filter : filters) { + persons.addFilter(filter); + } + if (persons.size() > 0) { + return true; + } + } + + boolean hasMembers; + hasMembers = false; + + if (SciDepartment.getConfig().getOrganizationMembersMerge()) { + SciDepartmentSubDepartmentsCollection subDepartments; + subDepartments = department.getSubDepartments(); + while (subDepartments.next()) { + SciDepartment subDepartment = subDepartments.getSubDepartment(); + + hasMembers = hasMembers(subDepartment, filters); + if (hasMembers) { + return true; + } + } + } + + return false; + } + + protected boolean hasProjects(final SciDepartment department, + final List filters) { + if (department.getProjects() != null) { + SciDepartmentProjectsCollection projects; + projects = department.getProjects(); + for (String filter : filters) { + projects.addFilter(filter); + } + if (projects.size() > 0) { + return true; + } + } + + boolean hasProjects; + hasProjects = false; + + if (SciDepartment.getConfig().getOrganizationProjectsMerge()) { + SciDepartmentSubDepartmentsCollection subDepartments; + subDepartments = department.getSubDepartments(); + + while (subDepartments.next()) { + SciDepartment subDepartment = subDepartments.getSubDepartment(); + + hasProjects = hasProjects(subDepartment, filters); + if (hasProjects) { + return true; + } + } + } + + return false; + } + + protected void generateSubDepartmentsXML(final SciDepartment department, + final Element parent, + final PageState state) { + SciDepartmentSubDepartmentsCollection subDepartments; + subDepartments = department.getSubDepartments(); + subDepartments.addOrder("departmentOrder asc"); + + long pageNumber = getPageNumber(state); + + Element subDepartmentsElem = parent.newChildElement("subDepartments"); + + long pageCount = getPageCount(subDepartments.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, subDepartments.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + subDepartments.setRange((int) begin, (int) end); + createPaginatorElement( + parent, pageNumber, pageCount, begin, end, count); + + while (subDepartments.next()) { + SciDepartment subDepartment; + subDepartment = subDepartments.getSubDepartment(); + + Element subDepartmentElem = subDepartmentsElem.newChildElement( + "subDepartment"); + subDepartmentElem.addAttribute("order", Integer.toString(subDepartments. + getSubDepartmentOrder())); + subDepartmentElem.addAttribute("oid", subDepartment.getOID(). + toString()); + + Element title = subDepartmentElem.newChildElement("title"); + title.setText(department.getTitle()); + + if ((subDepartment.getAddendum() != null) + && !(subDepartment.getAddendum().isEmpty())) { + Element addendum = subDepartmentElem.newChildElement("addendum"); + addendum.setText(subDepartment.getAddendum()); + } + + if ((subDepartment.getDepartmentShortDescription() != null) + && !(subDepartment.getDepartmentShortDescription().isEmpty())) { + Element shortDesc = subDepartmentElem.newChildElement( + "shortDescription"); + shortDesc.setText(subDepartment.getDepartmentShortDescription()); + } + + GenericOrganizationalUnitPersonCollection heads; + heads = subDepartment.getPersons(); + heads.addFilter(("role_name = 'head'")); + heads.addOrder("surname asc, givenname asc"); + + if (heads.size() > 0) { + Element headsElem = subDepartmentElem.newChildElement("heads"); + + while (heads.next()) { + GenericPerson head = heads.getPerson(); + Element headElem = headsElem.newChildElement("head"); + Element titlePre = headElem.newChildElement("titlePre"); + titlePre.setText(head.getTitlePre()); + Element givenName = headElem.newChildElement("givenname"); + givenName.setText(head.getGivenName()); + Element surname = headElem.newChildElement("surname"); + surname.setText(head.getSurname()); + Element titlePost = headElem.newChildElement("titlePost"); + titlePost.setText(head.getTitlePost()); + } + } + + GenericOrganizationalUnitContactCollection contacts; + contacts = subDepartment.getContacts(); + if (contacts.size() > 0) { + Element contactsElem = subDepartmentElem.newChildElement( + "contacts"); + + while (contacts.next()) { + generateContactXML(contacts.getContact(), + contactsElem, + state, + Integer.toString( + contacts.getContactOrder()), + true); + } + } + } + } + + protected void generateMembersXML(final SciDepartment department, + final Element parent, + final PageState state, + final List filters) { + if (SciDepartment.getConfig().getOrganizationMembersMerge()) { + List members; + members = new LinkedList(); + GenericOrganizationalUnitPersonCollection departmentMembers; + departmentMembers = department.getPersons(); + for(String filter : filters) { + departmentMembers.addFilter(filter); + } + + SciDepartmentSubDepartmentsCollection subDepartments; + subDepartments = department.getSubDepartments(); + + while (departmentMembers.next()) { + addMember(departmentMembers.getPerson(), + departmentMembers.getRoleName(), + departmentMembers.getStatus(), + members); + } + + mergeMembers(subDepartments, members, filters); + + Collections.sort(members, new MemberListItemComparator()); + + long pageNumber = getPageNumber(state); + long pageCount = getPageCount(members.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, members.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + List membersToShow = members.subList((int) begin, + (int) end); + + createPaginatorElement( + parent, pageNumber, pageCount, begin, + end, + count); + Element membersElem = parent.newChildElement("members"); + + for (MemberListItem memberItem : membersToShow) { + generateMemberXML(memberItem.getMember(), + membersElem, + memberItem.getRole(), + memberItem.getStatus(), + state); + } + } else { + GenericOrganizationalUnitPersonCollection departmentMembers; + departmentMembers = department.getPersons(); + for(String filter : filters) { + departmentMembers.addFilter(filter); + } + + List members = new LinkedList(); + + while (departmentMembers.next()) { + addMember(departmentMembers.getPerson(), + departmentMembers.getRoleName(), + departmentMembers.getStatus(), + members); + } + + Collections.sort(members, new MemberListItemComparator()); + + long pageNumber = getPageNumber(state); + + Element membersElem = parent.newChildElement("members"); + + long pageCount = getPageCount(members.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, members.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + List membersToShow = members.subList((int) begin, + (int) end); + createPaginatorElement( + parent, pageNumber, pageCount, begin, end, + count); + + for (MemberListItem memberItem : membersToShow) { + generateMemberXML(memberItem.getMember(), + membersElem, + memberItem.getRole(), + memberItem.getStatus(), + state); + } + } + } + + protected void generateProjectsXML(final SciDepartment department, + final Element parent, + final PageState state, + final List filters) { + if (SciDepartment.getConfig().getOrganizationProjectsMerge()) { + List projects; + projects = new LinkedList(); + SciDepartmentProjectsCollection departmentProjects; + departmentProjects = department.getProjects(); + + if ((filters != null) + && !(filters.isEmpty())) { + for (String filter : filters) { + departmentProjects.addFilter(filter); + } + } + + SciDepartmentSubDepartmentsCollection subDepartments; + subDepartments = department.getSubDepartments(); + + while (departmentProjects.next()) { + projects.add(departmentProjects.getProject()); + } + + mergeProjects(subDepartments, projects, filters); + + Collections.sort(projects, new SciProjectComparator()); + + long pageNumber = getPageNumber(state); + long pageCount = getPageCount(projects.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, projects.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + List projectsToShow = projects.subList((int) begin, + (int) end); + + createPaginatorElement( + parent, pageNumber, pageCount, begin, + end, + count); + + Element projectsElem = parent.newChildElement("projects"); + for (SciProject project : projectsToShow) { + generateProjectXML(project, projectsElem, state); + } + } else { + SciDepartmentProjectsCollection departmentProjects; + departmentProjects = department.getProjects(); + + if ((filters != null) + && !(filters.isEmpty())) { + for (String filter : filters) { + departmentProjects.addFilter(filter); + } + } + + List projects = new LinkedList(); + + while (departmentProjects.next()) { + projects.add(departmentProjects.getProject()); + } + + Collections.sort(projects, new SciProjectComparator()); + + long pageNumber = getPageNumber(state); + long pageCount = getPageCount(projects.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, projects.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + List projectsToShow = projects.subList((int) begin, + (int) end); + + createPaginatorElement( + parent, pageNumber, pageCount, begin, + end, + count); + + Element projectsElem = parent.newChildElement("projects"); + for (SciProject project : projectsToShow) { + generateProjectXML(project, projectsElem, state); + } + } + } + + @Override + public void generateXML(ContentItem item, + Element element, + PageState state) { + Element content = generateBaseXML(item, element, state); + + Element availableData = content.newChildElement("availableData"); + + SciDepartment department = (SciDepartment) item; + + SciOrganizationConfig config = SciDepartment.getConfig(); + + if ((department.getDepartmentDescription() != null) + && !department.getDepartmentDescription().isEmpty()) { + availableData.newChildElement("description"); + } + if ((department.getContacts() != null) + && (department.getContacts().size() > 0)) { + availableData.newChildElement("contacts"); + } + if ((department.getSubDepartments() != null) + && (department.getSubDepartments().size() > 0)) { + availableData.newChildElement("subDepartments"); + } + if (config.getOrganizationMembersAllInOne()) { + if (hasMembers(department, new LinkedList())) { + availableData.newChildElement("members"); + } + } else { + if (hasMembers(department, getFiltersForActiveMembers())) { + availableData.newChildElement("membersActive"); + } + if (hasMembers(department, getFiltersForAssociatedMembers())) { + availableData.newChildElement("membersAssociated"); + } + if (hasMembers(department, getFiltersForFormerMembers())) { + availableData.newChildElement("membersFormer"); + } + } + if (config.getOrganizationProjectsAllInOne()) { + if (hasProjects(department, new LinkedList())) { + availableData.newChildElement("projects"); + } else { + if (hasProjects(department, getFiltersForOngoingProjects())) { + availableData.newChildElement("projectsOngoing"); + } + if (hasProjects(department, getFiltersForFinishedProjects())) { + availableData.newChildElement("projectsFinished"); + } + } + } + + String show = getShowParam(state); + + if (SHOW_DESCRIPTION.equals(show)) { + String desc; + desc = department.getDepartmentDescription(); + + Element description = content.newChildElement("description"); + description.setText(desc); + } else if (SHOW_CONTACTS.equals(show)) { + generateContactsXML(department, content, state); + } else if (SHOW_MEMBERS.equals(show)) { + generateMembersXML(department, content, state, new LinkedList()); + } else if (SHOW_MEMBERS_ACTIVE.equals(show)) { + generateMembersXML(department, content, state, getFiltersForActiveMembers()); + } else if (SHOW_MEMBERS_ASSOCIATED.equals(show)) { + generateMembersXML(department, content, state, getFiltersForAssociatedMembers()); + } else if (SHOW_MEMBERS_FORMER.equals(show)) { + generateMembersXML(department, content, state, getFiltersForFormerMembers()); + } else if (SHOW_PROJECTS.equals(show)) { + generateProjectsXML(department, content, state, new LinkedList()); + } else if (SHOW_PROJECTS_ONGOING.equals(show)) { + generateProjectsXML(department, content, state, getFiltersForOngoingProjects()); + } else if (SHOW_PROJECTS_FINISHED.equals(show)) { + generateProjectsXML(department, content, state, getFiltersForFinishedProjects()); + } + } +} diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsTable.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsTable.java index 99fcc12da..bb47a57fa 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsTable.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsTable.java @@ -85,7 +85,7 @@ public class SciDepartmentProjectsTable SciOrganizationGlobalizationUtil.globalize( "sciorganization.ui.department.project.remove").localize(), TABLE_COL_DEL)); - colModel.add(new TableColumn( + /*colModel.add(new TableColumn( 2, SciOrganizationGlobalizationUtil.globalize( "sciorganization.ui.department.project.up").localize(), @@ -94,15 +94,15 @@ public class SciDepartmentProjectsTable 3, SciOrganizationGlobalizationUtil.globalize( "sciorganization.ui.department.project.down").localize(), - TABLE_COL_DOWN)); + TABLE_COL_DOWN));*/ setModelBuilder( new SciDepartmentProjectsTableModelBuilder(itemModel)); colModel.get(0).setCellRenderer(new EditCellRenderer()); colModel.get(1).setCellRenderer(new DeleteCellRenderer()); - colModel.get(2).setCellRenderer(new UpCellRenderer()); - colModel.get(3).setCellRenderer(new DownCellRenderer()); + //colModel.get(2).setCellRenderer(new UpCellRenderer()); + //colModel.get(3).setCellRenderer(new DownCellRenderer()); addTableActionListener(this); } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberPropertiesStep.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberPropertiesStep.java index f5cdc2f83..6ee6607ef 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberPropertiesStep.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberPropertiesStep.java @@ -45,52 +45,7 @@ public class SciMemberPropertiesStep extends SimpleEditStep { sheet = (DomainObjectPropertySheet) GenericPersonPropertiesStep. getGenericPersonPropertySheet(itemModel); - - DomainObjectPropertySheet.AttributeFormatter associatedFormatter = - new DomainObjectPropertySheet.AttributeFormatter() { - - public String format(DomainObject obj, String attribute, - PageState state) { - SciMember member; - - member = (SciMember) obj; - - if ((member.isAssociatedMember() != null) && member.isAssociatedMember()) { - return (String) SciOrganizationGlobalizationUtil.globalize( - "sciorganization.ui.member.yes").localize(); - } else { - return (String) SciOrganizationGlobalizationUtil.globalize( - "sciorganization.ui.member.no").localize(); - } - } - }; - - DomainObjectPropertySheet.AttributeFormatter formerFormatter = - new DomainObjectPropertySheet.AttributeFormatter() { - - public String format(DomainObject obj, String attribute, - PageState state) { - SciMember member; - - member = (SciMember) obj; - - if ((member.isFormerMember() != null) && member.isFormerMember()) { - return (String) SciOrganizationGlobalizationUtil.globalize( - "sciorganization.ui.member.yes").localize(); - } else { - return (String) SciOrganizationGlobalizationUtil.globalize( - "sciorganization.ui.member.no").localize(); - } - } - }; - - sheet.add(SciOrganizationGlobalizationUtil.globalize( - "sciorganization.ui.member.associatedMember"), - SciMember.ASSOCIATED_MEMBER, associatedFormatter); - sheet.add(SciOrganizationGlobalizationUtil.globalize( - "sciorganization.ui.member.formerMember"), - SciMember.FORMER_MEMBER, formerFormatter); - + return sheet; } } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberPropertyForm.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberPropertyForm.java index 3a0cc804d..a18a7ec53 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberPropertyForm.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberPropertyForm.java @@ -67,24 +67,7 @@ public class SciMemberPropertyForm @Override protected void addWidgets() { - super.addWidgets(); - - add(new Label(SciOrganizationGlobalizationUtil.globalize( - "sciorganization.ui.member.associatedMember"))); - ParameterModel isAssociated = new BooleanParameter( - SciMember.ASSOCIATED_MEMBER); - ArrayParameter associatedParam = new ArrayParameter(isAssociated); - m_associated = new CheckboxGroup(associatedParam); - m_associated.addOption(new Option("assoc", "")); - add(m_associated); - - add(new Label(SciOrganizationGlobalizationUtil.globalize( - "sciorganization.ui.member.formerMember"))); - ParameterModel isFormer = new BooleanParameter(SciMember.FORMER_MEMBER); - ArrayParameter formerParam = new ArrayParameter(isFormer); - m_former = new CheckboxGroup(formerParam); - m_former.addOption(new Option("former", "")); - add(m_former); + super.addWidgets(); } @Override @@ -92,15 +75,7 @@ public class SciMemberPropertyForm super.init(fse); FormData data = fse.getFormData(); - SciMember member = (SciMember) super.initBasicWidgets(fse); - - if ((member.isAssociatedMember() != null) && - member.isAssociatedMember()) { - m_associated.setValue(fse.getPageState(), "assoc"); - } - if ((member.isFormerMember() != null) && member.isFormerMember()) { - m_former.setValue(fse.getPageState(), "former"); - } + SciMember member = (SciMember) super.initBasicWidgets(fse); } @Override @@ -112,21 +87,7 @@ public class SciMemberPropertyForm if ((member != null) && getSaveCancelSection().getSaveButton(). isSelected(fse.getPageState())) { - if (m_associated.getValue(state) == null) { - logger.debug("Setting associated member status to false..."); - member.setAssociatedMember(false); - } else { - logger.debug("Setting associated member status to true..."); - member.setAssociatedMember(true); - } - if (m_former.getValue(state) == null) { - logger.debug("Setting former member status to false..."); - member.setFormerMember(false); - } else { - logger.debug("Setting former member status to true..."); - member.setFormerMember(true); - } - + member.save(); init(fse); diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationBasePanel.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationBasePanel.java new file mode 100644 index 000000000..b841a1b6b --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationBasePanel.java @@ -0,0 +1,414 @@ +/* + * Copyright (c) 2010 Jens Pelzetter, + * for the Center of Social Politics of the University of Bremen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.PageState; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitContactCollection; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitPersonCollection; +import com.arsdigita.cms.contenttypes.GenericPerson; +import com.arsdigita.cms.contenttypes.GenericPersonContactCollection; +import com.arsdigita.cms.contenttypes.SciDepartment; +import com.arsdigita.cms.contenttypes.SciDepartmentProjectsCollection; +import com.arsdigita.cms.contenttypes.SciDepartmentSubDepartmentsCollection; +import com.arsdigita.cms.contenttypes.SciProject; +import com.arsdigita.xml.Element; +import java.util.Calendar; +import java.util.Collections; +import java.util.Comparator; +import java.util.GregorianCalendar; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; +import org.apache.log4j.Logger; + +/** + * Base class for all panels of the sci-types-organization module. + * + * @see SciOrganizationPanel + * @see SciDepartmentPanel + * @see SciProjectPanel + * @author Jens Pelzetter + */ +public abstract class SciOrganizationBasePanel + extends GenericOrganizationalUnitPanel { + + private final static Logger s_log = Logger.getLogger( + SciOrganizationBasePanel.class); + + protected class MemberListItem { + + private GenericPerson member; + private String role; + private String status; + + public MemberListItem(final GenericPerson member, + final String role, + final String status) { + this.member = member; + this.role = role; + this.status = status; + } + + public GenericPerson getMember() { + return member; + } + + public String getRole() { + return role; + } + + public String getStatus() { + return status; + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final MemberListItem other = (MemberListItem) obj; + if (this.member != other.member && (this.member == null || !this.member. + equals(other.member))) { + return false; + } + if ((this.role == null) ? (other.role != null) + : !this.role.equals(other.role)) { + return false; + } + if ((this.status == null) ? (other.status != null) + : !this.status.equals(other.status)) { + return false; + } + return true; + } + + @Override + public int hashCode() { + int hash = 7; + hash = + 79 * hash + (this.member != null ? this.member.hashCode() : 0); + hash = 79 * hash + (this.role != null ? this.role.hashCode() : 0); + hash = + 79 * hash + (this.status != null ? this.status.hashCode() : 0); + return hash; + } + } + + protected class MemberListItemComparator + implements Comparator { + + public int compare(MemberListItem member1, MemberListItem member2) { + int result = 0; + + result = + member1.getMember().getSurname().compareToIgnoreCase(member2. + getMember(). + getSurname()); + + if (result == 0) { + result = member1.getMember().getGivenName().compareTo( + member2.getMember().getGivenName()); + } + + return result; + } + } + + protected class SciProjectComparator implements Comparator { + + public int compare(SciProject project1, SciProject project2) { + int result = 0; + + result = project1.getBegin().compareTo(project2.getBegin()); + + if (result == 0) { + result = project1.getEnd().compareTo(project2.getEnd()); + } + + return result; + } + } + + protected List getFiltersForActiveMembers() { + List filters; + filters = new LinkedList(); + + filters.add("link.status = 'active'"); + + return filters; + } + + protected List getFiltersForAssociatedMembers() { + List filters; + filters = new LinkedList(); + + filters.add("link.status = 'associated'"); + + return filters; + } + + protected List getFiltersForFormerMembers() { + List filters; + filters = new LinkedList(); + + filters.add("link.status = 'former'"); + + return filters; + } + + protected List getFiltersForOngoingProjects() { + List filters; + Calendar today; + + filters = new LinkedList(); + today = new GregorianCalendar(); + filters.add(String.format("projectend > '%d-%02d-%02d'", + today.get(java.util.Calendar.YEAR), + today.get(java.util.Calendar.MONTH) + + 1, + today.get(java.util.Calendar.DAY_OF_MONTH))); + return filters; + } + + protected List getFiltersForFinishedProjects() { + List filters; + Calendar today; + + filters = new LinkedList(); + today = new GregorianCalendar(); + filters.add(String.format("projectend <= '%d-%02d-%02d'", + today.get(java.util.Calendar.YEAR), + today.get(java.util.Calendar.MONTH) + + 1, + today.get(java.util.Calendar.DAY_OF_MONTH))); + return filters; + } + + protected void generateMemberXML(final GenericPerson person, + final Element parent, + final String roleName, + final String status, + final PageState state) { + Element memberElem = parent.newChildElement("member"); + + memberElem.addAttribute("role", roleName); + memberElem.addAttribute("status", status); + memberElem.addAttribute("oid", person.getOID().toString()); + + Element title = memberElem.newChildElement("title"); + title.setText(person.getTitle()); + + if ((person.getTitlePre() != null) + && !person.getTitlePre().isEmpty()) { + Element titlePre = memberElem.newChildElement("titlePre"); + titlePre.setText(person.getTitlePre()); + } + + Element surname = memberElem.newChildElement("surname"); + surname.setText(person.getSurname()); + + Element givenName = memberElem.newChildElement("givenname"); + givenName.setText(person.getGivenName()); + + if ((person.getTitlePost() != null) + && !person.getTitlePost().isEmpty()) { + Element titlePost = memberElem.newChildElement("titlePost"); + titlePost.setText(person.getTitlePost()); + } + + if ((person.getContacts() != null) + && (person.getContacts().size() > 0)) { + GenericPersonContactCollection contacts; + contacts = person.getContacts(); + + Element contactsElem = + memberElem.newChildElement("contacts"); + + while (contacts.next()) { + generateContactXML( + contacts.getContact(), + contactsElem, + state, + contacts.getContactOrder(), + false); + } + } + } + + protected void addMember(final GenericPerson person, + final String roleName, + final String status, + final List members) { + members.add(new MemberListItem(person, roleName, status)); + } + + protected void mergeMembers( + final SciDepartmentSubDepartmentsCollection subDepartments, + final List members, + final List filters) { + while (subDepartments.next()) { + SciDepartment subDepartment = subDepartments.getSubDepartment(); + GenericOrganizationalUnitPersonCollection departmentMembers; + departmentMembers = subDepartment.getPersons(); + for (String filter : filters) { + departmentMembers.addFilter(filter); + } + + while (departmentMembers.next()) { + addMember(departmentMembers.getPerson(), + departmentMembers.getRoleName(), + departmentMembers.getStatus(), + members); + } + + SciDepartmentSubDepartmentsCollection subSubDepartments; + subSubDepartments = subDepartment.getSubDepartments(); + + if ((subSubDepartments != null) + && (subSubDepartments.size() > 0)) { + mergeMembers(subSubDepartments, members, filters); + } + } + } + + protected void generateMembersListXML(final List members, + final Element parent, + final PageState state) { + Set membersSet; + List membersWithoutDoubles; + membersSet = new HashSet(members); + membersWithoutDoubles = new LinkedList(membersSet); + + Collections.sort(membersWithoutDoubles, new MemberListItemComparator()); + + long pageNumber = getPageNumber(state); + long pageCount = getPageCount(membersWithoutDoubles.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, membersWithoutDoubles.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + List membersWithoutDoublesToShow = membersWithoutDoubles. + subList((int) begin, + (int) end); + + createPaginatorElement( + parent, pageNumber, pageCount, begin, + end, + count); + Element membersWithoutDoublesElem = parent.newChildElement( + "members"); + + for (MemberListItem memberItem : membersWithoutDoublesToShow) { + generateMemberXML(memberItem.getMember(), + membersWithoutDoublesElem, + memberItem.getRole(), + memberItem.getStatus(), + state); + } + } + + protected void generateProjectXML(final SciProject project, + final Element parent, + final PageState state) { + Element projectElem = parent.newChildElement("project"); + projectElem.addAttribute("oid", project.toString()); + + Element title = projectElem.newChildElement("title"); + title.setText(project.getTitle()); + + if ((project.getAddendum() != null) + && !(project.getAddendum().isEmpty())) { + Element addendum = projectElem.newChildElement("addendum"); + addendum.setText(project.getAddendum()); + } + + if ((project.getProjectShortDescription() != null) + && !(project.getProjectShortDescription().isEmpty())) { + Element shortDesc = projectElem.newChildElement("shortDescription"); + shortDesc.setText(project.getProjectShortDescription()); + } + + GenericOrganizationalUnitPersonCollection members; + members = project.getPersons(); + members.addOrder("surname asc, givenname asc"); + + if (members.size() > 0) { + Element membersElem = projectElem.newChildElement("mebers"); + + while (members.next()) { + generateMemberXML(members.getPerson(), + membersElem, + members.getRoleName(), + members.getStatus(), + state); + } + } + + GenericOrganizationalUnitContactCollection contacts; + contacts = project.getContacts(); + + if (contacts.size() > 0) { + Element contactsElem = projectElem.newChildElement("contacts"); + + while (contacts.next()) { + generateContactXML(contacts.getContact(), + contactsElem, + state, + Integer.toString(contacts.getContactOrder()), + true); + } + } + } + + protected void mergeProjects( + final SciDepartmentSubDepartmentsCollection subDepartments, + final List projects, + final List filters) { + while (subDepartments.next()) { + SciDepartmentProjectsCollection departmentProjects; + departmentProjects = subDepartments.getSubDepartment().getProjects(); + + if ((filters != null) + && !(filters.isEmpty())) { + for (String filter : filters) { + departmentProjects.addFilter(filter); + } + } + + while (departmentProjects.next()) { + projects.add(departmentProjects.getProject()); + } + + SciDepartmentSubDepartmentsCollection subSubDepartments; + subSubDepartments = subDepartments.getSubDepartment(). + getSubDepartments(); + + if ((subSubDepartments != null) + && subSubDepartments.size() > 0) { + mergeProjects(subSubDepartments, projects, filters); + } + } + } +} diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationPanel.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationPanel.java new file mode 100644 index 000000000..394e001f8 --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationPanel.java @@ -0,0 +1,587 @@ +/* + * Copyright (c) 2010 Jens Pelzetter, + * for the Center of Social Politics of the University of Bremen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.PageState; +import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitContactCollection; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitPersonCollection; +import com.arsdigita.cms.contenttypes.GenericPerson; +import com.arsdigita.cms.contenttypes.SciDepartment; +import com.arsdigita.cms.contenttypes.SciDepartmentProjectsCollection; +import com.arsdigita.cms.contenttypes.SciDepartmentSubDepartmentsCollection; +import com.arsdigita.cms.contenttypes.SciOrganization; +import com.arsdigita.cms.contenttypes.SciOrganizationConfig; +import com.arsdigita.cms.contenttypes.SciOrganizationDepartmentsCollection; +import com.arsdigita.cms.contenttypes.SciOrganizationProjectsCollection; +import com.arsdigita.cms.contenttypes.SciProject; +import com.arsdigita.xml.Element; +import java.util.Calendar; +import java.util.Collections; +import java.util.GregorianCalendar; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; +import org.apache.log4j.Logger; + +/** + * Panel for rendering the properties of a SciOrganization. The property to show + * is selected via the show parameter. + * + * @author Jens Pelzetter + */ +public class SciOrganizationPanel extends SciOrganizationBasePanel { + + private static final Logger s_log = Logger.getLogger( + SciOrganizationPanel.class); + public static final String SHOW_DESCRIPTION = "description"; + public static final String SHOW_MEMBERS_ACTIVE = "membersActive"; + public static final String SHOW_MEMBERS_ASSOCIATED = "membersAssociated"; + public static final String SHOW_MEMBERS_FORMER = "membersFormer"; + public static final String SHOW_DEPARTMENTS = "departments"; + public static final String SHOW_PROJECTS = "projects"; + public static final String SHOW_PROJECTS_ONGOING = "projectsOngoing"; + public static final String SHOW_PROJECTS_FINISHED = "projectsFinished"; + + @Override + protected String getDefaultForShowParam() { + return SHOW_DESCRIPTION; + } + + @Override + protected Class getAllowedClass() { + return SciOrganization.class; + } + + /** + * + * @param orga + * @param filters + * @return + */ + protected boolean hasMembers(final SciOrganization orga, + final List filters) { + + if (orga.getPersons() != null) { + GenericOrganizationalUnitPersonCollection persons; + persons = orga.getPersons(); + for (String filter : filters) { + persons.addFilter(filter); + } + if (persons.size() > 0) { + return true; + } + } + + if (SciOrganization.getConfig().getOrganizationMembersMerge()) { + boolean hasMembers; + hasMembers = false; + SciOrganizationDepartmentsCollection departments; + departments = orga.getDepartments(); + while (departments.next()) { + SciDepartment department = departments.getDepartment(); + + hasMembers = hasMembers(department, filters); + if (hasMembers) { + return true; + } + } + } + return false; + } + + protected boolean hasMembers(final SciDepartment department, + final List filters) { + + if (department.getPersons() != null) { + GenericOrganizationalUnitPersonCollection persons; + persons = department.getPersons(); + for (String filter : filters) { + persons.addFilter(filter); + } + if (persons.size() > 0) { + return true; + } + } else { + + boolean hasMembers; + hasMembers = false; + + SciDepartmentSubDepartmentsCollection subDepartments; + subDepartments = department.getSubDepartments(); + while (subDepartments.next()) { + SciDepartment subDepartment = subDepartments.getSubDepartment(); + + hasMembers = hasMembers(subDepartment, filters); + if (hasMembers) { + return true; + } + } + } + + return false; + } + + /** + * + * @param orga + * @param filters + * @return + */ + protected boolean hasProjects(final SciOrganization orga, + final List filters) { + if (orga.getProjects() != null) { + SciOrganizationProjectsCollection projects; + projects = orga.getProjects(); + for (String filter : filters) { + projects.addFilter(filter); + } + if (projects.size() > 0) { + return true; + } + } + + boolean hasProjects; + hasProjects = false; + + if (SciOrganization.getConfig().getOrganizationProjectsMerge()) { + SciOrganizationDepartmentsCollection departments; + departments = orga.getDepartments(); + + while (departments.next()) { + SciDepartment department = departments.getDepartment(); + + hasProjects = hasProjects(department, filters); + if (hasProjects) { + return true; + } + } + } + + return false; + } + + protected boolean hasProjects(final SciDepartment department, + final List filters) { + if (department.getProjects() != null) { + SciDepartmentProjectsCollection projects; + projects = department.getProjects(); + for (String filter : filters) { + projects.addFilter(filter); + } + if (projects.size() > 0) { + return true; + } + } + + boolean hasProjects; + hasProjects = false; + + SciDepartmentSubDepartmentsCollection subDepartments; + subDepartments = department.getSubDepartments(); + while (subDepartments.next()) { + SciDepartment subDepartment = subDepartments.getSubDepartment(); + + hasProjects = hasProjects(subDepartment, filters); + if (hasProjects) { + return true; + } + } + + return false; + } + + protected void generateDepartmentsXML(final SciOrganization orga, + final Element parent, + final PageState state) { + SciOrganizationDepartmentsCollection departments; + departments = orga.getDepartments(); + departments.addOrder("departmentOrder asc"); + + long pageNumber = getPageNumber(state); + + Element departmentsElem = parent.newChildElement("departments"); + + long pageCount = getPageCount(departments.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, departments.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + departments.setRange((int) begin, (int) end); + createPaginatorElement( + parent, pageNumber, pageCount, begin, end, count); + + while (departments.next()) { + SciDepartment department; + department = departments.getDepartment(); + + Element departmentElem = departmentsElem.newChildElement( + "department"); + departmentElem.addAttribute("order", Integer.toString(departments. + getDepartmentOrder())); + departmentElem.addAttribute("oid", department.getOID().toString()); + + Element title = departmentElem.newChildElement("title"); + title.setText(department.getTitle()); + + if ((department.getAddendum() != null) + && !(department.getAddendum().isEmpty())) { + Element addendum = departmentElem.newChildElement("addendum"); + addendum.setText(department.getAddendum()); + } + + if ((department.getDepartmentShortDescription() != null) + && !(department.getDepartmentShortDescription().isEmpty())) { + Element shortDesc = departmentElem.newChildElement( + "shortDescription"); + shortDesc.setText(department.getDepartmentShortDescription()); + } + + GenericOrganizationalUnitPersonCollection heads; + heads = department.getPersons(); + heads.addFilter("role_name = 'head'"); + heads.addOrder("surname asc, givenname asc"); + + if (heads.size() > 0) { + Element headsElem = departmentElem.newChildElement("heads"); + + while (heads.next()) { + GenericPerson head = heads.getPerson(); + Element headElem = headsElem.newChildElement("head"); + Element titlePre = headElem.newChildElement("titlePre"); + titlePre.setText(head.getTitlePre()); + Element givenName = headElem.newChildElement("givenname"); + givenName.setText(head.getGivenName()); + Element surname = headElem.newChildElement("surname"); + surname.setText(head.getSurname()); + Element titlePost = headElem.newChildElement("titlePost"); + titlePost.setText(head.getTitlePost()); + } + } + + GenericOrganizationalUnitContactCollection contacts; + contacts = department.getContacts(); + if (contacts.size() > 0) { + Element contactsElem = + departmentElem.newChildElement("contacts"); + + while (contacts.next()) { + generateContactXML(contacts.getContact(), + contactsElem, + state, + Integer.toString( + contacts.getContactOrder()), + true); + } + } + } + } + + protected void mergeMembers( + final SciOrganizationDepartmentsCollection departments, + final List members, + final List filters) { + + while (departments.next()) { + SciDepartment department = departments.getDepartment(); + GenericOrganizationalUnitPersonCollection departmentsMembers; + departmentsMembers = department.getPersons(); + for (String filter : filters) { + departmentsMembers.addFilter(filter); + } + + while (departmentsMembers.next()) { + addMember(departmentsMembers.getPerson(), + departmentsMembers.getRoleName(), + departmentsMembers.getStatus(), + members); + } + + SciDepartmentSubDepartmentsCollection subDepartments; + subDepartments = department.getSubDepartments(); + + + if ((subDepartments != null) + && subDepartments.size() > 0) { + mergeMembers(subDepartments, members, filters); + } + } + } + + protected void generateMembersXML(final SciOrganization orga, + final Element parent, + final PageState state, + final List filters) { + if (SciOrganization.getConfig().getOrganizationMembersMerge()) { + List members; + members = new LinkedList(); + GenericOrganizationalUnitPersonCollection orgaMembers; + orgaMembers = orga.getPersons(); + for (String filter : filters) { + orgaMembers.addFilter(filter); + } + + SciOrganizationDepartmentsCollection departments; + departments = orga.getDepartments(); + + while (orgaMembers.next()) { + addMember(orgaMembers.getPerson(), + orgaMembers.getRoleName(), + orgaMembers.getStatus(), + members); + } + + mergeMembers(departments, members, filters); + + generateMembersListXML(members, parent, state); + } else { + GenericOrganizationalUnitPersonCollection orgaMembers; + orgaMembers = orga.getPersons(); + for(String filter : filters) { + orgaMembers.addFilter(filter); + } + List members = new LinkedList(); + + while (orgaMembers.next()) { + addMember(orgaMembers.getPerson(), + orgaMembers.getRoleName(), + orgaMembers.getStatus(), + members); + } + + generateMembersListXML(members, parent, state); + } + } + + protected void mergeProjects( + final SciOrganizationDepartmentsCollection departments, + final List projects, + final List filters) { + + while (departments.next()) { + SciDepartmentProjectsCollection departmentProjects; + departmentProjects = departments.getDepartment().getProjects(); + + if ((filters != null) + && !(filters.isEmpty())) { + for (String filter : filters) { + departmentProjects.addFilter(filter); + } + } + + while (departmentProjects.next()) { + projects.add(departmentProjects.getProject()); + } + + SciDepartmentSubDepartmentsCollection subDepartments; + subDepartments = departments.getDepartment().getSubDepartments(); + + if ((subDepartments != null) + && subDepartments.size() > 0) { + mergeProjects(subDepartments, projects, filters); + } + } + } + + protected void generateProjectsXML(final SciOrganization orga, + final Element parent, + final PageState state, + final List filters) { + if (SciOrganization.getConfig().getOrganizationProjectsMerge()) { + List projects; + projects = new LinkedList(); + SciOrganizationProjectsCollection orgaProjects; + orgaProjects = orga.getProjects(); + + if ((filters != null) + && !(filters.isEmpty())) { + for (String filter : filters) { + orgaProjects.addFilter(filter); + } + } + + SciOrganizationDepartmentsCollection departments; + departments = orga.getDepartments(); + + while (orgaProjects.next()) { + projects.add(orgaProjects.getProject()); + } + + mergeProjects(departments, projects, filters); + + Set projectsSet; + List projectsWithoutDoubles; + projectsSet = new HashSet(projects); + projectsWithoutDoubles = new LinkedList(projectsSet); + + Collections.sort(projectsWithoutDoubles, new SciProjectComparator()); + + long pageNumber = getPageNumber(state); + long pageCount = getPageCount(projectsWithoutDoubles.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, projectsWithoutDoubles.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + List projectsWithoutDoublesToShow = projectsWithoutDoubles. + subList((int) begin, + (int) end); + + createPaginatorElement( + parent, pageNumber, pageCount, begin, + end, + count); + + Element projectsWithoutDoublesElem = parent.newChildElement( + "projectsWithoutDoubles"); + for (SciProject project : projectsWithoutDoublesToShow) { + generateProjectXML(project, projectsWithoutDoublesElem, state); + } + } else { + SciOrganizationProjectsCollection orgaProjects; + orgaProjects = orga.getProjects(); + + if ((filters != null) + && !(filters.isEmpty())) { + for (String filter : filters) { + orgaProjects.addFilter(filter); + } + } + + List projects = new LinkedList(); + + while (orgaProjects.next()) { + projects.add(orgaProjects.getProject()); + } + + Collections.sort(projects, new SciProjectComparator()); + + long pageNumber = getPageNumber(state); + long pageCount = getPageCount(projects.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, projects.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + List projectsToShow = projects.subList((int) begin, + (int) end); + + createPaginatorElement( + parent, pageNumber, pageCount, begin, + end, + count); + + Element projectsElem = parent.newChildElement("projects"); + for (SciProject project : projectsToShow) { + generateProjectXML(project, projectsElem, state); + } + } + } + + @Override + public void generateXML(ContentItem item, + Element element, + PageState state) { + Element content = generateBaseXML(item, element, state); + + Element availableData = content.newChildElement("availableData"); + + SciOrganization orga = (SciOrganization) item; + + SciOrganizationConfig config; + config = SciOrganization.getConfig(); + + if ((orga.getOrganizationDescription() != null) + && !(orga.getOrganizationDescription().isEmpty())) { + availableData.newChildElement("description"); + } + if ((orga.getContacts() != null) + && (orga.getContacts().size() > 0)) { + availableData.newChildElement("contacts"); + } + if ((orga.getDepartments() != null) + && (orga.getDepartments().size() > 0)) { + availableData.newChildElement("departments"); + } + if (config.getOrganizationMembersAllInOne()) { + if (hasMembers(orga, new LinkedList())) { + availableData.newChildElement("members"); + } + } else { + if (hasMembers(orga, getFiltersForActiveMembers())) { + availableData.newChildElement("membersActive"); + } + if (hasMembers(orga, getFiltersForAssociatedMembers())) { + availableData.newChildElement("membersAssociated"); + } + if (hasMembers(orga, getFiltersForFormerMembers())) { + availableData.newChildElement("membersFormer"); + } + } + if (config.getOrganizationProjectsAllInOne()) { + if (hasProjects(orga, new LinkedList())) { + availableData.newChildElement("projects"); + } + } else { + if (hasProjects(orga, getFiltersForOngoingProjects())) { + availableData.newChildElement("projectsOngoing"); + } + if (hasProjects(orga, getFiltersForFinishedProjects())) { + availableData.newChildElement("projectsFinished"); + } + } + + String show = getShowParam(state); + + if (SHOW_DESCRIPTION.equals(show)) { + String desc; + desc = orga.getOrganizationDescription(); + + Element description = content.newChildElement("description"); + description.setText(desc); + } else if (SHOW_CONTACTS.equals(show)) { + generateContactsXML(orga, content, state); + } else if (SHOW_DEPARTMENTS.equals(show)) { + generateDepartmentsXML(orga, content, state); + } else if (SHOW_MEMBERS.equals(show)) { + generateMembersXML(orga, content, state, new LinkedList()); + } else if (SHOW_MEMBERS_ACTIVE.equals(show)) { + generateMembersXML(orga, content, state, + getFiltersForActiveMembers()); + } else if (SHOW_MEMBERS_ASSOCIATED.equals(show)) { + generateMembersXML(orga, content, state, + getFiltersForAssociatedMembers()); + } else if (SHOW_MEMBERS_FORMER.equals(show)) { + generateMembersXML(orga, content, state, + getFiltersForFormerMembers()); + } else if (SHOW_PROJECTS.equals(show)) { + generateProjectsXML(orga, content, state, new LinkedList()); + } else if (SHOW_PROJECTS_ONGOING.equals(show)) { + generateProjectsXML( + orga, content, state, getFiltersForOngoingProjects()); + } else if (SHOW_PROJECTS_FINISHED.equals(show)) { + Calendar today = new GregorianCalendar(); + generateProjectsXML( + orga, content, state, getFiltersForFinishedProjects()); + } + } +} diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationProjectsTable.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationProjectsTable.java index c9fea044e..7dd62618b 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationProjectsTable.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationProjectsTable.java @@ -86,7 +86,7 @@ public class SciOrganizationProjectsTable SciOrganizationGlobalizationUtil.globalize( "sciorganization.ui.organization.project.remove").localize(), TABLE_COL_DEL)); - colModel.add(new TableColumn( + /*colModel.add(new TableColumn( 2, SciOrganizationGlobalizationUtil.globalize( "sciorganization.ui.organization.project.up").localize(), @@ -95,15 +95,15 @@ public class SciOrganizationProjectsTable 3, SciOrganizationGlobalizationUtil.globalize( "sciorganization.ui.organization.project.down").localize(), - TABLE_COL_DOWN)); + TABLE_COL_DOWN));*/ setModelBuilder( new SciOrganizationProjectsTableModelBuilder(itemModel)); colModel.get(0).setCellRenderer(new EditCellRenderer()); colModel.get(1).setCellRenderer(new DeleteCellRenderer()); - colModel.get(2).setCellRenderer(new UpCellRenderer()); - colModel.get(3).setCellRenderer(new DownCellRenderer()); + //colModel.get(2).setCellRenderer(new UpCellRenderer()); + //colModel.get(3).setCellRenderer(new DownCellRenderer()); addTableActionListener(this); } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPanel.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPanel.java new file mode 100644 index 000000000..53499aa6a --- /dev/null +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPanel.java @@ -0,0 +1,256 @@ +/* + * Copyright (c) 2010 Jens Pelzetter, + * for the Center of Social Politics of the University of Bremen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.PageState; +import com.arsdigita.cms.ContentItem; +import com.arsdigita.cms.contenttypes.GenericOrganizationalUnitPersonCollection; +import com.arsdigita.cms.contenttypes.GenericPerson; +import com.arsdigita.cms.contenttypes.SciMember; +import com.arsdigita.cms.contenttypes.SciOrganizationConfig; +import com.arsdigita.cms.contenttypes.SciProject; +import com.arsdigita.cms.contenttypes.SciProjectSubProjectsCollection; +import com.arsdigita.xml.Element; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.LinkedList; +import java.util.List; +import org.apache.log4j.Logger; + +/** + * + * @author Jens Pelzetter + */ +public class SciProjectPanel extends SciOrganizationBasePanel { + + private static final Logger s_log = Logger.getLogger(SciProjectPanel.class); + public static final String SHOW_DESCRIPTION = "description"; + public static final String SHOW_SUBPROJECTS = "subprojects"; + public static final String SHOW_SUBPROJECTS_ONGOING = "subprojectsOngoing"; + public static final String SHOW_SUBPROJECTS_FINISHED = "subprojectsFinished"; + public static final String SHOW_PUBLICATIONS = "publications"; + + @Override + protected String getDefaultForShowParam() { + return SHOW_DESCRIPTION; + } + + @Override + protected Class getAllowedClass() { + return SciProject.class; + } + + protected boolean hasMembers(final SciProject project, + final List filters) { + if (project.getPersons() != null) { + GenericOrganizationalUnitPersonCollection persons; + persons = project.getPersons(); + for(String filter : filters) { + persons.addFilter(filter); + } + if (persons.size() > 0) { + return true; + } + } + + boolean hasMembers; + hasMembers = false; + if (SciProject.getConfig().getOrganizationMembersMerge()) { + SciProjectSubProjectsCollection subProjects; + subProjects = project.getSubProjects(); + + while (subProjects.next()) { + SciProject subProject = subProjects.getSubProject(); + + hasMembers = hasMembers(subProject, filters); + if (hasMembers) { + return true; + } + } + } + + return false; + } + + protected boolean hasSubProjects(final SciProject project, + final List filters) { + if (project.getSubProjects() != null) { + + SciProjectSubProjectsCollection subProjects; + subProjects = project.getSubProjects(); + for(String filter : filters) { + subProjects.addFilter(filter); + } + if (subProjects.size() > 0) { + return true; + } + } + return false; + } + + protected void generateSubProjectsXML(final SciProject project, + final Element parent, + final PageState state, + final List filters) { + SciProjectSubProjectsCollection subProjects; + subProjects = project.getSubProjects(); + for(String filter : filters) { + subProjects.addFilter(filter); + } + subProjects.addOrder("begin desc, end desc"); + + long pageNumber = getPageNumber(state); + + Element subProjectsElem = parent.newChildElement("subProjects"); + + long pageCount = getPageCount(subProjects.size()); + long begin = getPaginatorBegin(pageNumber); + long count = getPaginatorCount(begin, subProjects.size()); + long end = getPaginatorEnd(begin, count); + pageNumber = normalizePageNumber(pageCount, pageNumber); + + subProjects.setRange((int) begin, (int) end); + createPaginatorElement(parent, pageNumber, pageCount, begin, end, count); + + while (subProjects.next()) { + SciProject subProject; + subProject = subProjects.getSubProject(); + + generateProjectXML(subProject, subProjectsElem, state); + } + } + + protected void mergeMembers( + final SciProjectSubProjectsCollection subProjects, + final List members, + final boolean active, + final boolean associated, + final boolean former) { + while (subProjects.next()) { + SciProject subProject = subProjects.getSubProject(); + GenericOrganizationalUnitPersonCollection projectMembers; + projectMembers = subProject.getPersons(); + + while (projectMembers.next()) { + addMember(projectMembers.getPerson(), + projectMembers.getRoleName(), + projectMembers.getStatus(), + members); + } + + SciProjectSubProjectsCollection subSubProjects; + subSubProjects = subProject.getSubProjects(); + if ((subSubProjects != null) && (subSubProjects.size() > 0)) { + mergeMembers(subProjects, members, active, associated, former); + } + } + } + + protected void generateMembersXML(final SciProject project, + final Element parent, + final PageState state, + final boolean active, + final boolean associated, + final boolean former) { + GenericOrganizationalUnitPersonCollection projectMembers; + projectMembers = project.getPersons(); + + List members; + members = new LinkedList(); + + while (projectMembers.next()) { + addMember(projectMembers.getPerson(), + projectMembers.getRoleName(), + projectMembers.getStatus(), + members); + } + + if (SciProject.getConfig().getProjectMembersMerge()) { + + SciProjectSubProjectsCollection subProjects; + subProjects = project.getSubProjects(); + + mergeMembers(subProjects, members, active, associated, former); + } + + generateMembersListXML(members, parent, state); + } + + @Override + public void generateXML(ContentItem item, + Element element, + PageState state) { + Element content = generateBaseXML(item, element, state); + + Element availableData = content.newChildElement("availableData"); + + SciProject project = (SciProject) item; + + SciOrganizationConfig config = SciProject.getConfig(); + + if ((project.getProjectDescription() != null) + && !project.getProjectDescription().isEmpty()) { + availableData.newChildElement("description"); + } + if ((project.getContacts() != null) + && (project.getContacts().size() > 0)) { + availableData.newChildElement("contacts"); + } + if ((project.getSubProjects() != null) + && (project.getSubProjects().size() > 0)) { + availableData.newChildElement("subProjects"); + } + if (config.getProjectMembersAllInOne()) { + if (hasMembers(project, new LinkedList())) { + availableData.newChildElement("members"); + } + } else { + if (hasMembers(project, getFiltersForActiveMembers())) { + availableData.newChildElement("activeMembers"); + } + if (hasMembers(project,getFiltersForAssociatedMembers())) { + availableData.newChildElement("associatedMembers"); + } + if (hasMembers(project, getFiltersForFormerMembers())) { + availableData.newChildElement("formerMembers"); + } + } + + String show = getShowParam(state); + + if (SHOW_DESCRIPTION.equals(show)) { + String desc; + desc = project.getProjectDescription(); + + Element description = content.newChildElement("description"); + description.setText(desc); + } else if (SHOW_CONTACTS.equals(show)) { + generateContactsXML(project, content, state); + } else if (SHOW_SUBPROJECTS.equals(show)) { + generateSubProjectsXML(project, content, state, new LinkedList()); + } else if (SHOW_SUBPROJECTS_ONGOING.equals(show)) { + generateSubProjectsXML(project, content, state, getFiltersForOngoingProjects()); + } else if (SHOW_SUBPROJECTS_FINISHED.equals(show)) { + generateSubProjectsXML(project, content, state, getFiltersForFinishedProjects()); + } else if (SHOW_MEMBERS.equals(show)) { + generateMembersXML(project, content, state, true, true, true); + } + } +} diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsTable.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsTable.java index 2ddd0b62a..fdda0c957 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsTable.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsTable.java @@ -82,7 +82,7 @@ public class SciProjectSubProjectsTable SciOrganizationGlobalizationUtil.globalize( "sciorganization.ui.project.subproject.remove").localize(), TABLE_COL_DEL)); - colModel.add(new TableColumn( + /*colModel.add(new TableColumn( 2, SciOrganizationGlobalizationUtil.globalize( "sciorganization.ui.project.subproject.up").localize(), @@ -91,14 +91,14 @@ public class SciProjectSubProjectsTable 3, SciOrganizationGlobalizationUtil.globalize( "sciorganization.ui.project.subproject.down").localize(), - TABLE_COL_DOWN)); + TABLE_COL_DOWN));*/ setModelBuilder( new SciProjectSubProjectsTableModelBuilder(itemModel)); colModel.get(0).setCellRenderer(new EditCellRenderer()); colModel.get(1).setCellRenderer(new DeleteCellRenderer()); - colModel.get(2).setCellRenderer(new UpCellRenderer()); - colModel.get(3).setCellRenderer(new DownCellRenderer()); + //colModel.get(2).setCellRenderer(new UpCellRenderer()); + //colModel.get(3).setCellRenderer(new DownCellRenderer()); addTableActionListener(this); } diff --git a/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java b/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java index 77d488e20..9347235d7 100644 --- a/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java +++ b/ccm-zes-aplaws/src/com/arsdigita/aplaws/Loader.java @@ -231,127 +231,6 @@ public class Loader extends PackageLoader { "ZeS Welcome Page for navigation", "/packages/navigation/templates/zes-welcome.jsp"); - template = Template.create( - "SciProject List", - "List of SciProjects", - "/packages/navigation/templates/SciProjectList.jsp"); - - template = Template.create( - "SciOrganization Description Only", - "Display only the description of a SciOrganization", - "/packages/navigation/templates/" - + "SciOrganizationDescription.jsp"); - - template = Template.create( - "SciOrganization Members", - "Displays only the members of a SciOrganization " - + "(and the short description)", - "/packages/navigation/templates/SciOrganizationMembers.jsp"); - - template = - Template.create( - "SciOrganization Active Members", - "Displays only the active members of a SciOrganization " - + "(and the short description)", - "/packages/navigation/templates/SciOrganizationActiveMembers.jsp"); - - template = - Template.create( - "SciOrganization Associated Members", - "Displays only the associated members of a SciOrganization " - + "(and the short description)", - "/packages/navigation/templates/SciOrganizationAssociatedMembers.jsp"); - - template = - Template.create( - "SciOrganization Former Members", - "Displays only the former members of a SciOrganization " - + "(and the short description)", - "/packages/navigation/templates/SciOrganizationFormerMembers.jsp"); - - template = Template.create( - "SciOrganization Departments", - "Displays only the departments of a SciOrganization", - "/packages/naviagation/templates/" - + "SciOrganizationDepartments.jsp"); - - template = Template.create( - "SciOrganization Projects", - "Displays only the projects of a SciOrganization (and its " - + "departments", - "/packages/navigation/templates/SciOrganizationProjects.jsp"); - - template = - Template.create( - "SciOrganization Ongoing Projects", - "Displays only the ongoging projects of a SciOrganization " - + "(and its departments)", - "/packages/navigation/templates/SciOrganizationOngoingProjects.jsp"); - - template = - Template.create( - "SciOrganization Finished Projects", - "Displays only the finished projects of a SciOrganization " - + "(and its departments)", - "/packages/navigation/templates/SciOrganizationFinishedProjects.jsp"); - - template = Template.create( - "SciDepartment Description Only", - "Display only the description of a SciDepartment", - "/packages/navigation/templates/" - + "SciDepartmentDescription.jsp"); - - template = Template.create( - "SciDepartment Members", - "Displays only the members of a SciDepartment " - + "(and the short description)", - "/packages/navigation/templates/SciDepartmentMembers.jsp"); - - template = Template.create( - "SciDepartment Active Members", - "Displays only the active members of a SciDepartment " - + "(and the short description)", - "/packages/navigation/templates/SciDepartmentActiveMembers.jsp"); - - template = - Template.create( - "SciDepartment Associated Members", - "Displays only the associated members of a SciDepartment " - + "(and the short description)", - "/packages/navigation/templates/SciDepartmentAssociatedMembers.jsp"); - - template = Template.create( - "SciDepartment Former Members", - "Displays only the former members of a SciDepartment " - + "(and the short description)", - "/packages/navigation/templates/SciDepartmentFormerMembers.jsp"); - - template = Template.create( - "SciDepartment Departments", - "Displays only the subdepartments of a SciDepartment", - "/packages/naviagation/templates/" - + "SciDepartmentDepartments.jsp"); - - template = Template.create( - "SciDepartment Projects", - "Displays only the projects of a SciDepartment (and its " - + "departments", - "/packages/navigation/templates/SciDepartmentProjects.jsp"); - - template = - Template.create( - "SciDepartment Ongoing Projects", - "Displays only the ongoing projects of a SciDepartment (and its " - + "subdepartments", - "/packages/navigation/templates/SciDepartmentOngoingProjects.jsp"); - - template = - Template.create( - "SciDepartment Finished Projects", - "Displays only the finished projects of a SciDepartment (and its " - + "subdepartments", - "/packages/navigation/templates/SciDepartmentFinishedProjects.jsp"); - template = Template.create( "MultiPartArticle as Index Item",