Yannick Pignot (European Commission) multilingual services

- EditionService for versioning of groups of translations
 - Quite a bit of trimming of whitespace that I have no intention of undoing.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5927 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-06-13 01:13:25 +00:00
parent 9abfab20ab
commit 35c3659f14
27 changed files with 5891 additions and 4335 deletions

View File

@@ -38,8 +38,40 @@ related_content=Related Content
deep_copy=Deep Copy deep_copy=Deep Copy
new_edition=New Edition new_edition=New Edition
new_edition_from=New Edition from this new_edition_from=New Edition from this
new_edition_tooltip=Create a new edition from this multilingual content.
properties_close=Edit multilingual properties when the dialog close properties_close=Edit multilingual properties when the dialog close
pivot_translation=Pivot translation pivot_translation=Pivot translation
edition=Edition
editions=Editions
current=Current
new_edition_wizard_title=New Edition Wizard
new_edition_wizard_desc=This wizard helps you to create a new edition of a multilingual document.
error_new_edition_wizard=Impossible to create a new edition from this multilingual document.
step1_choose_translation=Starting item
step1_choose_translation_desc=Step one, select the starting item from the list of translations
new_edition_choose_translation_title=Step One - Starting item
new_edition_choose_translation_desc=Choose the content item you want to create the new edition.
step2_edition_details=Edition Details
step2_edition_details_desc=Step two, edit the detail of the new edition
new_edition_details_title=Step Two - Edition Details
new_edition_details_desc=Enter information about the new edition.
step3_edition_summary=Summary
step3_edition_summary_desc=Step three, view the summary of the new edition
new_edition_summary_title=Step Three - Summary
new_edition_summary_desc=The information you entered is shown below.
new_edition_finish_instruction=To close this wizard and apply your changes click Finish.
edition_properties=Edition Properties
edition_notes=Edition Notes
modify_translation_properties=Modify translation properties when this wizard finishes.
translation_title=Translation title
translation_language=Translation language
translation_author=Translation author
new_edition_details=New edition details
create_new_edition_using=Create a new edition using
translations_checked_out_error=Cannot create a new edition because the following translations are checked out.
available_translations=Available translations
# Date Pattern # Date Pattern
date_pattern=d MMMM yyyy date_pattern=d MMMM yyyy

View File

@@ -583,7 +583,7 @@
<image>/images/icons/reset.gif</image> <image>/images/icons/reset.gif</image>
<action>#{NavigatorPluginBean.reset}</action> <action>#{NavigatorPluginBean.reset}</action>
</action> </action>
<!-- Make a document multilingual --> <!-- Make a document multilingual -->
<action id="make_doc_multilingual"> <action id="make_doc_multilingual">
<permissions> <permissions>
@@ -646,6 +646,17 @@
</params> </params>
</action> </action>
<!-- Manage ml container details -->
<action id="new_edition">
<permissions>
<permission allow="true">Write</permission>
</permissions>
<label-id>new_edition</label-id>
<tooltip-id>new_edition_tooltip</tooltip-id>
<image>/images/icons/new_edition_icon.gif</image>
<action>wizard:newEdition</action>
</action>
<!-- the 'action-group' elements define unique blocks of actions that reference the actions <!-- the 'action-group' elements define unique blocks of actions that reference the actions
as defined above and can override or supply display elements for the group of actions --> as defined above and can override or supply display elements for the group of actions -->
<!-- the component is responsible for making the context Node object available with name <!-- the component is responsible for making the context Node object available with name
@@ -762,6 +773,7 @@
<action-group id="multilingual_details_actions"> <action-group id="multilingual_details_actions">
<action idref="add_translation" /> <action idref="add_translation" />
<action idref="add_translation_wc" /> <action idref="add_translation_wc" />
<action idref="new_edition" />
</action-group> </action-group>
<!-- Actions Menu for Space Details screen --> <!-- Actions Menu for Space Details screen -->

View File

