ccm-cms-types-xmlfeed: Upgrade script (6.6.0 to 6.6.1) for settings correct keys for labels and description of the authoring step.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2385 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2013-10-25 17:28:37 +00:00
parent e672128cbe
commit f9e5f9596f
6 changed files with 104 additions and 35 deletions

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project" <ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-cms-types-xmlfeed" name="ccm-cms-types-xmlfeed"
prettyName="XML Feed" prettyName="XML Feed"
version="6.6.0" version="6.6.1"
release="1" release="1"
webapp="ROOT"> webapp="ROOT">
<ccm:dependencies> <ccm:dependencies>

View File

@ -0,0 +1,59 @@
--
-- Copyright (C) 2013 Jens Pelzetter. All Rights Reserved.
--
-- 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
--
-- Fixes the labels for authoring steps (and the moment the key in the
-- database is the english text, this upgrade replaces this with the
-- key and sets the bundle for the authoring steps.
UPDATE authoring_steps
SET label_key = 'cms.contenttypes.shared.basic_properties.title',
label_bundle = 'com.arsdigita.cms.CMSResources',
description_key = 'cms.contenttypes.shared.basic_properties.description',
description_bundle = 'com.arsdigita.cms.CMSResources'
WHERE step_id = (SELECT authoring_steps.step_id
FROM authoring_steps
JOIN authoring_kit_step_map ON authoring_steps.step_id = authoring_kit_step_map.step_id
JOIN authoring_kits ON authoring_kit_step_map.kit_id = authoring_kits.kit_id
JOIN content_types ON authoring_kits.type_id = content_types.type_id
WHERE authoring_steps.component = 'com.arsdigita.cms.contenttypes.xmlfeed.ui.XMLFeedProperties'
AND content_types.object_type = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeed');
UPDATE authoring_steps
SET label_key = 'xmlfeed.authoring.styling_step.title',
label_bundle = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources',
description_key = 'xmlfeed.authoring.styling_step.description',
description_bundle = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources'
WHERE step_id = (SELECT authoring_steps.step_id
FROM authoring_steps
JOIN authoring_kit_step_map ON authoring_steps.step_id = authoring_kit_step_map.step_id
JOIN authoring_kits ON authoring_kit_step_map.kit_id = authoring_kits.kit_id
JOIN content_types ON authoring_kits.type_id = content_types.type_id
WHERE authoring_steps.component = 'com.arsdigita.cms.contenttypes.xmlfeed.ui.XSLFileProperties'
AND content_types.object_type = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeed');
UPDATE authoring_steps
SET label_key = 'xmlfeed.authoring.query_form_step.title',
label_bundle = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources',
description_key = 'xmlfeed.authoring.query_form.description',
description_bundle = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources'
WHERE step_id = (SELECT authoring_steps.step_id
FROM authoring_steps
JOIN authoring_kit_step_map ON authoring_steps.step_id = authoring_kit_step_map.step_id
JOIN authoring_kits ON authoring_kit_step_map.kit_id = authoring_kits.kit_id
JOIN content_types ON authoring_kits.type_id = content_types.type_id
WHERE authoring_steps.component = 'com.arsdigita.cms.ui.formbuilder.FormControls'
AND content_types.object_type = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeed');

View File

@ -0,0 +1 @@
@@ ../default/upgrade/6.6.0-6.6.1/fix_authoring_step_labels.sql

View File

@ -0,0 +1,3 @@
begin;
\i ../default/upgrade/6.6.0-6.6.1/fix_authoring_step_labels.sql
commit;

View File

@ -1,45 +1,45 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types" <ctd:content-types xmlns:ctd="http://xmlns.redhat.com/cms/content-types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd">
<ctd:content-type label="XML Feed" <ctd:content-type label="XML Feed"
description="Form for querying a remote XML service" description="Form for querying a remote XML service"
objectType="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeed" objectType="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeed"
classname="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeed"> classname="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeed">
<ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate"> <ctd:authoring-kit createComponent="com.arsdigita.cms.ui.authoring.PageCreate">
<ctd:authoring-step <ctd:authoring-step
label="Basic Properties" label="Basic Properties"
labelKey="cms.contenttypes.shared.basic_properties.title" labelKey="cms.contenttypes.shared.basic_properties.title"
labelBundle="com.arsdigita.cms.CMSResources" labelBundle="com.arsdigita.cms.CMSResources"
descriptionKey="cms.contenttypes.shared.basic_properties.description" descriptionKey="cms.contenttypes.shared.basic_properties.description"
descriptionBundle="com.arsdigita.cms.CMSResources" descriptionBundle="com.arsdigita.cms.CMSResources"
description="Edit the basic properties" description="Edit the basic properties"
component="com.arsdigita.cms.contenttypes.xmlfeed.ui.XMLFeedProperties" component="com.arsdigita.cms.contenttypes.xmlfeed.ui.XMLFeedProperties"
ordering="1"/> ordering="1"/>
<!-- Styling Step label="Styling" --> <!-- Styling Step label="Styling" -->
<ctd:authoring-step <ctd:authoring-step
labelKey="xmlfeed.authoring.styling_step.title" labelKey="xmlfeed.authoring.styling_step.title"
labelBundle="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources" labelBundle="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources"
descriptionKey="xmlfeed.authoring.styling_step.description" descriptionKey="xmlfeed.authoring.styling_step.description"
descriptionBundle="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources" descriptionBundle="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources"
component="com.arsdigita.cms.contenttypes.xmlfeed.ui.XSLFileProperties" component="com.arsdigita.cms.contenttypes.xmlfeed.ui.XSLFileProperties"
ordering="2"/> ordering="2"/>
<!-- Query Form Step label="Query Form" --> <!-- Query Form Step label="Query Form" -->
<ctd:authoring-step <ctd:authoring-step
labelKey="xmlfeed.authoring.query_form_step.title" labelKey="xmlfeed.authoring.query_form_step.title"
labelBundle="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources" labelBundle="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources"
descriptionKey="xmlfeed.authoring.query_form.description" descriptionKey="xmlfeed.authoring.query_form.description"
descriptionBundle="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources" descriptionBundle="com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources"
component="com.arsdigita.cms.ui.formbuilder.FormControls" component="com.arsdigita.cms.ui.formbuilder.FormControls"
ordering="3" /> ordering="3" />
<ctd:include href="/WEB-INF/content-types/shared.xml"/> <ctd:include href="/WEB-INF/content-types/shared.xml"/>
</ctd:authoring-kit> </ctd:authoring-kit>
</ctd:content-type> </ctd:content-type>
</ctd:content-types> </ctd:content-types>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<upgrade>
<version from="6.6.0" to="6.6.1">
<script sql="ccm-cms-types-xmlfeed/upgrade/::database::-6.6.0-6.6.1.sql"/>
</version>
</upgrade>