mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Phase one of merge of EC multilingual work
These files are their changes plus adjustments for formatting and immediate clashes I anticipate that this will break the build, but there are too many changes coming to risk it. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5740 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,46 @@
|
||||
# I18N message properties
|
||||
|
||||
# Multilingual
|
||||
make_multilingual=Make Multilingual
|
||||
make_multilingual_tooltip=Make this document multilingual
|
||||
make_multilingual_description=Transform this document as a multilingual document.
|
||||
error_make_multilingual_dialog=Unable to make this file multilingual.
|
||||
add_translation=Add Translation
|
||||
add_translation_tooltip=Add a translation to this document
|
||||
add_translation_description=Add a translation to the document.
|
||||
error_add_translation_dialog=Unable to add a translation.
|
||||
trad_exists_error=A traduction already exists for this locale.
|
||||
add_translation_wc=Add Translation Without Content
|
||||
add_translation_wc_tooltip=Add a translation without content to the document
|
||||
add_translation_wc_description=Add a translation to the document's properties.
|
||||
error_add_translation_wc_dialog=Unable to add a translation without content.
|
||||
create_properties_close=Add new properties when the dialog closes
|
||||
ml_common_content_properties=Common Multilingual Content Properties
|
||||
ml_other_options=Other Options
|
||||
ml_add_trans_when_diag_close=Add translation when this dialog closes.
|
||||
ml_with_content=With content
|
||||
ml_just_trans_info=Without content (just translation information)
|
||||
not_multilingual=This document has no multilinguism aspect.
|
||||
allow_multilinguism=Allow Multilinguism Aspect
|
||||
select_language=<Select a language>
|
||||
ml_content_info=Multilingual Content Info
|
||||
edit_ml_container_properties=Edit multilingual content properties
|
||||
edit_ml_container_description=Modify the information about the multilingual content.
|
||||
error_locale_null=A locale must be defined for this node.
|
||||
translator=Translator
|
||||
manage_multilingual_details_for=Manage Multilingual Content for
|
||||
manage_multilingual_details=Manage Multilingual Content
|
||||
manage_multilingual_details_tooltip=Manage multilingual properties of the document
|
||||
manage_multilingual_details_description=Use this page to manage manage multilingual content.
|
||||
translations=Translations
|
||||
related_translations=Related Translations
|
||||
related_content=Related Content
|
||||
deep_copy=Deep Copy
|
||||
new_edition=New Edition
|
||||
new_edition_from=New Edition from this
|
||||
properties_close=Edit multilingual properties when the dialog close
|
||||
pivot_translation=Pivot translation
|
||||
|
||||
# Date Pattern
|
||||
date_pattern=d MMMM yyyy
|
||||
date_time_pattern=d MMMM yyyy HH:mm
|
||||
@@ -35,6 +76,7 @@ editworkflow_description=Modify the simple workflow properties then click OK.
|
||||
editspace_description=Modify the space properties then click OK.
|
||||
editlink_description=Modify the link object properties then click OK.
|
||||
create_space_description=Enter information about the new space then click Create Space.
|
||||
create_multilingual_space_description=Enter information about the new space then click Create Space.
|
||||
space_rules_description=This view shows you all the rules to be applied to content in this space.
|
||||
warning_inline=This is only recommended for HTML or plain text documents.
|
||||
categories_description=This view allows you to browse and modify the categories hiearchy.
|
||||
@@ -140,7 +182,7 @@ resetall=Reset All
|
||||
content_rules=Content Rules
|
||||
view_in_browser=View In Browser
|
||||
view_in_webdav=View in WebDAV
|
||||
view_in_cifs=View in CIFS
|
||||
view_in_cifs=View in CIFS
|
||||
download_content=Download Content
|
||||
details_page_bookmark=Details Page URL
|
||||
details_browse_bookmark=Browse Page URL
|
||||
@@ -215,6 +257,7 @@ author=Author
|
||||
date=Date
|
||||
mimetype=Format
|
||||
modifier=Modifier
|
||||
locale=Locale
|
||||
|
||||
# Repo permission display labels
|
||||
# Note - these come from the server, the english translation is generally the same
|
||||
@@ -244,6 +287,7 @@ delete_rule=Delete Rule
|
||||
delete_user=Delete User
|
||||
remove_user=Remove User
|
||||
create_space=Create Space
|
||||
create_multilingual_space=Create Multilingual Space
|
||||
add_content=Add Content
|
||||
create_content=Create Content
|
||||
create_form=Create Web Form
|
||||
@@ -343,7 +387,7 @@ browse_posts=Browse Posts
|
||||
forums_info=This view allows you to browse forum spaces and forums.
|
||||
forum_info=This view allows you to browse topics in this forum.
|
||||
topic_info=This view allows you to browse posts in this topic.
|
||||
no_forums=No forum spaces or forums to display. Click the ''Create Forum Space'' action to create a forum space or ''Create Forum'' action to create a forum.
|
||||
no_forums=No forum spaces or forums to display. Click the ''Create Forum Space'' action to create a forum space or ''Create Forum'' action to create a forum.
|
||||
no_topics=No topics to display. Click the ''Create Topic'' action to create a topic.
|
||||
no_posts=No posts to display. Click the ''Post to Topic'' action to create a post.
|
||||
topic=Topic
|
||||
@@ -775,7 +819,7 @@ action_remove_features=Remove aspect ''{0}''
|
||||
action_specialise_type=Item is specialised to type ''{0}''
|
||||
action_simple_workflow={0} item to ''{1}'' if ''{2}'' action is taken.
|
||||
action_link_category=Link to category ''{0}''
|
||||
action_transform=Copies content to ''{0}'' and transforms to ''{1}''
|
||||
action_transform=Copies content to ''{0}'' and transforms to ''{1}''
|
||||
action_transform_image=Copies image to ''{0}'' and transforms to ''{1}'' using option ''{2}''
|
||||
action_copy=Copy to ''{0}''
|
||||
action_copy_to_web_project_folder=Copy to ''{0}'' in ''{1}''
|
||||
@@ -983,7 +1027,7 @@ delete_avm_file_confirm=Are you sure you want to remove \"{0}\" from the sandbox
|
||||
delete_folder=Delete Folder
|
||||
delete_avm_folder_info=To remove this folder and its contents from the sandbox, click OK.
|
||||
delete_avm_folder_confirm=Are you sure you want to remove \"{0}\" and its contents from the sandbox?
|
||||
error_delete_folder=Unable to delete Folder due to system error:
|
||||
error_delete_folder=Unable to delete Folder due to system error:
|
||||
create_web_content=Create Web Content
|
||||
create_web_content_title=Create Web Content Wizard
|
||||
create_web_content_desc=This wizard helps you to create a new content item for a website.
|
||||
@@ -1462,16 +1506,16 @@ error_homespace=The Home Space node referenced by Id: {0} cannot be found. It ma
|
||||
error_search=Search failed due to system error: {0}
|
||||
error_exists=A Space or File with that name already exists: {0}
|
||||
error_delete_space=Unable to delete Space due to system error:
|
||||
error_delete_file=Unable to delete File due to system error:
|
||||
error_delete_sandbox=Unable to delete Sandbox due to system error:
|
||||
error_delete_file=Unable to delete File due to system error:
|
||||
error_delete_sandbox=Unable to delete Sandbox due to system error:
|
||||
error_checkout=Unable to check out Content Node due to system error:
|
||||
error_update=Unable to update Content Node due to system error:
|
||||
error_update=Unable to update Content Node due to system error:
|
||||
error_cancel_checkout=Unable to cancel check out of Content Node due to system error:
|
||||
error_checkin=Unable to check in Content Node due to system error:
|
||||
error_paste=Unable to paste item due to system error:
|
||||
error_paste=Unable to paste item due to system error:
|
||||
error_login_user=Unable to login - unknown username/password.
|
||||
error_login_missing=Must specify username and password.
|
||||
error_delete_rule=Unable to delete Rule due to system error:
|
||||
error_delete_rule=Unable to delete Rule due to system error:
|
||||
error_actions=Failed to run Actions due to error: {0}
|
||||
error_rule=Failed to create Rule due to error: {0}
|
||||
error_space=Failed to create new space due to error: {0}
|
||||
@@ -1527,7 +1571,7 @@ delete_file_confirm=Are you sure you want to delete \"{0}\" and all previous ver
|
||||
delete_rule_info=To remove this rule from the space, click Yes.
|
||||
delete_user_info=To delete this user from the system, click Yes.
|
||||
delete_rule_confirm=Are you sure you want to delete \"{0}\"?
|
||||
delete_user_confirm=The User will no longer be able to access the system. Are you sure you want to delete user \"{0}\"?
|
||||
delete_user_confirm=The User will no longer be able to access the system. Are you sure you want to delete user \"{0}\"?
|
||||
remove_invited_user_confirm=The User will no longer be able to access the documents and folders in this space. Are you sure you want to remove user \"{0}\"?
|
||||
remove_content_user_confirm=The User will no longer be able to access this content. Are you sure you want to remove user \"{0}\"?
|
||||
delete_companyroot_confirm=WARNING: This folder is a special folder accessed by all Users! Please be sure that you wish to delete this folder. It may cause System Errors if you remove it.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<actions>
|
||||
<!-- each action is defined individually and then referenced in an 'action-group' block
|
||||
via an 'idref' attribute specifing the action definition to use -->
|
||||
|
||||
|
||||
<!-- full example -->
|
||||
<action id="example1_edit_doc_http">
|
||||
<!-- a list of permissions to evaluate action against before checking other preconditions -->
|
||||
@@ -41,7 +41,68 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Make a document multilingual -->
|
||||
<action id="make_doc_multilingual">
|
||||
<permissions>
|
||||
<permission allow="true">Write</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.MakeMultilingualEvaluator</evaluator>
|
||||
<label-id>make_multilingual</label-id>
|
||||
<tooltip-id>make_multilingual_tooltip</tooltip-id>
|
||||
<image>/images/icons/make_ml.gif</image>
|
||||
<action>dialog:makeMultilingual</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
<!-- Add a translation -->
|
||||
<action id="add_translation">
|
||||
<permissions>
|
||||
<permission allow="true">Write</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.AddTranslationEvaluator</evaluator>
|
||||
<label-id>add_translation</label-id>
|
||||
<tooltip-id>add_translation_tooltip</tooltip-id>
|
||||
<image>/images/icons/add_tranlsation.gif</image>
|
||||
<action-listener>#{AddTranslationDialog.start}</action-listener>
|
||||
<action>addTranslation</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
<!-- Add a translation whithout content -->
|
||||
<action id="add_translation_wc">
|
||||
<permissions>
|
||||
<permission allow="true">Write</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.AddTranslationEvaluator</evaluator>
|
||||
<label-id>add_translation_wc</label-id>
|
||||
<tooltip-id>add_translation_wc_tooltip</tooltip-id>
|
||||
<image>/images/icons/add_tranlsation_wc.gif</image>
|
||||
<action>dialog:addTranslationWithoutContent</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
<!-- Manage ml container details -->
|
||||
<action id="ml_details">
|
||||
<permissions>
|
||||
<permission allow="true">Read</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.MultilingualDetailsEvaluator</evaluator>
|
||||
<label-id>manage_multilingual_details</label-id>
|
||||
<tooltip-id>manage_multilingual_details_tooltip</tooltip-id>
|
||||
<image>/images/icons/multilingual_details.gif</image>
|
||||
<action-listener>#{BrowseBean.setupContentAction}</action-listener>
|
||||
<action>dialog:showMLContainerDetails</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
<!-- Edit document action to open using normal HTTP access or inline Edit if set -->
|
||||
<action id="edit_doc_http">
|
||||
<permissions>
|
||||
@@ -56,7 +117,7 @@
|
||||
</params>
|
||||
<!-- can also specify style, class etc. but this is better done in 'actions' element -->
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Edit document using WebDav access -->
|
||||
<action id="edit_doc_webdav">
|
||||
<permissions>
|
||||
@@ -68,7 +129,7 @@
|
||||
<!-- NOTE: uses the special 'actionContext' object supplied by the parent actions component -->
|
||||
<onclick>javascript:openDoc('#{actionContext.webdavUrl}');</onclick>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Edit document using CIFS access -->
|
||||
<action id="edit_doc_cifs">
|
||||
<permissions>
|
||||
@@ -81,7 +142,7 @@
|
||||
<href>#{actionContext.cifsPath}</href>
|
||||
<target>cifs</target>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Checkin document -->
|
||||
<action id="checkin_doc">
|
||||
<evaluator>org.alfresco.web.action.evaluator.CheckinDocEvaluator</evaluator>
|
||||
@@ -93,7 +154,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Checkout document -->
|
||||
<action id="checkout_doc">
|
||||
<evaluator>org.alfresco.web.action.evaluator.CheckoutDocEvaluator</evaluator>
|
||||
@@ -105,7 +166,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Cancel checkout document -->
|
||||
<action id="cancelcheckout_doc">
|
||||
<evaluator>org.alfresco.web.action.evaluator.CancelCheckoutDocEvaluator</evaluator>
|
||||
@@ -117,7 +178,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- View document details -->
|
||||
<action id="details_doc">
|
||||
<label-id>view_details</label-id>
|
||||
@@ -128,7 +189,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- View space details -->
|
||||
<action id="details_space">
|
||||
<label-id>view_details</label-id>
|
||||
@@ -139,7 +200,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Preview document in template -->
|
||||
<action id="preview_doc">
|
||||
<label-id>preview</label-id>
|
||||
@@ -150,7 +211,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Preview space in template -->
|
||||
<action id="preview_space">
|
||||
<label-id>preview</label-id>
|
||||
@@ -161,7 +222,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Delete document -->
|
||||
<action id="delete_doc">
|
||||
<permissions>
|
||||
@@ -176,7 +237,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Delete space -->
|
||||
<action id="delete_space">
|
||||
<permissions>
|
||||
@@ -190,7 +251,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Update document -->
|
||||
<action id="update_doc">
|
||||
<permissions>
|
||||
@@ -205,7 +266,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- 'Approve' workflow step for document -->
|
||||
<action id="approve_doc">
|
||||
<evaluator>org.alfresco.web.action.evaluator.ApproveDocEvaluator</evaluator>
|
||||
@@ -217,7 +278,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- 'Reject' workflow step for document -->
|
||||
<action id="reject_doc">
|
||||
<evaluator>org.alfresco.web.action.evaluator.RejectDocEvaluator</evaluator>
|
||||
@@ -229,7 +290,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- 'Approve' workflow step for document details page -->
|
||||
<action id="approve_doc_details">
|
||||
<evaluator>org.alfresco.web.action.evaluator.ApproveDocEvaluator</evaluator>
|
||||
@@ -241,7 +302,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- 'Reject' workflow step for document details page-->
|
||||
<action id="reject_doc_details">
|
||||
<evaluator>org.alfresco.web.action.evaluator.RejectDocEvaluator</evaluator>
|
||||
@@ -253,7 +314,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- 'Approve' workflow step for space -->
|
||||
<action id="approve_space">
|
||||
<evaluator>org.alfresco.web.action.evaluator.ApproveDocEvaluator</evaluator>
|
||||
@@ -265,7 +326,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- 'Reject' workflow step for space -->
|
||||
<action id="reject_space">
|
||||
<evaluator>org.alfresco.web.action.evaluator.RejectDocEvaluator</evaluator>
|
||||
@@ -277,7 +338,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- 'Approve' workflow step for space details page -->
|
||||
<action id="approve_space_details">
|
||||
<evaluator>org.alfresco.web.action.evaluator.ApproveDocEvaluator</evaluator>
|
||||
@@ -289,7 +350,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- 'Reject' workflow step for space details page-->
|
||||
<action id="reject_space_details">
|
||||
<evaluator>org.alfresco.web.action.evaluator.RejectDocEvaluator</evaluator>
|
||||
@@ -301,7 +362,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Cut a document or space to the clipboard, from browse or doc details screens -->
|
||||
<action id="cut_node">
|
||||
<permissions>
|
||||
@@ -309,6 +370,7 @@
|
||||
</permissions>
|
||||
<label-id>cut</label-id>
|
||||
<image>/images/icons/cut.gif</image>
|
||||
<evaluator>org.alfresco.web.action.evaluator.CutNodeEvaluator</evaluator>
|
||||
<action-listener>#{ClipboardBean.cutNode}</action-listener>
|
||||
<params>
|
||||
<param name="ref">#{actionContext.nodeRef}</param>
|
||||
@@ -316,7 +378,7 @@
|
||||
<!--<param name="parent">#{NavigationBean.currentNodeId}</param>-->
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Copy a document or space to the clipboard, from browse or doc details screens -->
|
||||
<action id="copy_node">
|
||||
<label-id>copy</label-id>
|
||||
@@ -327,7 +389,7 @@
|
||||
<!--<param name="parent">#{NavigationBean.currentNodeId}</param>-->
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Paste All clipboard items into a space -->
|
||||
<action id="paste_all">
|
||||
<permissions>
|
||||
@@ -347,7 +409,7 @@
|
||||
<image>/images/icons/new_content.gif</image>
|
||||
<action>wizard:createContent</action>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Create XML content type -->
|
||||
<action id="create_form">
|
||||
<evaluator>org.alfresco.web.action.evaluator.CreateFormEvaluator</evaluator>
|
||||
@@ -370,7 +432,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Create space -->
|
||||
<action id="create_space">
|
||||
<permissions>
|
||||
@@ -380,7 +442,18 @@
|
||||
<image>/images/icons/create_space.gif</image>
|
||||
<action>dialog:createSpace</action>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Create multilingual space -->
|
||||
<action id="create_multilingual_space">
|
||||
<permissions>
|
||||
<permission allow="true">CreateChildren</permission>
|
||||
</permissions>
|
||||
<label-id>create_multilingual_space</label-id>
|
||||
<image>/images/icons/create_space.gif</image>
|
||||
<action>dialog:createMultilingualSpace</action>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Create Advanced Space Wizard -->
|
||||
<action id="create_space_wizard">
|
||||
<permissions>
|
||||
@@ -390,7 +463,7 @@
|
||||
<image>/images/icons/create_space.gif</image>
|
||||
<action>wizard:createSpace</action>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Create Website Wizard -->
|
||||
<action id="create_website_wizard">
|
||||
<evaluator>org.alfresco.web.action.evaluator.CreateWebProjectEvaluator</evaluator>
|
||||
@@ -398,7 +471,7 @@
|
||||
<image>/images/icons/create_website.gif</image>
|
||||
<action>wizard:createWebsite</action>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Manage Space Users -->
|
||||
<action id="manage_space_users">
|
||||
<permissions>
|
||||
@@ -412,7 +485,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Manage Space Rules -->
|
||||
<action id="manage_space_rules">
|
||||
<permissions>
|
||||
@@ -426,7 +499,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Email Space Users -->
|
||||
<action id="email_space_users">
|
||||
<label-id>email_space_users</label-id>
|
||||
@@ -437,7 +510,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Manage Deleted Items -->
|
||||
<action id="manage_deleted_items">
|
||||
<evaluator>org.alfresco.web.action.evaluator.ShortcutNodeEvaluator</evaluator>
|
||||
@@ -445,7 +518,7 @@
|
||||
<image>/images/icons/trashcan.gif</image>
|
||||
<action>dialog:manageDeletedItems</action>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Take Ownership of document -->
|
||||
<action id="take_ownership_doc">
|
||||
<permissions>
|
||||
@@ -456,7 +529,7 @@
|
||||
<image>/images/icons/take_ownership.gif</image>
|
||||
<action-listener>#{DocumentDetailsBean.takeOwnership}</action-listener>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Take Ownership of space -->
|
||||
<action id="take_ownership_space">
|
||||
<permissions>
|
||||
@@ -466,7 +539,7 @@
|
||||
<image>/images/icons/take_ownership.gif</image>
|
||||
<action-listener>#{SpaceDetailsBean.takeOwnership}</action-listener>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Unlock document -->
|
||||
<action id="unlock_doc">
|
||||
<permissions>
|
||||
@@ -477,7 +550,7 @@
|
||||
<image>/images/icons/unlock.gif</image>
|
||||
<action-listener>#{DocumentDetailsBean.unlock}</action-listener>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Manage Content Users -->
|
||||
<action id="manage_content_users">
|
||||
<permissions>
|
||||
@@ -491,7 +564,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Create Shortcut -->
|
||||
<action id="create_shortcut">
|
||||
<evaluator>org.alfresco.web.action.evaluator.ShortcutNodeEvaluator</evaluator>
|
||||
@@ -502,18 +575,18 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Run Other Action (e.g. repo action) -->
|
||||
<action id="run_action">
|
||||
<label-id>other_action</label-id>
|
||||
<image>/images/icons/action.gif</image>
|
||||
<action>wizard:runAction</action>
|
||||
<action>wizard:runAction</action>
|
||||
<action-listener>#{WizardManager.setupParameters}</action-listener>
|
||||
<params>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Import into Space -->
|
||||
<action id="import_space">
|
||||
<permissions>
|
||||
@@ -527,7 +600,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Export from Space -->
|
||||
<action id="export_space">
|
||||
<label-id>export</label-id>
|
||||
@@ -538,38 +611,38 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- ReApply Rules -->
|
||||
<action id="reapply-rules">
|
||||
<label-id>reapply_rules</label-id>
|
||||
<label-id>reapply_rules</label-id>
|
||||
<image>/images/icons/reapply_rules.gif</image>
|
||||
<action-listener>#{RulesBean.reapplyRules}</action-listener>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- Ignore Inherited Rules -->
|
||||
<action id="ignore-inherited-rules">
|
||||
<label>#{RulesBean.ignoreInheritedRulesLabelId}</label>
|
||||
<label>#{RulesBean.ignoreInheritedRulesLabelId}</label>
|
||||
<image>/images/icons/reapply_rules.gif</image>
|
||||
<action-listener>#{RulesBean.ignoreInheritedRules}</action-listener>
|
||||
</action>
|
||||
|
||||
</action>
|
||||
|
||||
<!-- Reset Tree -->
|
||||
<action id="reset_navigator">
|
||||
<label-id>reset_navigator</label-id>
|
||||
<image>/images/icons/reset.gif</image>
|
||||
<action>#{NavigatorPluginBean.reset}</action>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- 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 -->
|
||||
<!-- the component is responsible for making the context Node object available with name
|
||||
of 'actionContext' so the actions can access it directly to get properties -->
|
||||
|
||||
|
||||
<!-- Actions for a document in the Browse screen -->
|
||||
<action-group id="document_browse">
|
||||
<show-link>false</show-link>
|
||||
<style-class>inlineAction</style-class>
|
||||
|
||||
|
||||
<action idref="edit_doc_http" />
|
||||
<action idref="edit_doc_webdav" />
|
||||
<action idref="edit_doc_cifs" />
|
||||
@@ -577,7 +650,7 @@
|
||||
<action idref="checkin_doc" />
|
||||
<action idref="details_doc" />
|
||||
<action idref="delete_doc" />
|
||||
|
||||
|
||||
<!-- Example action defined in-line rather than by reference
|
||||
<action id="example2_checkout_doc">
|
||||
<permissions>
|
||||
@@ -589,9 +662,9 @@
|
||||
<action-listener>#{CheckinCheckoutBean.setupContentAction}</action-listener>
|
||||
<action>checkoutFile</action>
|
||||
</action>-->
|
||||
|
||||
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions Menu for a document in the Browse screen -->
|
||||
<action-group id="document_browse_menu">
|
||||
<action idref="preview_doc" />
|
||||
@@ -602,7 +675,7 @@
|
||||
<action idref="cut_node" />
|
||||
<action idref="copy_node" />
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions for a space in the Browse screen -->
|
||||
<action-group id="space_browse">
|
||||
<show-link>false</show-link>
|
||||
@@ -612,23 +685,24 @@
|
||||
<action idref="details_space" />
|
||||
<action idref="delete_space" />
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions Menu for a space in the Browse screen -->
|
||||
<action-group id="space_browse_menu">
|
||||
<action idref="preview_space" />
|
||||
<action idref="approve_space" />
|
||||
<action idref="reject_space" />
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions Menu for Create in Browse screen -->
|
||||
<action-group id="browse_create_menu">
|
||||
<action idref="create_content" />
|
||||
<action idref="create_form" />
|
||||
<action idref="create_website_wizard" />
|
||||
<action idref="create_space" />
|
||||
<action idref= "create_multilingual_space" />
|
||||
<action idref="create_space_wizard" />
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions Menu for More Actions in Browse screen -->
|
||||
<action-group id="browse_actions_menu">
|
||||
<action idref="details_space" />
|
||||
@@ -641,7 +715,7 @@
|
||||
<!-- NOTE: now found on the User Console
|
||||
<action idref="manage_deleted_items" />-->
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions Menu for Document Details screen -->
|
||||
<action-group id="doc_details_actions">
|
||||
<action idref="checkout_doc" />
|
||||
@@ -665,8 +739,25 @@
|
||||
<action idref="create_shortcut" />
|
||||
<action idref="preview_doc" />
|
||||
<action idref="run_action" />
|
||||
<action idref="make_doc_multilingual" />
|
||||
<action idref="add_translation" />
|
||||
<action idref="add_translation_wc" />
|
||||
<action idref="ml_details" />
|
||||
</action-group>
|
||||
|
||||
|
||||
|
||||
<action-group id="Multilingual_details_actions">
|
||||
<action idref="add_translation" />
|
||||
<action idref="add_translation_wc" />
|
||||
<!--action idref="cut_container" /-->
|
||||
<!--action idref="copy_container" /-->
|
||||
<!--action idref="delete_container" /-->
|
||||
<!--action idref="take_ownership_container" /-->
|
||||
<!--action idref="start_discussion_container" /-->
|
||||
<!--action idref="new_edition_container" /-->
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions Menu for Space Details screen -->
|
||||
<action-group id="space_details_actions">
|
||||
<action idref="approve_space_details" />
|
||||
@@ -684,7 +775,7 @@
|
||||
<action idref="preview_space" />
|
||||
<action idref="run_action" />
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions Menu for File Link Details screen -->
|
||||
<action-group id="filelink_details_actions">
|
||||
<action idref="cut_node" />
|
||||
@@ -694,7 +785,7 @@
|
||||
<action idref="manage_content_users" />
|
||||
<action idref="run_action" />
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions Menu for Folder Link Details screen -->
|
||||
<action-group id="spacelink_details_actions">
|
||||
<action idref="cut_node" />
|
||||
@@ -704,18 +795,18 @@
|
||||
<action idref="manage_content_users" />
|
||||
<action idref="run_action" />
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions Menu for Manage Rules screen -->
|
||||
<action-group id="rules_actions_menu">
|
||||
<action idref="reapply-rules" />
|
||||
<action idref="ignore-inherited-rules" />
|
||||
<action idref="reapply-rules" />
|
||||
<action idref="ignore-inherited-rules" />
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions for the navigator plugin -->
|
||||
<action-group id="navigator_actions">
|
||||
<action idref="reset_navigator" />
|
||||
</action-group>
|
||||
|
||||
|
||||
</actions>
|
||||
</config>
|
||||
|
||||
|
@@ -1,19 +1,48 @@
|
||||
<alfresco-config>
|
||||
|
||||
<config>
|
||||
<config>
|
||||
<dialog-container>/jsp/dialog/container.jsp</dialog-container>
|
||||
<plain-dialog-container>/jsp/dialog/plain-container.jsp</plain-dialog-container>
|
||||
|
||||
<dialogs>
|
||||
|
||||
<!-- -->
|
||||
<!-- Multilingual Dialogs -->
|
||||
|
||||
<!-- Definition of the make multilingual dialog -->
|
||||
<dialog name="makeMultilingual" page="/jsp/ml/make-multilingual-dialog.jsp" managed-bean="MakeMultilingualDialog"
|
||||
icon="/images/icons/make_ml_large.gif" title-id="make_multilingual"
|
||||
description-id="make_multilingual_description" error-message-id="error_make_multilingual_dialog" />
|
||||
|
||||
<!-- Definition of the add translation dialog dialog -->
|
||||
<dialog name="addTranslationWithoutContent" page="/jsp/ml/add-translation-without-content.jsp" managed-bean="AddTranslationWithoutContentDialog"
|
||||
icon="/images/icons/add_tranlsation_wc_large.gif" title-id="add_translation_wc"
|
||||
description-id="add_translation_wc_description" error-message-id="error_add_translation_wc_dialog" />
|
||||
|
||||
<!-- Definition of the edit ml container dialog -->
|
||||
<dialog name="editMlContainer" page="/jsp/ml/edit-ml-container-dialog.jsp" managed-bean="EditMLContainerDialog"
|
||||
icon="/images/icons/details_large.gif" title-id="edit_ml_container_properties"
|
||||
description-id="edit_ml_container_description" />
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- Content and Space Dialogs -->
|
||||
|
||||
<!-- Definition of the create space dialog -->
|
||||
<dialog name="createSpace" page="/jsp/spaces/create-space-dialog.jsp" managed-bean="CreateSpaceDialog"
|
||||
<dialog name="createSpace" page="/jsp/spaces/create-space-dialog.jsp" managed-bean="CreateMultilingualSpaceDialog"
|
||||
icon="/images/icons/create_space_large.gif" title-id="create_space"
|
||||
description-id="create_space_description" error-message-id="error_create_space_dialog" />
|
||||
|
||||
<!-- Definition of the create multilingual space dialog -->
|
||||
<dialog name="createMultilingualSpace" page="/jsp/spaces/ml/create-multilingual-space-dialog.jsp" managed-bean="CreateMultilingualSpaceDialog"
|
||||
icon="/images/icons/create_space_large.gif" title-id="create_multilingual_space"
|
||||
description-id="create_multilingual_space_description" error-message-id="error_create_space_dialog" />
|
||||
|
||||
<!-- Definition of the create multilingual properties dialog -->
|
||||
<dialog name="createMultilingualProperties" page="/jsp/spaces/ml/create-multilingual-properties-dialog.jsp" managed-bean="CreateMultilingualPropertiesDialog"
|
||||
icon="/images/icons/create_space_large.gif" title-id="create_multilingual_space"
|
||||
description-id="create_multilingual_space_description" error-message-id="error_create_multilingual_space_dialog" />
|
||||
|
||||
<!-- Definition of the edit space dialog -->
|
||||
<dialog name="editSpace" page="/jsp/spaces/edit-space-dialog.jsp" managed-bean="EditSpaceDialog"
|
||||
icon="/images/icons/details_large.gif" title-id="modify_space_properties"
|
||||
|
@@ -20,7 +20,7 @@
|
||||
<!-- Override the cut action to check for discussions, don't allow them to be cut -->
|
||||
<!-- Cut a document or space to the clipboard, from browse or doc details screens -->
|
||||
<action id="cut_node">
|
||||
<evaluator>org.alfresco.web.action.evaluator.DiscussionCutCopyEvaluator</evaluator>
|
||||
<evaluator>org.alfresco.web.action.evaluator.CutNodeEvaluator</evaluator>
|
||||
<permissions>
|
||||
<permission allow="true">Delete</permission>
|
||||
</permissions>
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<alfresco-config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="content">
|
||||
<property-sheet>
|
||||
<show-property name="name" />
|
||||
<show-property name="mimetype" display-label-id="content_type"
|
||||
<show-property name="mimetype" display-label-id="content_type"
|
||||
component-generator="MimeTypeSelectorGenerator" />
|
||||
<!-- NOTE: The following 3 properties are defined here to cover -->
|
||||
<!-- the scenario where content is added via CIFS or FTP -->
|
||||
@@ -14,12 +14,12 @@
|
||||
ignore-if-missing="false" component-generator="TextAreaGenerator" />
|
||||
<show-property name="author" display-label-id="author"
|
||||
ignore-if-missing="false" />
|
||||
<show-property name="size" display-label-id="size"
|
||||
converter="org.alfresco.faces.ByteSizeConverter"
|
||||
<show-property name="size" display-label-id="size"
|
||||
converter="org.alfresco.faces.ByteSizeConverter"
|
||||
show-in-edit-mode="false" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="folder">
|
||||
<property-sheet>
|
||||
<show-property name="name"/>
|
||||
@@ -31,25 +31,25 @@
|
||||
<show-property name="description" display-label-id="description"
|
||||
ignore-if-missing="false" component-generator="TextAreaGenerator" />
|
||||
<show-property name="app:icon" show-in-view-mode="false" display-label-id="icon"
|
||||
component-generator="SpaceIconPickerGenerator"
|
||||
component-generator="SpaceIconPickerGenerator"
|
||||
ignore-if-missing="false" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
<config evaluator="node-type" condition="dictionaryModel">
|
||||
<property-sheet>
|
||||
<property-sheet>
|
||||
<show-property name="name" />
|
||||
<show-property name="mimetype" display-label-id="content_type"
|
||||
<show-property name="mimetype" display-label-id="content_type"
|
||||
component-generator="MimeTypeSelectorGenerator" />
|
||||
<show-property name="title" />
|
||||
<show-property name="description" />
|
||||
<show-property name="size" display-label-id="size"
|
||||
converter="org.alfresco.faces.ByteSizeConverter"
|
||||
show-in-edit-mode="false" />
|
||||
<show-property name="modelActive"/>
|
||||
<show-property name="size" display-label-id="size"
|
||||
converter="org.alfresco.faces.ByteSizeConverter"
|
||||
show-in-edit-mode="false" />
|
||||
<show-property name="modelActive"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="app:filelink">
|
||||
<property-sheet>
|
||||
<show-property name="name" />
|
||||
@@ -58,7 +58,7 @@
|
||||
<show-property name="destination" converter="org.alfresco.faces.DisplayPathConverter"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="app:folderlink">
|
||||
<property-sheet>
|
||||
<show-property name="name" />
|
||||
@@ -66,7 +66,7 @@
|
||||
<show-property name="destination" converter="org.alfresco.faces.DisplayPathConverter"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="titled">
|
||||
<property-sheet>
|
||||
<!-- The 'name' property isn't part of the titled aspect -->
|
||||
@@ -78,7 +78,7 @@
|
||||
<show-property name="description" component-generator="TextAreaGenerator" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="app:uifacets">
|
||||
<property-sheet>
|
||||
<!-- The 'name' property isn't part of the uifacets aspect -->
|
||||
@@ -92,13 +92,13 @@
|
||||
component-generator="SpaceIconPickerGenerator" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="author">
|
||||
<property-sheet>
|
||||
<show-property name="author" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="complianceable">
|
||||
<property-sheet>
|
||||
<show-property name="removeAfter"/>
|
||||
@@ -117,27 +117,27 @@
|
||||
<show-property name="subject"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="effectivity">
|
||||
<property-sheet>
|
||||
<show-property name="from"/>
|
||||
<show-property name="to"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="summarizable">
|
||||
<property-sheet>
|
||||
<show-property name="summary"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="versionable">
|
||||
<property-sheet>
|
||||
<show-property name="versionLabel" show-in-edit-mode="false" />
|
||||
<show-property name="autoVersion" converter="org.alfresco.faces.BooleanLabelConverter"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="translatable">
|
||||
<property-sheet>
|
||||
<show-association name="translations"/>
|
||||
@@ -149,7 +149,7 @@
|
||||
<show-property name="locale"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="auditable">
|
||||
<property-sheet>
|
||||
<show-property name="creator" read-only="true" show-in-edit-mode="false" />
|
||||
@@ -158,19 +158,19 @@
|
||||
<show-property name="modified" read-only="true" show-in-edit-mode="false" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="cm:ownable">
|
||||
<property-sheet>
|
||||
<show-property name="cm:owner" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="app:inlineeditable">
|
||||
<property-sheet>
|
||||
<show-property name="app:editInline" converter="org.alfresco.faces.BooleanLabelConverter" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="sys:archived">
|
||||
<property-sheet>
|
||||
<show-property name="sys:archivedBy" />
|
||||
@@ -188,11 +188,41 @@
|
||||
<show-property name="subjectline" read-only="true"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="cm:mlDocument">
|
||||
<property-sheet>
|
||||
<show-property name="author" display-label-id="translator"/>
|
||||
<show-property name="sys:locale"
|
||||
component-generator="LanguageSelectorGenerator" display-label-id="language"/>
|
||||
<show-property name="description" component-generator="TextAreaGenerator" />
|
||||
<!-- Bug issue, icon displays with other properties if visible -->
|
||||
<show-property name="app:icon" show-in-view-mode="false" show-in-edit-mode="false" />
|
||||
<!-- Don't allow mofification of the Auto Version property -->
|
||||
<show-property name="autoVersion" show-in-view-mode="true" show-in-edit-mode="false" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
<config evaluator="aspect-name" condition="cm:mlEmptyTranslation">
|
||||
<property-sheet>
|
||||
<show-property name="mimetype" show-in-edit-mode="false" show-in-view-mode="false" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
<config evaluator="node-type" condition="cm:mlContainer">
|
||||
<property-sheet>
|
||||
<show-property name="author"/>
|
||||
<show-property name="sys:locale"
|
||||
display-label-id="pivot_translation"
|
||||
component-generator="MlContainerLanguageSelectorGenerator" />
|
||||
<!-- Don't allow mofification of the Auto Version property -->
|
||||
<show-property name="autoVersion" show-in-view-mode="true" show-in-edit-mode="false" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
<!-- ********************************** -->
|
||||
<!-- Configuration for discussion types -->
|
||||
<!-- ********************************** -->
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="fm:forums">
|
||||
<property-sheet>
|
||||
<show-property name="name"/>
|
||||
@@ -203,7 +233,7 @@
|
||||
<show-property name="title" show-in-view-mode="false" show-in-edit-mode="false" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="fm:forum">
|
||||
<property-sheet>
|
||||
<show-property name="name"/>
|
||||
@@ -214,7 +244,7 @@
|
||||
<show-property name="title" show-in-view-mode="false" show-in-edit-mode="false" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="fm:topic">
|
||||
<property-sheet>
|
||||
<show-property name="name" display-label-id="subject" />
|
||||
@@ -225,13 +255,13 @@
|
||||
<show-property name="title" show-in-view-mode="false" show-in-edit-mode="false" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<!-- ******************************** -->
|
||||
<!-- Configuration for workflow types -->
|
||||
<!-- ******************************** -->
|
||||
|
||||
|
||||
<!-- Generic workflow task -->
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="bpm:workflowTask" replace="true">
|
||||
<property-sheet>
|
||||
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
|
||||
@@ -242,7 +272,7 @@
|
||||
<show-property name="bpm:status" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="bpm:startTask" replace="true">
|
||||
<property-sheet>
|
||||
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
|
||||
@@ -253,9 +283,9 @@
|
||||
<show-association name="bpm:assignee" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<!-- Review and Approve workflow tasks -->
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="wf:submitReviewTask" replace="true">
|
||||
<property-sheet>
|
||||
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
|
||||
@@ -277,7 +307,7 @@
|
||||
<show-association name="bpm:groupAssignee" display-label-id="wf_reviewers" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="wf:reviewTask" replace="true">
|
||||
<property-sheet>
|
||||
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
|
||||
@@ -359,7 +389,7 @@
|
||||
<show-property name="wf:actualPercent" read-only="true"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<!-- Ad hoc workflow tasks -->
|
||||
|
||||
<config evaluator="node-type" condition="wf:submitAdhocTask" replace="true">
|
||||
@@ -373,7 +403,7 @@
|
||||
<show-association name="bpm:assignee" display-label-id="wf_adhoc_assign_to" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="wf:adhocTask" replace="true">
|
||||
<property-sheet>
|
||||
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
|
||||
@@ -384,7 +414,7 @@
|
||||
<show-property name="bpm:status" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="wf:completedAdhocTask" replace="true">
|
||||
<property-sheet>
|
||||
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
|
||||
@@ -396,9 +426,9 @@
|
||||
<show-association name="bpm:assignee" display-label-id="wf_adhoc_assignee" read-only="true" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<!-- WCM workflow tasks -->
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="wcmwf:submitReviewTask" replace="true">
|
||||
<property-sheet>
|
||||
<separator name="sep1" display-label-id="wf_review_options" component-generator="HeaderSeparatorGenerator" />
|
||||
@@ -407,7 +437,7 @@
|
||||
<show-association name="bpm:assignees" display-label-id="wf_reviewers" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="wcmwf:reviewTask" replace="true">
|
||||
<property-sheet>
|
||||
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
|
||||
@@ -421,7 +451,7 @@
|
||||
<show-association name="bpm:assignees" display-label-id="wf_reviewers" read-only="true"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="wcmwf:rejectedTask" replace="true">
|
||||
<property-sheet>
|
||||
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
|
||||
@@ -433,7 +463,7 @@
|
||||
<show-property name="wcmwf:approveCnt" read-only="true"/>
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="node-type" condition="wcmwf:submitpendingTask" replace="true">
|
||||
<property-sheet>
|
||||
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
|
||||
@@ -507,7 +537,7 @@
|
||||
<show-property name="app:icon" show-in-view-mode="false" show-in-edit-mode="false" />
|
||||
</property-sheet>
|
||||
</config>
|
||||
|
||||
|
||||
<config evaluator="aspect-name" condition="wca:expires">
|
||||
<property-sheet>
|
||||
<show-property name="wca:expirationDate" read-only="true" />
|
||||
|
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.ml.MultilingualContentService;
|
||||
import org.alfresco.web.action.ActionEvaluator;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.UserPreferencesBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* Evaluates whether the Add Translation (with or without content) action should be visible.
|
||||
*
|
||||
* If the node is not already Multilingual, locked, or if a translation exists for each available
|
||||
* filter language, don't allow the action.
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class AddTranslationEvaluator implements ActionEvaluator
|
||||
{
|
||||
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
MultilingualContentService mlservice =
|
||||
(MultilingualContentService) FacesHelper.getManagedBean(fc, "MultilingualContentService");
|
||||
|
||||
UserPreferencesBean userprefs =
|
||||
(UserPreferencesBean) FacesHelper.getManagedBean(fc, "UserPreferencesBean");
|
||||
|
||||
// the number of translation of this document
|
||||
int availableTranslationCount = mlservice.getTranslations(node.getNodeRef()).size();
|
||||
// the total number of available languages for the translation
|
||||
int contentFilterLanguagesCount = userprefs.getContentFilterLanguages(false).length;
|
||||
|
||||
return (
|
||||
node.isLocked() == false &&
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false &&
|
||||
node.hasAspect(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT) == true &&
|
||||
availableTranslationCount < contentFilterLanguagesCount
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@@ -51,6 +51,7 @@ public class CheckoutDocEvaluator implements ActionEvaluator
|
||||
return dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT) &&
|
||||
((node.hasPermission(PermissionService.CHECK_OUT) && node.hasPermission(PermissionService.CREATE_CHILDREN) &&
|
||||
(node.isLocked() == false &&
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false)));
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false) &&
|
||||
node.hasAspect(ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION) == false));
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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.action.evaluator;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.web.action.ActionEvaluator;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* Evaluates whether the Cut Node action should be visible.
|
||||
*
|
||||
* Among all available operations over non-multilingual documents (i.e. copy,
|
||||
* delete, start discussion, etc), there is a missing one: <b>Move</b>.
|
||||
* Translations cannot be moved due to the exiting link it has with the logical
|
||||
* document. Despite it is technically achievable, it could be functionally
|
||||
* troublesome. Spreading translations of the same semantic message among several
|
||||
* spaces could lead to confusion and problems.
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class CutNodeEvaluator extends DiscussionCutCopyEvaluator
|
||||
{
|
||||
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
boolean eval = super.evaluate(node);
|
||||
|
||||
if(eval == true)
|
||||
{
|
||||
eval = !node.getAspects().contains(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT);
|
||||
}
|
||||
|
||||
return eval;
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -24,8 +24,12 @@
|
||||
*/
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.ml.MultilingualContentService;
|
||||
import org.alfresco.web.action.ActionEvaluator;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
@@ -40,7 +44,33 @@ public class DeleteDocEvaluator implements ActionEvaluator
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
return (node.isLocked() == false &&
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false);
|
||||
boolean isPivot = false;
|
||||
|
||||
// special case for multilingual documents
|
||||
if(node.getAspects().contains(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT))
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
MultilingualContentService mlservice =
|
||||
(MultilingualContentService) FacesHelper.getManagedBean(fc, "MultilingualContentService");
|
||||
|
||||
// if the translation is the last translation, user can delete it
|
||||
if(mlservice.getTranslations(node.getNodeRef()).size() == 1)
|
||||
{
|
||||
isPivot = false;
|
||||
}
|
||||
// Else if the node is the pivot language, user can't delete it
|
||||
else if( mlservice.getPivotTranslation(node.getNodeRef()).getId()
|
||||
.equalsIgnoreCase(node.getNodeRef().getId()))
|
||||
{
|
||||
isPivot = true;
|
||||
}
|
||||
// finally, the node is not the pivot translation, user can delete it
|
||||
}
|
||||
|
||||
return (node.isLocked() == false &&
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false &&
|
||||
isPivot == false
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
@@ -26,6 +26,7 @@ package org.alfresco.web.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.model.ForumModel;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
@@ -64,6 +65,12 @@ public class DiscussionCutCopyEvaluator implements ActionEvaluator
|
||||
result = (assocType.equals(ForumModel.ASSOC_DISCUSSION) == false);
|
||||
}
|
||||
|
||||
// impossible to copy a translation without content.
|
||||
if(result && node.getAspects().contains(ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION))
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@@ -52,9 +52,15 @@ public class EditDocHttpEvaluator implements ActionEvaluator
|
||||
|
||||
boolean result = false;
|
||||
|
||||
// Since the reader returned of an empty translation is the reader of it's pivot translation, it makes
|
||||
// no sens to edit it on-line.
|
||||
if(node.getAspects().contains(ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION))
|
||||
{
|
||||
//result = false
|
||||
}
|
||||
// if the node is inline editable, the default http behaviour should
|
||||
// always be used otherwise the configured approach is used
|
||||
if (dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT))
|
||||
else if (dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT))
|
||||
{
|
||||
if (node.hasAspect(ApplicationModel.ASPECT_INLINEEDITABLE) == true ||
|
||||
"http".equals(Application.getClientConfig(fc).getEditLinkType()))
|
||||
|
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.web.action.ActionEvaluator;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.UserPreferencesBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* Evaluates whether the Make Multilingual action should be visible.
|
||||
*
|
||||
* If the node is already Multilingual don't allow the action.
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class MakeMultilingualEvaluator implements ActionEvaluator
|
||||
{
|
||||
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
UserPreferencesBean userprefs =
|
||||
(UserPreferencesBean) FacesHelper.getManagedBean(fc, "UserPreferencesBean");
|
||||
|
||||
// the total number of available languages for the translation have to be greather that 0
|
||||
int contentFilterLanguagesCount = userprefs.getContentFilterLanguages(false).length;
|
||||
|
||||
return (node.isLocked() == false &&
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false &&
|
||||
node.hasAspect(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT) == false &&
|
||||
contentFilterLanguagesCount > 0
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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.action.evaluator;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.web.action.ActionEvaluator;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* Evaluates whether the Manage Multinlingual Details action should be visible.
|
||||
*
|
||||
* The action is available only if the node is a translation.
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class MultilingualDetailsEvaluator implements ActionEvaluator
|
||||
{
|
||||
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
return (
|
||||
node.hasAspect(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT) == true
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@@ -26,6 +26,7 @@ package org.alfresco.web.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.web.action.ActionEvaluator;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.NavigationBean;
|
||||
@@ -45,6 +46,10 @@ public class StartWorkflowEvaluator implements ActionEvaluator
|
||||
{
|
||||
NavigationBean nav =
|
||||
(NavigationBean)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), NavigationBean.BEAN_NAME);
|
||||
return (nav.getIsGuest() == false);
|
||||
|
||||
return (
|
||||
nav.getIsGuest() == false
|
||||
&& node.hasAspect(ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION) == false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -132,6 +133,15 @@ public class BrowseBean implements IContextListener
|
||||
this.searchService = searchService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param userPreferencesBean The UserPreferencesBean to set.
|
||||
*/
|
||||
public void setUserPreferencesBean(UserPreferencesBean userPreferencesBean)
|
||||
{
|
||||
this.userPreferencesBean = userPreferencesBean;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param lockService The Lock Service to set.
|
||||
*/
|
||||
@@ -481,6 +491,7 @@ public class BrowseBean implements IContextListener
|
||||
node.addPropertyResolver("fileType16", this.resolverFileType16);
|
||||
node.addPropertyResolver("fileType32", this.resolverFileType32);
|
||||
node.addPropertyResolver("size", this.resolverSize);
|
||||
node.addPropertyResolver("lang", this.resolverLang);
|
||||
}
|
||||
|
||||
|
||||
@@ -630,7 +641,7 @@ public class BrowseBean implements IContextListener
|
||||
|
||||
// look for Space folder node
|
||||
if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_FOLDER) == true &&
|
||||
this.dictionaryService.isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER) == false)
|
||||
this.dictionaryService.isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER) == false)
|
||||
{
|
||||
// create our Node representation
|
||||
node = new MapNode(nodeRef, this.nodeService, true);
|
||||
@@ -659,6 +670,7 @@ public class BrowseBean implements IContextListener
|
||||
node.addPropertyResolver("fileType16", this.resolverFileType16);
|
||||
node.addPropertyResolver("fileType32", this.resolverFileType32);
|
||||
node.addPropertyResolver("size", this.resolverSize);
|
||||
node.addPropertyResolver("lang", this.resolverLang);
|
||||
|
||||
this.contentNodes.add(node);
|
||||
}
|
||||
@@ -823,6 +835,7 @@ public class BrowseBean implements IContextListener
|
||||
node.addPropertyResolver("fileType16", this.resolverFileType16);
|
||||
node.addPropertyResolver("fileType32", this.resolverFileType32);
|
||||
node.addPropertyResolver("size", this.resolverSize);
|
||||
node.addPropertyResolver("lang", this.resolverLang);
|
||||
node.addPropertyResolver("path", this.resolverPath);
|
||||
node.addPropertyResolver("displayPath", this.resolverDisplayPath);
|
||||
|
||||
@@ -1043,6 +1056,39 @@ public class BrowseBean implements IContextListener
|
||||
}
|
||||
};
|
||||
|
||||
public NodePropertyResolver resolverLang = new NodePropertyResolver() {
|
||||
public Object get(Node node) {
|
||||
|
||||
String lang = null;
|
||||
|
||||
if(node.getAspects().contains(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT))
|
||||
{
|
||||
Locale locale = (Locale) node.getProperties().get(ContentModel.PROP_LOCALE);
|
||||
|
||||
// the content filter lang defined by the user
|
||||
String userLang = userPreferencesBean.getContentFilterLanguage();
|
||||
// the node lang
|
||||
String nodeLang = locale.getLanguage();
|
||||
|
||||
// if filter equals all languages : display the lang for each translation
|
||||
if(nodeLang == null)
|
||||
{
|
||||
lang = nodeLang;
|
||||
}
|
||||
|
||||
// if filter is different : display the lang
|
||||
else if (!nodeLang.equalsIgnoreCase(userLang))
|
||||
{
|
||||
lang = nodeLang;
|
||||
}
|
||||
|
||||
// else if the filter is equal to the lang node : nothing to do [lang = null]
|
||||
|
||||
}
|
||||
|
||||
return lang;
|
||||
}
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Navigation action event handlers
|
||||
@@ -1357,6 +1403,7 @@ public class BrowseBean implements IContextListener
|
||||
node.addPropertyResolver("fileType32", this.resolverFileType32);
|
||||
node.addPropertyResolver("mimetype", this.resolverMimetype);
|
||||
node.addPropertyResolver("size", this.resolverSize);
|
||||
node.addPropertyResolver("lang", this.resolverLang);
|
||||
|
||||
for (NodeEventListener listener : getNodeEventListeners())
|
||||
{
|
||||
@@ -1727,6 +1774,9 @@ public class BrowseBean implements IContextListener
|
||||
/** The NavigationBean bean reference */
|
||||
protected NavigationBean navigator;
|
||||
|
||||
/** The UserPreferencesBean to be used by the bean */
|
||||
protected UserPreferencesBean userPreferencesBean;
|
||||
|
||||
/** The DictionaryService bean reference */
|
||||
protected DictionaryService dictionaryService;
|
||||
|
||||
|
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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.node.MLPropertyInterceptor;
|
||||
import org.alfresco.service.cmr.repository.MLText;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
|
||||
public class CreateMultilingualPropertiesBean
|
||||
{
|
||||
/** binding with edit of Other Options */
|
||||
private String language = null;
|
||||
private String newlanguage = null;
|
||||
private String title = null;
|
||||
private String description = null;
|
||||
protected boolean add_new_properties = false;
|
||||
|
||||
/** The NodeService to be used by the bean */
|
||||
protected NodeService nodeService;
|
||||
/** The user preferences bean reference */
|
||||
protected UserPreferencesBean preferences;
|
||||
|
||||
|
||||
/**
|
||||
* @param nodeService The NodeService to set.
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
public String getLanguage()
|
||||
{
|
||||
return this.language;
|
||||
}
|
||||
|
||||
public void setLanguage(String x)
|
||||
{
|
||||
this.language = x;
|
||||
Application.setLanguage(FacesContext.getCurrentInstance(), this.language);
|
||||
}
|
||||
|
||||
public void setNewlanguage(String x)
|
||||
{
|
||||
this.newlanguage = x;
|
||||
}
|
||||
|
||||
public String getNewlanguage()
|
||||
{
|
||||
return this.newlanguage;
|
||||
}
|
||||
|
||||
|
||||
public void setUserPreferencesBean(UserPreferencesBean preferences)
|
||||
{
|
||||
this.preferences = preferences;
|
||||
}
|
||||
|
||||
public UserPreferencesBean getUserPreferencesBean()
|
||||
{
|
||||
return preferences;
|
||||
}
|
||||
|
||||
public void setTitle(String x)
|
||||
{
|
||||
this.title = x;
|
||||
}
|
||||
|
||||
public void setDescription(String x)
|
||||
{
|
||||
this.description = x;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return this.title;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return this.description;
|
||||
}
|
||||
|
||||
|
||||
// Display the list of all multilingual properties
|
||||
public SelectItem[] getListAllDescriptionsProperties()
|
||||
{
|
||||
MLPropertyInterceptor.setMLAware(true);
|
||||
BrowseBean browseBean = (BrowseBean) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "BrowseBean");
|
||||
|
||||
// create the space (just create a folder for now)
|
||||
NodeRef nodeRef = browseBean.getDocument().getNodeRef();
|
||||
|
||||
if(nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION) != null)
|
||||
{
|
||||
List<SelectItem> sel = new ArrayList<SelectItem>();
|
||||
|
||||
if (nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION) instanceof MLText)
|
||||
{
|
||||
MLText descriptions = (MLText) nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION);
|
||||
|
||||
for(Map.Entry<Locale, String> description : descriptions.entrySet())
|
||||
{
|
||||
sel.add(new SelectItem(description.getKey().toString(), description.getValue().toString()));
|
||||
}
|
||||
|
||||
MLPropertyInterceptor.setMLAware(false);
|
||||
|
||||
// Create the table
|
||||
SelectItem[] items = new SelectItem[sel.size()];
|
||||
|
||||
// Copy into table
|
||||
sel.toArray(items);
|
||||
|
||||
if(sel.size() > 0)
|
||||
{
|
||||
return items;
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectItem[] elements = { new SelectItem("","")}; return elements;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectItem[] elements = { new SelectItem("","")}; return elements;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectItem[] elements = { new SelectItem("")}; return elements;
|
||||
}
|
||||
}
|
||||
|
||||
// Display the list of all multilingual properties
|
||||
public SelectItem[] getListAllTitlesProperties()
|
||||
{
|
||||
MLPropertyInterceptor.setMLAware(true);
|
||||
BrowseBean browseBean = (BrowseBean) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "BrowseBean");
|
||||
|
||||
// create the space (just create a folder for now)
|
||||
NodeRef nodeRef = browseBean.getDocument().getNodeRef();
|
||||
|
||||
if(nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION) != null)
|
||||
{
|
||||
List<SelectItem> sel = new ArrayList<SelectItem>();
|
||||
|
||||
if (nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION) instanceof MLText)
|
||||
{
|
||||
MLText descriptions = (MLText) nodeService.getProperty(nodeRef, ContentModel.PROP_TITLE);
|
||||
|
||||
for(Map.Entry<Locale, String> description : descriptions.entrySet())
|
||||
{
|
||||
sel.add(new SelectItem(description.getKey().toString(), description.getValue()));
|
||||
}
|
||||
|
||||
MLPropertyInterceptor.setMLAware(false);
|
||||
// Create the table
|
||||
SelectItem[] items = new SelectItem[sel.size()];
|
||||
// Copy into table
|
||||
sel.toArray(items);
|
||||
|
||||
if(sel.size() > 0)
|
||||
{
|
||||
return items;
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectItem[] elements = { new SelectItem("","")}; return elements;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectItem[] elements = { new SelectItem("","")}; return elements;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectItem[] elements = { new SelectItem("","")}; return elements;
|
||||
}
|
||||
}
|
||||
|
||||
public SelectItem[] getContentFilterLanguages()
|
||||
{
|
||||
return preferences.getContentFilterLanguages(false);
|
||||
}
|
||||
public boolean isAdd_new_properties() {return this.add_new_properties;}
|
||||
public void setAdd_new_properties(boolean x){this.add_new_properties = x;}
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.application.FacesMessage;
|
||||
@@ -79,6 +80,8 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
protected LockService lockService;
|
||||
protected VersionService versionService;
|
||||
protected CheckOutCheckInService cociService;
|
||||
protected MultilingualContentService multilingualContentService;
|
||||
protected ContentFilterLanguagesService contentFilterLanguagesService;
|
||||
|
||||
private NodeRef addedCategory;
|
||||
private List categories;
|
||||
@@ -96,6 +99,8 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
|
||||
// initial state of some panels that don't use the default
|
||||
panels.put("version-history-panel", false);
|
||||
panels.put("ml-info-panel", false);
|
||||
panels.put("related-translation-panel", false);
|
||||
}
|
||||
|
||||
|
||||
@@ -184,6 +189,14 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
return getDocument().hasAspect(ApplicationModel.ASPECT_INLINEEDITABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the current document has the 'inlineeditable' aspect applied
|
||||
*/
|
||||
public boolean isMultilingual()
|
||||
{
|
||||
return getDocument().hasAspect(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of objects representing the versions of the
|
||||
* current document
|
||||
@@ -220,6 +233,69 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
return versions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of objects representing the editions of the
|
||||
* logical document
|
||||
*
|
||||
* @return List of editions
|
||||
*/
|
||||
public List getEditionHistory()
|
||||
{
|
||||
List<MapNode> editions = new ArrayList<MapNode>();
|
||||
|
||||
if (getDocument().getType().equals(ContentModel.TYPE_MULTILINGUAL_CONTAINER))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return editions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of objects representing the translations of the
|
||||
* current document
|
||||
*
|
||||
* @return List of translations
|
||||
*/
|
||||
public List getTranslations()
|
||||
{
|
||||
List<MapNode> translations = new ArrayList<MapNode>();
|
||||
|
||||
if (getDocument().hasAspect(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT))
|
||||
{
|
||||
|
||||
Map<Locale, NodeRef> translationsMap = this.multilingualContentService.getTranslations(getDocument().getNodeRef());
|
||||
|
||||
if (translationsMap != null && translationsMap.size() > 0)
|
||||
{
|
||||
for (Map.Entry entry : translationsMap.entrySet())
|
||||
{
|
||||
NodeRef nodeRef = (NodeRef) entry.getValue();
|
||||
|
||||
// create a map node representation of the translation
|
||||
MapNode mapNode = new MapNode(nodeRef);
|
||||
|
||||
Locale locale = (Locale) nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE);
|
||||
|
||||
String lgge = (locale != null) ?
|
||||
// convert the locale into new ISO codes
|
||||
contentFilterLanguagesService.convertToNewISOCode(locale.getLanguage()).toUpperCase()
|
||||
: null ;
|
||||
|
||||
mapNode.put("name", nodeService.getProperty(nodeRef, ContentModel.PROP_NAME));
|
||||
mapNode.put("language", lgge);
|
||||
mapNode.put("url", DownloadContentServlet.generateBrowserURL(nodeRef, mapNode.getName()));
|
||||
|
||||
// add the client side version to the list
|
||||
translations.add(mapNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return translations;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determines whether the current document has any categories applied
|
||||
*
|
||||
@@ -699,6 +775,19 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
return this.getNode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ml container of the document this bean is currently representing
|
||||
*
|
||||
* @return The document multilingual container NodeRef
|
||||
*/
|
||||
public Node getDocumentMlContainer()
|
||||
{
|
||||
NodeRef nodeRef = getNode().getNodeRef();
|
||||
|
||||
return new Node(multilingualContentService.getTranslationContainer(nodeRef));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the lock service instance the bean should use
|
||||
*
|
||||
@@ -728,4 +817,21 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
{
|
||||
this.cociService = cociService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param multilingualContentService the multilingualContentService to set
|
||||
*/
|
||||
public void setMultilingualContentService(
|
||||
MultilingualContentService multilingualContentService)
|
||||
{
|
||||
this.multilingualContentService = multilingualContentService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param contentFilterLanguagesService The ContentFilterLanguagesService to set.
|
||||
*/
|
||||
public void setContentFilterLanguagesService(ContentFilterLanguagesService contentFilterLanguagesService)
|
||||
{
|
||||
this.contentFilterLanguagesService = contentFilterLanguagesService;
|
||||
}
|
||||
}
|
||||
|
@@ -35,6 +35,10 @@ import javax.faces.model.SelectItem;
|
||||
import org.alfresco.config.Config;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.service.cmr.ml.ContentFilterLanguagesService;
|
||||
import org.alfresco.service.cmr.ml.MultilingualContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.context.UIContextService;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
@@ -51,7 +55,12 @@ public class UserPreferencesBean
|
||||
private static final String PREF_STARTLOCATION = "start-location";
|
||||
|
||||
private static final String PREF_CONTENTFILTERLANGUAGE = "content-filter-language";
|
||||
private static final String MSG_CONTENTALLLANGUAGES = "content_all_languages";
|
||||
|
||||
/**
|
||||
* Remplacement message for set the filter at 'all languages'.
|
||||
* Must be considered as a null value.
|
||||
*/
|
||||
public static final String MSG_CONTENTALLLANGUAGES = "content_all_languages";
|
||||
|
||||
/** language locale selection */
|
||||
private String language = null;
|
||||
@@ -59,6 +68,14 @@ public class UserPreferencesBean
|
||||
/** content language locale selection */
|
||||
private String contentFilterLanguage = null;
|
||||
|
||||
/** the injected MultilingualContentService */
|
||||
MultilingualContentService multilingualContentService;
|
||||
|
||||
/** the injected ContentFilterLanguagesService */
|
||||
ContentFilterLanguagesService contentFilterLanguagesService;
|
||||
|
||||
/** the injected NodeService */
|
||||
NodeService nodeService;
|
||||
|
||||
/**
|
||||
* @return the list of available languages
|
||||
@@ -66,7 +83,7 @@ public class UserPreferencesBean
|
||||
public SelectItem[] getLanguages()
|
||||
{
|
||||
// Get the item selection list
|
||||
SelectItem[] items = getLanguageItems(false);
|
||||
SelectItem[] items = getLanguageItems();
|
||||
// Change the current language
|
||||
if (this.language == null)
|
||||
{
|
||||
@@ -120,56 +137,134 @@ public class UserPreferencesBean
|
||||
// Null means All Languages
|
||||
if (locale == null)
|
||||
{
|
||||
this.contentFilterLanguage = MSG_CONTENTALLLANGUAGES;
|
||||
this.contentFilterLanguage = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.contentFilterLanguage = locale.toString();
|
||||
}
|
||||
}
|
||||
return (contentFilterLanguage.equals(MSG_CONTENTALLLANGUAGES)) ? null : contentFilterLanguage;
|
||||
|
||||
// set the content filter locale on the core
|
||||
I18NUtil.setContentLocale(I18NUtil.parseLocale(this.contentFilterLanguage));
|
||||
|
||||
return this.contentFilterLanguage;
|
||||
//return (contentFilterLanguage.equals(MSG_CONTENTALLLANGUAGES)) ? "en" : contentFilterLanguage;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param languageStr A valid locale string or {@link #MSG_CONTENTALLLANGUAGES}
|
||||
*/
|
||||
public void setContentFilterLanguage(String languageStr)
|
||||
public void setContentFilterLanguage(String contentFilterLanguage)
|
||||
{
|
||||
this.contentFilterLanguage = languageStr;
|
||||
this.contentFilterLanguage = contentFilterLanguage;
|
||||
Locale language = null;
|
||||
if (languageStr.equals(MSG_CONTENTALLLANGUAGES))
|
||||
if (contentFilterLanguage.equals(MSG_CONTENTALLLANGUAGES))
|
||||
{
|
||||
// The generic "All Languages" was selected - persist this as a null
|
||||
this.contentFilterLanguage = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
// It should be a proper locale string
|
||||
language = I18NUtil.parseLocale(languageStr);
|
||||
language = I18NUtil.parseLocale(contentFilterLanguage);
|
||||
}
|
||||
PreferencesService.getPreferences().setValue(PREF_CONTENTFILTERLANGUAGE, language);
|
||||
|
||||
// set the content filter locale on the core
|
||||
I18NUtil.setContentLocale(language);
|
||||
|
||||
// Ensure a refresh
|
||||
UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list of items for the content filtering language selection
|
||||
* @return list of items for the content filtering language selection include the label 'all langaguages'
|
||||
*/
|
||||
public SelectItem[] getContentFilterLanguages()
|
||||
{
|
||||
// Get the item selection list
|
||||
SelectItem[] items = getLanguageItems(true);
|
||||
|
||||
return items;
|
||||
return getContentFilterLanguages(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param includeAllLanguages if true, the list must include the label 'all languages'
|
||||
* @return list of items for the content filtering language selection
|
||||
*/
|
||||
public SelectItem[] getContentFilterLanguages(boolean includeAllLanguages)
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
ResourceBundle msg = Application.getBundle(fc);
|
||||
|
||||
// get the list of filter languages
|
||||
List<String> languages = contentFilterLanguagesService.getFilterLanguages();
|
||||
|
||||
// set the item selection list
|
||||
SelectItem[] items = new SelectItem[(includeAllLanguages) ? languages.size() + 1 : languages.size()];
|
||||
int idx = 0;
|
||||
|
||||
// include the <All Languages> item if needed
|
||||
if (includeAllLanguages)
|
||||
{
|
||||
String allLanguagesStr = msg.getString(MSG_CONTENTALLLANGUAGES);
|
||||
items[idx] = new SelectItem(MSG_CONTENTALLLANGUAGES, allLanguagesStr);
|
||||
idx++;
|
||||
}
|
||||
|
||||
for(String lang : languages)
|
||||
{
|
||||
String label = contentFilterLanguagesService.getLabelByCode(lang);
|
||||
|
||||
items[idx] = new SelectItem(
|
||||
lang,
|
||||
label);
|
||||
|
||||
idx++;
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* return the list of languages in which the given node hasn't be translated yet.
|
||||
*
|
||||
* @param translation the translatable node ref
|
||||
* @param returnTranslationLanguage if true, return the language of the given translation.
|
||||
* @return the list of languages
|
||||
*/
|
||||
public SelectItem[] getAvailablesContentFilterLanguages(NodeRef translation, boolean returnTranslationLanguage)
|
||||
{
|
||||
// get the list of missing translation of this node
|
||||
List<Locale> missingLocales = multilingualContentService.getMissingTranslations(translation, returnTranslationLanguage);
|
||||
|
||||
// set the item selection list
|
||||
SelectItem[] items = new SelectItem[missingLocales.size()];
|
||||
int idx = 0;
|
||||
|
||||
for(Locale locale : missingLocales)
|
||||
{
|
||||
String label = contentFilterLanguagesService.getLabelByCode(locale.getLanguage());
|
||||
|
||||
items[idx] = new SelectItem(
|
||||
locale.toString(),
|
||||
label);
|
||||
idx++;
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper to return the available language items
|
||||
*
|
||||
* @param includeAllLanguages True to include a marker item for "All Languages"
|
||||
* @return Array of SelectItem objects
|
||||
*/
|
||||
private static SelectItem[] getLanguageItems(boolean includeAllLanguages)
|
||||
private static SelectItem[] getLanguageItems()
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
Config config = Application.getConfigService(fc).getConfig("Languages");
|
||||
@@ -178,11 +273,7 @@ public class UserPreferencesBean
|
||||
|
||||
List<String> languages = langConfig.getLanguages();
|
||||
List<SelectItem> items = new ArrayList<SelectItem>(10);
|
||||
if (includeAllLanguages)
|
||||
{
|
||||
String allLanguagesStr = Application.getMessage(fc, MSG_CONTENTALLLANGUAGES);
|
||||
items.add(new SelectItem(MSG_CONTENTALLLANGUAGES, allLanguagesStr));
|
||||
}
|
||||
|
||||
for (String locale : languages)
|
||||
{
|
||||
// get label associated to the locale
|
||||
@@ -258,4 +349,46 @@ public class UserPreferencesBean
|
||||
{
|
||||
return Application.getClientConfig(FacesContext.getCurrentInstance()).getAllowGuestConfig();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the multilingualContentService
|
||||
*/
|
||||
public MultilingualContentService getMultilingualContentService()
|
||||
{
|
||||
return multilingualContentService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param multilingualContentService the multilingualContentService to set
|
||||
*/
|
||||
public void setMultilingualContentService(
|
||||
MultilingualContentService multilingualContentService)
|
||||
{
|
||||
this.multilingualContentService = multilingualContentService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the nodeService
|
||||
*/
|
||||
public NodeService getNodeService()
|
||||
{
|
||||
return nodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nodeService the nodeService to set
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param contentFilterLanguagesService the contentFilterLanguagesService to set
|
||||
*/
|
||||
public void setContentFilterLanguagesService(
|
||||
ContentFilterLanguagesService contentFilterLanguagesService)
|
||||
{
|
||||
this.contentFilterLanguagesService = contentFilterLanguagesService;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* 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.generator;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.component.UISelectItems;
|
||||
import javax.faces.component.UISelectOne;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.model.SelectItem;
|
||||
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.UserPreferencesBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.ui.repo.component.property.PropertySheetItem;
|
||||
import org.alfresco.web.ui.repo.component.property.UIPropertySheet;
|
||||
import org.alfresco.web.ui.repo.converter.LanguageConverter;
|
||||
|
||||
/**
|
||||
* Generates a LANGUAGE selector component.
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class LanguageSelectorGenerator extends BaseComponentGenerator
|
||||
{
|
||||
protected Node node;
|
||||
|
||||
protected UserPreferencesBean userPreferencesBean;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public UIComponent generate(FacesContext context, String id)
|
||||
{
|
||||
UIComponent component = context.getApplication().
|
||||
createComponent(UISelectOne.COMPONENT_TYPE);
|
||||
FacesHelper.setupComponentId(context, component, id);
|
||||
|
||||
// create the list of choices
|
||||
UISelectItems itemsComponent = (UISelectItems)context.getApplication().
|
||||
createComponent("javax.faces.SelectItems");
|
||||
|
||||
itemsComponent.setValue(getLanguageItems());
|
||||
|
||||
// add the items as a child component
|
||||
component.getChildren().add(itemsComponent);
|
||||
|
||||
return component;
|
||||
}
|
||||
|
||||
protected SelectItem[] getLanguageItems()
|
||||
{
|
||||
SelectItem[] items = userPreferencesBean.getAvailablesContentFilterLanguages(node.getNodeRef(), true);
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected UIComponent createComponent(FacesContext context, UIPropertySheet propertySheet, PropertySheetItem item) {
|
||||
|
||||
this.node = propertySheet.getNode();
|
||||
|
||||
return super.createComponent(context, propertySheet, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupConverter(FacesContext context,
|
||||
UIPropertySheet propertySheet, PropertySheetItem property,
|
||||
PropertyDefinition propertyDef, UIComponent component)
|
||||
{
|
||||
createAndSetConverter(context, LanguageConverter.CONVERTER_ID, component);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupMandatoryValidation(FacesContext context,
|
||||
UIPropertySheet propertySheet, PropertySheetItem item,
|
||||
UIComponent component, boolean realTimeChecking, String idSuffix)
|
||||
{
|
||||
// null is may be a right value for a language
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the injected userPreferencesBean
|
||||
*
|
||||
* @param userPreferencesBean
|
||||
*/
|
||||
public void setUserPreferencesBean(UserPreferencesBean userPreferencesBean)
|
||||
{
|
||||
this.userPreferencesBean = userPreferencesBean;
|
||||
}
|
||||
}
|
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* 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.generator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.model.SelectItem;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.ml.ContentFilterLanguagesService;
|
||||
import org.alfresco.service.cmr.ml.MultilingualContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
|
||||
|
||||
/**
|
||||
* Generates a LANGUAGE selector component for display a list of language
|
||||
* for a ML container.
|
||||
*
|
||||
* The list of languages must contains the languages of each of this <b>non-empty</b>
|
||||
* translations.
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class MlContainerLanguageSelectorGenerator extends LanguageSelectorGenerator
|
||||
{
|
||||
protected MultilingualContentService multilingualContentService;
|
||||
protected ContentFilterLanguagesService contentFilterLanguagesService;
|
||||
protected NodeService nodeService;
|
||||
|
||||
protected SelectItem[] getLanguageItems()
|
||||
{
|
||||
Map<Locale, NodeRef> translations = multilingualContentService.getTranslations(node.getNodeRef());
|
||||
|
||||
List<SelectItem> items = new ArrayList<SelectItem>();
|
||||
|
||||
for(Map.Entry<Locale, NodeRef> entry : translations.entrySet())
|
||||
{
|
||||
if(!nodeService.hasAspect(entry.getValue(), ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION))
|
||||
{
|
||||
Locale loc = entry.getKey();
|
||||
|
||||
items.add(new SelectItem(
|
||||
loc.getLanguage(),
|
||||
contentFilterLanguagesService.getLabelByCode(loc.toString())));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
SelectItem[] itemsArray = new SelectItem[items.size()];
|
||||
items.toArray(itemsArray);
|
||||
|
||||
return itemsArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the injected contentFilterLanguagesService
|
||||
*
|
||||
* @param contentFilterLanguagesService
|
||||
*/
|
||||
public void setContentFilterLanguagesService(
|
||||
ContentFilterLanguagesService contentFilterLanguagesService)
|
||||
{
|
||||
this.contentFilterLanguagesService = contentFilterLanguagesService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the injected multilingualContentService
|
||||
*
|
||||
* @param multilingualContentService
|
||||
*/
|
||||
public void setMultilingualContentService(
|
||||
MultilingualContentService multilingualContentService)
|
||||
{
|
||||
this.multilingualContentService = multilingualContentService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the injected nodeService
|
||||
*
|
||||
* @param nodeService the nodeService to set
|
||||
*/
|
||||
public void setNodeService(NodeService nodeService)
|
||||
{
|
||||
this.nodeService = nodeService;
|
||||
}
|
||||
}
|
@@ -0,0 +1,225 @@
|
||||
/*
|
||||
* 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.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.model.SelectItem;
|
||||
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.ml.MultilingualContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.web.app.servlet.DownloadContentServlet;
|
||||
import org.alfresco.web.bean.UserPreferencesBean;
|
||||
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
|
||||
/**
|
||||
* 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>
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class AddTranslationWithoutContentDialog extends BaseDialogBean
|
||||
{
|
||||
|
||||
public static String LOCALE_REGEX = "%locale%";
|
||||
public static String EMPTY_DOCUMENT_EXTENSION = "." + LOCALE_REGEX + "_properties";
|
||||
|
||||
private MultilingualContentService multilingualContentService;
|
||||
private UserPreferencesBean userPreferencesBean;
|
||||
|
||||
// the translation being to be created
|
||||
protected NodeRef newTranslation;
|
||||
|
||||
private String name;
|
||||
private String title;
|
||||
private String description;
|
||||
private String author;
|
||||
private String language;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void init(Map<String, String> parameters)
|
||||
{
|
||||
super.init(parameters);
|
||||
|
||||
name = null;
|
||||
title = null;
|
||||
description = null;
|
||||
author = null;
|
||||
language = null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
// get the reference node
|
||||
NodeRef refNode = this.browseBean.getDocument().getNodeRef();
|
||||
|
||||
// get the required properties to create the new node and to make it multilingual
|
||||
Locale locale = I18NUtil.parseLocale(language);
|
||||
|
||||
// rename the translation like [name].[lang]_properties
|
||||
String extension = EMPTY_DOCUMENT_EXTENSION.replaceAll(LOCALE_REGEX, language);
|
||||
this.name += extension;
|
||||
|
||||
// add the empty translation
|
||||
newTranslation = multilingualContentService.addEmptyTranslation(refNode, name, locale);
|
||||
|
||||
// set the properties
|
||||
nodeService.setProperty(newTranslation, ContentModel.PROP_DESCRIPTION, description);
|
||||
nodeService.setProperty(newTranslation, ContentModel.PROP_AUTHOR, author);
|
||||
nodeService.setProperty(newTranslation, ContentModel.PROP_TITLE, title);
|
||||
|
||||
// set the current browse node
|
||||
Node browse = new Node(newTranslation);
|
||||
|
||||
// get the content data of the pivot translation
|
||||
NodeRef pivot = multilingualContentService.getPivotTranslation(refNode);
|
||||
|
||||
Map<String, Object> browseProp = browse.getProperties();
|
||||
browseProp.put("size", 0);
|
||||
browseProp.put("mimetype", extension);
|
||||
browseProp.put("fileType32", Utils.getFileTypeImage(name, false));
|
||||
browseProp.put("url", DownloadContentServlet.generateDownloadURL(pivot, name));
|
||||
|
||||
this.browseBean.setDocument(browse);
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param userPreferencesBean the userPreferencesBean to set
|
||||
*/
|
||||
public void setUserPreferencesBean(UserPreferencesBean userPreferencesBean)
|
||||
{
|
||||
this.userPreferencesBean = userPreferencesBean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param multilingualContentService the multilingualContentService to set
|
||||
*/
|
||||
public void setMultilingualContentService(
|
||||
MultilingualContentService multilingualContentService)
|
||||
{
|
||||
this.multilingualContentService = multilingualContentService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the author
|
||||
*/
|
||||
public String getAuthor()
|
||||
{
|
||||
return author;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param author the author to set
|
||||
*/
|
||||
public void setAuthor(String author)
|
||||
{
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the description
|
||||
*/
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param description the description to set
|
||||
*/
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the language
|
||||
*/
|
||||
public String getLanguage()
|
||||
{
|
||||
return language;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param language the language to set
|
||||
*/
|
||||
public void setLanguage(String language)
|
||||
{
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the name
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name the name to set
|
||||
*/
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the title
|
||||
*/
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param title the title to set
|
||||
*/
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the unusedLanguages
|
||||
*/
|
||||
public SelectItem[] getUnusedLanguages()
|
||||
{
|
||||
return userPreferencesBean.getAvailablesContentFilterLanguages(this.browseBean.getDocument().getNodeRef(), false);
|
||||
}
|
||||
}
|
211
source/java/org/alfresco/web/bean/ml/AddTranslationlDialog.java
Normal file
211
source/java/org/alfresco/web/bean/ml/AddTranslationlDialog.java
Normal file
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
* 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.util.Map;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.model.SelectItem;
|
||||
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.ml.MultilingualContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.bean.UserPreferencesBean;
|
||||
import org.alfresco.web.bean.content.AddContentDialog;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* Dialog bean to upload a new document and to add it to an existing MLContainer.
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class AddTranslationlDialog extends AddContentDialog
|
||||
{
|
||||
|
||||
private MultilingualContentService multilingualContentService;
|
||||
private UserPreferencesBean userPreferencesBean;
|
||||
|
||||
// the multilingual container where to add this translation
|
||||
protected NodeRef mlContainer;
|
||||
|
||||
// Locale of the new translation
|
||||
private String language;
|
||||
|
||||
// languages available in the ML container yet
|
||||
private SelectItem[] unusedLanguages;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.web.bean.content.AddContentDialog#init(java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public void init(Map<String, String> parameters)
|
||||
{
|
||||
super.init(parameters);
|
||||
|
||||
this.language = null;
|
||||
setMlContainer(this.browseBean.getDocument().getNodeRef());
|
||||
setFileName(null);
|
||||
unusedLanguages = null;
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.web.bean.content.AddContentDialog#finishImpl(javax.faces.context.FacesContext, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
|
||||
// add the new file to the repository
|
||||
outcome = super.finishImpl(context, outcome);
|
||||
|
||||
// add a new translation
|
||||
multilingualContentService.addTranslation(this.createdNode, this.mlContainer, I18NUtil.parseLocale(this.language));
|
||||
|
||||
this.browseBean.setDocument(new Node(this.createdNode));
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDefaultFinishOutcome()
|
||||
{
|
||||
|
||||
return "showDocDetails";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String cancel()
|
||||
{
|
||||
super.cancel();
|
||||
|
||||
return getDefaultFinishOutcome();
|
||||
}
|
||||
|
||||
public boolean finishButtonDisabled()
|
||||
{
|
||||
return author == null || author.length() < 1 || language == null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the locale of this new translation
|
||||
*/
|
||||
public String getLanguage()
|
||||
{
|
||||
return language;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param language the locale of this new translation
|
||||
*/
|
||||
public void setLanguage(String language)
|
||||
{
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Multilingual container where the translation will be associated
|
||||
*/
|
||||
public NodeRef getMlContainer()
|
||||
{
|
||||
return mlContainer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Multilingual container where the translation will be associated.
|
||||
*
|
||||
* @param mlContainer mlContainer is a MLDocument, the the MLContainer will
|
||||
* become it's own MLContainer
|
||||
*/
|
||||
public void setMlContainer(NodeRef mlContainer)
|
||||
{
|
||||
QName type = null;
|
||||
|
||||
if(mlContainer != null)
|
||||
{
|
||||
type = nodeService.getType(mlContainer);
|
||||
|
||||
if(ContentModel.TYPE_MULTILINGUAL_CONTAINER.equals(type)){
|
||||
this.mlContainer = mlContainer;
|
||||
}
|
||||
else if(ContentModel.TYPE_CONTENT.equals(type)
|
||||
&& nodeService.hasAspect(mlContainer, ContentModel.ASPECT_MULTILINGUAL_DOCUMENT)){
|
||||
|
||||
this.mlContainer = multilingualContentService.getTranslationContainer(mlContainer);
|
||||
}
|
||||
else{
|
||||
this.mlContainer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param unusedLanguages
|
||||
*/
|
||||
public void setUnusedLanguages(SelectItem[] unusedLanguages)
|
||||
{
|
||||
this.unusedLanguages = unusedLanguages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method calls by the dialog to limit the list of languages.
|
||||
*
|
||||
* @return the list of availables translation in the MLContainer
|
||||
*/
|
||||
|
||||
public SelectItem[] getUnusedLanguages()
|
||||
{
|
||||
|
||||
if(unusedLanguages == null)
|
||||
{
|
||||
unusedLanguages = userPreferencesBean.getAvailablesContentFilterLanguages(getMlContainer(), false);
|
||||
}
|
||||
|
||||
return unusedLanguages;
|
||||
}
|
||||
|
||||
public MultilingualContentService getMultilingualContentService()
|
||||
{
|
||||
return multilingualContentService;
|
||||
}
|
||||
|
||||
public void setMultilingualContentService(
|
||||
MultilingualContentService multilingualContentService)
|
||||
{
|
||||
this.multilingualContentService = multilingualContentService;
|
||||
}
|
||||
|
||||
public UserPreferencesBean getUserPreferencesBean()
|
||||
{
|
||||
return userPreferencesBean;
|
||||
}
|
||||
|
||||
public void setUserPreferencesBean(UserPreferencesBean userPreferencesBean)
|
||||
{
|
||||
this.userPreferencesBean = userPreferencesBean;
|
||||
}
|
||||
}
|
140
source/java/org/alfresco/web/bean/ml/EditMLContainerDialog.java
Normal file
140
source/java/org/alfresco/web/bean/ml/EditMLContainerDialog.java
Normal file
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
* 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.Map;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.service.cmr.ml.MultilingualContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* Dialog bean to edit an existing multilingual container.
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class EditMLContainerDialog extends BaseDialogBean
|
||||
{
|
||||
|
||||
MultilingualContentService multilingualContentService;
|
||||
|
||||
private Node editableNode;
|
||||
|
||||
@Override
|
||||
public void init(Map<String, String> parameters)
|
||||
{
|
||||
super.init(parameters);
|
||||
|
||||
this.editableNode = initEditableNode();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFinishButtonDisabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getFinishButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), "ok");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
// get the container node ref
|
||||
NodeRef container = editableNode.getNodeRef();
|
||||
|
||||
// get the modified properties
|
||||
Map<String, Object> editProperties = this.editableNode.getProperties();
|
||||
|
||||
// modify the properties of the container with the user modified properties
|
||||
for(Map.Entry<String, Object> entry : editProperties.entrySet())
|
||||
{
|
||||
QName qname = QName.createQName(entry.getKey());
|
||||
|
||||
nodeService.setProperty(container, qname, (Serializable) entry.getValue());
|
||||
}
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init the editable Node
|
||||
*/
|
||||
protected Node initEditableNode()
|
||||
{
|
||||
return new Node(
|
||||
multilingualContentService.getTranslationContainer(
|
||||
this.browseBean.getDocument().getNodeRef())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the editableNode
|
||||
*/
|
||||
public Node getEditableNode() {
|
||||
return editableNode;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String doPostCommitProcessing(FacesContext context, String outcome)
|
||||
{
|
||||
this.browseBean.getDocument().reset();
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Bean getters and setters
|
||||
|
||||
/**
|
||||
* @return the multilingualContentService
|
||||
*/
|
||||
public MultilingualContentService getMultilingualContentService() {
|
||||
return multilingualContentService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param multilingualContentService the multilingualContentService to set
|
||||
*/
|
||||
public void setMultilingualContentService(
|
||||
MultilingualContentService multilingualContentService) {
|
||||
this.multilingualContentService = multilingualContentService;
|
||||
}
|
||||
|
||||
|
||||
}
|
288
source/java/org/alfresco/web/bean/ml/MakeMultilingualDialog.java
Normal file
288
source/java/org/alfresco/web/bean/ml/MakeMultilingualDialog.java
Normal file
@@ -0,0 +1,288 @@
|
||||
/*
|
||||
* 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.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.model.SelectItem;
|
||||
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.ml.MultilingualContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.UserPreferencesBean;
|
||||
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* Dialog bean to make a node multilingual
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class MakeMultilingualDialog extends BaseDialogBean
|
||||
{
|
||||
|
||||
private MultilingualContentService multilingualContentService;
|
||||
|
||||
private UserPreferencesBean userPreferencesBean;
|
||||
|
||||
/** if needed, add a new translation with content after this dialog closed */
|
||||
public static final String OPT_ADD_WITH_CONTENT = "ADD_WITH_CONTENT";
|
||||
/** if needed, add a new translation without content after this dialog closed */
|
||||
public static final String OPT_ADD_WITHOUT_CONTENT = "ADD_WITHOUT_CONTENT";
|
||||
|
||||
// The author is a mandatory properties
|
||||
private String author;
|
||||
|
||||
// The langage of the node to make multilingual
|
||||
private String language;
|
||||
|
||||
// set to true, a new translation will be added at the end of this dialog
|
||||
private boolean addTranslationAfter = true;
|
||||
|
||||
// set if the new translation to add will be an empty document or not
|
||||
private String addingMode = OPT_ADD_WITH_CONTENT;
|
||||
|
||||
// the node to edit
|
||||
protected Node editableNode;
|
||||
|
||||
@Override
|
||||
public void init(Map<String, String> parameters)
|
||||
{
|
||||
super.init(parameters);
|
||||
|
||||
// setup the editable node
|
||||
this.editableNode = initEditableNode();
|
||||
|
||||
NodeRef nodeRef = this.editableNode.getNodeRef();
|
||||
|
||||
// propose the author and the language of the content for the properties of the MLContainer
|
||||
if(this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_AUTHOR) == true
|
||||
&& this.nodeService.getProperty(nodeRef, ContentModel.PROP_AUTHOR) != null)
|
||||
{
|
||||
setAuthor((String) this.nodeService.getProperty(nodeRef, ContentModel.PROP_AUTHOR));
|
||||
}
|
||||
else
|
||||
{
|
||||
setAuthor("");
|
||||
}
|
||||
|
||||
if(this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_LOCALIZED) == true
|
||||
&& this.nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE) != null)
|
||||
{
|
||||
setLanguage(((Locale) this.nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE)).toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
setLanguage(null);
|
||||
}
|
||||
|
||||
addTranslationAfter = false;
|
||||
addingMode = OPT_ADD_WITH_CONTENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init the editable Node
|
||||
*/
|
||||
protected Node initEditableNode()
|
||||
{
|
||||
return new Node(this.browseBean.getDocument().getNodeRef());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.web.bean.dialog.BaseDialogBean#finishImpl(javax.faces.context.FacesContext, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
Locale loc = I18NUtil.parseLocale(getLanguage());
|
||||
|
||||
NodeRef nodeRef = this.editableNode.getNodeRef();
|
||||
|
||||
// make this node multilingual
|
||||
NodeRef mlContainer = multilingualContentService.makeTranslation(nodeRef, loc);
|
||||
|
||||
// set the local of the current node.
|
||||
nodeService.setProperty(nodeRef, ContentModel.PROP_LOCALE, getLanguage());
|
||||
|
||||
// if the author of the node is not set, set it with the default author name of
|
||||
// the new ML Container
|
||||
String nodeAuthor = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_AUTHOR);
|
||||
if(nodeAuthor == null || nodeAuthor.length() < 1)
|
||||
nodeService.setProperty(nodeRef, ContentModel.PROP_AUTHOR, getAuthor());
|
||||
|
||||
// set properties of the ml container
|
||||
nodeService.setProperty(mlContainer, ContentModel.PROP_AUTHOR, getAuthor());
|
||||
nodeService.setProperty(mlContainer, ContentModel.PROP_LOCALE, getLanguage());
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.web.bean.dialog.BaseDialogBean#doPostCommitProcessing(javax.faces.context.FacesContext, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected String doPostCommitProcessing(FacesContext context, String outcome)
|
||||
{
|
||||
// reset the document held by the browse bean as it's just been updated
|
||||
this.browseBean.getDocument().reset();
|
||||
|
||||
// go to the set add translation dialog if asked
|
||||
// to otherwise just return
|
||||
if (this.addTranslationAfter)
|
||||
{
|
||||
if(addingMode.equalsIgnoreCase(OPT_ADD_WITHOUT_CONTENT))
|
||||
{
|
||||
return "dialog:addTranslationWithoutContent";
|
||||
}
|
||||
else
|
||||
{
|
||||
AddTranslationlDialog dialog = (AddTranslationlDialog) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AddTranslationDialog");
|
||||
dialog.start(null);
|
||||
return "addTranslation";
|
||||
}
|
||||
}
|
||||
// close the dialog
|
||||
return outcome;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFinishButtonDisabled()
|
||||
{
|
||||
return !(author != null && author.length() > 0 && language != null);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Bean getters and setters
|
||||
|
||||
/**
|
||||
* Returns the node being edited
|
||||
*
|
||||
* @return The node being edited
|
||||
*/
|
||||
public Node getEditableNode()
|
||||
{
|
||||
return this.editableNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the author of the new created MLContainer
|
||||
*/
|
||||
public String getAuthor()
|
||||
{
|
||||
return author;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param author the author of new created MLContainer
|
||||
*/
|
||||
public void setAuthor(String author)
|
||||
{
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if a new translation must be added after this dialog closes
|
||||
*/
|
||||
public boolean isAddTranslationAfter()
|
||||
{
|
||||
return addTranslationAfter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param addTranslationAfter set to true, a new translation will be added after this dialog closes
|
||||
*/
|
||||
public void setAddTranslationAfter(boolean addTranslationAfter)
|
||||
{
|
||||
this.addTranslationAfter = addTranslationAfter;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the language of the translation
|
||||
*/
|
||||
public String getLanguage()
|
||||
{
|
||||
return language;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param language the language of the translation
|
||||
*/
|
||||
public void setLanguage(String language)
|
||||
{
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param editableNode the node will become a multilingual
|
||||
*/
|
||||
public void setEditableNode(Node editableNode)
|
||||
{
|
||||
this.editableNode = editableNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if the new translation must be added at the end of this dialog,
|
||||
* this mode defines if the translation will be an empty document or not
|
||||
*/
|
||||
public String getAddingMode() {
|
||||
return addingMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param addingMode if the new translation must be added at the end of this dialog,
|
||||
* this mode defines if the translation will be an empty document or not
|
||||
*/
|
||||
public void setAddingMode(String addingMode) {
|
||||
this.addingMode = addingMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the complete list of available languages for the multilinguism
|
||||
*/
|
||||
public SelectItem[] getFilterLanguages()
|
||||
{
|
||||
return userPreferencesBean.getContentFilterLanguages(false);
|
||||
}
|
||||
|
||||
public void setMultilingualContentService(
|
||||
MultilingualContentService multilingualContentService)
|
||||
{
|
||||
this.multilingualContentService = multilingualContentService;
|
||||
}
|
||||
|
||||
public void setUserPreferencesBean(UserPreferencesBean userPreferencesBean)
|
||||
{
|
||||
this.userPreferencesBean = userPreferencesBean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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.spaces;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
||||
import org.alfresco.web.app.Application;
|
||||
|
||||
|
||||
public class CreateMultilingualPropertiesDialog extends CreateMultilingualPropertiesWizard
|
||||
{
|
||||
// ------------------------------------------------------------------------------
|
||||
// Wizard implementation
|
||||
|
||||
@Override
|
||||
public String getFinishButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), "create_multilingual_space");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDefaultCancelOutcome()
|
||||
{
|
||||
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME + AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "browse";
|
||||
|
||||
// return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDefaultFinishOutcome()
|
||||
{
|
||||
// return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME + AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "browse";
|
||||
|
||||
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected String doPostCommitProcessing(FacesContext context, String outcome)
|
||||
{
|
||||
// do nothing by default, subclasses can override if necessary
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
* 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.spaces;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.node.MLPropertyInterceptor;
|
||||
import org.alfresco.service.cmr.repository.MLText;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.util.PropertyMap;
|
||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.CreateMultilingualPropertiesBean;
|
||||
import org.alfresco.web.bean.UserPreferencesBean;
|
||||
|
||||
public class CreateMultilingualPropertiesWizard extends CreateSpaceWizard
|
||||
{
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
MLText title, description;
|
||||
|
||||
// bind to the bean
|
||||
CreateMultilingualPropertiesBean createMultilingualPropertiesBean = (CreateMultilingualPropertiesBean) FacesHelper.getManagedBean(context, "CreateMultilingualPropertiesBean");
|
||||
UserPreferencesBean userPreferencesBean = (UserPreferencesBean) FacesHelper.getManagedBean(context, "UserPreferencesBean");
|
||||
|
||||
if (this.createFrom.equals("scratch"))
|
||||
{
|
||||
// create the space (just create a folder for now)
|
||||
NodeRef nodeRef = this.browseBean.getDocument().getNodeRef();
|
||||
// Add aspect (PropertyMap is a extension of HashMap with key LOCALE)
|
||||
PropertyMap properties = new PropertyMap();
|
||||
|
||||
// Modification du casting de l objet r<>cup<75>r<EFBFBD> des getters de MLText en Text
|
||||
MLPropertyInterceptor.setMLAware(true);
|
||||
|
||||
// MLText is a HashMap composed by key and description The Function addValue is the same that the function put() but the key is the Locale value
|
||||
Serializable oTitle = nodeService.getProperty(nodeRef, ContentModel.PROP_TITLE);
|
||||
Serializable oDescription = nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION);
|
||||
|
||||
|
||||
if(oTitle instanceof MLText)
|
||||
{
|
||||
title = (MLText) oTitle;
|
||||
}
|
||||
else
|
||||
{
|
||||
title = new MLText();
|
||||
title.addValue(I18NUtil.parseLocale(userPreferencesBean.getContentFilterLanguage()), oTitle.toString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(oDescription instanceof MLText)
|
||||
{
|
||||
description = (MLText) oDescription;
|
||||
}
|
||||
else
|
||||
{
|
||||
description = new MLText();
|
||||
title.addValue(I18NUtil.parseLocale(userPreferencesBean.getContentFilterLanguage()), oDescription.toString());
|
||||
}
|
||||
|
||||
title.addValue(I18NUtil.parseLocale(createMultilingualPropertiesBean.getNewlanguage()), createMultilingualPropertiesBean.getTitle());
|
||||
description.addValue(I18NUtil.parseLocale(createMultilingualPropertiesBean.getNewlanguage()), createMultilingualPropertiesBean.getDescription());
|
||||
|
||||
properties.put(ContentModel.PROP_TITLE, title);
|
||||
properties.put(ContentModel.PROP_DESCRIPTION, description);
|
||||
|
||||
|
||||
// Ajout de l'aspect multilingue sur le titre
|
||||
this.nodeService.addAspect(nodeRef, ContentModel.ASPECT_TITLED, properties);
|
||||
/*
|
||||
MLText descriptionss = (MLText) nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION);
|
||||
|
||||
List<SelectItem> sel = new ArrayList();
|
||||
|
||||
for(Map.Entry<Locale, String> dd : descriptionss.entrySet())
|
||||
{
|
||||
sel.add(new SelectItem(dd.getKey().toString(), dd.getValue()));
|
||||
}
|
||||
|
||||
SelectItem[] items = new SelectItem[sel.size()];
|
||||
sel.toArray(items);
|
||||
*/
|
||||
// Modification du casting de l objet r<>cup<75>r<EFBFBD> des getters de MLText en Text
|
||||
MLPropertyInterceptor.setMLAware(false);
|
||||
}
|
||||
else if (this.createFrom.equals("existing"))
|
||||
{
|
||||
}
|
||||
else if (this.createFrom.equals("template"))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
if (createMultilingualPropertiesBean.isAdd_new_properties())
|
||||
{
|
||||
createMultilingualPropertiesBean.setTitle("");
|
||||
createMultilingualPropertiesBean.setDescription("");
|
||||
createMultilingualPropertiesBean.setAdd_new_properties(false);
|
||||
|
||||
return "dialog:createMultilingualProperties";
|
||||
}
|
||||
else
|
||||
{
|
||||
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME + AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "browse";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param preferences The UserPreferencesBean to set
|
||||
*/
|
||||
public void setUserPreferencesBean(UserPreferencesBean preferences)
|
||||
{
|
||||
this.preferences = preferences;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the preferences of the user
|
||||
*/
|
||||
public UserPreferencesBean getUserPreferencesBean()
|
||||
{
|
||||
return preferences;
|
||||
}
|
||||
|
||||
|
||||
/** The user preferences bean reference */
|
||||
protected UserPreferencesBean preferences;
|
||||
protected CreateMultilingualPropertiesBean createMultilingualPropertiesBean;
|
||||
}
|
||||
|
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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.spaces;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.CreateMultilingualPropertiesBean;
|
||||
|
||||
public class CreateMultilingualSpaceDialog extends CreateMultilingualSpaceWizard
|
||||
{
|
||||
// ------------------------------------------------------------------------------
|
||||
// Wizard implementation
|
||||
|
||||
@Override
|
||||
public String getFinishButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), "create_multilingual_space");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDefaultCancelOutcome()
|
||||
{
|
||||
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDefaultFinishOutcome()
|
||||
{
|
||||
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected String doPostCommitProcessing(FacesContext context, String outcome)
|
||||
{
|
||||
// do nothing by default, subclasses can override if necessary
|
||||
if(isEdit())
|
||||
{
|
||||
return "dialog:createMultilingualProperties";
|
||||
}
|
||||
else
|
||||
{
|
||||
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setCreateMultilingualPropertiesBean(CreateMultilingualPropertiesBean x)
|
||||
{
|
||||
this.createMultilingualPropertiesBean = x;
|
||||
}
|
||||
|
||||
public boolean isEdit()
|
||||
{
|
||||
return this.edit;
|
||||
}
|
||||
|
||||
public void setEdit(boolean x)
|
||||
{
|
||||
this.edit=x;
|
||||
}
|
||||
|
||||
|
||||
private boolean edit;
|
||||
|
||||
public CreateMultilingualPropertiesBean getCreateMultilingualPropertiesBean(){return this.createMultilingualPropertiesBean;}
|
||||
|
||||
protected CreateMultilingualPropertiesBean createMultilingualPropertiesBean;
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
* 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.spaces;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.model.ApplicationModel;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.model.FileInfo;
|
||||
import org.alfresco.service.cmr.repository.MLText;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.DynamicNamespacePrefixResolver;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.CreateMultilingualPropertiesBean;
|
||||
import org.alfresco.web.bean.UserPreferencesBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
|
||||
|
||||
public class CreateMultilingualSpaceWizard extends CreateSpaceWizard
|
||||
{
|
||||
|
||||
protected boolean showOtherProperties = true;
|
||||
|
||||
|
||||
/**
|
||||
* @return Determines whether the edit properties dialog should be
|
||||
* shown when this one ends
|
||||
*/
|
||||
public boolean isShowOtherProperties()
|
||||
{
|
||||
return this.showOtherProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param showOthers Sets whether the edit properties dialog is shown
|
||||
*/
|
||||
public void setShowOtherProperties(boolean showOthers)
|
||||
{
|
||||
this.showOtherProperties = showOthers;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
String newSpaceId = null;
|
||||
CreateMultilingualPropertiesBean createMultilingualPropertiesBean = (CreateMultilingualPropertiesBean) FacesHelper.getManagedBean(context, "CreateMultilingualPropertiesBean");
|
||||
|
||||
|
||||
if (this.createFrom.equals("scratch"))
|
||||
{
|
||||
// create the space (just create a folder for now)
|
||||
NodeRef parentNodeRef;
|
||||
|
||||
String nodeId = this.navigator.getCurrentNodeId();
|
||||
|
||||
if (nodeId == null)
|
||||
{
|
||||
parentNodeRef = this.nodeService.getRootNode(Repository.getStoreRef());
|
||||
}
|
||||
else
|
||||
{
|
||||
parentNodeRef = new NodeRef(Repository.getStoreRef(), nodeId);
|
||||
}
|
||||
|
||||
|
||||
FileInfo fileInfo = fileFolderService.create(parentNodeRef, this.name, Repository.resolveToQName(this.spaceType));
|
||||
NodeRef nodeRef = fileInfo.getNodeRef();
|
||||
newSpaceId = nodeRef.getId();
|
||||
|
||||
// apply the uifacets aspect - icon, title and description props
|
||||
Map<QName, Serializable> uiFacetsProps = new HashMap<QName, Serializable>(5);
|
||||
|
||||
uiFacetsProps.put(ApplicationModel.PROP_ICON, this.icon);
|
||||
// uiFacetsProps.put(ContentModel.PROP_TITLE, this.title);
|
||||
// uiFacetsProps.put(ContentModel.PROP_DESCRIPTION, this.description);
|
||||
|
||||
|
||||
// Ajout de l icone
|
||||
this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, uiFacetsProps);
|
||||
|
||||
Locale language = I18NUtil.parseLocale(createMultilingualPropertiesBean.getNewlanguage());
|
||||
|
||||
this.nodeService.setProperty(nodeRef, ContentModel.PROP_TITLE, new MLText(language, this.title));
|
||||
this.nodeService.setProperty(nodeRef, ContentModel.PROP_DESCRIPTION, new MLText(language, this.description));
|
||||
|
||||
|
||||
// remember the created node
|
||||
this.createdNode = nodeRef;
|
||||
// Passer le noeud en parametre afin de le recuperer dans un autre dialogue
|
||||
this.browseBean.setDocument(new Node(this.createdNode));
|
||||
|
||||
setTitle(""); setDescription(""); setName("");
|
||||
}
|
||||
else if (this.createFrom.equals("existing"))
|
||||
{
|
||||
// copy the selected space and update the name, description and icon
|
||||
NodeRef sourceNode = this.existingSpaceId;
|
||||
NodeRef parentSpace = new NodeRef(Repository.getStoreRef(), this.navigator.getCurrentNodeId());
|
||||
|
||||
// copy from existing
|
||||
NodeRef copiedNode = this.fileFolderService.copy(sourceNode, parentSpace, this.name).getNodeRef();
|
||||
|
||||
Locale usrLocale = I18NUtil.parseLocale(getUserPreferencesBean().getContentFilterLanguage());
|
||||
|
||||
// also need to set the new title, description and icon properties
|
||||
|
||||
this.nodeService.setProperty(copiedNode, ContentModel.PROP_TITLE, new MLText(usrLocale, this.title));
|
||||
this.nodeService.setProperty(copiedNode, ContentModel.PROP_DESCRIPTION, new MLText(usrLocale, this.description));
|
||||
this.nodeService.setProperty(copiedNode, ApplicationModel.PROP_ICON, this.icon);
|
||||
|
||||
newSpaceId = copiedNode.getId();
|
||||
|
||||
// remember the created node
|
||||
this.createdNode = copiedNode;
|
||||
}
|
||||
else if (this.createFrom.equals("template"))
|
||||
{
|
||||
// copy the selected space and update the name, description and icon
|
||||
NodeRef sourceNode = new NodeRef(Repository.getStoreRef(), this.templateSpaceId);
|
||||
NodeRef parentSpace = new NodeRef(Repository.getStoreRef(), this.navigator.getCurrentNodeId());
|
||||
|
||||
// copy from the template
|
||||
NodeRef copiedNode = this.fileFolderService.copy(sourceNode, parentSpace, this.name).getNodeRef();
|
||||
// also need to set the new title, description and icon properties
|
||||
this.nodeService.setProperty(copiedNode, ContentModel.PROP_TITLE, this.title);
|
||||
this.nodeService.setProperty(copiedNode, ContentModel.PROP_DESCRIPTION, this.description);
|
||||
this.nodeService.setProperty(copiedNode, ApplicationModel.PROP_ICON, this.icon);
|
||||
|
||||
newSpaceId = copiedNode.getId();
|
||||
|
||||
|
||||
// remember the created node
|
||||
this.createdNode = copiedNode;
|
||||
}
|
||||
|
||||
// if the user selected to save the space as a template space copy the new
|
||||
// space to the templates folder
|
||||
if (this.saveAsTemplate)
|
||||
{
|
||||
// get hold of the Templates node
|
||||
DynamicNamespacePrefixResolver namespacePrefixResolver = new DynamicNamespacePrefixResolver(null);
|
||||
namespacePrefixResolver.registerNamespace(NamespaceService.APP_MODEL_PREFIX, NamespaceService.APP_MODEL_1_0_URI);
|
||||
|
||||
String xpath = Application.getRootPath(FacesContext.getCurrentInstance()) + "/" +
|
||||
Application.getGlossaryFolderName(FacesContext.getCurrentInstance()) + "/" +
|
||||
Application.getSpaceTemplatesFolderName(FacesContext.getCurrentInstance());
|
||||
|
||||
NodeRef rootNodeRef = this.nodeService.getRootNode(Repository.getStoreRef());
|
||||
List<NodeRef> templateNodeList = this.searchService.selectNodes(
|
||||
rootNodeRef,
|
||||
xpath, null, namespacePrefixResolver, false);
|
||||
if (templateNodeList.size() == 1)
|
||||
{
|
||||
// get the first item in the list as we from test above there is only one!
|
||||
NodeRef templateNode = templateNodeList.get(0);
|
||||
NodeRef sourceNode = new NodeRef(Repository.getStoreRef(), newSpaceId);
|
||||
// copy this to the template location
|
||||
fileFolderService.copy(sourceNode, templateNode, this.templateName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param preferences The UserPreferencesBean to set
|
||||
*/
|
||||
public void setUserPreferencesBean(UserPreferencesBean preferences)
|
||||
{
|
||||
this.preferences = preferences;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return the preferences of the user
|
||||
*/
|
||||
public UserPreferencesBean getUserPreferencesBean()
|
||||
{
|
||||
return preferences;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** The user preferences bean reference */
|
||||
protected UserPreferencesBean preferences;
|
||||
protected CreateMultilingualPropertiesBean createMultilingualPropertiesBean;
|
||||
}
|
||||
|
@@ -15,11 +15,11 @@
|
||||
* 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:
|
||||
* 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.spaces;
|
||||
@@ -60,7 +60,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Bean responsible for the create space wizard
|
||||
*
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class CreateSpaceWizard extends BaseWizardBean
|
||||
@@ -68,7 +68,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
public static final String DEFAULT_SPACE_ICON_NAME = "space-icon-default";
|
||||
public static final String DEFAULT_SPACE_ICON_PATH = "";
|
||||
public static final String DEFAULT_SPACE_TYPE_ICON_PATH = "/images/icons/space.gif";
|
||||
|
||||
|
||||
private static Log logger = LogFactory.getLog(CreateSpaceWizard.class);
|
||||
|
||||
protected String spaceType;
|
||||
@@ -85,27 +85,27 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
protected List<SelectItem> templates;
|
||||
protected List<UIListItem> folderTypes;
|
||||
protected List<UIDescription> folderTypeDescriptions;
|
||||
|
||||
|
||||
// the NodeRef of the node created during finish
|
||||
protected NodeRef createdNode;
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Wizard implementation
|
||||
|
||||
|
||||
/**
|
||||
* Initialises the wizard
|
||||
*/
|
||||
public void init(Map<String, String> parameters)
|
||||
{
|
||||
super.init(parameters);
|
||||
|
||||
|
||||
// clear the cached query results
|
||||
if (this.templates != null)
|
||||
{
|
||||
this.templates.clear();
|
||||
this.templates = null;
|
||||
}
|
||||
|
||||
|
||||
// reset all variables
|
||||
this.createFrom = "scratch";
|
||||
this.spaceType = ContentModel.TYPE_FOLDER.toString();
|
||||
@@ -119,7 +119,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
this.templateName = null;
|
||||
this.saveAsTemplate = false;
|
||||
}
|
||||
|
||||
|
||||
public String next()
|
||||
{
|
||||
// if the user has chosen to create the space from an existing
|
||||
@@ -134,15 +134,15 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
NodeRef templateNode = new NodeRef(Repository.getStoreRef(), this.templateSpaceId);
|
||||
this.spaceType = this.nodeService.getType(templateNode).toString();
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
String newSpaceId = null;
|
||||
|
||||
|
||||
if (this.createFrom.equals("scratch"))
|
||||
{
|
||||
// create the space (just create a folder for now)
|
||||
@@ -156,14 +156,14 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
parentNodeRef = new NodeRef(Repository.getStoreRef(), nodeId);
|
||||
}
|
||||
|
||||
|
||||
FileInfo fileInfo = fileFolderService.create(
|
||||
parentNodeRef,
|
||||
this.name,
|
||||
Repository.resolveToQName(this.spaceType));
|
||||
NodeRef nodeRef = fileInfo.getNodeRef();
|
||||
newSpaceId = nodeRef.getId();
|
||||
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Created folder node with name: " + this.name);
|
||||
|
||||
@@ -173,10 +173,10 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
uiFacetsProps.put(ContentModel.PROP_TITLE, this.title);
|
||||
uiFacetsProps.put(ContentModel.PROP_DESCRIPTION, this.description);
|
||||
this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, uiFacetsProps);
|
||||
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Added uifacets aspect with properties: " + uiFacetsProps);
|
||||
|
||||
|
||||
// remember the created node
|
||||
this.createdNode = nodeRef;
|
||||
}
|
||||
@@ -185,20 +185,20 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
// copy the selected space and update the name, description and icon
|
||||
NodeRef sourceNode = this.existingSpaceId;
|
||||
NodeRef parentSpace = new NodeRef(Repository.getStoreRef(), this.navigator.getCurrentNodeId());
|
||||
|
||||
|
||||
// copy from existing
|
||||
NodeRef copiedNode = this.fileFolderService.copy(sourceNode, parentSpace, this.name).getNodeRef();
|
||||
|
||||
NodeRef copiedNode = this.fileFolderService.copy(sourceNode, parentSpace, this.name).getNodeRef();
|
||||
|
||||
// also need to set the new title, description and icon properties
|
||||
this.nodeService.setProperty(copiedNode, ContentModel.PROP_TITLE, this.title);
|
||||
this.nodeService.setProperty(copiedNode, ContentModel.PROP_DESCRIPTION, this.description);
|
||||
this.nodeService.setProperty(copiedNode, ApplicationModel.PROP_ICON, this.icon);
|
||||
|
||||
|
||||
newSpaceId = copiedNode.getId();
|
||||
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Copied space with id of " + sourceNode.getId() + " to " + this.name);
|
||||
|
||||
|
||||
// remember the created node
|
||||
this.createdNode = copiedNode;
|
||||
}
|
||||
@@ -213,16 +213,16 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
this.nodeService.setProperty(copiedNode, ContentModel.PROP_TITLE, this.title);
|
||||
this.nodeService.setProperty(copiedNode, ContentModel.PROP_DESCRIPTION, this.description);
|
||||
this.nodeService.setProperty(copiedNode, ApplicationModel.PROP_ICON, this.icon);
|
||||
|
||||
|
||||
newSpaceId = copiedNode.getId();
|
||||
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Copied template space with id of " + sourceNode.getId() + " to " + this.name);
|
||||
|
||||
|
||||
// remember the created node
|
||||
this.createdNode = copiedNode;
|
||||
}
|
||||
|
||||
|
||||
// if the user selected to save the space as a template space copy the new
|
||||
// space to the templates folder
|
||||
if (this.saveAsTemplate)
|
||||
@@ -230,11 +230,11 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
// get hold of the Templates node
|
||||
DynamicNamespacePrefixResolver namespacePrefixResolver = new DynamicNamespacePrefixResolver(null);
|
||||
namespacePrefixResolver.registerNamespace(NamespaceService.APP_MODEL_PREFIX, NamespaceService.APP_MODEL_1_0_URI);
|
||||
|
||||
|
||||
String xpath = Application.getRootPath(FacesContext.getCurrentInstance()) + "/" +
|
||||
Application.getGlossaryFolderName(FacesContext.getCurrentInstance()) + "/" +
|
||||
Application.getSpaceTemplatesFolderName(FacesContext.getCurrentInstance());
|
||||
|
||||
|
||||
NodeRef rootNodeRef = this.nodeService.getRootNode(Repository.getStoreRef());
|
||||
List<NodeRef> templateNodeList = this.searchService.selectNodes(
|
||||
rootNodeRef,
|
||||
@@ -248,13 +248,15 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
fileFolderService.copy(sourceNode, templateNode, this.templateName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setTitle(""); setDescription("");
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Bean Getters and Setters
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns the copyPolicy.
|
||||
*/
|
||||
@@ -270,7 +272,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
this.copyPolicy = copyPolicy;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns the createFrom.
|
||||
*/
|
||||
@@ -294,14 +296,14 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param description The description to set.
|
||||
*/
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the existingSpaceId.
|
||||
@@ -310,7 +312,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
return existingSpaceId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param existingSpaceId The existingSpaceId to set.
|
||||
*/
|
||||
@@ -318,7 +320,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
this.existingSpaceId = existingSpaceId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns the icon.
|
||||
*/
|
||||
@@ -326,7 +328,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
return icon;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param icon The icon to set.
|
||||
*/
|
||||
@@ -334,7 +336,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns the name.
|
||||
*/
|
||||
@@ -342,15 +344,15 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param name The name to set.
|
||||
*/
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
this.name = name.trim();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns the title.
|
||||
*/
|
||||
@@ -358,7 +360,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param title The title to set.
|
||||
*/
|
||||
@@ -366,7 +368,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns the saveAsTemplate.
|
||||
*/
|
||||
@@ -374,7 +376,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
return saveAsTemplate;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param saveAsTemplate The saveAsTemplate to set.
|
||||
*/
|
||||
@@ -390,7 +392,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
return spaceType;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param spaceType The spaceType to set.
|
||||
*/
|
||||
@@ -398,7 +400,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
this.spaceType = spaceType;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns the templateName.
|
||||
*/
|
||||
@@ -406,7 +408,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
return templateName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param templateName The templateName to set.
|
||||
*/
|
||||
@@ -414,7 +416,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
this.templateName = templateName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns the templateSpaceId.
|
||||
*/
|
||||
@@ -422,7 +424,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
return templateSpaceId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param templateSpaceId The templateSpaceId to set.
|
||||
*/
|
||||
@@ -430,7 +432,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
this.templateSpaceId = templateSpaceId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns the summary data for the wizard.
|
||||
*/
|
||||
@@ -438,7 +440,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
String summaryCreateType = null;
|
||||
ResourceBundle bundle = Application.getBundle(FacesContext.getCurrentInstance());
|
||||
|
||||
|
||||
if (this.createFrom.equals("scratch"))
|
||||
{
|
||||
summaryCreateType = bundle.getString("scratch");
|
||||
@@ -451,11 +453,11 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
summaryCreateType = bundle.getString("a_template");
|
||||
}
|
||||
|
||||
|
||||
// String summarySaveAsTemplate = this.saveAsTemplate ? bundle.getString("yes") : bundle.getString("no");
|
||||
// bundle.getString("save_as_template"), bundle.getString("template_name")},
|
||||
// summarySaveAsTemplate, this.templateName
|
||||
|
||||
|
||||
String spaceTypeLabel = null;
|
||||
for (UIListItem item : this.getFolderTypes())
|
||||
{
|
||||
@@ -465,28 +467,28 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return buildSummary(
|
||||
new String[] {bundle.getString("space_type"), bundle.getString("name"),
|
||||
new String[] {bundle.getString("space_type"), bundle.getString("name"),
|
||||
bundle.getString("description"), bundle.getString("creating_from")},
|
||||
new String[] {spaceTypeLabel, this.name, this.description, summaryCreateType});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Returns a list of template spaces currently in the system
|
||||
*/
|
||||
public List<SelectItem> getTemplateSpaces()
|
||||
{
|
||||
{
|
||||
if (this.templates == null)
|
||||
{
|
||||
this.templates = new ArrayList<SelectItem>();
|
||||
|
||||
|
||||
FacesContext context = FacesContext.getCurrentInstance();
|
||||
String xpath = Application.getRootPath(context) + "/" + Application.getGlossaryFolderName(context) +
|
||||
"/" + Application.getSpaceTemplatesFolderName(context) + "/*";
|
||||
NodeRef rootNodeRef = this.nodeService.getRootNode(Repository.getStoreRef());
|
||||
NodeRef rootNodeRef = this.nodeService.getRootNode(Repository.getStoreRef());
|
||||
List<NodeRef> results = this.searchService.selectNodes(rootNodeRef, xpath, null, this.namespaceService, false);
|
||||
|
||||
|
||||
if (results.size() > 0)
|
||||
{
|
||||
for (NodeRef assocRef : results)
|
||||
@@ -497,23 +499,23 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
this.templates.add(new SelectItem(childNode.getId(), childNode.getName()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// make sure the list is sorted by the label
|
||||
QuickSort sorter = new QuickSort(this.templates, "label", true, IDataContainer.SORT_CASEINSENSITIVE);
|
||||
sorter.sort();
|
||||
}
|
||||
|
||||
|
||||
// add an entry (at the start) to instruct the user to select a template
|
||||
this.templates.add(0, new SelectItem("none", Application.getMessage(FacesContext.getCurrentInstance(), "select_a_template")));
|
||||
}
|
||||
|
||||
|
||||
return this.templates;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of UIListItem objects representing the folder types
|
||||
* Returns a list of UIListItem objects representing the folder types
|
||||
* and also constructs the list of descriptions for each type
|
||||
*
|
||||
*
|
||||
* @return List of UIListItem components
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -524,7 +526,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
FacesContext context = FacesContext.getCurrentInstance();
|
||||
this.folderTypes = new ArrayList<UIListItem>(2);
|
||||
this.folderTypeDescriptions = new ArrayList<UIDescription>(2);
|
||||
|
||||
|
||||
// add the well known 'container space' type to start with
|
||||
UIListItem defaultItem = new UIListItem();
|
||||
String defaultLabel = Application.getMessage(context, "container");
|
||||
@@ -533,12 +535,12 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
defaultItem.setTooltip(defaultLabel);
|
||||
defaultItem.setImage(DEFAULT_SPACE_TYPE_ICON_PATH);
|
||||
this.folderTypes.add(defaultItem);
|
||||
|
||||
|
||||
UIDescription defaultDesc = new UIDescription();
|
||||
defaultDesc.setControlValue(ContentModel.TYPE_FOLDER.toString());
|
||||
defaultDesc.setText(Application.getMessage(context, "container_desc"));
|
||||
this.folderTypeDescriptions.add(defaultDesc);
|
||||
|
||||
|
||||
// add any configured content sub-types to the list
|
||||
Config wizardCfg = Application.getConfigService(FacesContext.getCurrentInstance()).
|
||||
getConfig("Space Wizards");
|
||||
@@ -546,54 +548,54 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
ConfigElement typesCfg = wizardCfg.getConfigElement("folder-types");
|
||||
if (typesCfg != null)
|
||||
{
|
||||
{
|
||||
for (ConfigElement child : typesCfg.getChildren())
|
||||
{
|
||||
QName idQName = Repository.resolveToQName(child.getAttribute("name"));
|
||||
TypeDefinition typeDef = this.dictionaryService.getType(idQName);
|
||||
|
||||
|
||||
if (typeDef != null)
|
||||
{
|
||||
if (this.dictionaryService.isSubClass(typeDef.getName(), ContentModel.TYPE_FOLDER))
|
||||
{
|
||||
// try and get the label from config
|
||||
String label = Utils.getDisplayLabel(context, child);
|
||||
|
||||
|
||||
// if there wasn't a client based label try and get it from the dictionary
|
||||
if (label == null)
|
||||
{
|
||||
label = typeDef.getTitle();
|
||||
}
|
||||
|
||||
|
||||
// finally use the localname if we still haven't found a label
|
||||
if (label == null)
|
||||
{
|
||||
label = idQName.getLocalName();
|
||||
}
|
||||
|
||||
|
||||
// resolve a description string for the type
|
||||
String description = Utils.getDescription(context, child);
|
||||
|
||||
|
||||
// if we don't have a local description just use the label
|
||||
if (description == null)
|
||||
{
|
||||
description = label;
|
||||
}
|
||||
|
||||
|
||||
// extract the icon to use from the config
|
||||
String icon = child.getAttribute("icon");
|
||||
if (icon == null || icon.length() == 0)
|
||||
{
|
||||
icon = DEFAULT_SPACE_TYPE_ICON_PATH;
|
||||
}
|
||||
|
||||
|
||||
UIListItem item = new UIListItem();
|
||||
item.setValue(idQName.toString());
|
||||
item.setLabel(label);
|
||||
item.setTooltip(label);
|
||||
item.setImage(icon);
|
||||
this.folderTypes.add(item);
|
||||
|
||||
|
||||
UIDescription desc = new UIDescription();
|
||||
desc.setControlValue(idQName.toString());
|
||||
desc.setText(description);
|
||||
@@ -601,13 +603,13 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("Failed to add '" + child.getAttribute("name") +
|
||||
logger.warn("Failed to add '" + child.getAttribute("name") +
|
||||
"' to the list of folder types as the type is not a subtype of cm:folder");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("Failed to add '" + child.getAttribute("name") +
|
||||
logger.warn("Failed to add '" + child.getAttribute("name") +
|
||||
"' to the list of folder types as the type is not recognised");
|
||||
}
|
||||
}
|
||||
@@ -621,15 +623,15 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
logger.warn("Could not find 'Space Wizards' configuration section");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return this.folderTypes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a list of UIDescription objects for the folder types
|
||||
*
|
||||
*
|
||||
* @return A list of UIDescription objects
|
||||
*/
|
||||
public List<UIDescription> getFolderTypeDescriptions()
|
||||
@@ -639,14 +641,14 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
// call the getFolderType method to construct the list
|
||||
getFolderTypes();
|
||||
}
|
||||
|
||||
|
||||
return this.folderTypeDescriptions;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a list of icons to allow the user to select from.
|
||||
* The list can change according to the type of space being created.
|
||||
*
|
||||
*
|
||||
* @return A list of icons
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -654,13 +656,13 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
// NOTE: we can't cache this list as it depends on the space type
|
||||
// which the user can change during the advanced space wizard
|
||||
|
||||
|
||||
List<UIListItem> icons = null;
|
||||
List<String> iconNames = new ArrayList<String>(8);
|
||||
|
||||
|
||||
QName type = QName.createQName(this.spaceType);
|
||||
String typePrefixForm = type.toPrefixString(this.namespaceService);
|
||||
|
||||
|
||||
Config config = Application.getConfigService(FacesContext.getCurrentInstance()).
|
||||
getConfig(typePrefixForm + " icons");
|
||||
if (config != null)
|
||||
@@ -673,14 +675,14 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
{
|
||||
String iconName = icon.getAttribute("name");
|
||||
String iconPath = icon.getAttribute("path");
|
||||
|
||||
|
||||
if (iconName != null && iconPath != null)
|
||||
{
|
||||
if (first)
|
||||
{
|
||||
// if this is the first icon create the list and make
|
||||
// if this is the first icon create the list and make
|
||||
// the first icon in the list the default
|
||||
|
||||
|
||||
icons = new ArrayList<UIListItem>(iconsCfg.getChildCount());
|
||||
if (this.icon == null)
|
||||
{
|
||||
@@ -689,7 +691,7 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
||||
|
||||
UIListItem item = new UIListItem();
|
||||
item.setValue(iconName);
|
||||
item.setImage(iconPath);
|
||||
@@ -699,36 +701,36 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if we didn't find any icons display one default choice
|
||||
if (icons == null)
|
||||
{
|
||||
icons = new ArrayList<UIListItem>(1);
|
||||
this.icon = DEFAULT_SPACE_ICON_NAME;
|
||||
|
||||
|
||||
UIListItem item = new UIListItem();
|
||||
item.setValue(DEFAULT_SPACE_ICON_NAME);
|
||||
item.setImage("/images/icons/space-icon-default.gif");
|
||||
icons.add(item);
|
||||
iconNames.add(DEFAULT_SPACE_ICON_NAME);
|
||||
}
|
||||
|
||||
// make sure the current value for the icon is valid for the
|
||||
|
||||
// make sure the current value for the icon is valid for the
|
||||
// current list of icons about to be displayed
|
||||
if (iconNames.contains(this.icon) == false)
|
||||
{
|
||||
this.icon = iconNames.get(0);
|
||||
}
|
||||
|
||||
|
||||
return icons;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Helper methods
|
||||
|
||||
|
||||
/**
|
||||
* Formats the error message to display if an error occurs during finish processing
|
||||
*
|
||||
*
|
||||
* @param exception The exception
|
||||
* @return The formatted message
|
||||
*/
|
||||
@@ -738,13 +740,13 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
if (exception instanceof FileExistsException)
|
||||
{
|
||||
return MessageFormat.format(Application.getMessage(
|
||||
FacesContext.getCurrentInstance(), Repository.ERROR_EXISTS),
|
||||
FacesContext.getCurrentInstance(), Repository.ERROR_EXISTS),
|
||||
((FileExistsException)exception).getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
return MessageFormat.format(Application.getMessage(
|
||||
FacesContext.getCurrentInstance(), "error_space"),
|
||||
FacesContext.getCurrentInstance(), "error_space"),
|
||||
exception.getMessage());
|
||||
}
|
||||
}
|
||||
|
@@ -15,11 +15,11 @@
|
||||
* 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:
|
||||
* 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.spaces;
|
||||
@@ -38,34 +38,35 @@ import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* Dialog bean to edit an existing space.
|
||||
*
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class EditSpaceDialog extends CreateSpaceDialog
|
||||
{
|
||||
protected Node editableNode;
|
||||
|
||||
|
||||
@Override
|
||||
public void init(Map<String, String> parameters)
|
||||
{
|
||||
super.init(parameters);
|
||||
|
||||
|
||||
// setup the space being edited
|
||||
this.editableNode = initEditableNode();
|
||||
this.spaceType = this.editableNode.getType().toString();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean getFinishButtonDisabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Init the editable Node
|
||||
*/
|
||||
@@ -73,71 +74,71 @@ public class EditSpaceDialog extends CreateSpaceDialog
|
||||
{
|
||||
return new Node(this.browseBean.getActionSpace().getNodeRef());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getFinishButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), "ok");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
// update the existing node in the repository
|
||||
NodeRef nodeRef = this.editableNode.getNodeRef();
|
||||
Map<String, Object> editedProps = this.editableNode.getProperties();
|
||||
|
||||
|
||||
// handle the name property separately, perform a rename in case it changed
|
||||
String name = (String)editedProps.get(ContentModel.PROP_NAME);
|
||||
if (name != null)
|
||||
{
|
||||
this.fileFolderService.rename(nodeRef, name);
|
||||
}
|
||||
|
||||
|
||||
// get the current set of properties from the repository
|
||||
Map<QName, Serializable> repoProps = this.nodeService.getProperties(nodeRef);
|
||||
|
||||
|
||||
// add the "uifacets" aspect if required, properties will get set below
|
||||
if (this.nodeService.hasAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS) == false)
|
||||
{
|
||||
this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, null);
|
||||
}
|
||||
|
||||
|
||||
// overwrite the current properties with the edited ones
|
||||
Iterator<String> iterProps = editedProps.keySet().iterator();
|
||||
while (iterProps.hasNext())
|
||||
{
|
||||
String propName = iterProps.next();
|
||||
QName qname = QName.createQName(propName);
|
||||
|
||||
|
||||
// make sure the property is represented correctly
|
||||
Serializable propValue = (Serializable)editedProps.get(propName);
|
||||
|
||||
|
||||
// check for empty strings when using number types, set to null in this case
|
||||
if ((propValue != null) && (propValue instanceof String) &&
|
||||
if ((propValue != null) && (propValue instanceof String) &&
|
||||
(propValue.toString().length() == 0))
|
||||
{
|
||||
PropertyDefinition propDef = this.dictionaryService.getProperty(qname);
|
||||
if (propDef != null)
|
||||
{
|
||||
if (propDef.getDataType().getName().equals(DataTypeDefinition.DOUBLE) ||
|
||||
if (propDef.getDataType().getName().equals(DataTypeDefinition.DOUBLE) ||
|
||||
propDef.getDataType().getName().equals(DataTypeDefinition.FLOAT) ||
|
||||
propDef.getDataType().getName().equals(DataTypeDefinition.INT) ||
|
||||
propDef.getDataType().getName().equals(DataTypeDefinition.INT) ||
|
||||
propDef.getDataType().getName().equals(DataTypeDefinition.LONG))
|
||||
{
|
||||
propValue = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
repoProps.put(qname, propValue);
|
||||
}
|
||||
|
||||
|
||||
// send the properties back to the repository
|
||||
this.nodeService.setProperties(nodeRef, repoProps);
|
||||
|
||||
|
||||
// we also need to persist any association changes that may have been made
|
||||
|
||||
|
||||
// add any associations added in the UI
|
||||
Map<String, Map<String, AssociationRef>> addedAssocs = this.editableNode.getAddedAssociations();
|
||||
for (Map<String, AssociationRef> typedAssoc : addedAssocs.values())
|
||||
@@ -147,7 +148,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
|
||||
this.nodeService.createAssociation(assoc.getSourceRef(), assoc.getTargetRef(), assoc.getTypeQName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// remove any association removed in the UI
|
||||
Map<String, Map<String, AssociationRef>> removedAssocs = this.editableNode.getRemovedAssociations();
|
||||
for (Map<String, AssociationRef> typedAssoc : removedAssocs.values())
|
||||
@@ -157,7 +158,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
|
||||
this.nodeService.removeAssociation(assoc.getSourceRef(), assoc.getTargetRef(), assoc.getTypeQName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// add any child associations added in the UI
|
||||
Map<String, Map<String, ChildAssociationRef>> addedChildAssocs = this.editableNode.getAddedChildAssociations();
|
||||
for (Map<String, ChildAssociationRef> typedAssoc : addedChildAssocs.values())
|
||||
@@ -167,7 +168,7 @@ public class EditSpaceDialog extends CreateSpaceDialog
|
||||
this.nodeService.addChild(assoc.getParentRef(), assoc.getChildRef(), assoc.getTypeQName(), assoc.getTypeQName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// remove any child association removed in the UI
|
||||
Map<String, Map<String, ChildAssociationRef>> removedChildAssocs = this.editableNode.getRemovedChildAssociations();
|
||||
for (Map<String, ChildAssociationRef> typedAssoc : removedChildAssocs.values())
|
||||
@@ -177,29 +178,54 @@ public class EditSpaceDialog extends CreateSpaceDialog
|
||||
this.nodeService.removeChild(assoc.getParentRef(), assoc.getChildRef());
|
||||
}
|
||||
}
|
||||
|
||||
return outcome;
|
||||
|
||||
|
||||
// do nothing by default, subclasses can override if necessary
|
||||
if(isEdit())
|
||||
{
|
||||
this.browseBean.setDocument(this.getEditableNode()); // (this.editableNode.getNodeRef());
|
||||
|
||||
return "dialog:createMultilingualProperties";
|
||||
}
|
||||
else
|
||||
{
|
||||
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String doPostCommitProcessing(FacesContext context, String outcome)
|
||||
{
|
||||
this.browseBean.getActionSpace().reset();
|
||||
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Bean getters and setters
|
||||
|
||||
/**
|
||||
* Returns the node being edited
|
||||
*
|
||||
*
|
||||
* @return The node being edited
|
||||
*/
|
||||
public Node getEditableNode()
|
||||
{
|
||||
return this.editableNode;
|
||||
}
|
||||
|
||||
public boolean isEdit()
|
||||
{
|
||||
return this.edit;
|
||||
}
|
||||
|
||||
public void setEdit(boolean x)
|
||||
{
|
||||
this.edit=x;
|
||||
}
|
||||
|
||||
|
||||
private boolean edit;
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* 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.ui.repo.component;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
import javax.faces.component.UISelectItems;
|
||||
import javax.faces.component.UISelectOne;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.model.SelectItem;
|
||||
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.UserPreferencesBean;
|
||||
import org.alfresco.web.bean.users.SpaceUsersBean;
|
||||
|
||||
/**
|
||||
* Component that holds a list of languages avalaiable to make a node multilingual.
|
||||
*
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class UILanguageSelector extends UISelectOne
|
||||
{
|
||||
public static final String COMPONENT_TYPE = "org.alfresco.faces.LanguageSelector";
|
||||
public static final String COMPONENT_FAMILY = "javax.faces.SelectOne";
|
||||
|
||||
// If true, the langage list is filtered to return all the langages yet available in the
|
||||
// MLContainer of the current node.
|
||||
// An available langage is a language where any translation is set.
|
||||
private boolean onlyAvailableLanguages = false;
|
||||
|
||||
// If true and if onlyAvailableLanguages, the list of available languages
|
||||
// will be return with the language of the node.
|
||||
// Used in the edit properties dialog.
|
||||
private boolean returnCurrentLanguage = true;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void encodeBegin(FacesContext context) throws IOException
|
||||
{
|
||||
// if the component does not have any children yet create the
|
||||
// list of Languages the user can choose from as a child
|
||||
// SelectItems component.
|
||||
if (getChildren().size() == 0)
|
||||
{
|
||||
UISelectItems items = (UISelectItems) context.getApplication().
|
||||
createComponent("javax.faces.SelectItems");
|
||||
items.setId(this.getId() + "_items");
|
||||
items.setValue(createList());
|
||||
// add the child component
|
||||
getChildren().add(items);
|
||||
}
|
||||
// do the default processing
|
||||
super.encodeBegin(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the list of SelectItem components to represent the list
|
||||
* of Langages the user can select from
|
||||
*
|
||||
* @return List of SelectItem components
|
||||
*/
|
||||
protected SelectItem[] createList()
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
SpaceUsersBean spaceUserBean = (SpaceUsersBean) FacesHelper.getManagedBean(fc, "SpaceUsersBean");
|
||||
UserPreferencesBean userPreferencesBean = (UserPreferencesBean) FacesHelper.getManagedBean(fc, "UserPreferencesBean");
|
||||
|
||||
// get the node ref
|
||||
NodeRef nodeRef = spaceUserBean.getNode().getNodeRef();
|
||||
|
||||
|
||||
if(this.onlyAvailableLanguages)
|
||||
{
|
||||
return userPreferencesBean.getAvailablesContentFilterLanguages(nodeRef, this.returnCurrentLanguage);
|
||||
}
|
||||
else
|
||||
{
|
||||
return userPreferencesBean.getContentFilterLanguages(false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the list of languages is filtered
|
||||
*/
|
||||
public boolean isOnlyAvailableLanguages()
|
||||
{
|
||||
return onlyAvailableLanguages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param onlyAvailableLanguages the list of languages is filtered
|
||||
*/
|
||||
public void setOnlyAvailableLanguages(boolean onlyAvailableLanguages)
|
||||
{
|
||||
this.onlyAvailableLanguages = onlyAvailableLanguages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the list must contain the language of the current node
|
||||
*/
|
||||
public boolean isReturnCurrentLanguage()
|
||||
{
|
||||
return returnCurrentLanguage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Without effect if onlyAvailableLanguages is false
|
||||
*
|
||||
* @param returnCurrentLanguage the list must contain the language of the current node
|
||||
*
|
||||
*/
|
||||
public void setReturnCurrentLanguage(boolean returnCurrentLanguage)
|
||||
{
|
||||
this.returnCurrentLanguage = returnCurrentLanguage;
|
||||
}
|
||||
}
|
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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.ui.repo.converter;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.convert.Converter;
|
||||
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.service.cmr.ml.ContentFilterLanguagesService;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
|
||||
/**
|
||||
* Converter class to convert a Locale into a language libelle
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class LanguageConverter implements Converter
|
||||
{
|
||||
/**
|
||||
* <p>The standard converter id for this converter.</p>
|
||||
*/
|
||||
public static final String CONVERTER_ID = "org.alfresco.faces.LanguageConverter";
|
||||
|
||||
/**
|
||||
* @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
|
||||
*/
|
||||
public Object getAsObject(FacesContext context, UIComponent component, String value)
|
||||
{
|
||||
if(value == null)
|
||||
{
|
||||
throw new IllegalArgumentException(I18NUtil.getMessage("error_locale_null"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
|
||||
*/
|
||||
public String getAsString(FacesContext context, UIComponent component, Object value)
|
||||
{
|
||||
if(value == null)
|
||||
{
|
||||
throw new IllegalArgumentException(I18NUtil.getMessage("error_locale_null"));
|
||||
}
|
||||
|
||||
// if the component's rendrer type is javax.faces.Text, return
|
||||
// the language label correponding to the received language code (as string) or the received locale
|
||||
else if(component.getRendererType().equalsIgnoreCase("javax.faces.Text"))
|
||||
{
|
||||
ContentFilterLanguagesService contentFilterLanguagesService = (ContentFilterLanguagesService) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "ContentFilterLanguagesService");
|
||||
|
||||
return contentFilterLanguagesService.getLabelByCode(value.toString());
|
||||
}
|
||||
// else don't modify
|
||||
else
|
||||
{
|
||||
return value.toString();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
* 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.ui.repo.tag;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
|
||||
import org.alfresco.web.ui.common.ComponentConstants;
|
||||
import org.alfresco.web.ui.common.tag.HtmlComponentTag;
|
||||
import org.alfresco.web.ui.repo.component.UILanguageSelector;
|
||||
import org.alfresco.web.ui.repo.component.UIMimeTypeSelector;
|
||||
|
||||
/**
|
||||
* Tag class for the Language selector component
|
||||
*
|
||||
* @author yanipig
|
||||
*/
|
||||
public class LanguageSelectorTag extends HtmlComponentTag
|
||||
{
|
||||
/** The value */
|
||||
private String value;
|
||||
|
||||
/** Whether the component is disabled */
|
||||
private String disabled;
|
||||
|
||||
/**
|
||||
* If the value is 'true', only the missing translations of the node will be return
|
||||
* Else returns all the languages
|
||||
*/
|
||||
private String onlyAvailable;
|
||||
|
||||
/**
|
||||
* If the value is 'true', the language of the node will be returned.
|
||||
*
|
||||
* Without effect if <code>onlyAvailable</code> is 'false'
|
||||
*/
|
||||
private String returnCurLgge;
|
||||
|
||||
|
||||
@Override
|
||||
public String getComponentType()
|
||||
{
|
||||
return UILanguageSelector.COMPONENT_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRendererType()
|
||||
{
|
||||
return ComponentConstants.JAVAX_FACES_MENU;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setProperties(UIComponent component)
|
||||
{
|
||||
super.setProperties(component);
|
||||
|
||||
setStringBindingProperty(component, "value", this.value);
|
||||
setBooleanProperty(component, "disabled", this.disabled);
|
||||
|
||||
if(onlyAvailable != null && "true".equalsIgnoreCase(onlyAvailable))
|
||||
{
|
||||
UILanguageSelector lggSelector = (UILanguageSelector) getComponentInstance();
|
||||
lggSelector.setOnlyAvailableLanguages(true);
|
||||
|
||||
if(returnCurLgge != null && "true".equalsIgnoreCase(returnCurLgge))
|
||||
{
|
||||
lggSelector.setReturnCurrentLanguage(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release()
|
||||
{
|
||||
super.release();
|
||||
|
||||
this.value = null;
|
||||
this.disabled = null;
|
||||
this.onlyAvailable = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value
|
||||
*
|
||||
* @param value the value
|
||||
*/
|
||||
public void setValue(String value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether the component should be rendered in a disabled state
|
||||
*
|
||||
* @param disabled true to render the component in a disabled state
|
||||
*/
|
||||
public void setDisabled(String disabled)
|
||||
{
|
||||
this.disabled = disabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether the component should returns each language or only the available
|
||||
* translations of the cuyrrent node.
|
||||
*
|
||||
* @param onlyAvailable
|
||||
*/
|
||||
public void setOnlyAvailable(String onlyAvailable)
|
||||
{
|
||||
this.onlyAvailable = onlyAvailable;
|
||||
}
|
||||
|
||||
public String getOnlyAvailable()
|
||||
{
|
||||
return onlyAvailable;
|
||||
}
|
||||
|
||||
public String getReturnCurLgge() {
|
||||
return returnCurLgge;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether the component should returns the language of the node
|
||||
*
|
||||
* Without effect if <code>onlyAvailable</code> is false.
|
||||
*
|
||||
* @param returnCurLgge
|
||||
*/
|
||||
public void setReturnCurLgge(String returnCurLgge) {
|
||||
this.returnCurLgge = returnCurLgge;
|
||||
}
|
||||
}
|
@@ -4,6 +4,174 @@
|
||||
<faces-config>
|
||||
|
||||
<!-- ==================== MANAGED BEANS ==================== -->
|
||||
<managed-bean>
|
||||
<description>
|
||||
The bean that make a document multilingual
|
||||
</description>
|
||||
<managed-bean-name>MakeMultilingualDialog</managed-bean-name>
|
||||
<managed-bean-class>org.alfresco.web.bean.ml.MakeMultilingualDialog</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>multilingualContentService</property-name>
|
||||
<value>#{MultilingualContentService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>nodeService</property-name>
|
||||
<value>#{NodeService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>fileFolderService</property-name>
|
||||
<value>#{FileFolderService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>searchService</property-name>
|
||||
<value>#{SearchService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>navigator</property-name>
|
||||
<value>#{NavigationBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>browseBean</property-name>
|
||||
<value>#{BrowseBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>dictionaryService</property-name>
|
||||
<value>#{DictionaryService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>namespaceService</property-name>
|
||||
<value>#{NamespaceService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>userPreferencesBean</property-name>
|
||||
<value>#{UserPreferencesBean}</value>
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>
|
||||
The bean that edit the multilinguals properties of a document
|
||||
</description>
|
||||
<managed-bean-name>EditMLContainerDialog</managed-bean-name>
|
||||
<managed-bean-class>org.alfresco.web.bean.ml.EditMLContainerDialog</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>multilingualContentService</property-name>
|
||||
<value>#{MultilingualContentService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>nodeService</property-name>
|
||||
<value>#{NodeService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>fileFolderService</property-name>
|
||||
<value>#{FileFolderService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>searchService</property-name>
|
||||
<value>#{SearchService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>navigator</property-name>
|
||||
<value>#{NavigationBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>browseBean</property-name>
|
||||
<value>#{BrowseBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>dictionaryService</property-name>
|
||||
<value>#{DictionaryService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>namespaceService</property-name>
|
||||
<value>#{NamespaceService}</value>
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>
|
||||
The bean that add a new translation without content
|
||||
</description>
|
||||
<managed-bean-name>AddTranslationWithoutContentDialog</managed-bean-name>
|
||||
<managed-bean-class>org.alfresco.web.bean.ml.AddTranslationWithoutContentDialog</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>nodeService</property-name>
|
||||
<value>#{NodeService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>fileFolderService</property-name>
|
||||
<value>#{FileFolderService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>dictionaryService</property-name>
|
||||
<value>#{DictionaryService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>browseBean</property-name>
|
||||
<value>#{BrowseBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>multilingualContentService</property-name>
|
||||
<value>#{MultilingualContentService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>userPreferencesBean</property-name>
|
||||
<value>#{UserPreferencesBean}</value>
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>
|
||||
The bean that add a translation with a content
|
||||
</description>
|
||||
<managed-bean-name>AddTranslationDialog</managed-bean-name>
|
||||
<managed-bean-class>org.alfresco.web.bean.ml.AddTranslationlDialog</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>multilingualContentService</property-name>
|
||||
<value>#{MultilingualContentService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>userPreferencesBean</property-name>
|
||||
<value>#{UserPreferencesBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>nodeService</property-name>
|
||||
<value>#{NodeService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>fileFolderService</property-name>
|
||||
<value>#{FileFolderService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>searchService</property-name>
|
||||
<value>#{SearchService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>navigator</property-name>
|
||||
<value>#{NavigationBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>browseBean</property-name>
|
||||
<value>#{BrowseBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>contentService</property-name>
|
||||
<value>#{ContentService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>dictionaryService</property-name>
|
||||
<value>#{DictionaryService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>namespaceService</property-name>
|
||||
<value>#{NamespaceService}</value>
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>
|
||||
The bean that backs up the Login screen
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -74,6 +74,11 @@
|
||||
<component-class>org.alfresco.web.ui.repo.component.UIMimeTypeSelector</component-class>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<component-type>org.alfresco.faces.LanguageSelector</component-type>
|
||||
<component-class>org.alfresco.web.ui.repo.component.UILanguageSelector</component-class>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<component-type>org.alfresco.faces.SimpleSearch</component-type>
|
||||
<component-class>org.alfresco.web.ui.repo.component.UISimpleSearch</component-class>
|
||||
@@ -200,6 +205,11 @@
|
||||
<converter-class>org.alfresco.web.ui.repo.converter.MimeTypeConverter</converter-class>
|
||||
</converter>
|
||||
|
||||
<converter>
|
||||
<converter-id>org.alfresco.faces.LanguageConverter</converter-id>
|
||||
<converter-class>org.alfresco.web.ui.repo.converter.LanguageConverter</converter-class>
|
||||
</converter>
|
||||
|
||||
<converter>
|
||||
<converter-id>org.alfresco.faces.DisplayPathConverter</converter-id>
|
||||
<converter-class>org.alfresco.web.ui.repo.converter.DisplayPathConverter</converter-class>
|
||||
|
@@ -985,6 +985,55 @@
|
||||
</attribute>
|
||||
</tag>
|
||||
|
||||
<tag>
|
||||
<name>mlLanguageSelector</name>
|
||||
<tag-class>org.alfresco.web.ui.repo.tag.LanguageSelectorTag</tag-class>
|
||||
<body-content>JSP</body-content>
|
||||
|
||||
<attribute>
|
||||
<name>id</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>binding</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>rendered</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>value</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>disabled</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>onlyAvailable</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
<attribute>
|
||||
<name>returnCurLgge</name>
|
||||
<required>false</required>
|
||||
<rtexprvalue>true</rtexprvalue>
|
||||
</attribute>
|
||||
|
||||
</tag>
|
||||
|
||||
<tag>
|
||||
<name>shelf</name>
|
||||
<tag-class>org.alfresco.web.ui.repo.tag.shelf.ShelfTag</tag-class>
|
||||
|
@@ -498,6 +498,18 @@ a.topToolbarLinkHighlight, a.topToolbarLinkHighlight:link, a.topToolbarLinkHighl
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.langCode
|
||||
{
|
||||
color:#FFFFFF;
|
||||
padding-left:2px;
|
||||
padding-right:2px;
|
||||
letter-spacing:1px;
|
||||
border:1px solid #000000;
|
||||
background-color:#0000FF;
|
||||
font-weight:bolder;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
|
||||
.userGroupPickerList
|
||||
{
|
||||
padding: 2px;
|
||||
|
@@ -55,7 +55,7 @@
|
||||
else if (e) keycode = e.which;
|
||||
if (keycode == 13)
|
||||
{
|
||||
document.forms['browse']['browse:act'].value='browse:' + field;
|
||||
document.forms['browse']['browse:act'].value='browse:' + field;
|
||||
document.forms['browse'].submit();
|
||||
return false;
|
||||
}
|
||||
@@ -393,7 +393,7 @@
|
||||
<div style="display:none"><a:actionLink id="content-apply" value="" actionListener="#{BrowseBean.updateContentPageSize}" /></div>
|
||||
</a:panel>
|
||||
</f:facet>
|
||||
</h:panelGroup>
|
||||
</h:panelGroup>
|
||||
<a:panel id="content-panel" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" styleClass="mainSubTitle"
|
||||
label="#{msg.browse_content}" progressive="true" facetsId="content-panel-facets"
|
||||
expanded='#{BrowseBean.panels["content-panel"]}' expandedActionListener="#{BrowseBean.expandPanel}">
|
||||
@@ -422,6 +422,8 @@
|
||||
</f:facet>
|
||||
<a:actionLink id="col10-act2" value="#{r.name}" href="#{r.url}" target="new" />
|
||||
<r:lockIcon id="col10-lock" value="#{r.nodeRef}" align="absmiddle" />
|
||||
<h:outputLabel value=" " rendered="#{r.lang != null}"/>
|
||||
<h:outputLabel value="#{r.lang}" styleClass="langCode" rendered="#{r.lang != null}"/>
|
||||
<r:nodeInfo id="col10-info" value="#{r.id}">
|
||||
<h:graphicImage id="col10-img" url="/images/icons/popup.gif" styleClass="popupImage" width="16" height="16" />
|
||||
</r:nodeInfo>
|
||||
@@ -434,6 +436,8 @@
|
||||
</f:facet>
|
||||
<a:actionLink id="col11-act2" value="#{r.name}" href="#{r.url}" target="new" styleClass="header" />
|
||||
<r:lockIcon id="col11-lock" value="#{r.nodeRef}" align="absmiddle" />
|
||||
<h:outputLabel value=" " rendered="#{r.lang != null}"/>
|
||||
<h:outputLabel value="#{r.lang}" styleClass="langCode" rendered="#{r.lang != null}"/>
|
||||
<r:nodeInfo id="col11-info" value="#{r.id}">
|
||||
<h:graphicImage id="col11-img" url="/images/icons/popup.gif" styleClass="popupImage" width="16" height="16" />
|
||||
</r:nodeInfo>
|
||||
@@ -446,6 +450,8 @@
|
||||
</f:facet>
|
||||
<a:actionLink id="col12-act2" value="#{r.name}" href="#{r.url}" target="new" styleClass="title" />
|
||||
<r:lockIcon id="col12-lock" value="#{r.nodeRef}" align="absmiddle" />
|
||||
<h:outputLabel value=" " rendered="#{r.lang != null}"/>
|
||||
<h:outputLabel value="#{r.lang}" styleClass="langCode" rendered="#{r.lang != null}"/>
|
||||
<r:nodeInfo id="col12-info" value="#{r.id}">
|
||||
<h:graphicImage id="col12-img" url="/images/icons/popup.gif" styleClass="popupImage" width="16" height="16" />
|
||||
</r:nodeInfo>
|
||||
|
@@ -284,6 +284,108 @@
|
||||
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<%-- Multlingual properties --%>
|
||||
<h:panelGroup id="ml-props-panel-facets">
|
||||
<f:facet name="title">
|
||||
<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write">
|
||||
<a:actionLink id="titleLinkMl" value="#{msg.modify}" showLink="false" image="/images/icons/edit_properties.gif"
|
||||
action="dialog:editMlContainer" />
|
||||
</r:permissionEvaluator>
|
||||
</f:facet>
|
||||
</h:panelGroup>
|
||||
|
||||
<%-- Panel if the node has the multinlingual aspect--%>
|
||||
<a:panel label="#{msg.ml_content_info}" facetsId="ml-props-panel-facets" id="ml-info-panel" progressive="true"
|
||||
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" rendered="#{DocumentDetailsBean.multilingual}"
|
||||
expanded='#{DocumentDetailsBean.panels["ml-info-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
|
||||
|
||||
<%-- properties for Ml container --%>
|
||||
<div style="padding:4px"></div>
|
||||
<h:outputText value="#{msg.properties}" styleClass="nodeWorkflowInfoTitle" style="padding:20px;"/>
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<r:propertySheetGrid id="ml-container-props-sheet" value="#{DocumentDetailsBean.documentMlContainer}"
|
||||
var="mlContainerProps" columns="1" labelStyleClass="propertiesLabel"
|
||||
externalConfig="true" cellpadding="2" cellspacing="2" mode="view"/>
|
||||
|
||||
|
||||
<div style="padding:8px"></div>
|
||||
|
||||
<a:panel label="#{msg.related_translations}" id="related-translation-panel" progressive="true"
|
||||
expanded='#{DocumentDetailsBean.panels["related-translation-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}" styleClass="nodeWorkflowInfoTitle">
|
||||
|
||||
<div style="padding:4px"></div>
|
||||
<%-- list of translations --%>
|
||||
<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 --%>
|
||||
<a:column id="col20" primary="true" width="20" style="padding:2px;">
|
||||
<f:facet name="header">
|
||||
<h:outputText value=""/>
|
||||
</f:facet>
|
||||
<h:graphicImage url="/images/icons/space_small.gif" />
|
||||
</a:column>
|
||||
|
||||
<%-- Name columns --%>
|
||||
<a:column id="col21" width="300" style="text-align:left">
|
||||
<f:facet name="header">
|
||||
<a:sortLink label="#{msg.name}" value="Name" mode="case-insensitive" styleClass="header"/>
|
||||
</f:facet>
|
||||
<a:actionLink id="view-name" value="#{r.name}" href="#{r.url}" target="new" />
|
||||
</a:column>
|
||||
|
||||
<%-- Language columns --%>
|
||||
<a:column id="col22" width="50" style="text-align:left">
|
||||
<f:facet name="header">
|
||||
<a:sortLink label="#{msg.language}" value="language" mode="case-insensitive" styleClass="header"/>
|
||||
</f:facet>
|
||||
<a:actionLink id="view-language" value="#{r.language}" href="#{r.url}" target="new" />
|
||||
</a:column>
|
||||
|
||||
<%-- view actions --%>
|
||||
<a:column id="col25" style="text-align: left">
|
||||
<f:facet name="header">
|
||||
<h:outputText value="#{msg.actions}"/>
|
||||
</f:facet>
|
||||
<a:actionLink id="view-link" value="#{msg.view}" href="#{r.url}" target="new" />
|
||||
</a:column>
|
||||
|
||||
<a:dataPager styleClass="pager" />
|
||||
</a:richList>
|
||||
</a:panel>
|
||||
<%-- Actions add translation --%>
|
||||
<table width="100%" cellspacing="2" cellpadding="15" border="0" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<a:actionLink id="act-add-trans-with-c" value="#{msg.add_translation}" action="addTranslation" actionListener="#{AddTranslationDialog.start}" showLink="true" image="/images/icons/add_tranlsation.gif" />
|
||||
</td>
|
||||
<td>
|
||||
<a:actionLink id="act-add-trans-without-c" value="#{msg.add_translation_wc}" action="dialog:addTranslationWithoutContent" showLink="true" image="/images/icons/add_tranlsation_wc.gif" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
<%-- Panel if the node has not the multinlingual aspect--%>
|
||||
<a:panel label="#{msg.ml_content_info}" id="no-ml-info-panel" progressive="true"
|
||||
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
|
||||
rendered="#{DetailsBean.multilingual == false}"
|
||||
expanded='#{DocumentDetailsBean.panels["ml-info-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
|
||||
<h:outputText id="no-ml-msg" value="#{msg.not_multilingual}<br/><br/>" escape="false" />
|
||||
<%-- Actions add translation --%>
|
||||
<table width="100%" cellspacing="2" cellpadding="15" border="0" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<a:actionLink id="act-make-multilingual" value="#{msg.make_multilingual}" action="dialog:makeMultilingual" showLink="true" image="/images/icons/make_ml.gif" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<h:panelGroup id="workflow-panel-facets">
|
||||
<f:facet name="title">
|
||||
<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write">
|
||||
|
380
source/web/jsp/ml/add-translation-dialog.jsp
Normal file
380
source/web/jsp/ml/add-translation-dialog.jsp
Normal file
@@ -0,0 +1,380 @@
|
||||
<%--
|
||||
* 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 buffer="32kb" contentType="text/html;charset=UTF-8" %>
|
||||
<%@ page isELIgnored="false" %>
|
||||
<%@ page import="javax.faces.context.FacesContext" %>
|
||||
<%@ page import="org.alfresco.web.app.Application" %>
|
||||
<%@ page import="org.alfresco.web.app.servlet.FacesHelper" %>
|
||||
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||
<%@ page import="org.alfresco.web.bean.ml.AddTranslationlDialog" %>
|
||||
<%
|
||||
boolean fileUploaded = false;
|
||||
|
||||
AddTranslationlDialog dialog = (AddTranslationlDialog)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "AddTranslationDialog");
|
||||
|
||||
if (dialog != null && dialog.getFileName() != null)
|
||||
{
|
||||
fileUploaded = true;
|
||||
}
|
||||
%>
|
||||
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<r:page titleId="title_add_content">
|
||||
|
||||
<f:view>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
||||
<h:form acceptcharset="UTF-8" id="add-content-upload-start">
|
||||
|
||||
<%-- Main outer table --%>
|
||||
<table cellspacing="0" cellpadding="2">
|
||||
|
||||
<%-- Title bar --%>
|
||||
<tr>
|
||||
<td colspan="2"><%@ include file="../parts/titlebar.jsp"%>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<%-- Main area --%>
|
||||
<tr valign="top">
|
||||
<%-- Shelf --%>
|
||||
<td><%@ include file="../parts/shelf.jsp"%>
|
||||
</td>
|
||||
|
||||
<%-- Work Area --%>
|
||||
<td width="100%">
|
||||
<table cellspacing="0" cellpadding="0" width="100%">
|
||||
<%-- Breadcrumb --%>
|
||||
<%@ include file="../parts/breadcrumb.jsp"%>
|
||||
|
||||
<%-- Status and Actions --%>
|
||||
<tr>
|
||||
<td
|
||||
style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)"
|
||||
width="4"></td>
|
||||
<td bgcolor="#dfe6ed"><%-- Status and Actions inner contents table --%>
|
||||
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
|
||||
<table cellspacing="4" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td width="32"><h:graphicImage id="dialog-logo"
|
||||
url="/images/icons/add_tranlsation_large.gif" /></td>
|
||||
<td>
|
||||
<div class="mainTitle"><h:outputText
|
||||
value="#{msg.add_translation}" /></div>
|
||||
<div class="mainSubText"><h:outputText
|
||||
value="#{msg.add_translation_description}" /></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td
|
||||
style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)"
|
||||
width="4"></td>
|
||||
</tr>
|
||||
|
||||
<%-- separator row with gradient shadow --%>
|
||||
<tr>
|
||||
<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><img
|
||||
src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif"
|
||||
width="4" height="9"></td>
|
||||
</tr>
|
||||
|
||||
</h:form>
|
||||
|
||||
<%-- Details --%>
|
||||
<tr valign=top>
|
||||
<td
|
||||
style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)"
|
||||
width="4"></td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="3" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="100%" valign="top"><a:errors
|
||||
message="#{msg.error_add_translation_dialog}"
|
||||
styleClass="errorMessage" /> <%
|
||||
if (fileUploaded)
|
||||
{
|
||||
PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc");
|
||||
out.write("<img alt='' align='absmiddle' src='");
|
||||
out.write(request.getContextPath());
|
||||
out.write("/images/icons/info_icon.gif' /> ");
|
||||
out.write(dialog.getFileUploadSuccessMsg());
|
||||
PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner");
|
||||
out.write("<div style='padding:2px;'></div>");
|
||||
}
|
||||
%> <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
|
||||
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<% if (fileUploaded == false) { %>
|
||||
<tr>
|
||||
<td colspan="3" class="wizardSectionHeading"><h:outputText
|
||||
value="#{msg.upload_content}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paddingRow"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="mainSubText" colspan="3"><h:outputText
|
||||
id="text1" value="1. #{msg.locate_content}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paddingRow"></td>
|
||||
</tr>
|
||||
|
||||
<r:uploadForm>
|
||||
<tr>
|
||||
<td colspan="3"><input style="margin-left:12px;"
|
||||
type="file" size="75" name="alfFileInput" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paddingRow"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="mainSubText" colspan="3">2. <%=Application.getMessage(FacesContext.getCurrentInstance(), "click_upload")%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><input style="margin-left:12px;"
|
||||
type="submit"
|
||||
value="<%=Application.getMessage(FacesContext.getCurrentInstance(), "upload")%>" />
|
||||
</td>
|
||||
</tr>
|
||||
</r:uploadForm>
|
||||
<% } %>
|
||||
|
||||
<h:form acceptcharset="UTF-8" id="add-content-upload-end" onsubmit="return validate();">
|
||||
<% if (fileUploaded) { %>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table border="0" cellspacing="2" cellpadding="2"
|
||||
class="selectedItems">
|
||||
<tr>
|
||||
<td colspan="2" class="selectedItemsHeader"><h:outputText
|
||||
id="text2" value="#{msg.uploaded_content}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="selectedItemsRow"><h:outputText id="text3"
|
||||
value="#{AddTranslationDialog.fileName}" /></td>
|
||||
<td><a:actionLink image="/images/icons/delete.gif"
|
||||
value="#{msg.remove}"
|
||||
action="#{AddTranslationDialog.removeUploadedFile}"
|
||||
showLink="false" id="link1" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paddingRow"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="wizardSectionHeading"> <h:outputText
|
||||
id="text4" value="#{msg.general_properties}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paddingRow"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="middle"><h:graphicImage
|
||||
value="/images/icons/required_field.gif"
|
||||
alt="#{msg.required_field}" /></td>
|
||||
<td><h:outputText id="text5" value="#{msg.name}:" /></td>
|
||||
<td width="85%">
|
||||
<h:inputText id="file-name" value="#{AddTranslationDialog.fileName}" maxlength="1024" size="35"
|
||||
onkeyup="checkButtonState();"
|
||||
onchange="checkButtonState();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><h:outputText id="text6" value="#{msg.type}:" /></td>
|
||||
<td><h:selectOneMenu id="object-type" value="#{AddTranslationDialog.objectType}">
|
||||
<f:selectItems value="#{AddTranslationDialog.objectTypes}" />
|
||||
</h:selectOneMenu></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><h:outputText id="text7"
|
||||
value="#{msg.content_type}:" /></td>
|
||||
<td><r:mimeTypeSelector id="mime-type"
|
||||
value="#{AddTranslationDialog.mimeType}" /></td>
|
||||
</tr>
|
||||
<%-- language selection drop-down --%>
|
||||
<tr>
|
||||
<td><h:graphicImage
|
||||
value="/images/icons/required_field.gif"
|
||||
alt="#{msg.required_field}" /></td>
|
||||
<td><h:outputText id="text25" value="#{msg.language}:" />
|
||||
</td>
|
||||
<td>
|
||||
<h:selectOneMenu id="language" value="#{AddTranslationDialog.language}" immediate="false" onchange="checkButtonState();" onkeydown="checkButtonState();" onkeyup="checkButtonState();">
|
||||
<f:selectItem itemLabel="#{msg.select_language}" itemValue="null"/>
|
||||
<f:selectItems value="#{AddTranslationDialog.unusedLanguages}" />
|
||||
</h:selectOneMenu>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<% if (dialog.getOtherPropertiesChoiceVisible()) { %>
|
||||
<tr>
|
||||
<td class="paddingRow"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="wizardSectionHeading"> <h:outputText
|
||||
id="text8" value="#{msg.other_properties}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<table style="padding-top: 2px;">
|
||||
<tr>
|
||||
<td colspan="3"><h:outputText id="text9"
|
||||
value="#{msg.modify_props_help_text}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paddingRow"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h:selectBooleanCheckbox value="#{AddTranslationDialog.showOtherProperties}" />
|
||||
</td>
|
||||
<td width="100%">
|
||||
<h:outputText id="text10" value="#{msg.modify_props_when_page_closes}" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<% } } %>
|
||||
|
||||
</table>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
|
||||
</td>
|
||||
|
||||
<td valign="top">
|
||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %>
|
||||
<table cellpadding="1" cellspacing="1" border="0">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton id="finish-button"
|
||||
styleClass="wizardButton"
|
||||
value="#{msg.ok}"
|
||||
action="#{AddTranslationDialog.finish}"
|
||||
disabled="#{AddTranslationDialog.finishButtonDisabled}"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton id="cancel-button"
|
||||
styleClass="wizardButton"
|
||||
value="#{msg.cancel}"
|
||||
action="#{AddTranslationDialog.cancel}"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td
|
||||
style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)"
|
||||
width="4"></td>
|
||||
</tr>
|
||||
|
||||
<%-- separator row with bottom panel graphics --%>
|
||||
<tr>
|
||||
<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><img
|
||||
src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif"
|
||||
width="4" height="4"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
var finishButtonPressed = false;
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
document.getElementById("add-content-upload-end:finish-button").onclick = function() {finishButtonPressed = true; clear_add_2Dcontent_2Dupload_2Dend();}
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("add-content-upload-end:file-name").value.length == 0
|
||||
|| document.getElementById("add-content-upload-end:language").selectedIndex == 0)
|
||||
{
|
||||
document.getElementById("add-content-upload-end:finish-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("add-content-upload-end:finish-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("add-content-upload-end:file-name"),
|
||||
'<a:outputText id="text11" value="#{msg.validation_invalid_character}" />', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</h:form>
|
||||
</f:view>
|
||||
</r:page>
|
82
source/web/jsp/ml/add-translation-without-content.jsp
Normal file
82
source/web/jsp/ml/add-translation-without-content.jsp
Normal file
@@ -0,0 +1,82 @@
|
||||
<%--
|
||||
* 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.properties}" escape="false" />
|
||||
</h:panelGrid>
|
||||
|
||||
|
||||
<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
|
||||
|
||||
<h:graphicImage value="/images/icons/required_field.gif" alt="#{msg.required_field}" />
|
||||
<h:outputText value="#{msg.name}:"/>
|
||||
<h:inputText id="name" value="#{DialogManager.bean.name}" maxlength="1024" size="35" immediate="false" onkeyup="checkButtonState();" onchange="checkButtonState();"/>
|
||||
|
||||
<h:graphicImage/>
|
||||
<h:outputText value="#{msg.title}:"/>
|
||||
<h:inputText id="title" value="#{DialogManager.bean.title}" maxlength="1024" size="35" immediate="false"/>
|
||||
|
||||
<h:graphicImage/>
|
||||
<h:outputText value="#{msg.description}:"/>
|
||||
<h:inputTextarea id="description" value="#{DialogManager.bean.description}" cols="35" rows="5" immediate="false"/>
|
||||
|
||||
<h:graphicImage value="/images/icons/required_field.gif" alt="#{msg.required_field}" />
|
||||
<h:outputText value="#{msg.author}:"/>
|
||||
<h:inputText id="author" value="#{DialogManager.bean.author}" maxlength="1024" size="35" immediate="false" onkeyup="checkButtonState();" onchange="checkButtonState();"/>
|
||||
|
||||
<h:graphicImage value="/images/icons/required_field.gif" alt="#{msg.required_field}" />
|
||||
<h:outputText value="#{msg.language}:"/>
|
||||
<h:selectOneMenu id="language" value="#{DialogManager.bean.language}" immediate="false" onchange="checkButtonState();" onkeydown="checkButtonState();" onkeyup="checkButtonState();">
|
||||
<f:selectItem itemLabel="#{msg.select_language}" itemValue="null"/>
|
||||
<f:selectItems value="#{DialogManager.bean.unusedLanguages}"/>
|
||||
</h:selectOneMenu>
|
||||
</h:panelGrid>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
|
||||
if (document.getElementById("dialog:dialog-body:name").value.length == 0 ||
|
||||
document.getElementById("dialog:dialog-body:author").value.length == 0 ||
|
||||
document.getElementById("dialog:dialog-body:language").selectedIndex == 0 )
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
38
source/web/jsp/ml/edit-ml-container-dialog.jsp
Normal file
38
source/web/jsp/ml/edit-ml-container-dialog.jsp
Normal file
@@ -0,0 +1,38 @@
|
||||
<%--
|
||||
* 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 Alan 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="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||
|
||||
<h:panelGrid columns="1" rowClasses="wizardSectionHeading, paddingRow"
|
||||
cellpadding="2" cellspacing="2" width="100%">
|
||||
<h:outputText value="#{msg.ml_common_content_properties}" />
|
||||
<r:propertySheetGrid id="ml-props" value="#{DialogManager.bean.editableNode}"
|
||||
var="mlContainerProps" columns="1" labelStyleClass="propertiesLabel"
|
||||
externalConfig="true" cellpadding="2" cellspacing="2" />
|
||||
</h:panelGrid>
|
||||
|
80
source/web/jsp/ml/make-multilingual-dialog.jsp
Normal file
80
source/web/jsp/ml/make-multilingual-dialog.jsp
Normal file
@@ -0,0 +1,80 @@
|
||||
<%--
|
||||
Copyright (C) 2005 Alfresco, Inc.
|
||||
|
||||
Licensed under the Mozilla Public License version 1.1
|
||||
with a permitted attribution clause. You may obtain a
|
||||
copy of the License at
|
||||
|
||||
http://www.alfresco.org/legal/license.txt
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
either express or implied. See the License for the specific
|
||||
language governing permissions and limitations under the
|
||||
License.
|
||||
--%>
|
||||
<%@ 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.ml_common_content_properties}" escape="false" />
|
||||
</h:panelGrid>
|
||||
|
||||
|
||||
<h:panelGrid columns="3" cellpadding="3" cellspacing="3" border="0">
|
||||
<h:graphicImage value="/images/icons/required_field.gif" alt="#{msg.required_field}" />
|
||||
<h:outputText value="#{msg.author}:"/>
|
||||
<h:inputText id="author" value="#{DialogManager.bean.author}" maxlength="1024" size="35" immediate="false" onkeyup="checkButtonState();" onchange="checkButtonState();" />
|
||||
|
||||
<%-- language selection drop-down --%>
|
||||
<h:graphicImage value="/images/icons/required_field.gif" alt="#{msg.required_field}" />
|
||||
<h:outputText value="#{msg.language}:"/>
|
||||
<h:selectOneMenu id="language" value="#{DialogManager.bean.language}" immediate="false" onchange="checkButtonState();" onkeydown="checkButtonState();" onkeyup="checkButtonState();">
|
||||
<f:selectItem itemLabel="#{msg.select_language}" itemValue="null"/>
|
||||
<f:selectItems value="#{DialogManager.bean.filterLanguages}"/>
|
||||
</h:selectOneMenu>
|
||||
</h:panelGrid>
|
||||
|
||||
<h:panelGrid columns="1" cellpadding="3" cellspacing="3" border="0" style="padding-top: 4px;"
|
||||
width="100%" rowClasses="wizardSectionHeading, paddingRow">
|
||||
<h:outputText value="#{msg.ml_other_options}" escape="false" />
|
||||
</h:panelGrid>
|
||||
|
||||
|
||||
<h:panelGrid style="padding-top: 2px;" columns="2">
|
||||
<h:selectBooleanCheckbox id="add_translation" value="#{DialogManager.bean.addTranslationAfter}" onchange="submit();" immediate="false"/>
|
||||
<h:outputText value="#{msg.ml_add_trans_when_diag_close}" />
|
||||
</h:panelGrid>
|
||||
|
||||
<h:panelGrid style="padding-top: 2px;" id="panel_adding_mode" >
|
||||
<h:panelGrid style="padding-top: 4px;padding-left: 15px;">
|
||||
<h:selectOneRadio required="false" value="#{DialogManager.bean.addingMode}" disabled="#{!DialogManager.bean.addTranslationAfter}" immediate="false" id="radioWithContent" layout="pageDirection">
|
||||
<f:selectItem itemValue="ADD_WITH_CONTENT" itemLabel="#{msg.ml_with_content}" itemDisabled="#{!DialogManager.bean.addTranslationAfter}"/>
|
||||
<f:selectItem itemValue="ADD_WITHOUT_CONTENT" itemLabel="#{msg.ml_just_trans_info}" itemDisabled="#{!DialogManager.bean.addTranslationAfter}"/>
|
||||
</h:selectOneRadio>
|
||||
</h:panelGrid>
|
||||
</h:panelGrid>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
|
||||
if (document.getElementById("dialog:dialog-body:author").value.length == 0 ||
|
||||
document.getElementById("dialog:dialog-body:language").selectedIndex == 0 )
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
247
source/web/jsp/ml/ml-container-details.jsp
Normal file
247
source/web/jsp/ml/ml-container-details.jsp
Normal file
@@ -0,0 +1,247 @@
|
||||
<%--
|
||||
* 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="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||
|
||||
<%@ page buffer="64kb" contentType="text/html;charset=UTF-8" %>
|
||||
<%@ page isELIgnored="false" %>
|
||||
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||
|
||||
<r:page titleId="title_file_details">
|
||||
|
||||
<f:view>
|
||||
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
||||
<h:form acceptcharset="UTF-8" id="document-details">
|
||||
|
||||
<%-- Main outer table --%>
|
||||
<table cellspacing="0" cellpadding="2">
|
||||
|
||||
<%-- Title bar --%>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<%@ include file="../parts/titlebar.jsp" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<%-- Main area --%>
|
||||
<tr valign="top">
|
||||
<%-- Shelf --%>
|
||||
<td>
|
||||
<%@ include file="../parts/shelf.jsp" %>
|
||||
</td>
|
||||
|
||||
<%-- Work Area --%>
|
||||
<td width="100%">
|
||||
<table cellspacing="0" cellpadding="0" width="100%">
|
||||
<%-- Breadcrumb --%>
|
||||
<%@ include file="../parts/breadcrumb.jsp" %>
|
||||
|
||||
<%-- Status and Actions --%>
|
||||
<tr>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
|
||||
<td bgcolor="#dfe6ed">
|
||||
|
||||
<%-- Status and Actions inner contents table --%>
|
||||
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
|
||||
<table cellspacing="4" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td width="32">
|
||||
<img src="<%=request.getContextPath()%>/images/icons/details_large.gif" width=32 height=32>
|
||||
</td>
|
||||
<td>
|
||||
<div class="mainTitle">
|
||||
<h:outputText value="#{msg.manage_multilingual_details_for}" /> '<h:outputText value="#{DocumentDetailsBean.name}" />'<r:lockIcon value="#{DocumentDetailsBean.document.nodeRef}" align="absmiddle" />
|
||||
</div>
|
||||
<div class="mainSubText"><h:outputText id="ml-details-description" value="#{msg.manage_multilingual_details_description}" /></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
|
||||
</tr>
|
||||
|
||||
<%-- separator row with gradient shadow --%>
|
||||
<tr>
|
||||
<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><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
|
||||
</tr>
|
||||
|
||||
<%-- Error Messages --%>
|
||||
<tr valign=top>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td>
|
||||
<td>
|
||||
<%-- messages tag to show messages not handled by other specific message tags --%>
|
||||
<a:errors message="" infoClass="statusWarningText" errorClass="statusErrorText" />
|
||||
</td>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width=4></td>
|
||||
</tr>
|
||||
|
||||
<%-- Details --%>
|
||||
<tr valign=top>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="3" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="100%" valign="top">
|
||||
<%-- wrapper comment used by the panel to add additional component facets --%>
|
||||
<h:panelGroup id="dashboard-panel-facets">
|
||||
<f:facet name="title">
|
||||
<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write" id="evalChange">
|
||||
<a:actionLink id="actModify" value="#{msg.modify}" action="dialog:applyTemplate" showLink="false" image="/images/icons/preview.gif" style="padding-right:8px" />
|
||||
<a:actionLink id="actRemove" value="#{msg.remove}" actionListener="#{DocumentDetailsBean.removeTemplate}" showLink="false" image="/images/icons/delete.gif" />
|
||||
</r:permissionEvaluator>
|
||||
</f:facet>
|
||||
</h:panelGroup>
|
||||
|
||||
|
||||
<%--
|
||||
Multlingual details
|
||||
--%>
|
||||
|
||||
<%-- properties for Ml container --%>
|
||||
<h:panelGroup id="ml-props-panel-facets">
|
||||
<f:facet name="title">
|
||||
<r:permissionEvaluator value="#{DocumentDetailsBean.documentMlContainer}" allow="Write">
|
||||
<a:actionLink id="titleLinkMl" value="#{msg.modify}" showLink="false" image="/images/icons/edit_properties.gif"
|
||||
action="dialog:editMlContainer" />
|
||||
</r:permissionEvaluator>
|
||||
</f:facet>
|
||||
</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"/>
|
||||
<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"
|
||||
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
|
||||
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">
|
||||
|
||||
<%-- Icon details view mode --%>
|
||||
<a:column id="col20" primary="true" width="20" style="padding:2px;">
|
||||
<f:facet name="header">
|
||||
<h:outputText value=""/>
|
||||
</f:facet>
|
||||
<h:graphicImage url="/images/icons/space_small.gif" />
|
||||
</a:column>
|
||||
|
||||
<%-- Name Columns --%>
|
||||
<a:column id="col21" width="300" style="text-align:left">
|
||||
<f:facet name="header">
|
||||
<a:sortLink label="#{msg.name}" value="Name" mode="case-insensitive" styleClass="header"/>
|
||||
</f:facet>
|
||||
<a:actionLink id="view-name" value="#{r.name}" href="#{r.url}" target="new" />
|
||||
</a:column>
|
||||
|
||||
<%-- Language columns --%>
|
||||
<a:column id="col22" width="50" style="text-align:left">
|
||||
<f:facet name="header">
|
||||
<a:sortLink label="#{msg.language}" value="language" mode="case-insensitive" styleClass="header"/>
|
||||
</f:facet>
|
||||
<h:outputText id="view-language" value="#{r.language}" />
|
||||
</a:column>
|
||||
|
||||
<%-- view actions --%>
|
||||
<a:column id="col25" style="text-align: left">
|
||||
<f:facet name="header">
|
||||
<h:outputText value="#{msg.actions}"/>
|
||||
</f:facet>
|
||||
<a:actionLink id="view-link" value="#{msg.view}" href="#{r.url}" target="new" />
|
||||
</a:column>
|
||||
|
||||
<a:dataPager styleClass="pager" />
|
||||
</a:richList>
|
||||
</a:panel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td valign="top">
|
||||
|
||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %>
|
||||
<table cellpadding="1" cellspacing="1" border="0" width="100%">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton id="close-btn" value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %>
|
||||
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<%-- Document Actions --%>
|
||||
<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}">
|
||||
<r:actions id="actions_doc" value="Multilingual_details_actions" context="#{DocumentDetailsBean.document}" verticalSpacing="3" style="white-space:nowrap" />
|
||||
</a:panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
|
||||
</tr>
|
||||
|
||||
<%-- separator row with bottom panel graphics --%>
|
||||
<tr>
|
||||
<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><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</h:form>
|
||||
|
||||
</f:view>
|
||||
|
||||
</r:page>
|
@@ -31,8 +31,12 @@
|
||||
<h:panelGrid columns="1" rowClasses="wizardSectionHeading, paddingRow"
|
||||
cellpadding="2" cellspacing="2" width="100%">
|
||||
<h:outputText value="#{msg.space_props}" />
|
||||
|
||||
<r:propertySheetGrid id="space-props" value="#{DialogManager.bean.editableNode}"
|
||||
var="spaceProps" columns="1" labelStyleClass="propertiesLabel"
|
||||
externalConfig="true" cellpadding="2" cellspacing="2" />
|
||||
</h:panelGrid>
|
||||
|
||||
<h:selectBooleanCheckbox value="#{EditSpaceDialog.edit}" id="edit" />
|
||||
<h:outputText value="#{msg.create_properties_close}" />
|
||||
|
||||
|
@@ -0,0 +1,147 @@
|
||||
<%--
|
||||
* 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="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||
|
||||
<f:verbatim>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var finishButtonPressed = false;
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
document.getElementById("dialog:dialog-body:title").focus();
|
||||
document.getElementById("dialog").onsubmit = validate;
|
||||
document.getElementById("dialog:finish-button").onclick = function() {finishButtonPressed = true; clear_dialog();}
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function checkButtonState(){document.getElementById("dialog:finish-button").disabled = false;}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("dialog:dialog-body:title"),
|
||||
'</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" /><f:verbatim>', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="3" class="wizardSectionHeading">
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.properties}" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
</f:verbatim>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.title}:" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:inputText id="title" value="#{CreateMultilingualPropertiesBean.title}" size="35" maxlength="1024" onkeyup="javascript:checkButtonState();" onchange="javascript:checkButtonState();" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
<f:verbatim>
|
||||
<%-- existing properties --%>
|
||||
<h:selectOneMenu id="existingpropertiestitle" value="#{CreateMultilingualPropertiesBean.language}" style="width:150px" >
|
||||
<f:selectItems value="#{CreateMultilingualPropertiesBean.listAllTitlesProperties}" />
|
||||
</h:selectOneMenu>
|
||||
</f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.description}:" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:inputText id="description" value="#{CreateMultilingualPropertiesBean.description}" size="35" maxlength="1024" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
<f:verbatim>
|
||||
<%-- existing properties --%>
|
||||
<h:selectOneMenu id="existingproperties" value="#{CreateMultilingualPropertiesBean.language}" style="width:150px" >
|
||||
<f:selectItems value="#{CreateMultilingualPropertiesBean.listAllDescriptionsProperties}" />
|
||||
</h:selectOneMenu>
|
||||
</f:verbatim>
|
||||
</td>
|
||||
|
||||
</br>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</f:verbatim>
|
||||
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="3" style="padding-left:22px">
|
||||
|
||||
|
||||
<td style="padding-left" >
|
||||
|
||||
<h:selectBooleanCheckbox value="#{CreateMultilingualPropertiesBean.add_new_properties}" id="editnewproperties" />
|
||||
|
||||
<span style="vertical-align:20%"></span>
|
||||
<h:outputText value=" " />
|
||||
|
||||
<h:selectOneMenu id="newlanguage" immediate="true" value="#{CreateMultilingualPropertiesBean.newlanguage}" style="width:80px" >
|
||||
<f:selectItems value="#{CreateMultilingualPropertiesBean.contentFilterLanguages}" />
|
||||
</h:selectOneMenu>
|
||||
|
||||
<h:outputText value=" " />
|
||||
<h:outputText value="#{msg.properties_close}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
173
source/web/jsp/spaces/ml/create-multilingual-space-dialog.jsp
Normal file
173
source/web/jsp/spaces/ml/create-multilingual-space-dialog.jsp
Normal file
@@ -0,0 +1,173 @@
|
||||
<%--
|
||||
* 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="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||
|
||||
<f:verbatim>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var finishButtonPressed = false;
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
document.getElementById("dialog:dialog-body:name").focus();
|
||||
document.getElementById("dialog").onsubmit = validate;
|
||||
document.getElementById("dialog:finish-button").onclick = function() {finishButtonPressed = true; clear_dialog();}
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("dialog:dialog-body:name").value.length == 0 )
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
|
||||
var retour = "";
|
||||
var val = document.getElementById("dialog:dialog-body:name");
|
||||
for(i=0;i < val.length;i++) if(val.charAt(i) != " ") {retour += val.charAt(i)}
|
||||
return validateName(retour,
|
||||
'</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" /><f:verbatim>',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="3" class="wizardSectionHeading">
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.properties}" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="middle">
|
||||
</f:verbatim>
|
||||
<h:graphicImage value="/images/icons/required_field.gif" alt="#{msg.required_field}" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.name}:" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td width="85%">
|
||||
</f:verbatim>
|
||||
<h:inputText id="name" value="#{DialogManager.bean.name}" size="35" maxlength="1024"
|
||||
onkeyup="javascript:checkButtonState();" onchange="javascript:checkButtonState();" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.title}:" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:inputText id="title" value="#{DialogManager.bean.title}" size="35" maxlength="1024" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.description}:" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:inputText id="description" value="#{DialogManager.bean.description}" size="35" maxlength="1024" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.icon}:" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
|
||||
</f:verbatim>
|
||||
<a:imagePickerRadioPanel id="space-icon" columns="6" spacing="4" value="#{DialogManager.bean.icon}"
|
||||
panelBorder="greyround" panelBgcolor="#F5F5F5">
|
||||
<a:listItems value="#{DialogManager.bean.icons}" />
|
||||
</a:imagePickerRadioPanel>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<td style="padding-left">
|
||||
<h:outputText value="#{msg.properties_close}:" />
|
||||
<h:outputText value=" " />
|
||||
<h:selectBooleanCheckbox value="#{CreateMultilingualSpaceDialog.edit}" id="Nedit" />
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h:selectOneMenu id="newlanguage" immediate="true" value="#{CreateMultilingualPropertiesBean.newlanguage}" style="width:80px" >
|
||||
<f:selectItems value="#{CreateMultilingualPropertiesBean.contentFilterLanguages}" />
|
||||
</h:selectOneMenu>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user