@@ -3,9 +3,9 @@
<config> <config>
<wizard-container>/jsp/wizard/container.jsp</wizard-container> <wizard-container>/jsp/wizard/container.jsp</wizard-container>
<plain-wizard-container>/jsp/wizard/plain-container.jsp</plain-wizard-container> <plain-wizard-container>/jsp/wizard/plain-container.jsp</plain-wizard-container>
<wizards> <wizards>
<!-- Definition of a create Web Project wizard --> <!-- Definition of a create Web Project wizard -->
<wizard name="createWebsite" managed-bean="CreateWebsiteWizard" <wizard name="createWebsite" managed-bean="CreateWebsiteWizard"
title-id="create_website_title" description-id="create_website_desc" title-id="create_website_title" description-id="create_website_desc"
@@ -47,7 +47,7 @@
instruction-id="create_website_finish_instruction" /> instruction-id="create_website_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of an edit Web Project wizard --> <!-- Definition of an edit Web Project wizard -->
<wizard name="editWebsite" managed-bean="EditWebsiteWizard" <wizard name="editWebsite" managed-bean="EditWebsiteWizard"
title-id="edit_website_title" description-id="edit_website_desc" title-id="edit_website_title" description-id="edit_website_desc"
@@ -77,7 +77,7 @@
instruction-id="edit_website_finish_instruction" /> instruction-id="edit_website_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of a Invite Website Users wizard --> <!-- Definition of a Invite Website Users wizard -->
<wizard name="inviteWebUsers" managed-bean="InviteWebsiteUsersWizard" <wizard name="inviteWebUsers" managed-bean="InviteWebsiteUsersWizard"
title-id="invite_webusers_title" description-id="invite_webusers_desc" title-id="invite_webusers_title" description-id="invite_webusers_desc"
@@ -101,7 +101,7 @@
instruction-id="invite_webusers_finish_instruction" /> instruction-id="invite_webusers_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of Invite Space Users wizard --> <!-- Definition of Invite Space Users wizard -->
<wizard name="inviteSpaceUsers" managed-bean="InviteSpaceUsersWizard" <wizard name="inviteSpaceUsers" managed-bean="InviteSpaceUsersWizard"
title-id="invite_title" description-id="invite_desc" title-id="invite_title" description-id="invite_desc"
@@ -125,7 +125,7 @@
instruction-id="invite_finish_instruction" /> instruction-id="invite_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of Invite Content Users wizard --> <!-- Definition of Invite Content Users wizard -->
<wizard name="inviteContentUsers" managed-bean="InviteContentUsersWizard" <wizard name="inviteContentUsers" managed-bean="InviteContentUsersWizard"
title-id="invite_content_title" description-id="invite_content_desc" title-id="invite_content_title" description-id="invite_content_desc"
@@ -149,135 +149,135 @@
instruction-id="invite_finish_instruction" /> instruction-id="invite_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of an advanced space wizard --> <!-- Definition of an advanced space wizard -->
<wizard name="createSpace" managed-bean="CreateSpaceWizard" <wizard name="createSpace" managed-bean="CreateSpaceWizard"
title-id="create_space_title" description-id="create_space_desc" title-id="create_space_title" description-id="create_space_desc"
icon="/images/icons/create_space_large.gif"> icon="/images/icons/create_space_large.gif">
<step name="create-from" title-id="starting_space" description-id="create_space_step1_desc"> <step name="create-from" title-id="starting_space" description-id="create_space_step1_desc">
<page path="/jsp/spaces/create-space-wizard/create-from.jsp" <page path="/jsp/spaces/create-space-wizard/create-from.jsp"
title-id="create_space_step1_title" title-id="create_space_step1_title"
description-id="create_space_step1_desc" description-id="create_space_step1_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="options" title-id="space_options" description-id="create_space_step2_desc"> <step name="options" title-id="space_options" description-id="create_space_step2_desc">
<condition if="#{CreateSpaceWizard.createFrom == 'scratch'}"> <condition if="#{CreateSpaceWizard.createFrom == 'scratch'}">
<page path="/jsp/spaces/create-space-wizard/from-scratch.jsp" <page path="/jsp/spaces/create-space-wizard/from-scratch.jsp"
title-id="create_space_step2_title" title-id="create_space_step2_title"
description-id="create_space_step2_desc" description-id="create_space_step2_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</condition> </condition>
<condition if="#{CreateSpaceWizard.createFrom == 'existing'}"> <condition if="#{CreateSpaceWizard.createFrom == 'existing'}">
<page path="/jsp/spaces/create-space-wizard/from-existing.jsp" <page path="/jsp/spaces/create-space-wizard/from-existing.jsp"
title-id="create_space_step2_title" title-id="create_space_step2_title"
description-id="create_space_step2_desc" description-id="create_space_step2_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</condition> </condition>
<condition if="#{CreateSpaceWizard.createFrom == 'template'}"> <condition if="#{CreateSpaceWizard.createFrom == 'template'}">
<page path="/jsp/spaces/create-space-wizard/from-template.jsp" <page path="/jsp/spaces/create-space-wizard/from-template.jsp"
title-id="create_space_step2_title" title-id="create_space_step2_title"
description-id="create_space_step2_desc" description-id="create_space_step2_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</condition> </condition>
</step> </step>
<step name="details" title-id="space_details" description-id="create_space_step3_desc"> <step name="details" title-id="space_details" description-id="create_space_step3_desc">
<page path="/jsp/spaces/create-space-wizard/details.jsp" <page path="/jsp/spaces/create-space-wizard/details.jsp"
title-id="create_space_step3_title" title-id="create_space_step3_title"
description-id="create_space_step3_desc" description-id="create_space_step3_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="summary" title-id="summary" description-id="summary_step_description"> <step name="summary" title-id="summary" description-id="summary_step_description">
<page path="/jsp/wizard/summary.jsp" <page path="/jsp/wizard/summary.jsp"
title-id="summary" title-id="summary"
description-id="summary_desc" description-id="summary_desc"
instruction-id="create_space_finish_instruction" /> instruction-id="create_space_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of the run action wizard --> <!-- Definition of the run action wizard -->
<wizard name="runAction" managed-bean="RunActionWizard" <wizard name="runAction" managed-bean="RunActionWizard"
title-id="run_action_title" description-id="run_action_desc" title-id="run_action_title" description-id="run_action_desc"
icon="/images/icons/new_rule_large.gif"> icon="/images/icons/new_rule_large.gif">
<step name="actions" title-id="actions" description=""> <step name="actions" title-id="actions" description="">
<page path="/jsp/actions/actions.jsp" <page path="/jsp/actions/actions.jsp"
title-id="run_action_step1_title" title-id="run_action_step1_title"
description="" description=""
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="summary" title-id="summary" description-id="summary_step_description"> <step name="summary" title-id="summary" description-id="summary_step_description">
<page path="/jsp/wizard/summary.jsp" <page path="/jsp/wizard/summary.jsp"
title-id="summary" title-id="summary"
description-id="summary_desc" description-id="summary_desc"
instruction-id="run_action_finish_instruction" /> instruction-id="run_action_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of the create rule wizard --> <!-- Definition of the create rule wizard -->
<wizard name="createRule" managed-bean="CreateRuleWizard" <wizard name="createRule" managed-bean="CreateRuleWizard"
title-id="create_rule_title" description-id="create_rule_desc" title-id="create_rule_title" description-id="create_rule_desc"
icon="/images/icons/new_rule_large.gif"> icon="/images/icons/new_rule_large.gif">
<step name="conditions" title-id="conditions" description=""> <step name="conditions" title-id="conditions" description="">
<page path="/jsp/rules/conditions.jsp" <page path="/jsp/rules/conditions.jsp"
title-id="create_rule_step1_title" title-id="create_rule_step1_title"
description="" description=""
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="actions" title-id="actions" description=""> <step name="actions" title-id="actions" description="">
<page path="/jsp/actions/actions.jsp" <page path="/jsp/actions/actions.jsp"
title-id="create_rule_step2_title" title-id="create_rule_step2_title"
description="" description=""
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="details" title-id="details" description=""> <step name="details" title-id="details" description="">
<page path="/jsp/rules/details.jsp" <page path="/jsp/rules/details.jsp"
title-id="create_rule_step3_title" title-id="create_rule_step3_title"
description="" description=""
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="summary" title-id="summary" description-id="summary_step_description"> <step name="summary" title-id="summary" description-id="summary_step_description">
<page path="/jsp/wizard/summary.jsp" <page path="/jsp/wizard/summary.jsp"
title-id="summary" title-id="summary"
description-id="summary_desc" description-id="summary_desc"
instruction-id="create_rule_finish_instruction" /> instruction-id="create_rule_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of the edit rule wizard --> <!-- Definition of the edit rule wizard -->
<wizard name="editRule" managed-bean="EditRuleWizard" <wizard name="editRule" managed-bean="EditRuleWizard"
title-id="edit_rule_title" description-id="edit_rule_desc" title-id="edit_rule_title" description-id="edit_rule_desc"
icon="/images/icons/new_rule_large.gif"> icon="/images/icons/new_rule_large.gif">
<step name="conditions" title-id="conditions" description=""> <step name="conditions" title-id="conditions" description="">
<page path="/jsp/rules/conditions.jsp" <page path="/jsp/rules/conditions.jsp"
title-id="create_rule_step1_title" title-id="create_rule_step1_title"
description="" description=""
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="actions" title-id="actions" description=""> <step name="actions" title-id="actions" description="">
<page path="/jsp/actions/actions.jsp" <page path="/jsp/actions/actions.jsp"
title-id="create_rule_step2_title" title-id="create_rule_step2_title"
description="" description=""
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="details" title-id="details" description=""> <step name="details" title-id="details" description="">
<page path="/jsp/rules/details.jsp" <page path="/jsp/rules/details.jsp"
title-id="create_rule_step3_title" title-id="create_rule_step3_title"
description="" description=""
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="summary" title-id="summary" description-id="summary_step_description"> <step name="summary" title-id="summary" description-id="summary_step_description">
<page path="/jsp/wizard/summary.jsp" <page path="/jsp/wizard/summary.jsp"
title-id="summary" title-id="summary"
description-id="summary_desc" description-id="summary_desc"
instruction-id="edit_rule_finish_instruction" /> instruction-id="edit_rule_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of the Create Content wizard --> <!-- Definition of the Create Content wizard -->
<wizard name="createContent" managed-bean="CreateContentWizard" <wizard name="createContent" managed-bean="CreateContentWizard"
title-id="create_content_title" description-id="create_content_desc" title-id="create_content_title" description-id="create_content_desc"
icon="/images/icons/new_content_large.gif"> icon="/images/icons/new_content_large.gif">
<step name="details" title-id="details" description-id="create_content_step1_desc"> <step name="details" title-id="details" description-id="create_content_step1_desc">
<page path="/jsp/content/create-content-wizard/details.jsp" <page path="/jsp/content/create-content-wizard/details.jsp"
title-id="create_content_step1_title" title-id="create_content_step1_title"
description-id="create_content_step1_desc" description-id="create_content_step1_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
@@ -302,22 +302,22 @@
instruction-id="content_finish_instruction" /> instruction-id="content_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of the Create Web Content wizard --> <!-- Definition of the Create Web Content wizard -->
<wizard name="createWebContent" managed-bean="CreateWebContentWizard" <wizard name="createWebContent" managed-bean="CreateWebContentWizard"
title-id="create_web_content_title" description-id="create_web_content_desc" title-id="create_web_content_title" description-id="create_web_content_desc"
icon="/images/icons/new_content_large.gif"> icon="/images/icons/new_content_large.gif">
<step name="details" <step name="details"
title-id="create_web_content_details_title" title-id="create_web_content_details_title"
description-id="create_content_step1_desc"> description-id="create_content_step1_desc">
<page path="/jsp/wcm/create-web-content-wizard/details.jsp" <page path="/jsp/wcm/create-web-content-wizard/details.jsp"
title-id="create_web_content_details_step_title" title-id="create_web_content_details_step_title"
description-id="create_content_step1_desc" description-id="create_content_step1_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="content" <step name="content"
title-id="create_web_content_enter_content_title" title-id="create_web_content_enter_content_title"
description-id="create_content_step2_desc"> description-id="create_content_step2_desc">
<condition if="#{CreateWebContentWizard.mimeType == 'text/html'}"> <condition if="#{CreateWebContentWizard.mimeType == 'text/html'}">
<page path="/jsp/wcm/create-web-content-wizard/create-html.jsp" <page path="/jsp/wcm/create-web-content-wizard/create-html.jsp"
title-id="create_web_content_enter_content_step_title" title-id="create_web_content_enter_content_step_title"
@@ -338,39 +338,39 @@
</step> </step>
<step name="summary" title-id="summary" description-id="summary_step_description"> <step name="summary" title-id="summary" description-id="summary_step_description">
<condition if="#{CreateWebContentWizard.mimeType == 'text/xml'}"> <condition if="#{CreateWebContentWizard.mimeType == 'text/xml'}">
<page path="/jsp/wcm/create-web-content-wizard/summary.jsp" <page path="/jsp/wcm/create-web-content-wizard/summary.jsp"
title-id="summary" title-id="summary"
description-id="create_web_content_summary_desc" description-id="create_web_content_summary_desc"
instruction-id="content_finish_instruction" /> instruction-id="content_finish_instruction" />
</condition> </condition>
<page path="/jsp/wizard/summary.jsp" <page path="/jsp/wizard/summary.jsp"
title-id="summary" title-id="summary"
description-id="summary_desc" description-id="summary_desc"
instruction-id="content_finish_instruction" /> instruction-id="content_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of the create form wizard --> <!-- Definition of the create form wizard -->
<wizard name="createForm" managed-bean="CreateFormWizard" <wizard name="createForm" managed-bean="CreateFormWizard"
title-id="create_form_title" description-id="create_form_desc" title-id="create_form_title" description-id="create_form_desc"
icon="/images/icons/create_form_large.gif"> icon="/images/icons/create_form_large.gif">
<step name="form_details" title-id="create_form_form_details_title" <step name="form_details" title-id="create_form_form_details_title"
description-id="create_form_form_details_desc"> description-id="create_form_form_details_desc">
<page path="/jsp/wcm/create-form-wizard/details.jsp" <page path="/jsp/wcm/create-form-wizard/details.jsp"
title-id="create_form_form_details_step_title" title-id="create_form_form_details_step_title"
description-id="create_form_form_details_desc" description-id="create_form_form_details_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="configure_rendering_engine_templates" <step name="configure_rendering_engine_templates"
title-id="create_form_configure_rendering_engine_templates_title" title-id="create_form_configure_rendering_engine_templates_title"
description-id="create_form_configure_rendering_engine_templates_desc"> description-id="create_form_configure_rendering_engine_templates_desc">
<page path="/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp" <page path="/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp"
title-id="create_form_configure_rendering_engine_templates_step_title" title-id="create_form_configure_rendering_engine_templates_step_title"
description-id="create_form_configure_rendering_engine_templates_desc" description-id="create_form_configure_rendering_engine_templates_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="select_default_workflow" <step name="select_default_workflow"
title-id="create_form_select_default_workflow_title" title-id="create_form_select_default_workflow_title"
description-id="create_form_select_default_workflow_desc"> description-id="create_form_select_default_workflow_desc">
<page path="/jsp/wcm/create-form-wizard/select-default-workflow.jsp" <page path="/jsp/wcm/create-form-wizard/select-default-workflow.jsp"
title-id="create_form_select_default_workflow_step_title" title-id="create_form_select_default_workflow_step_title"
@@ -389,23 +389,23 @@
<wizard name="editForm" managed-bean="EditFormWizard" <wizard name="editForm" managed-bean="EditFormWizard"
title-id="edit_form_title" description-id="edit_form_desc" title-id="edit_form_title" description-id="edit_form_desc"
icon="/images/icons/edit_form_large.gif"> icon="/images/icons/edit_form_large.gif">
<step name="form_details" title-id="create_form_form_details_title" <step name="form_details" title-id="create_form_form_details_title"
description-id="create_form_form_details_desc"> description-id="create_form_form_details_desc">
<page path="/jsp/wcm/create-form-wizard/details.jsp" <page path="/jsp/wcm/create-form-wizard/details.jsp"
title-id="create_form_form_details_step_title" title-id="create_form_form_details_step_title"
description-id="create_form_form_details_desc" description-id="create_form_form_details_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="configure_rendering_engine_templates" <step name="configure_rendering_engine_templates"
title-id="create_form_configure_rendering_engine_templates_title" title-id="create_form_configure_rendering_engine_templates_title"
description-id="create_form_configure_rendering_engine_templates_desc"> description-id="create_form_configure_rendering_engine_templates_desc">
<page path="/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp" <page path="/jsp/wcm/create-form-wizard/configure-rendering-engines.jsp"
title-id="create_form_configure_rendering_engine_templates_step_title" title-id="create_form_configure_rendering_engine_templates_step_title"
description-id="create_form_configure_rendering_engine_templates_desc" description-id="create_form_configure_rendering_engine_templates_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="select_default_workflow" <step name="select_default_workflow"
title-id="create_form_select_default_workflow_title" title-id="create_form_select_default_workflow_title"
description-id="create_form_select_default_workflow_desc"> description-id="create_form_select_default_workflow_desc">
<page path="/jsp/wcm/create-form-wizard/select-default-workflow.jsp" <page path="/jsp/wcm/create-form-wizard/select-default-workflow.jsp"
title-id="create_form_select_default_workflow_step_title" title-id="create_form_select_default_workflow_step_title"
@@ -445,51 +445,82 @@
title-id="configure_dashboard_title" description-id="configure_dashboard_desc" title-id="configure_dashboard_title" description-id="configure_dashboard_desc"
icon="/images/icons/configure_dashboard_large.gif"> icon="/images/icons/configure_dashboard_large.gif">
<step name="layout" title-id="step_layout" description-id="configure_dashboard_step1_desc"> <step name="layout" title-id="step_layout" description-id="configure_dashboard_step1_desc">
<page path="/jsp/dashboards/wizard/layout.jsp" <page path="/jsp/dashboards/wizard/layout.jsp"
title-id="configure_dashboard_step1_title" title-id="configure_dashboard_step1_title"
description-id="configure_dashboard_step1_desc" description-id="configure_dashboard_step1_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="columns" title-id="step_columns" description-id="configure_dashboard_step2_desc"> <step name="columns" title-id="step_columns" description-id="configure_dashboard_step2_desc">
<page path="/jsp/dashboards/wizard/columns.jsp" <page path="/jsp/dashboards/wizard/columns.jsp"
title-id="configure_dashboard_step2_title" title-id="configure_dashboard_step2_title"
description-id="configure_dashboard_step2_desc" description-id="configure_dashboard_step2_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="summary" title-id="summary" description-id="summary_step_description"> <step name="summary" title-id="summary" description-id="summary_step_description">
<page path="/jsp/wizard/summary.jsp" <page path="/jsp/wizard/summary.jsp"
title-id="summary" title-id="summary"
description-id="summary_desc" description-id="summary_desc"
instruction-id="configure_dashboard_finish_instruction" /> instruction-id="configure_dashboard_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of the Start Workflow wizard --> <!-- Definition of the Start Workflow wizard -->
<wizard name="startWorkflow" managed-bean="StartWorkflowWizard" <wizard name="startWorkflow" managed-bean="StartWorkflowWizard"
description-id="start_workflow_desc" icon="/images/icons/new_workflow_large.gif"> description-id="start_workflow_desc" icon="/images/icons/new_workflow_large.gif">
<step name="choose-workflow" title-id="step_choose_workflow" <step name="choose-workflow" title-id="step_choose_workflow"
description-id="start_workflow_choose_desc"> description-id="start_workflow_choose_desc">
<page path="/jsp/workflow/start-workflow-wizard/choose-workflow.jsp" <page path="/jsp/workflow/start-workflow-wizard/choose-workflow.jsp"
title-id="start_workflow_choose_title" title-id="start_workflow_choose_title"
description-id="start_workflow_choose_desc" description-id="start_workflow_choose_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="options" title-id="step_workflow_options" <step name="options" title-id="step_workflow_options"
description-id="start_workflow_options_desc"> description-id="start_workflow_options_desc">
<page path="/jsp/workflow/start-workflow-wizard/workflow-options.jsp" <page path="/jsp/workflow/start-workflow-wizard/workflow-options.jsp"
title-id="start_workflow_options_title" title-id="start_workflow_options_title"
description-id="start_workflow_options_desc" description-id="start_workflow_options_desc"
instruction-id="default_instruction" /> instruction-id="default_instruction" />
</step> </step>
<step name="summary" title-id="summary" description-id="summary_step_description"> <step name="summary" title-id="summary" description-id="summary_step_description">
<page path="/jsp/wizard/summary.jsp" <page path="/jsp/wizard/summary.jsp"
title-id="summary" title-id="summary"
description-id="summary_desc" description-id="summary_desc"
instruction-id="start_workflow_finish_instruction" /> instruction-id="start_workflow_finish_instruction" />
</step> </step>
</wizard> </wizard>
<!-- Definition of the Start Workflow wizard -->
<wizard name="newEdition" managed-bean="NewEditionWizard"
title-id="new_edition_wizard_title"
description-id="new_edition_wizard_desc"
error-message-id="error_new_edition_wizard"
icon="/images/icons/new_edition_large.gif">
<step name="choose-translation"
title-id="step1_choose_translation"
description-id="step1_choose_translation_desc">
<page path="/jsp/ml/new-edition-wizard/choose-translation.jsp"
title-id="new_edition_choose_translation_title"
description-id="new_edition_choose_translation_desc"
instruction-id="default_instruction" />
</step>
<step name="edition-details"
title-id="step2_edition_details"
description-id="step2_edition_details_desc">
<page path="/jsp/ml/new-edition-wizard/edition-details.jsp"
title-id="new_edition_details_title"
description-id="new_edition_details_desc"
instruction-id="default_instruction" />
</step>
<step name="edition-summary"
title-id="step3_edition_summary"
description-id="step3_edition_summary_desc">
<page path="/jsp/ml/new-edition-wizard/edition-summary.jsp"
title-id="new_edition_summary_title"
description-id="new_edition_summary_desc"
instruction-id="new_edition_finish_instruction" />
</step>
</wizard>
</wizards> </wizards>
</config> </config>
</alfresco-config> </alfresco-config>

