From 4010761c1a3aafce2d05f0acead1c729512950a7 Mon Sep 17 00:00:00 2001 From: jensp Date: Tue, 3 Dec 2013 18:29:14 +0000 Subject: [PATCH] =?UTF-8?q?SciProject:=20Angabe=20von=20F=C3=B6rderkennzei?= =?UTF-8?q?chen=20bei=20Drittmittelgebern.=20Das=20F=C3=B6rderkennzeichen?= =?UTF-8?q?=20ist=20eine=20Eigenschaft=20der=20Assoziation=20zwischen=20Pr?= =?UTF-8?q?ojekt=20und=20Drittmittelgeber.=20Es=20k=C3=B6nnen=20somit=20me?= =?UTF-8?q?hrere=20F=C3=B6rderkennzeichen=20(pro=20Mittelgeber=20eines)=20?= =?UTF-8?q?angegeben=20werden.=20Die=20Drittmittelgeber=20k=C3=B6nnen=20je?= =?UTF-8?q?tzt=20au=C3=9Ferdem=20sortiert=20werden.=20Die=20genaue=20Anzei?= =?UTF-8?q?ge=20h=C3=A4ngt=20wie=20=C3=BCblich=20vom=20Theme=20am.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@2469 8810af33-2d31-482b-a856-94f89814c4df --- .../navigation/ui/object/CategoryFilter.java | 3 +- .../ui/PublicationAuthorsTable.java | 13 +- ccm-sci-types-project/application.xml | 10 +- .../arsdigita/content-types/SciProject.pdl | 4 +- .../6.6.6-6.6.7/create_sponsor_map.sql | 20 ++- .../6.6.7-6.6.8/add_sponsor_fundingcode.sql | 2 + .../upgrade/postgres-6.6.7-6.6.8.sql | 7 + .../src/ccm-sci-types-project.upgrade | 3 + .../cms/contenttypes/SciProject.java | 12 ++ .../cms/contenttypes/SciProjectBundle.java | 28 +-- .../SciProjectSponsorCollection.java | 125 +++++++++++++- .../ui/SciProjectResources.properties | 8 +- .../ui/SciProjectResources_de.properties | 8 +- .../ui/SciProjectSponsorForm.java | 141 ++++++++++++--- .../ui/SciProjectSponsorSheet.java | 163 +++++++++++++++++- .../ui/SciProjectSponsorStep.java | 26 ++- .../contenttypes/ui/SciProjectSummaryTab.java | 3 + 17 files changed, 499 insertions(+), 77 deletions(-) create mode 100644 ccm-sci-types-project/sql/ccm-sci-types-project/default/upgrade/6.6.7-6.6.8/add_sponsor_fundingcode.sql create mode 100644 ccm-sci-types-project/sql/ccm-sci-types-project/upgrade/postgres-6.6.7-6.6.8.sql diff --git a/ccm-navigation/src/com/arsdigita/navigation/ui/object/CategoryFilter.java b/ccm-navigation/src/com/arsdigita/navigation/ui/object/CategoryFilter.java index 8369c7c68..8e8fb866d 100644 --- a/ccm-navigation/src/com/arsdigita/navigation/ui/object/CategoryFilter.java +++ b/ccm-navigation/src/com/arsdigita/navigation/ui/object/CategoryFilter.java @@ -79,7 +79,7 @@ public class CategoryFilter { categoryIds.add(value); } } - + final com.arsdigita.persistence.Filter filter = objects.addInSubqueryFilter("parent.id", "com.arsdigita.categorization.objectIDsInMultipleSubtrees"); filter.set("categoryIDs", categoryIds); //objects.addFilter(compoundFilter); @@ -190,4 +190,5 @@ public class CategoryFilter { } } } + } diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationAuthorsTable.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationAuthorsTable.java index f6c06b124..7ed268b41 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationAuthorsTable.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/PublicationAuthorsTable.java @@ -39,7 +39,6 @@ import com.arsdigita.cms.contenttypes.AuthorshipCollection; import com.arsdigita.cms.contenttypes.GenericPerson; import com.arsdigita.cms.contenttypes.Publication; import com.arsdigita.cms.dispatcher.ItemResolver; -import com.arsdigita.cms.dispatcher.Utilities; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.dispatcher.ObjectNotFoundException; import com.arsdigita.globalization.GlobalizedMessage; @@ -82,31 +81,31 @@ public class PublicationAuthorsTable colModel.add(new TableColumn( 0, PublicationGlobalizationUtil.globalize( - "publications.ui.authors.author.name").localize(), + "publications.ui.authors.author.name"), TABLE_COL_EDIT)); colModel.add(new TableColumn( 1, PublicationGlobalizationUtil.globalize( - "publications.ui.authors.author.isEditor").localize())); + "publications.ui.authors.author.isEditor"))); colModel.add(new TableColumn( 2, PublicationGlobalizationUtil.globalize( - "publications.ui.authors.edit_assoc").localize(), + "publications.ui.authors.edit_assoc"), TABLE_COL_EDIT_ASSOC)); colModel.add(new TableColumn( 3, PublicationGlobalizationUtil.globalize( - "publications.ui.authors.author.delete").localize(), + "publications.ui.authors.author.delete"), TABLE_COL_DEL)); colModel.add(new TableColumn( 4, PublicationGlobalizationUtil.globalize( - "publications.ui.authors.author.up").localize(), + "publications.ui.authors.author.up"), TABLE_COL_UP)); colModel.add(new TableColumn( 5, PublicationGlobalizationUtil.globalize( - "publications.ui.authors.author.down").localize(), + "publications.ui.authors.author.down"), TABLE_COL_DOWN)); setModelBuilder( diff --git a/ccm-sci-types-project/application.xml b/ccm-sci-types-project/application.xml index adc89fac1..35f3b2c57 100644 --- a/ccm-sci-types-project/application.xml +++ b/ccm-sci-types-project/application.xml @@ -1,10 +1,10 @@ + name="ccm-sci-types-project" + prettyName="Scientific CMS Project content type" + version = "6.6.8" + release="1" + webapp="ROOT"> diff --git a/ccm-sci-types-project/pdl/com/arsdigita/content-types/SciProject.pdl b/ccm-sci-types-project/pdl/com/arsdigita/content-types/SciProject.pdl index 749a1d3d6..bc6856e46 100644 --- a/ccm-sci-types-project/pdl/com/arsdigita/content-types/SciProject.pdl +++ b/ccm-sci-types-project/pdl/com/arsdigita/content-types/SciProject.pdl @@ -33,7 +33,9 @@ association { to ct_sci_project_sponsor_map.sponsor_id, join ct_sci_project_sponsor_map.project_id to ct_sci_project_bundles.bundle_id; - Integer[0..1] sponsorOrder = ct_sci_project_sponsor_map.sponsor_order INTEGER; + + Integer[0..1] sponsorOrder = ct_sci_project_sponsor_map.sponsor_order INTEGER; + String[0..1] sponsorFundingCode = ct_sci_project_sponsor_map.sponsor_funding_code VARCHAR(512); } query getIdsOfProjectsOfOrgaUnit { diff --git a/ccm-sci-types-project/sql/ccm-sci-types-project/default/upgrade/6.6.6-6.6.7/create_sponsor_map.sql b/ccm-sci-types-project/sql/ccm-sci-types-project/default/upgrade/6.6.6-6.6.7/create_sponsor_map.sql index 2304da355..52bcec2d9 100644 --- a/ccm-sci-types-project/sql/ccm-sci-types-project/default/upgrade/6.6.6-6.6.7/create_sponsor_map.sql +++ b/ccm-sci-types-project/sql/ccm-sci-types-project/default/upgrade/6.6.6-6.6.7/create_sponsor_map.sql @@ -1,15 +1,17 @@ -create table ct_sci_project_sponsor_map ( +CREATE TABLE ct_sci_project_sponsor_map ( sponsor_id INTEGER not null, project_id INTEGER not null, sponsor_order INTEGER, - constraint ct_sci_pro_spo_map_pro_p_y6bbk - primary key(project_id, sponsor_id) + CONSTRAINT ct_sci_pro_spo_map_pro_p_y6bbk + PRIMARY KEY(project_id, sponsor_id) ); -alter table ct_sci_project_sponsor_map add - constraint ct_sci_pro_spo_map_pro_f_8a7hv foreign key (project_id) - references ct_sci_project_bundles(bundle_id); -alter table ct_sci_project_sponsor_map add - constraint ct_sci_pro_spo_map_spo_f_7x6td foreign key (sponsor_id) - references cms_orgaunit_bundles(bundle_id); + ALTER TABLE ct_sci_project_sponsor_map +ADD CONSTRAINT ct_sci_pro_spo_map_pro_f_8a7hv + FOREIGN KEY (project_id) + REFERENCES ct_sci_project_bundles(bundle_id); + ALTER TABLE ct_sci_project_sponsor_map +ADD CONSTRAINT ct_sci_pro_spo_map_spo_f_7x6td + FOREIGN KEY (sponsor_id) + REFERENCES cms_orgaunit_bundles(bundle_id); diff --git a/ccm-sci-types-project/sql/ccm-sci-types-project/default/upgrade/6.6.7-6.6.8/add_sponsor_fundingcode.sql b/ccm-sci-types-project/sql/ccm-sci-types-project/default/upgrade/6.6.7-6.6.8/add_sponsor_fundingcode.sql new file mode 100644 index 000000000..9b3c59d1b --- /dev/null +++ b/ccm-sci-types-project/sql/ccm-sci-types-project/default/upgrade/6.6.7-6.6.8/add_sponsor_fundingcode.sql @@ -0,0 +1,2 @@ +ALTER TABLE ct_sci_project_sponsor_map + ADD COLUMN sponsor_funding_code VARCHAR(512); \ No newline at end of file diff --git a/ccm-sci-types-project/sql/ccm-sci-types-project/upgrade/postgres-6.6.7-6.6.8.sql b/ccm-sci-types-project/sql/ccm-sci-types-project/upgrade/postgres-6.6.7-6.6.8.sql new file mode 100644 index 000000000..6b4149fbd --- /dev/null +++ b/ccm-sci-types-project/sql/ccm-sci-types-project/upgrade/postgres-6.6.7-6.6.8.sql @@ -0,0 +1,7 @@ +\echo 'ScientificCMS SciProject module upgrade 6.6.7 -> 6.6.8 (PostgreSQL)' + +begin; + +\i ../default/upgrade/6.6.7-6.6.8/add_sponsor_fundingcode.sql + +end; \ No newline at end of file diff --git a/ccm-sci-types-project/src/ccm-sci-types-project.upgrade b/ccm-sci-types-project/src/ccm-sci-types-project.upgrade index 9d8f36465..c33f6634e 100644 --- a/ccm-sci-types-project/src/ccm-sci-types-project.upgrade +++ b/ccm-sci-types-project/src/ccm-sci-types-project.upgrade @@ -5,4 +5,7 @@