View File

@@ -39,7 +39,7 @@ import org.alfresco.web.bean.repository.Node;
* If the node is not already Multilingual, locked, or if a translation exists for each available * If the node is not already Multilingual, locked, or if a translation exists for each available
* filter language, don't allow the action. * filter language, don't allow the action.
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class AddTranslationEvaluator implements ActionEvaluator public class AddTranslationEvaluator implements ActionEvaluator
{ {

View File

@@ -38,7 +38,7 @@ import org.alfresco.web.bean.repository.Node;
* troublesome. Spreading translations of the same semantic message among several * troublesome. Spreading translations of the same semantic message among several
* spaces could lead to confusion and problems. * spaces could lead to confusion and problems.
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class CutNodeEvaluator implements ActionEvaluator public class CutNodeEvaluator implements ActionEvaluator
{ {

View File

@@ -37,7 +37,7 @@ import org.alfresco.web.bean.repository.Node;
* *
* If the node is already Multilingual don't allow the action. * If the node is already Multilingual don't allow the action.
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class MakeMultilingualEvaluator implements ActionEvaluator public class MakeMultilingualEvaluator implements ActionEvaluator
{ {

View File

@@ -33,7 +33,7 @@ import org.alfresco.web.bean.repository.Node;
* *
* The action is available only if the node is a translation. * The action is available only if the node is a translation.
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class MultilingualDetailsEvaluator implements ActionEvaluator public class MultilingualDetailsEvaluator implements ActionEvaluator
{ {

View File

@@ -15,11 +15,11 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of * As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre * the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's * and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing * FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here: * the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing" * http://www.alfresco.com/legal/licensing"
*/ */
package org.alfresco.web.bean; package org.alfresco.web.bean;
@@ -28,6 +28,8 @@ import java.io.Serializable;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
@@ -45,6 +47,7 @@ import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransacti
import org.alfresco.service.cmr.coci.CheckOutCheckInService; import org.alfresco.service.cmr.coci.CheckOutCheckInService;
import org.alfresco.service.cmr.lock.LockService; import org.alfresco.service.cmr.lock.LockService;
import org.alfresco.service.cmr.ml.ContentFilterLanguagesService; import org.alfresco.service.cmr.ml.ContentFilterLanguagesService;
import org.alfresco.service.cmr.ml.EditionService;
import org.alfresco.service.cmr.ml.MultilingualContentService; import org.alfresco.service.cmr.ml.MultilingualContentService;
import org.alfresco.service.cmr.repository.ContentData; import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
@@ -62,54 +65,57 @@ import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.Utils;
import org.alfresco.web.ui.common.Utils.URLMode; import org.alfresco.web.ui.common.Utils.URLMode;
import org.alfresco.web.ui.common.component.UIActionLink; import org.alfresco.web.ui.common.component.UIActionLink;
/** /**
* Backing bean providing access to the details of a document * Backing bean providing access to the details of a document
* *
* @author gavinc * @author gavinc
*/ */
public class DocumentDetailsBean extends BaseDetailsBean public class DocumentDetailsBean extends BaseDetailsBean
{ {
private static final String OUTCOME_RETURN = "showDocDetails"; private static final String OUTCOME_RETURN = "showDocDetails";
private static final String MSG_HAS_FOLLOWING_CATEGORIES = "has_following_categories"; private static final String MSG_HAS_FOLLOWING_CATEGORIES = "has_following_categories";
private static final String MSG_NO_CATEGORIES_APPLIED = "no_categories_applied"; private static final String MSG_NO_CATEGORIES_APPLIED = "no_categories_applied";
private static final String MSG_SUCCESS_UNLOCK = "success_unlock"; private static final String MSG_SUCCESS_UNLOCK = "success_unlock";
private static final String MSG_CURRENT = "current";
private static final String MSG_ERROR_ASPECT_INLINEEDITABLE = "error_aspect_inlineeditable"; private static final String MSG_ERROR_ASPECT_INLINEEDITABLE = "error_aspect_inlineeditable";
private static final String MSG_ERROR_ASPECT_VERSIONING = "error_aspect_versioning"; private static final String MSG_ERROR_ASPECT_VERSIONING = "error_aspect_versioning";
private static final String MSG_ERROR_ASPECT_CLASSIFY = "error_aspect_classify"; private static final String MSG_ERROR_ASPECT_CLASSIFY = "error_aspect_classify";
private static final String MSG_ERROR_UPDATE_CATEGORY = "error_update_category"; private static final String MSG_ERROR_UPDATE_CATEGORY = "error_update_category";
private static final String ML_VERSION_PANEL_ID = "ml-versions-panel";
protected LockService lockService; protected LockService lockService;
protected VersionService versionService; protected VersionService versionService;
protected CheckOutCheckInService cociService; protected CheckOutCheckInService cociService;
protected MultilingualContentService multilingualContentService; protected MultilingualContentService multilingualContentService;
protected ContentFilterLanguagesService contentFilterLanguagesService; protected ContentFilterLanguagesService contentFilterLanguagesService;
protected EditionService editionService;
private NodeRef addedCategory; private NodeRef addedCategory;
private List categories; private List categories;
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Construction // Construction
/** /**
* Default constructor * Default constructor
*/ */
public DocumentDetailsBean() public DocumentDetailsBean()
{ {
super(); super();
// initial state of some panels that don't use the default // initial state of some panels that don't use the default
panels.put("version-history-panel", false); panels.put("version-history-panel", false);
panels.put("ml-info-panel", false); panels.put("ml-info-panel", false);
panels.put("related-translation-panel", false); panels.put("related-translation-panel", false);
} }
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// Bean property getters and setters // Bean property getters and setters
/** /**
* Resets any state that may be held by this bean * Resets any state that may be held by this bean
*/ */
@@ -117,25 +123,25 @@ public class DocumentDetailsBean extends BaseDetailsBean
{ {
// reset the workflow cache // reset the workflow cache
this.workflowProperties = null; this.workflowProperties = null;
// reset the category caches // reset the category caches
this.categories = null; this.categories = null;
this.addedCategory = null; this.addedCategory = null;
} }
/** /**
* Returns the URL to download content for the current document * Returns the URL to download content for the current document
* *
* @return Content url to download the current document * @return Content url to download the current document
*/ */
public String getUrl() public String getUrl()
{ {
return (String)getDocument().getProperties().get("url"); return (String)getDocument().getProperties().get("url");
} }
/** /**
* Returns the URL to the content for the current document * Returns the URL to the content for the current document
* *
* @return Content url to the current document * @return Content url to the current document
*/ */
public String getBrowserUrl() public String getBrowserUrl()
@@ -146,7 +152,7 @@ public class DocumentDetailsBean extends BaseDetailsBean
/** /**
* Returns the download URL to the content for the current document * Returns the download URL to the content for the current document
* *
* @return Download url to the current document * @return Download url to the current document
*/ */
public String getDownloadUrl() public String getDownloadUrl()
@@ -154,10 +160,10 @@ public class DocumentDetailsBean extends BaseDetailsBean
Node doc = getLinkResolvedNode(); Node doc = getLinkResolvedNode();
return Utils.generateURL(FacesContext.getCurrentInstance(), doc, URLMode.HTTP_DOWNLOAD); return Utils.generateURL(FacesContext.getCurrentInstance(), doc, URLMode.HTTP_DOWNLOAD);
} }
/** /**
* Resolve the actual document Node from any Link object that may be proxying it * Resolve the actual document Node from any Link object that may be proxying it
* *
* @return current document Node or document Node resolved from any Link object * @return current document Node or document Node resolved from any Link object
*/ */
protected Node getLinkResolvedNode() protected Node getLinkResolvedNode()
@@ -173,17 +179,17 @@ public class DocumentDetailsBean extends BaseDetailsBean
} }
return document; return document;
} }
/** /**
* Determines whether the current document is versionable * Determines whether the current document is versionable
* *
* @return true if the document has the versionable aspect * @return true if the document has the versionable aspect
*/ */
public boolean isVersionable() public boolean isVersionable()
{ {
return getDocument().hasAspect(ContentModel.ASPECT_VERSIONABLE); return getDocument().hasAspect(ContentModel.ASPECT_VERSIONABLE);
} }
/** /**
* @return true if the current document has the 'inlineeditable' aspect applied * @return true if the current document has the 'inlineeditable' aspect applied
*/ */
@@ -191,7 +197,7 @@ public class DocumentDetailsBean extends BaseDetailsBean
{ {
return getDocument().hasAspect(ApplicationModel.ASPECT_INLINEEDITABLE); return getDocument().hasAspect(ApplicationModel.ASPECT_INLINEEDITABLE);
} }
/** /**
* @return true if the current document has the 'inlineeditable' aspect applied * @return true if the current document has the 'inlineeditable' aspect applied
*/ */
@@ -199,21 +205,35 @@ public class DocumentDetailsBean extends BaseDetailsBean
{ {
return getDocument().hasAspect(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT); return getDocument().hasAspect(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT);
} }
/** /**
* Returns a list of objects representing the versions of the * Save the state of the panel that was expanded/collapsed
* current document */
* public void expandPanel(ActionEvent event)
{
super.expandPanel(event);
String id = event.getComponent().getId();
if(id.startsWith(ML_VERSION_PANEL_ID))
{
this.currentEditionCursorPosition = Integer.parseInt(id.substring("ml-versions-panel".length())) - 1;
}
}
/**
* Returns a list of objects representing the versions of the
* current document
*
* @return List of previous versions * @return List of previous versions
*/ */
public List getVersionHistory() public List getVersionHistory()
{ {
List<MapNode> versions = new ArrayList<MapNode>(); List<MapNode> versions = new ArrayList<MapNode>();
if (getDocument().hasAspect(ContentModel.ASPECT_VERSIONABLE)) if (getDocument().hasAspect(ContentModel.ASPECT_VERSIONABLE))
{ {
VersionHistory history = this.versionService.getVersionHistory(getDocument().getNodeRef()); VersionHistory history = this.versionService.getVersionHistory(getDocument().getNodeRef());
if (history != null) if (history != null)
{ {
for (Version version : history.getAllVersions()) for (Version version : history.getAllVersions())
@@ -224,39 +244,208 @@ public class DocumentDetailsBean extends BaseDetailsBean
clientVersion.put("notes", version.getDescription()); clientVersion.put("notes", version.getDescription());
clientVersion.put("author", version.getCreator()); clientVersion.put("author", version.getCreator());
clientVersion.put("versionDate", version.getCreatedDate()); clientVersion.put("versionDate", version.getCreatedDate());
clientVersion.put("url", DownloadContentServlet.generateBrowserURL(version.getFrozenStateNodeRef(), clientVersion.put("url", DownloadContentServlet.generateBrowserURL(version.getFrozenStateNodeRef(),
clientVersion.getName())); clientVersion.getName()));
// add the client side version to the list // add the client side version to the list
versions.add(clientVersion); versions.add(clientVersion);
} }
} }
} }
return versions; return versions;
} }
/** /**
* Returns a list of objects representing the editions of the * The comparator to sort a version list according their version label ascending
* logical document *
* * TODO add this code in the repository as Version Util class ?
*/
private Comparator versionComparator = new Comparator()
{
public int compare(Object o1, Object o2)
{
String label01 = ((Version) o1).getVersionLabel();
String label02 = ((Version) o2).getVersionLabel();
// sort the list ascending
return label02.compareTo(label01);
}
};
/** List of client light weight edition histories */
private List<SingleEditionBean> editionHistory = null;
/** For the client side iteration on the edition hitories list, it represents the index of the list */
private int currentEditionCursorPosition;
/**
* For the client side iteration on the edition hitories list, returns the number of editions.
*
* @return the number of edition of the current mlContainer
*/
public int getEditionSize()
{
// return the size of the list
return editionHistory.size();
}
/**
* Init the mlContainer histories and returns an empty list to fill a rich list value without content.
*
* @return an empty list
*/
public List getEmptyListAndInitEditions()
{
// this call ensures that the edition of the mlContainer must be
// re-initialized.
// remove each old mlContainer's translations of the panel list
List<String> panelsToRemove = new ArrayList<String>();
for(Map.Entry<String, Boolean> panel : panels.entrySet())
{
if(panel.getKey().startsWith(ML_VERSION_PANEL_ID))
{
//panels.remove(panel.getKey());
panelsToRemove.add(panel.getKey());
}
}
for(String panelId : panelsToRemove)
{
panels.remove(panelId);
}
// init the Edition histories
initEditionHistory();
currentEditionCursorPosition = -1;
return new ArrayList(0);
}
/**
* For the client side iteration on the edition hitories list,
* return the next edition history.
*
* @return a light weight representation of an edition history
*/
public SingleEditionBean getNextSingleEditionBean()
{
currentEditionCursorPosition++;
return getCurrentSingleEditionBean();
}
/**
* For the client side iteration on the edition hitories list,
* return the current edition history.
*
* @return a light weight representation of an edition history
*/
public SingleEditionBean getCurrentSingleEditionBean()
{
return editionHistory.get(currentEditionCursorPosition);
}
/**
* Constructs a list of objects representing the editions of the
* logical document
*
* @return List of editions * @return List of editions
*/ */
public List getEditionHistory() @SuppressWarnings("unchecked")
private List<SingleEditionBean> initEditionHistory()
{ {
List<MapNode> editions = new ArrayList<MapNode>(); // get the mlContainer
NodeRef mlContainer = getDocumentMlContainer().getNodeRef();
if (getDocument().getType().equals(ContentModel.TYPE_MULTILINGUAL_CONTAINER))
// get all editions and sort them ascending according their version label
List<Version> orderedEditionList = new ArrayList<Version>(editionService.getEditions(mlContainer).getAllVersions());
Collections.sort(orderedEditionList, versionComparator);
// the list of Single Edition Bean to return
editionHistory = new ArrayList<SingleEditionBean>(orderedEditionList.size());
boolean firstEdition = true;
// for each edition, init a SingleEditionBean
for (Version edition : orderedEditionList)
{ {
SingleEditionBean editionBean = new SingleEditionBean();
MapNode clientEdition = new MapNode(edition.getFrozenStateNodeRef());
String editionLabel = edition.getVersionLabel();
if (firstEdition)
{
editionLabel += " (" + Application.getMessage(FacesContext.getCurrentInstance(), MSG_CURRENT) + ")";
}
clientEdition.put("editionLabel", editionLabel);
clientEdition.put("editionNotes", edition.getDescription());
clientEdition.put("editionAuthor", edition.getCreator());
clientEdition.put("editionDate", edition.getCreatedDate());
// Set the edition of the edition bean
editionBean.setEdition(clientEdition);
// get translations
List<VersionHistory> translationHistories = null;
if (firstEdition)
{
// Get the translations because the current edition doesn't content link with its
// translation in the version store.
Map<Locale, NodeRef> translations = multilingualContentService.getTranslations(mlContainer);
translationHistories = new ArrayList<VersionHistory>(translations.size());
for (NodeRef translation : translations.values())
{
translationHistories.add(versionService.getVersionHistory(translation));
}
}
else
{
translationHistories = editionService.getVersionedTranslations(edition);
}
// add each translation in the SingleEditionBean
for (VersionHistory versionHistory : translationHistories)
{
// get the list of versions and sort them ascending according their version label
List<Version> orderedVersions = new ArrayList<Version>(versionHistory.getAllVersions());
Collections.sort(orderedVersions, versionComparator);
// the last version is the first version of the list
Version lastVersion = orderedVersions.get(0);
// get the properties of the lastVersion
Map<QName, Serializable> lastVersionProperties = editionService.getVersionedMetadatas(lastVersion);
Locale language = (Locale) lastVersionProperties.get(ContentModel.PROP_LOCALE);
// create a map node representation of the last version
MapNode clientLastVersion = new MapNode(lastVersion.getFrozenStateNodeRef());
clientLastVersion.put("versionName", lastVersionProperties.get(ContentModel.PROP_NAME));
clientLastVersion.put("versionDescription", lastVersionProperties.get(ContentModel.PROP_DESCRIPTION));
clientLastVersion.put("versionAuthor", lastVersionProperties.get(ContentModel.PROP_AUTHOR));
clientLastVersion.put("versionCreatedDate", lastVersionProperties.get(ContentModel.PROP_CREATED));
clientLastVersion.put("versionModifiedDate", lastVersionProperties.get(ContentModel.PROP_MODIFIED));
clientLastVersion.put("versionLanguage", this.contentFilterLanguagesService.convertToNewISOCode(language.getLanguage()).toUpperCase());
clientLastVersion.put("versionUrl", DownloadContentServlet.generateBrowserURL(lastVersion.getFrozenStateNodeRef(), clientLastVersion.getName()));
// add a translation of the editionBean
editionBean.addTranslations(clientLastVersion);
}
editionHistory.add(editionBean);
firstEdition = false;
} }
return editions; return editionHistory;
} }
/** /**
* Returns a list of objects representing the translations of the * Returns a list of objects representing the translations of the current document
* current document
* *
* @return List of translations * @return List of translations
*/ */
@@ -272,18 +461,18 @@ public class DocumentDetailsBean extends BaseDetailsBean
{ {
for (Map.Entry entry : translationsMap.entrySet()) for (Map.Entry entry : translationsMap.entrySet())
{ {
NodeRef nodeRef = (NodeRef) entry.getValue(); NodeRef nodeRef = (NodeRef) entry.getValue();
// create a map node representation of the translation // create a map node representation of the translation
MapNode mapNode = new MapNode(nodeRef); MapNode mapNode = new MapNode(nodeRef);
Locale locale = (Locale) nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE); Locale locale = (Locale) nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE);
String lgge = (locale != null) ? String lgge = (locale != null) ?
// convert the locale into new ISO codes // convert the locale into new ISO codes
contentFilterLanguagesService.convertToNewISOCode(locale.getLanguage()).toUpperCase() contentFilterLanguagesService.convertToNewISOCode(locale.getLanguage()).toUpperCase()
: null; : null;
mapNode.put("name", nodeService.getProperty(nodeRef, ContentModel.PROP_NAME)); mapNode.put("name", nodeService.getProperty(nodeRef, ContentModel.PROP_NAME));
mapNode.put("language", lgge); mapNode.put("language", lgge);
mapNode.put("url", DownloadContentServlet.generateBrowserURL(nodeRef, mapNode.getName())); mapNode.put("url", DownloadContentServlet.generateBrowserURL(nodeRef, mapNode.getName()));
@@ -293,47 +482,47 @@ public class DocumentDetailsBean extends BaseDetailsBean
} }
} }
} }
return translations; return translations;
} }
/** /**
* Determines whether the current document has any categories applied * Determines whether the current document has any categories applied
* *
* @return true if the document has categories attached * @return true if the document has categories attached
*/ */
public boolean isCategorised() public boolean isCategorised()
{ {
return getDocument().hasAspect(ContentModel.ASPECT_GEN_CLASSIFIABLE); return getDocument().hasAspect(ContentModel.ASPECT_GEN_CLASSIFIABLE);
} }
/** /**
* Returns a list of objects representing the categories applied to the * Returns a list of objects representing the categories applied to the
* current document * current document
* *
* @return List of categories * @return List of categories
*/ */
public String getCategoriesOverviewHTML() public String getCategoriesOverviewHTML()
{ {
String html = null; String html = null;
if (isCategorised()) if (isCategorised())
{ {
// we know for now that the general classifiable aspect only will be // we know for now that the general classifiable aspect only will be
// applied so we can retrive the categories property direclty // applied so we can retrive the categories property direclty
Collection<NodeRef> categories = (Collection<NodeRef>)this.nodeService.getProperty( Collection<NodeRef> categories = (Collection<NodeRef>)this.nodeService.getProperty(
getDocument().getNodeRef(), ContentModel.PROP_CATEGORIES); getDocument().getNodeRef(), ContentModel.PROP_CATEGORIES);
if (categories == null || categories.size() == 0) if (categories == null || categories.size() == 0)
{ {
html = Application.getMessage(FacesContext.getCurrentInstance(), MSG_NO_CATEGORIES_APPLIED); html = Application.getMessage(FacesContext.getCurrentInstance(), MSG_NO_CATEGORIES_APPLIED);
} }
else else
{ {
StringBuilder builder = new StringBuilder(Application.getMessage(FacesContext.getCurrentInstance(), StringBuilder builder = new StringBuilder(Application.getMessage(FacesContext.getCurrentInstance(),
MSG_HAS_FOLLOWING_CATEGORIES)); MSG_HAS_FOLLOWING_CATEGORIES));
builder.append("<ul>"); builder.append("<ul>");
for (NodeRef ref : categories) for (NodeRef ref : categories)
{ {
@@ -345,48 +534,48 @@ public class DocumentDetailsBean extends BaseDetailsBean
} }
} }
builder.append("</ul>"); builder.append("</ul>");
html = builder.toString(); html = builder.toString();
} }
} }
return html; return html;
} }
/** /**
* Event handler called to setup the categories for editing * Event handler called to setup the categories for editing
* *
* @param event The event * @param event The event
*/ */
public void setupCategoriesForEdit(ActionEvent event) public void setupCategoriesForEdit(ActionEvent event)
{ {
this.categories = (List)this.nodeService.getProperty(getDocument().getNodeRef(), this.categories = (List)this.nodeService.getProperty(getDocument().getNodeRef(),
ContentModel.PROP_CATEGORIES); ContentModel.PROP_CATEGORIES);
} }
/** /**
* Returns a Map of the initial categories on the node keyed by the NodeRef * Returns a Map of the initial categories on the node keyed by the NodeRef
* *
* @return Map of initial categories * @return Map of initial categories
*/ */
public List getCategories() public List getCategories()
{ {
return this.categories; return this.categories;
} }
/** /**
* Sets the categories Map * Sets the categories Map
* *
* @param categories * @param categories
*/ */
public void setCategories(List categories) public void setCategories(List categories)
{ {
this.categories = categories; this.categories = categories;
} }
/** /**
* Returns the last category added from the multi value editor * Returns the last category added from the multi value editor
* *
* @return The last category added * @return The last category added
*/ */
public NodeRef getAddedCategory() public NodeRef getAddedCategory()
@@ -586,11 +775,11 @@ public class DocumentDetailsBean extends BaseDetailsBean
Utils.addErrorMessage(MessageFormat.format(Application.getMessage( Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), MSG_ERROR_ASPECT_INLINEEDITABLE), e.getMessage()), e); FacesContext.getCurrentInstance(), MSG_ERROR_ASPECT_INLINEEDITABLE), e.getMessage()), e);
} }
// force recreation of the details view - this means the properties sheet component will reinit // force recreation of the details view - this means the properties sheet component will reinit
return OUTCOME_RETURN; return OUTCOME_RETURN;
} }
/** /**
* Navigates to next item in the list of content for the current Space * Navigates to next item in the list of content for the current Space
*/ */
@@ -623,7 +812,7 @@ public class DocumentDetailsBean extends BaseDetailsBean
// handle wrapping case // handle wrapping case
next = nodes.get(0); next = nodes.get(0);
} }
// prepare for showing details for this node // prepare for showing details for this node
this.browseBean.setupContentAction(next.getId(), false); this.browseBean.setupContentAction(next.getId(), false);
break; break;
@@ -632,7 +821,7 @@ public class DocumentDetailsBean extends BaseDetailsBean
} }
} }
} }
/** /**
* Navigates to the previous item in the list of content for the current Space * Navigates to the previous item in the list of content for the current Space
*/ */
@@ -662,7 +851,7 @@ public class DocumentDetailsBean extends BaseDetailsBean
// handle wrapping case // handle wrapping case
previous = nodes.get(nodes.size() - 1); previous = nodes.get(nodes.size() - 1);
} }
// prepare for showing details for this node // prepare for showing details for this node
this.browseBean.setupContentAction(previous.getId(), false); this.browseBean.setupContentAction(previous.getId(), false);
break; break;
@@ -671,7 +860,7 @@ public class DocumentDetailsBean extends BaseDetailsBean
} }
} }
} }
/** /**
* @see org.alfresco.web.bean.BaseDetailsBean#getPropertiesPanelId() * @see org.alfresco.web.bean.BaseDetailsBean#getPropertiesPanelId()
*/ */
@@ -679,59 +868,59 @@ public class DocumentDetailsBean extends BaseDetailsBean
{ {
return "document-props"; return "document-props";
} }
/** /**
* Returns a model for use by a template on the Document Details page. * Returns a model for use by a template on the Document Details page.
* *
* @return model containing current document and current space info. * @return model containing current document and current space info.
*/ */
public Map getTemplateModel() public Map getTemplateModel()
{ {
Map<String, Object> model = new HashMap<String, Object>(2, 1.0f); Map<String, Object> model = new HashMap<String, Object>(2, 1.0f);
model.put("document", getDocument().getNodeRef()); model.put("document", getDocument().getNodeRef());
model.put("space", this.navigator.getCurrentNode().getNodeRef()); model.put("space", this.navigator.getCurrentNode().getNodeRef());
model.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver); model.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver);
return model; return model;
} }
/** /**
* Returns whether the current document is locked * Returns whether the current document is locked
* *
* @return true if the document is checked out * @return true if the document is checked out
*/ */
public boolean isLocked() public boolean isLocked()
{ {
return getDocument().isLocked(); return getDocument().isLocked();
} }
/** /**
* Returns whether the current document is a working copy * Returns whether the current document is a working copy
* *
* @return true if the document is a working copy * @return true if the document is a working copy
*/ */
public boolean isWorkingCopy() public boolean isWorkingCopy()
{ {
return getDocument().hasAspect(ContentModel.ASPECT_WORKING_COPY); return getDocument().hasAspect(ContentModel.ASPECT_WORKING_COPY);
} }
/** /**
* @return the working copy document Node for this document if found and the * @return the working copy document Node for this document if found and the
* current has permission or null if not * current has permission or null if not
*/ */
public Node getWorkingCopyDocument() public Node getWorkingCopyDocument()
{ {
Node workingCopyNode = null; Node workingCopyNode = null;
if (isLocked()) if (isLocked())
{ {
NodeRef workingCopyRef = this.cociService.getWorkingCopy(getDocument().getNodeRef()); NodeRef workingCopyRef = this.cociService.getWorkingCopy(getDocument().getNodeRef());
if (workingCopyRef != null) if (workingCopyRef != null)
{ {
workingCopyNode = new Node(workingCopyRef); workingCopyNode = new Node(workingCopyRef);
// if the current user does not have read permission on // if the current user does not have read permission on
// working copy return null // working copy return null
if (workingCopyNode.hasPermission(PermissionService.READ) == false) if (workingCopyNode.hasPermission(PermissionService.READ) == false)
{ {
@@ -739,33 +928,33 @@ public class DocumentDetailsBean extends BaseDetailsBean
} }
} }
} }
return workingCopyNode; return workingCopyNode;
} }
/** /**
* Returns whether the current document is a working copy owned by the current User * Returns whether the current document is a working copy owned by the current User
* *
* @return true if the document is a working copy owner by the current User * @return true if the document is a working copy owner by the current User
*/ */
public boolean isOwner() public boolean isOwner()
{ {
return getDocument().isWorkingCopyOwner(); return getDocument().isWorkingCopyOwner();
} }
/** /**
* Returns the Node this bean is currently representing * Returns the Node this bean is currently representing
* *
* @return The Node * @return The Node
*/ */
public Node getNode() public Node getNode()
{ {
return this.browseBean.getDocument(); return this.browseBean.getDocument();
} }
/** /**
* Returns the document this bean is currently representing * Returns the document this bean is currently representing
* *
* @return The document Node * @return The document Node
*/ */
public Node getDocument() public Node getDocument()
@@ -775,19 +964,19 @@ public class DocumentDetailsBean extends BaseDetailsBean
/** /**
* Returns the ml container of the document this bean is currently representing * Returns the ml container of the document this bean is currently representing
* *
* @return The document multilingual container NodeRef * @return The document multilingual container NodeRef
*/ */
public Node getDocumentMlContainer() public Node getDocumentMlContainer()
{ {
NodeRef nodeRef = getNode().getNodeRef(); NodeRef nodeRef = getNode().getNodeRef();
return new Node(multilingualContentService.getTranslationContainer(nodeRef)); return new Node(multilingualContentService.getTranslationContainer(nodeRef));
} }
/** /**
* Sets the lock service instance the bean should use * Sets the lock service instance the bean should use
* *
* @param lockService The LockService * @param lockService The LockService
*/ */
public void setLockService(LockService lockService) public void setLockService(LockService lockService)
@@ -797,17 +986,17 @@ public class DocumentDetailsBean extends BaseDetailsBean
/** /**
* Sets the version service instance the bean should use * Sets the version service instance the bean should use
* *
* @param versionService The VersionService * @param versionService The VersionService
*/ */
public void setVersionService(VersionService versionService) public void setVersionService(VersionService versionService)
{ {
this.versionService = versionService; this.versionService = versionService;
} }
/** /**
* Sets the checkincheckout service instance the bean should use * Sets the checkincheckout service instance the bean should use
* *
* @param cociService The CheckOutCheckInService * @param cociService The CheckOutCheckInService
*/ */
public void setCheckOutCheckInService(CheckOutCheckInService cociService) public void setCheckOutCheckInService(CheckOutCheckInService cociService)
@@ -816,19 +1005,29 @@ public class DocumentDetailsBean extends BaseDetailsBean
} }
/** /**
* @param multilingualContentService the multilingualContentService to set * @param multilingualContentService the multilingual ContentService to set
*/ */
public void setMultilingualContentService( public void setMultilingualContentService(MultilingualContentService multilingualContentService)
MultilingualContentService multilingualContentService)
{ {
this.multilingualContentService = multilingualContentService; this.multilingualContentService = multilingualContentService;
} }
/** /**
* @param contentFilterLanguagesService The ContentFilterLanguagesService to set. * @param contentFilterLanguagesService The Content Filter Languages Service to set.
*/ */
public void setContentFilterLanguagesService(ContentFilterLanguagesService contentFilterLanguagesService) public void setContentFilterLanguagesService(ContentFilterLanguagesService contentFilterLanguagesService)
{ {
this.contentFilterLanguagesService = contentFilterLanguagesService; this.contentFilterLanguagesService = contentFilterLanguagesService;
} }
/**
* @param EditionService The Edition Service to set.
*/
public void setEditionService(EditionService editionService)
{
this.editionService = editionService;
}
} }

View File

@@ -0,0 +1,71 @@
package org.alfresco.web.bean;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.web.bean.repository.MapNode;
/**
* Util class which represents a light weight representation of an edition history for the
* client side needs.
*
* @author pignoya
*/
public class SingleEditionBean
{
/** The edition in a list */
private List<MapNode> edition = null;
/** The translation list of the edition */
private List<MapNode> translations = null;
/**
* @return
*/
public String getEditionLabel()
{
return (String) this.getEdition().get(0).get("editionLabel");
}
/**
* @return the edition
*/
public List<MapNode> getEdition()
{
return edition;
}
/**
* @param edition the edition to set
*/
public void setEdition(MapNode edition)
{
this.edition = new ArrayList<MapNode>(1);
translations = null;
this.edition.add(edition);
}
/**
* @return the translations
*/
public List<MapNode> getTranslations()
{
return translations;
}
/**
* @param translation the translations to add to the list
*/
public void addTranslations(MapNode translation)
{
if(this.translations == null)
{
this.translations = new ArrayList<MapNode>();
}
this.translations.add(translation);
}
}

View File

@@ -41,7 +41,7 @@ import org.alfresco.web.ui.repo.converter.LanguageConverter;
/** /**
* Generates a LANGUAGE selector component. * Generates a LANGUAGE selector component.
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class LanguageSelectorGenerator extends BaseComponentGenerator public class LanguageSelectorGenerator extends BaseComponentGenerator
{ {

View File

@@ -45,7 +45,7 @@ import org.alfresco.service.cmr.repository.NodeService;
* The list of languages must contains the languages of each of this <b>non-empty</b> * The list of languages must contains the languages of each of this <b>non-empty</b>
* translations. * translations.
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class MlContainerLanguageSelectorGenerator extends LanguageSelectorGenerator public class MlContainerLanguageSelectorGenerator extends LanguageSelectorGenerator
{ {

View File

@@ -45,7 +45,7 @@ import org.alfresco.web.ui.common.Utils;
* Dialog bean to add a new translation without content. I means, a new node is created * Dialog bean to add a new translation without content. I means, a new node is created
* but it doesn't content the propertie <code>{http://www.alfresco.org/model/content/1.0}content</code> * but it doesn't content the propertie <code>{http://www.alfresco.org/model/content/1.0}content</code>
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class AddTranslationWithoutContentDialog extends BaseDialogBean public class AddTranslationWithoutContentDialog extends BaseDialogBean
{ {

View File

@@ -151,8 +151,7 @@ public class AddTranslationlDialog extends AddContentDialog
return multilingualContentService; return multilingualContentService;
} }
public void setMultilingualContentService( public void setMultilingualContentService(MultilingualContentService multilingualContentService)
MultilingualContentService multilingualContentService)
{ {
this.multilingualContentService = multilingualContentService; this.multilingualContentService = multilingualContentService;
} }

View File

@@ -39,7 +39,7 @@ import org.alfresco.web.bean.repository.Node;
/** /**
* Dialog bean to edit an existing multilingual container. * Dialog bean to edit an existing multilingual container.
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class EditMLContainerDialog extends BaseDialogBean public class EditMLContainerDialog extends BaseDialogBean
{ {

View File

@@ -42,7 +42,7 @@ import org.alfresco.web.bean.repository.Node;
/** /**
* Dialog bean to make a node multilingual * Dialog bean to make a node multilingual
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class MakeMultilingualDialog extends BaseDialogBean public class MakeMultilingualDialog extends BaseDialogBean
{ {

View File

@@ -0,0 +1,447 @@
/*
* Copyright (C) 2005-2007 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program 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 General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
*/
package org.alfresco.web.bean.ml;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.version.VersionModel;
import org.alfresco.service.cmr.lock.LockService;
import org.alfresco.service.cmr.lock.LockStatus;
import org.alfresco.service.cmr.ml.ContentFilterLanguagesService;
import org.alfresco.service.cmr.ml.EditionService;
import org.alfresco.service.cmr.ml.MultilingualContentService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.version.Version;
import org.alfresco.service.cmr.version.VersionType;
import org.alfresco.web.app.AlfrescoNavigationHandler;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.wizard.BaseWizardBean;
/**
* Wizard bean to create a new edition from an existing MLContainer.
*
* @author yanipig
*/
public class NewEditionWizard extends BaseWizardBean
{
protected EditionService editionService;
protected MultilingualContentService multilingualContentService;
protected ContentFilterLanguagesService contentFilterLanguagesService;
protected LockService lockService;
protected NodeRef mlContainerToVersion;
private List<SelectItem> selectableTranslations;
private String startingItemNodeString;
private String editionNotes;
private boolean minorChange;
private boolean otherProperties;
private List<SelectItem> translationCheckedOut;
private String language;
private String title;
private String author;
private boolean hasTranslationCheckedOut;
private NodeRef startingElement;
@Override
public void init(Map<String, String> parameters)
{
super.init(parameters);
// reset the fileds
startingItemNodeString = null;
editionNotes = null;
minorChange = true;
otherProperties = false;
translationCheckedOut = null;
language = "lang";
title = "title";
author = "author";
selectableTranslations = null;
// set the mlContainer to version
NodeRef currentNodeRef = this.browseBean.getDocument().getNodeRef();
if(ContentModel.TYPE_MULTILINGUAL_CONTAINER.equals(nodeService.getType(currentNodeRef)))
{
mlContainerToVersion = currentNodeRef;
}
else
{
mlContainerToVersion = multilingualContentService.getTranslationContainer(currentNodeRef);
}
translationCheckedOut = getTranslationCheckedOut();
hasTranslationCheckedOut = getHasTranslationCheckedOut();
}
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
// fill the edition properties
Map<String, Serializable> versionProperties = new HashMap<String, Serializable>(1, 1.0f);
versionProperties.put(Version.PROP_DESCRIPTION, editionNotes);
if (minorChange)
{
versionProperties.put(VersionModel.PROP_VERSION_TYPE, VersionType.MINOR);
}
else
{
versionProperties.put(VersionModel.PROP_VERSION_TYPE, VersionType.MAJOR);
}
// create the edition and get the reference of the new starting translation
NodeRef newPivot = editionService.createEdition(startingElement, versionProperties);
if (otherProperties == true)
{
this.browseBean.setDocument(new Node(newPivot));
outcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME + AlfrescoNavigationHandler.OUTCOME_SEPARATOR + AlfrescoNavigationHandler.DIALOG_PREFIX + "setContentProperties";
}
else
{
outcome = AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME + AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "browse";
}
return outcome;
}
/**
* Determines whether there are any translation checked out.
*
* @return true if there are translation checked out
*/
public boolean getHasTranslationCheckedOut()
{
hasTranslationCheckedOut = getTranslationCheckedOut().size() > 0;
return hasTranslationCheckedOut;
}
@Override
public boolean getFinishButtonDisabled()
{
return super.getFinishButtonDisabled() || hasTranslationCheckedOut;
}
@Override
public boolean getNextButtonDisabled()
{
return super.getNextButtonDisabled() || hasTranslationCheckedOut;
}
/**
* Return the list of cecked out document found in the mlContainer.
*
* @return the list of checked out translation
*/
public List<SelectItem> getTranslationCheckedOut()
{
if(translationCheckedOut == null )
{
// first call, init the list
this.translationCheckedOut = new ArrayList<SelectItem>();
// get all translations of the mlContainer
Map<Locale, NodeRef> translations = multilingualContentService.getTranslations(mlContainerToVersion);
// fill the select itms
for(Map.Entry<Locale, NodeRef> entry : translations.entrySet())
{
NodeRef nodeRef = entry.getValue();
if(nodeService.hasAspect(nodeRef, ContentModel.ASPECT_LOCKABLE))
{
LockStatus lockStatus = lockService.getLockStatus(nodeRef);
if (lockStatus != LockStatus.NO_LOCK)
{
// if the node is locked, add it to the locked translation list
String name = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
Locale lang = (Locale) nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE);
String lockOwner = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_WORKING_COPY_OWNER);
this.translationCheckedOut.add(new SelectItem(
"(" + lang.getLanguage() + ")",
name,
lockOwner
));
}
}
}
}
return this.translationCheckedOut;
}
/**
* Return the list of available translations to begin the starting translations of the new edition.
*
* @return the list of available translations
*/
public List<SelectItem> getSelectableTranslations()
{
if(selectableTranslations == null)
{
// first call, init the list
selectableTranslations = new ArrayList<SelectItem>();
// get all translations of the mlContainer
Map<Locale, NodeRef> translations = multilingualContentService.getTranslations(mlContainerToVersion);
// fill the select items
for(Map.Entry<Locale, NodeRef> entry : translations.entrySet())
{
NodeRef nodeRef = entry.getValue();
//add each non empty translation
if(!nodeService.hasAspect(nodeRef, ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION))
{
String name = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_NAME);
Locale lang = (Locale) nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE);
selectableTranslations.add(new SelectItem(
nodeRef.toString(),
name + " - " + contentFilterLanguagesService.getLabelByCode(lang.getLanguage())
));
}
}
}
return selectableTranslations;
}
/**
* @param multilingualContentService the Multilingual Content Service to set
*/
public void setMultilingualContentService(MultilingualContentService multilingualContentService)
{
this.multilingualContentService = multilingualContentService;
}
/**
* @param nodeService the Node Service to set
*/
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
/**
* @param editionService the Edition Service to set
*/
public void setEditionService(EditionService editionService)
{
this.editionService = editionService;
}
/**
* @return the edition notes
*/
public String getEditionNotes()
{
return editionNotes;
}
/**
* @param editionNotes the edition notes to set
*/
public void setEditionNotes(String editionNotes)
{
this.editionNotes = editionNotes;
}
/**
* @return the minorChange get if the new edition is minor or not.
*/
public boolean isMinorChange()
{
return minorChange;
}
/**
* @param minorChange set if the new edition is minor or not.
*/
public void setMinorChange(boolean minorChange)
{
this.minorChange = minorChange;
}
/**
* @return the otherProperties, get if the edit details dialog must be set at the end of the wizard
*/
public boolean isOtherProperties()
{
return otherProperties;
}
/**
* @param otherProperties set as true, the edit details dialog must be set at the end of the wizard
*/
public void setOtherProperties(boolean otherProperties)
{
this.otherProperties = otherProperties;
}
/**
* @return the starting translation being the new pivot of tne new edition
*/
public String getStartingItemNodeString()
{
return startingItemNodeString;
}
/**
* @param startingItemNodeString the starting translation to set as the new pivot of tne new edition
*/
public void setStartingItemNodeString(String startingItemNodeString)
{
// get the starting point translation with its id
startingElement = new NodeRef(startingItemNodeString);
// set the futur properties of the new starting element (only usefull for the summary step)
setLanguage((Locale) nodeService.getProperty(startingElement, ContentModel.PROP_LOCALE));
setAuthor((String) nodeService.getProperty(startingElement, ContentModel.PROP_AUTHOR));
setTitle((String) nodeService.getProperty(startingElement, ContentModel.PROP_TITLE));
this.startingItemNodeString = startingItemNodeString;
}
/**
* @param contentFilterLanguagesService the Content Filter Languages Service to set
*/
public void setContentFilterLanguagesService(ContentFilterLanguagesService contentFilterLanguagesService)
{
this.contentFilterLanguagesService = contentFilterLanguagesService;
}
/**
* @param lockService the Lock Service to set
*/
public void setLockService(LockService lockService)
{
this.lockService = lockService;
}
/**
* @return the author
*/
public String getAuthor()
{
return author;
}
/**
* @param author the author to set
*/
public void setAuthor(String author)
{
this.author = author;
}
/**
* @return the language
*/
public String getLanguage()
{
return language;
}
/**
* @param language the language to set
*/
public void setLanguage(String language)
{
this.language = language;
}
/**
* @param language the language to set
*/
public void setLanguage(Locale locale)
{
this.language = locale.getLanguage();
}
/**
* @return the title
*/
public String getTitle()
{
return title;
}
/**
* @param title the title to set
*/
public void setTitle(String title)
{
this.title = title;
}
/**
* @return the versionLabel
*/
public String getVersionLabel()
{
String toReturn = "Version Label";
if(minorChange)
{
toReturn += " (minor change)";
}
return toReturn;
}
}

View File

@@ -41,7 +41,7 @@ import org.alfresco.web.bean.users.SpaceUsersBean;
* Component that holds a list of languages avalaiable to make a node multilingual. * Component that holds a list of languages avalaiable to make a node multilingual.
* *
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class UILanguageSelector extends UISelectOne public class UILanguageSelector extends UISelectOne
{ {

View File

@@ -35,7 +35,7 @@ import org.alfresco.web.app.servlet.FacesHelper;
/** /**
* Converter class to convert a Locale into a language libelle * Converter class to convert a Locale into a language libelle
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class LanguageConverter implements Converter public class LanguageConverter implements Converter
{ {

View File

@@ -34,7 +34,7 @@ import org.alfresco.web.ui.repo.component.UIMimeTypeSelector;
/** /**
* Tag class for the Language selector component * Tag class for the Language selector component
* *
* @author yanipig * @author Yannick Pignot
*/ */
public class LanguageSelectorTag extends HtmlComponentTag public class LanguageSelectorTag extends HtmlComponentTag
{ {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,6 +1,6 @@
<%-- <%--
* Copyright (C) 2005-2007 Alfresco Software Limited. * Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
@@ -15,11 +15,11 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of * As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre * the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's * and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing * FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here: * the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing" * http://www.alfresco.com/legal/licensing"
--%> --%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
@@ -35,41 +35,40 @@
<r:page titleId="title_file_details"> <r:page titleId="title_file_details">
<f:view> <f:view>
<%-- load a bundle of properties with I18N strings --%> <%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/> <f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptcharset="UTF-8" id="document-details"> <h:form acceptcharset="UTF-8" id="document-details">
<%-- Main outer table --%> <%-- Main outer table --%>
<table cellspacing="0" cellpadding="2"> <table cellspacing="0" cellpadding="2">
<%-- Title bar --%> <%-- Title bar --%>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<%@ include file="../parts/titlebar.jsp" %> <%@ include file="../parts/titlebar.jsp" %>
</td> </td>
</tr> </tr>
<%-- Main area --%> <%-- Main area --%>
<tr valign="top"> <tr valign="top">
<%-- Shelf --%> <%-- Shelf --%>
<td> <td>
<%@ include file="../parts/shelf.jsp" %> <%@ include file="../parts/shelf.jsp" %>
</td> </td>
<%-- Work Area --%> <%-- Work Area --%>
<td width="100%"> <td width="100%">
<table cellspacing="0" cellpadding="0" width="100%"> <table cellspacing="0" cellpadding="0" width="100%">
<%-- Breadcrumb --%> <%-- Breadcrumb --%>
<%@ include file="../parts/breadcrumb.jsp" %> <%@ include file="../parts/breadcrumb.jsp" %>
<%-- Status and Actions --%> <%-- Status and Actions --%>
<tr> <tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td> <td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
<td bgcolor="#dfe6ed"> <td bgcolor="#dfe6ed">
<%-- Status and Actions inner contents table --%> <%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%> <%-- Generally this consists of an icon, textual summary and actions for the current object --%>
<table cellspacing="4" cellpadding="0" width="100%"> <table cellspacing="4" cellpadding="0" width="100%">
@@ -80,32 +79,32 @@
<td> <td>
<div class="mainTitle"> <div class="mainTitle">
<h:outputText value="#{msg.manage_multilingual_details_for}" /> '<h:outputText value="#{DocumentDetailsBean.name}" />'<r:lockIcon value="#{DocumentDetailsBean.document.nodeRef}" align="absmiddle" /> <h:outputText value="#{msg.manage_multilingual_details_for}" /> '<h:outputText value="#{DocumentDetailsBean.name}" />'<r:lockIcon value="#{DocumentDetailsBean.document.nodeRef}" align="absmiddle" />
</div> </div>
<div class="mainSubText"><h:outputText id="ml-details-description" value="#{msg.manage_multilingual_details_description}" /></div> <div class="mainSubText"><h:outputText id="ml-details-description" value="#{msg.manage_multilingual_details_description}" /></div>
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td> <td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
</tr> </tr>
<%-- separator row with gradient shadow --%> <%-- separator row with gradient shadow --%>
<tr> <tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td> <td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td> <td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td> <td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
</tr> </tr>
<%-- Error Messages --%> <%-- Error Messages --%>
<tr valign=top> <tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td> <td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td>
<td> <td>
<%-- messages tag to show messages not handled by other specific message tags --%> <%-- messages tag to show messages not handled by other specific message tags --%>
<a:errors message="" infoClass="statusWarningText" errorClass="statusErrorText" /> <a:errors message="" infoClass="statusWarningText" errorClass="statusErrorText" />
</td> </td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width=4></td> <td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width=4></td>
</tr> </tr>
<%-- Details --%> <%-- Details --%>
<tr valign=top> <tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td> <td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
@@ -123,11 +122,10 @@
</f:facet> </f:facet>
</h:panelGroup> </h:panelGroup>
<%--
<%-- Multlingual details
Multlingual details --%>
--%>
<%-- properties for Ml container --%> <%-- properties for Ml container --%>
<h:panelGroup id="ml-props-panel-facets"> <h:panelGroup id="ml-props-panel-facets">
<f:facet name="title"> <f:facet name="title">
@@ -136,74 +134,228 @@
action="dialog:editMlContainer" /> action="dialog:editMlContainer" />
</r:permissionEvaluator> </r:permissionEvaluator>
</f:facet> </f:facet>
</h:panelGroup> </h:panelGroup>
<a:panel label="#{msg.properties}" facetsId="ml-props-panel-facets" id="ml-properties-panel" progressive="true"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
expanded='#{DocumentDetailsBean.panels["ml-properties-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
<h:outputText styleClass="nodeWorkflowInfoTitle"/> <a:panel label="#{msg.properties}" facetsId="ml-props-panel-facets" id="ml-properties-panel" progressive="true"
<r:propertySheetGrid id="ml-container-props-sheet" value="#{DocumentDetailsBean.documentMlContainer}" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
var="mlContainerProps" columns="1" labelStyleClass="propertiesLabel" expanded='#{DocumentDetailsBean.panels["ml-properties-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
externalConfig="true" cellpadding="2" cellspacing="2" mode="view"/>
</a:panel>
<div style="padding:4px"></div>
<%-- list of translations --%> <h:outputText styleClass="nodeWorkflowInfoTitle"/>
<r:propertySheetGrid id="ml-container-props-sheet" value="#{DocumentDetailsBean.documentMlContainer}"
var="mlContainerProps" columns="1" labelStyleClass="propertiesLabel"
externalConfig="true" cellpadding="2" cellspacing="2" mode="view"/>
</a:panel>
<div style="padding:4px"></div>
<%-- list of translations --%>
<a:panel label="#{msg.translations}" id="ml-translation-panel" progressive="true" <a:panel label="#{msg.translations}" id="ml-translation-panel" progressive="true"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
expanded='#{DocumentDetailsBean.panels["ml-translation-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}"> expanded='#{DocumentDetailsBean.panels["ml-translation-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
<a:richList id="TranslationList" viewMode="details" value="#{DocumentDetailsBean.translations}"
var="r" styleClass="recordSet" headerStyleClass="recordSetHeader"
rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
pageSize="10" initialSortColumn="Name" initialSortDescending="false">
<a:richList id="TranslationList" viewMode="details" value="#{DocumentDetailsBean.translations}"
var="r" styleClass="recordSet" headerStyleClass="recordSetHeader"
rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
pageSize="10" initialSortColumn="Name" initialSortDescending="false">
<%-- Icon details view mode --%> <%-- Icon details view mode --%>
<a:column id="col20" primary="true" width="20" style="padding:2px;"> <a:column id="col20" primary="true" width="20" style="padding:2px;">
<f:facet name="header"> <f:facet name="header">
<h:outputText value=""/> <h:outputText value=""/>
</f:facet> </f:facet>
<h:graphicImage url="/images/filetypes/_default.gif" /> <h:graphicImage url="/images/filetypes/_default.gif" />
</a:column> </a:column>
<%-- Name Columns --%> <%-- Name Columns --%>
<a:column id="col21" width="300" style="text-align:left"> <a:column id="col21" width="300" style="text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink label="#{msg.name}" value="Name" mode="case-insensitive" styleClass="header"/> <a:sortLink label="#{msg.name}" value="Name" mode="case-insensitive" styleClass="header"/>
</f:facet> </f:facet>
<a:actionLink id="view-name" value="#{r.name}" href="#{r.url}" target="new" /> <a:actionLink id="view-name" value="#{r.name}" href="#{r.url}" target="new" />
</a:column> </a:column>
<%-- Language columns --%> <%-- Language columns --%>
<a:column id="col22" width="50" style="text-align:left"> <a:column id="col22" width="50" style="text-align:left">
<f:facet name="header"> <f:facet name="header">
<a:sortLink label="#{msg.language}" value="language" mode="case-insensitive" styleClass="header"/> <a:sortLink label="#{msg.language}" value="language" mode="case-insensitive" styleClass="header"/>
</f:facet> </f:facet>
<h:outputText id="view-language" value="#{r.language}" /> <h:outputText id="view-language" value="#{r.language}" />
</a:column> </a:column>
<%-- view actions --%> <%-- view actions --%>
<a:column id="col25" style="text-align: left"> <a:column id="col25" style="text-align: left">
<f:facet name="header"> <f:facet name="header">
<h:outputText value="#{msg.actions}"/> <h:outputText value="#{msg.actions}"/>
</f:facet> </f:facet>
<a:actionLink id="view-link" value="#{msg.view}" href="#{r.url}" target="new" /> <a:actionLink id="view-link" value="#{msg.view}" href="#{r.url}" target="new" />
</a:column> </a:column>
<a:dataPager styleClass="pager" /> <a:dataPager styleClass="pager" />
</a:richList> </a:richList>
</a:panel>
<div style="padding:4px"></div>
<%--
Editions details
--%>
<a:panel label="#{msg.editions}" id="ml-editions-panel" progressive="true"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
expanded='#{DocumentDetailsBean.panels["ml-editions-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
<a:richList id="EditionTitle" viewMode="details" value="#{DocumentDetailsBean.emptyListAndInitEditions}"
var="ed" styleClass="recordSet" headerStyleClass="recordSetHeader"
rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
initialSortDescending="true">
<%-- Icon details view mode --%>
<a:column id="col30" primary="true" width="20" style="padding:2px;">
<f:facet name="header">
<h:outputText value=""/>
</f:facet>
</a:column>
<%-- edition label --%>
<a:column id="col31" width="100" style="text-align:left">
<f:facet name="header">
<h:outputText value="#{msg.edition}" styleClass="header"/>
</f:facet>
</a:column>
<%-- edition notes --%>
<a:column id="col32" width="200" style="text-align:left">
<f:facet name="header">
<h:outputText value="#{msg.notes}" styleClass="header"/>
</f:facet>
</a:column>
<%-- edition author --%>
<a:column id="col33" style="text-align:left">
<f:facet name="header">
<h:outputText value="#{msg.author}" styleClass="header"/>
</f:facet>
</a:column>
<%-- edition date --%>
<a:column id="col34" style="text-align:left; white-space:nowrap">
<f:facet name="header">
<h:outputText value="#{msg.date}" styleClass="header"/>
</f:facet>
</a:column>
</a:richList>
<c:forEach var="idx" begin="1" end="${DocumentDetailsBean.editionSize}" >
<a:richList id="ml-editions-list${idx}" viewMode="details" value="#{DocumentDetailsBean.nextSingleEditionBean.edition}"
var="ed" styleClass="recordSet" headerStyleClass="recordSetHeader"
rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt"
width="100%" initialSortColumn="editionLabel" initialSortDescending="true">
<%-- Icon details view mode --%>
<a:column id="column-edition-view-mode${idx}" primary="true" width="20" style="padding:2px;">
<a:graphicImageExprEnable id="edition-image${idx}" url="/images/icons/folder.gif" />
</a:column>
<%-- edition label --%>
<a:column id="column-edition-label${idx}" width="100" style="text-align:left">
<a:outputTextExprEnable id="edition-label${idx}" value="#{ed.editionLabel}"/>
</a:column>
<%-- edition notes --%>
<a:column id="column-edition-notes${idx}" width="200" style="text-align:left">
<a:outputTextExprEnable id="edition-notes${idx}" value="#{ed.editionNotes}" />
</a:column>
<%-- edition author --%>
<a:column id="column-edition-author${idx}" style="text-align:left">
<a:outputTextExprEnable id="edition-author${idx}" value="#{ed.editionAuthor}" />
</a:column>
<%-- edition date --%>
<a:column id="column-edition-date${idx}" style="text-align:left; white-space:nowrap">
<a:outputTextExprEnable id="edition-date${idx}" value="#{ed.editionDate}">
<a:convertXMLDate type="both" pattern="#{msg.date_pattern}" />
</a:outputTextExprEnable>
</a:column>
</a:richList>
<div style="padding-left:25">
<a:panel label="#{msg.related_content}" id="ml-versions-panel${idx}" progressive="true" expanded="false"
expandedActionListener="#{DocumentDetailsBean.expandPanel}" styleClass="nodeWorkflowInfoTitle" >
<a:richList id="ml-versions-list${idx}" viewMode="details" value="#{DocumentDetailsBean.currentSingleEditionBean.translations}"
var="tr" styleClass="recordSet" headerStyleClass="recordSetHeader"
rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
pageSize="10" initialSortColumn="versionName" initialSortDescending="true" style="padding-left:12px;padding-top:10px;">
<%-- Icon details view mode --%>
<a:column id="column-view-mode${idx}" primary="true" width="20" style="padding:2px;">
<f:facet name="header">
<a:outputTextExprEnable id="translation-image-title${idx}" value="" styleClass="header"/>
</f:facet>
<a:graphicImageExprEnable id="translation-image${idx}" url="/images/filetypes/_default.gif" />
</a:column>
<%-- Versionned name --%>
<a:column id="column-name${idx}" width="100" style="text-align:left">
<f:facet name="header">
<a:sortLink id="sort-name${idx}" label="#{msg.name}" value="versionName" mode="case-insensitive" styleClass="header"/>
</f:facet>
<a:outputTextExprEnable id="translation-name${idx}" value="#{tr.versionName}"/>
</a:column>
<%-- Versionned description --%>
<a:column id="column-description${idx}" width="200" style="text-align:left">
<f:facet name="header">
<a:outputTextExprEnable id="desc-title${idx}" value="#{msg.description}" styleClass="header"/>
</f:facet>
<a:outputTextExprEnable id="translation-description${idx}" value="#{tr.versionDescription}" />
</a:column>
<%-- Versionned creation date --%>
<a:column id="column-creation-date${idx}" style="text-align:left; white-space:nowrap">
<f:facet name="header">
<a:sortLink id="sort-cr-date${idx}" label="#{msg.created}" value="versionCreatedDate" mode="case-insensitive" styleClass="header"/>
</f:facet>
<a:outputTextExprEnable id="translation-created-date${idx}" value="#{tr.versionCreatedDate}">
<a:convertXMLDate type="both" pattern="#{msg.date_pattern}" />
</a:outputTextExprEnable>
</a:column>
<%-- Versionned modified date --%>
<a:column id="column-modified-date${idx}" style="text-align:left; white-space:nowrap">
<f:facet name="header">
<a:sortLink id="sort-mod-date${idx}" label="#{msg.modified}" value="versionModifiedDate" mode="case-insensitive" styleClass="header"/>
</f:facet>
<a:outputTextExprEnable id="translation-modif-date${idx}" value="#{tr.versionModifiedDate}">
<a:convertXMLDate type="both" pattern="#{msg.date_pattern}" />
</a:outputTextExprEnable>
</a:column>
<%-- Versionned language --%>
<a:column id="column-language${idx}" style="text-align:left">
<f:facet name="header">
<a:sortLink id="sort-lang${idx}" label="#{msg.language}" value="versionLanguage" mode="case-insensitive" styleClass="header"/>
</f:facet>
<a:outputTextExprEnable id="translation-language${idx}" value="#{tr.versionLanguage}" />
</a:column>
<%-- view actions --%>
<a:column id="column-action${idx}" style="text-align: left">
<f:facet name="header">
<a:outputTextExprEnable id="translation-action${idx}" value="#{msg.actions}"/>
</f:facet>
<a:actionLink id="translation-link${idx}" value="#{msg.view}" href="#{tr.versionUrl}" target="new" />
</a:column>
</a:richList>
</a:panel>
</div>
</c:forEach>
</a:panel> </a:panel>
<td valign="top">
<td valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %>
<table cellpadding="1" cellspacing="1" border="0" width="100%"> <table cellpadding="1" cellspacing="1" border="0" width="100%">
<tr> <tr>
@@ -213,9 +365,9 @@
</tr> </tr>
</table> </table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %>
<div style="padding:4px"></div> <div style="padding:4px"></div>
<%-- Document Actions --%> <%-- Document Actions --%>
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" style="text-align:center" <a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" style="text-align:center"
progressive="true" expanded='#{DocumentDetailsBean.panels["actions-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}"> progressive="true" expanded='#{DocumentDetailsBean.panels["actions-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
@@ -227,21 +379,21 @@
</td> </td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td> <td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
</tr> </tr>
<%-- separator row with bottom panel graphics --%> <%-- separator row with bottom panel graphics --%>
<tr> <tr>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td> <td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td> <td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td> <td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</h:form> </h:form>
</f:view> </f:view>
</r:page> </r:page>

View File

@@ -0,0 +1,54 @@
<%--
* Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program 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 General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<h:panelGroup rendered="#{WizardManager.bean.hasTranslationCheckedOut == true}">
<f:verbatim>
<%PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc");%>
<table><tr><td>
</f:verbatim>
<h:graphicImage url="/images/icons/info_icon.gif" />
<f:verbatim>
</td><td>
</f:verbatim>
<h:outputText value="#{msg.translations_checked_out_error}" />
<f:verbatim>
</td></tr></table>
<%PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner");%>
</f:verbatim>
</h:panelGroup>
<h:panelGrid columns="1" styleClass="workflowSelection" rendered="#{WizardManager.bean.hasTranslationCheckedOut == false}">
<h:outputText value="#{msg.available_translations}:" style="font-weight:bold;"/>
<h:selectOneRadio id="selected-translations" value="#{WizardManager.bean.startingItemNodeString}"
layout="pageDirection">
<f:selectItems value="#{WizardManager.bean.selectableTranslations}" />
</h:selectOneRadio>
</h:panelGrid>

View File

@@ -0,0 +1,53 @@
<%--
* Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program 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 General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;" width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="#{msg.edition_properties}" escape="false" />
</h:panelGrid>
<h:panelGrid style="padding-top: 2px;" columns="1">
<h:outputText value="#{msg.edition_notes}" />
<h:inputTextarea value="#{WizardManager.bean.editionNotes}" rows="2" cols="50"/>
</h:panelGrid>
<h:panelGrid style="padding-top: 2px;" columns="2">
<h:selectBooleanCheckbox id="add_translation" value="#{WizardManager.bean.minorChange}" immediate="false"/>
<h:outputText value="#{msg.minor_change}" />
</h:panelGrid>
<h:panelGrid columns="1" cellpadding="2" style="padding-top: 4px; padding-bottom: 4px;" width="100%" rowClasses="wizardSectionHeading">
<h:outputText value="#{msg.other_properties}" escape="false" />
</h:panelGrid>
<h:panelGrid style="padding-top: 2px;" columns="2">
<h:selectBooleanCheckbox id="add_translation" value="#{WizardManager.bean.otherProperties}" immediate="false"/>
<h:outputText value="#{msg.modify_translation_properties}" />
</h:panelGrid>

View File

@@ -0,0 +1,58 @@
<%--
* Copyright (C) 2005-2007 Alfresco Software Limited.
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program 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 General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<h:panelGrid columns="1" styleClass="workflowSelection">
<h:panelGrid columns="1">
<h:outputText value="#{msg.create_new_edition_using}" style="font-weight:bold;"/>
</h:panelGrid>
<h:panelGrid columns="2" style="padding-left: 10px;">
<h:outputText value="#{msg.translation_title}:" />
<h:outputText value="#{WizardManager.bean.title}" style="font-style:italic;"/>
<h:outputText value="#{msg.translation_language}:" />
<h:outputText value="#{WizardManager.bean.language}" style="font-style:italic;"/>
<h:outputText value="#{msg.translation_author}:" />
<h:outputText value="#{WizardManager.bean.author}" style="font-style:italic;"/>
</h:panelGrid>
</h:panelGrid>
<h:outputText id="padding1" styleClass="paddingRow" value="&nbsp;" escape="false" />
<h:outputText id="padding2" styleClass="paddingRow" value="&nbsp;" escape="false" />
<h:panelGrid columns="1" styleClass="workflowSelection">
<h:panelGrid columns="1">
<h:outputText value="#{msg.new_edition_details}" style="font-weight:bold;"/>
</h:panelGrid>
<h:panelGrid columns="2" style="padding-left: 10px;">
<h:outputText value="#{msg.version}:"/>
<h:outputText value="#{WizardManager.bean.versionLabel}" style="font-style:italic;"/>
<h:outputText value="#{msg.version_notes}:"/>
<h:outputText value="#{WizardManager.bean.editionNotes}" style="font-style:italic;"/>
</h:panelGrid>
</h:panelGrid>