Platform Explorer / CMF 1.8

Component org.nuxeo.cm.actions

Contributions

XML Source

<?xml version="1.0" encoding="UTF-8"?>
<component name="org.nuxeo.cm.actions">

  <require>org.nuxeo.ecm.platform.actions</require>
  <require>org.nuxeo.ecm.platform.notifications.web.actions</require>
  <require>org.nuxeo.ecm.platform.actions.relations.web</require>
  <require>org.nuxeo.ecm.platform.forum.actions</require>
  <require>org.nuxeo.ecm.platform.comment.actions</require>
  <require>org.nuxeo.ecm.platform.userworkspace.actions</require>
  <require>org.nuxeo.ecm.platform.routing.actions</require>
  <require>org.nuxeo.ecm.user.center.actions</require>

  <extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="actions">

    <!-- Disable POPUP Actions -->
    <action id="POPUP_EDIT" enabled="false" />
    <action id="POPUP_COPY" enabled="false" />
    <action id="POPUP_PASTE" enabled="false" />
    <action id="POPUP_MOVE" enabled="false" />
    <action id="POPUP_RENAME" enabled="false" />
    <action id="POPUP_DEL" enabled="false" />
    <action id="POPUP_RIGHTS" enabled="false" />
    <action id="POPUP_WORKFLOW" enabled="false" />
    <action id="POPUP_DOCUMENT_LOCK" enabled="false" />
    <action id="POPUP_DOCUMENT_UNLOCK" enabled="false" />

    <!-- add back login/logout + personal workspace links (see NXP-6418) -->
    <action id="documents" link="view_documents"
      label="label.main.tab.case.management" order="40">
      <category>MAIN_TABS</category>
    </action>
    <action id="home" enabled="true" />
    <!-- end of login/logout actions -->

    <!-- Actions for the document selection -->

    <action id="CASEMANAGEMENT_CURRENT_SELECTION_DELETE"
      link="#{cmCaseActions.purgeCaseSelection}" label="command.deleteDocs"
      icon="" help="comand.deleteDocs.help"
      confirm="if( !confirmDeleteDocumentsForever() ) return false;">
      <category>CASE_MANAGEMENT_CURRENT_SELECTION_LIST</category>
      <filter id="candDeleteDrafts">
        <rule grant="true">
          <condition>#{cmCaseActions.canPurge}</condition>
        </rule>
      </filter>
    </action>

    <action id="CASEMANAGEMENT_CURRENT_SELECTION_OPEN" enabled="false"
      link="#{cmCaseActions.followTranstionCaseSelection('open')}"
      label="command.cm.open" icon="" help="comand.cm.open.help">
      <category>CASE_MANAGEMENT_CURRENT_SELECTION_LIST</category>
      <filter id="canOpenCase">
        <rule grant="true">
          <condition>
            #{cmCaseActions.canCaseSelectionFollowTransition('open')}
          </condition>
        </rule>
      </filter>
    </action>

    <action id="CASEMANAGEMENT_CURRENT_SELECTION_PROCESS" enabled="false"
      link="#{cmCaseActions.followTranstionCaseSelection('process')}"
      label="command.cm.process" icon="" help="comand.cm.process.help">
      <category>CASE_MANAGEMENT_CURRENT_SELECTION_LIST</category>
      <filter id="canProcessCase">
        <rule grant="true">
          <condition>
            #{cmCaseActions.canCaseSelectionFollowTransition('process')}
          </condition>
        </rule>
      </filter>
    </action>

    <action id="CASEMANAGEMENT_CURRENT_SELECTION_ARCHIVE" enabled="false"
      link="#{cmCaseActions.followTranstionCaseSelection('archive')}"
      label="command.cm.archive" icon="" help="comand.cm.archive.help">
      <category>CASE_MANAGEMENT_CURRENT_SELECTION_LIST</category>
      <filter id="canArchiveCase">
        <rule grant="true">
          <condition>
            #{cmCaseActions.canCaseSelectionFollowTransition('archive')}
          </condition>
        </rule>
      </filter>
    </action>

    <!-- filter out some actions -->

    <action id="TAB_MY_SUBSCRIPTIONS">
      <filter-id>isNotCaseItemOrCase</filter-id>
    </action>

    <action id="TAB_MANAGE_SUBSCRIPTIONS">
      <filter-id>isNotCaseItemOrCase</filter-id>
    </action>

    <!-- action id="TAB_EDIT">
      <filter-id>isNotCaseItemOrCase</filter-id>
      </action>
      
      <action id="TAB_METADATA_VIEW">
      <filter-id>isNotCaseItemOrCase</filter-id>
      </action>
      
      <action id="TAB_METADATA_EDIT">
      <filter-id>isNotCaseItemOrCase</filter-id>
      </action -->

    <!-- remove useless -->
    <action id="newDocument">
      <filter-id>isNotCmCase</filter-id>
      <filter-id>isNotCaseItem</filter-id>
      <filter-id>isNotMailbox</filter-id>
    </action>
    <action id="newFile" enabled="false" />
    <action id="TAB_CONTENT">
      <filter-id>hideFromMailbox</filter-id>
      <filter-id>isNotCmCase</filter-id>
    </action>
    <action id="TAB_EDIT">
      <filter-id>hideFromMailbox</filter-id>
    </action>
    <action id="TAB_MY_SUBSCRIPTIONS">
      <filter-id>hideFromMailbox</filter-id>
    </action>
    <action id="TAB_CONTENT_HISTORY">
      <filter-id>hideFromMailbox</filter-id>
    </action>

    <!-- case/case item tab actions -->
    <!-- redefine some tabs -->
    <action id="TAB_VIEW">
      <filter-id>isNotCaseItemOrCase</filter-id>
    </action>
    <action id="TAB_CASE_MANAGEMENT_VIEW"
      link="/casemanagement/caseitem/tabs/document_properties.xhtml" order="10"
      label="label.casemanagement.tab.properties">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>isCaseItemOrCase</filter-id>
    </action>

    <action id="TAB_RELATIONS">
      <filter-id>isNotCaseItemOrCase</filter-id>
    </action>
    <action id="TAB_CASE_MANAGEMENT_RELATIONS"
      link="/casemanagement/caseitem/tabs/document_relations.xhtml" order="30"
      label="label.casemanagement.tab.relations">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>isCaseItemOrCase</filter-id>
    </action>

    <action id="CM_TAB_FILES_EDIT"
      link="/casemanagement/caseitem/tabs/document_files_edit.xhtml" order="43"
      label="action.view.files">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>canEditCase</filter-id>
      <filter-id>canEditCaseItem</filter-id>
      <filter-id>mutable_document</filter-id>
      <filter-id>isCaseItemOrCase</filter-id>
    </action>

    <action id="TAB_FILES_EDIT">
      <filter-id>isNotCaseItemOrCase</filter-id>
    </action>

    <action id="CASE_ITEM_CREATE"
      link="#{cmDocumentActions.createCaseItemInCase}" label="command.create"
      order="0">
      <category>CASE_ITEM_CREATE_BOTTOM_LIST</category>
    </action>

    <action id="CANCEL_CASE_ITEM_CREATE" link="#{navigationContext.goBack()}"
      order="10" label="command.cancel" immediate="true">
      <category>CASE_ITEM_CREATE_BOTTOM_LIST</category>
    </action>

    <action id="EMPTY_CASE_CREATE" link="#{cmDocumentActions.createEmptyCase}"
      label="command.create" order="0">
      <category>EMPTY_CASE_CREATE_BOTTOM_LIST</category>
    </action>

    <action id="CANCEL_CASE_CREATE" link="#{navigationContext.goBack()}"
      order="10" label="command.cancel" immediate="true">
      <category>EMPTY_CASE_CREATE_BOTTOM_LIST</category>
    </action>

    <action id="TAB_CONTENT_HISTORY">
      <filter-id>isNotCaseItemOrCase</filter-id>
    </action>
    <action id="TAB_CASE_MANAGEMENT_HISTORY"
      link="/casemanagement/caseitem/tabs/document_history.xhtml" order="50"
      label="label.casemanagement.tab.history">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>isCaseItemOrCase</filter-id>
    </action>
    <action id="TAB_CASE_MANAGEMENT_ROUTING_HISTORY"
      link="/casemanagement/case/tabs/document_routing_history.xhtml" order="55"
      label="label.casemanagement.tab.history.routing">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>isCmCase</filter-id>
    </action>

    <action id="TAB_PREVIEW">
      <filter-id>isNotCaseItemOrCase</filter-id>
    </action>
    <action id="TAB_CASE_MANAGEMENT_PREVIEW"
      link="/casemanagement/caseitem/tabs/document_annotation_preview.xhtml"
      enabled="true" order="200" label="label.document.preview"
      icon="/icons/file.gif">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>isCaseItemOrCase</filter-id>
      <filter-id>isCurrentCaseItemPreviewAvailable</filter-id>
    </action>

    <!-- Mailbox Actions -->
    <action id="newMailbox" link="#{documentActions.createDocument('Mailbox')}"
      enabled="true" label="label.casemanagement.createMailbox"
      icon="/icons/action_add.gif">
      <category>SUBVIEW_UPPER_LIST</category>
      <filter-id>newCmMailbox</filter-id>
    </action>

    <action id="editMailbox"
      link="/casemanagement/mailbox/tabs/mailbox_edit.xhtml" order="20"
      label="label.casemanagement.editMailbox" enabled="true"
      icon="/icons/file.gif">
      <category>MANAGE_MAILBOX_ACTION_LIST</category>
    </action>

    <action id="TAB_MAILBOX_DELEGATION"
      link="/casemanagement/mailbox/tabs/mailbox_delegation_content.xhtml"
      order="21" label="label.casemanagement.delegationMailbox" enabled="true"
      icon="/icons/file.gif">
      <category>MANAGE_MAILBOX_ACTION_LIST</category>

    </action>

    <action id="TAB_MAILBOX_MAILINGLIST"
      link="/casemanagement/mailbox/tabs/mailbox_mailing_list.xhtml" order="30"
      label="label.casemanagement.mailingList" enabled="true"
      icon="/icons/file.gif">
      <category>MANAGE_MAILBOX_ACTION_LIST</category>

    </action>

    <!-- Mailbox View Action -->
    <action id="TAB_MAILBOX_INBOX"
      link="/casemanagement/mailbox/tabs/mailbox_inbox_content.xhtml" order="20"
      label="label.casemanagement.inboxMailbox" enabled="true"
      icon="/icons/file.gif">
      <category>VIEW_MAILBOX_ACTION_LIST</category>
    </action>

    <action id="TAB_MAILBOX_SERVICE"
      link="/casemanagement/mailbox/tabs/mailbox_service_content.xhtml"
      order="21" label="label.casemanagement.serviceMailbox" enabled="true"
      icon="/icons/file.gif">
      <category>VIEW_MAILBOX_ACTION_LIST</category>
      <filter-id>isGenericMailbox</filter-id>
    </action>

    <action id="TAB_MAILBOX_SENT"
      link="/casemanagement/mailbox/tabs/mailbox_sent_content.xhtml" order="22"
      label="label.casemanagement.sentMailbox" enabled="true"
      icon="/icons/file.gif">
      <category>VIEW_MAILBOX_ACTION_LIST</category>
    </action>

    <action id="TAB_MAILBOX_DRAFT"
      link="/casemanagement/mailbox/tabs/mailbox_draft_content.xhtml" order="23"
      label="label.casemanagement.draftMailbox" enabled="true"
      icon="/icons/file.gif">
      <category>VIEW_MAILBOX_ACTION_LIST</category>
      <filter-id>canCreateCase</filter-id>
    </action>

    <action id="SHOW_MANAGE_MAILBOX_ACTION"
      link="/casemanagement/mailbox/mailbox_manage.xhtml"
      label="label.casemanagement.action.manage" enabled="true" order="24">
      <category>VIEW_MAILBOX_ACTION_LIST</category>
    </action>
    <!-- Case Management actions -->

    <action id="distribute_cm_case"
      link="/casemanagement/caseitem/tabs/distribute_cm_case.xhtml"
      label="label.casemanagement.action.distributionRequest"
      icon="/icons/case-management_distribute.gif" order="10">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>isNotCaseItem</filter-id>
      <filter-id>canDistributeCase</filter-id>
    </action>

    <action id="choose_particitants"
      link="/casemanagement/caseitem/chose_participants.xhtml"
      label="label.casemanagement.action.mailboxes"
      icon="/icons/case-management_distribute.gif" order="10">
      <category>distribute_cm_case_sub_tab</category>
      <filter-id>canDistributeCase</filter-id>
    </action>

    <action id="choose_mailinglist"
      link="/casemanagement/caseitem/choose_mailinglist.xhtml"
      label="label.casemanagement.action.choosemailinglist"
      icon="/icons/case-management_distribute.gif" order="10">
      <category>distribute_cm_case_sub_tab</category>
      <filter-id>canDistributeCase</filter-id>
    </action>

    <action id="distributeAction" enabled="true"
      link="#{cmDistributionActions.validateWizard}"
      label="label.casemanagement.distribution.send" order="10">
      <category>DISTRIBUTION_ACTION_BOTTOM_LIST</category>
    </action>

    <action id="cancelDistribution" enabled="true"
      link="#{cmDistributionActions.cancelWizard}" label="command.cancel"
      order="20">
      <category>DISTRIBUTION_ACTION_BOTTOM_LIST</category>
    </action>

    <action id="addCaseItem"
      link="javascript:Richfaces.showModalPanel('selectDocTypePanel');"
      label="action.new.document" enabled="true">
      <category>CASE_ACTION_UPPER_LIST_HREF</category>
      <filter-id>isCmCase</filter-id>
      <filter-id>canEditCase</filter-id>
    </action>
    <!-- End Mail Distribution actions -->
    <!-- remove usual comment tab for correspondance documents -->
    <action id="view_comments">
      <filter-id>isNotCaseItemOrCase</filter-id>
    </action>

    <action id="TAB_CASE_MANAGEMENT_COMMENTS"
      link="/incl/tabs/document_comments.xhtml" enabled="true" order="80"
      label="action.view.comments">
      <category>VIEW_ACTION_LIST</category>
      <filter-id>isEmptyCase</filter-id>
      <filter-id>mutable_document</filter-id>
      <filter-id>not_anonymous</filter-id>
    </action>

    <action id="newComment" link="#{commentManagerActions.addComment}"
      enabled="true" label="command.add">
      <category>CASE_MANAGEMENT_COMMENT_ACTIONS</category>
    </action>

    <action id="cancelComment" link="#{commentManagerActions.cancelComment}"
      enabled="true" label="command.cancel">
      <category>CASE_MANAGEMENT_COMMENT_ACTIONS</category>
    </action>

    <!-- end of envelope/document tab actions -->

    <!-- Mailbox Management Actions -->
    <action id="TAB_MAILBOX_PLANS"
      link="/casemanagement/mailbox/tabs/mailbox_plans_content.xhtml" order="25"
      label="label.casemanagement.plansMailbox" enabled="true"
      icon="/icons/file.gif">
      <category>MANAGE_MAILBOX_ACTION_LIST</category>

    </action>

    <action id="newCaseItemDocument"
      link="javascript:Richfaces.showModalPanel('selectMailboxDocTypePanel');"
      label="action.new.document" enabled="true">
      <category>DRAFT_ACTION_UPPER_LIST_HREF</category>
      <filter-id>canCreateCase</filter-id>
    </action>

    <!-- End of Mailbox Management Actions -->


    <action id="TAB_DISTRIBUTION_PARTICIPANTS"
      link="/casemanagement/caseitem/tabs/distribute_cm_case.xhtml"
      label="label.casemanagement.action.distributionRequest"
      icon="/icons/case-management_distribute.gif" order="10">
      <category>DISTRIBUTION_CASE_ACTION_LIST</category>
      <filter-id>isCmCase</filter-id>
    </action>

    <action id="TAB_DISTRIBUTION_FAVORITES"
      link="/incl/tabs/document_content.xhtml"
      label="label.casemanagement.action.distributionFavorites"
      icon="/icons/case-management_distribute.gif" order="10">
      <category>DISTRIBUTION_CASE_ACTION_LIST</category>
      <filter-id>isCmCase</filter-id>
    </action>

    <action id="TAB_DISTRIBUTION_LISTS" link="/incl/tabs/document_content.xhtml"
      label="label.casemanagement.action.distributionLists"
      icon="/icons/case-management_distribute.gif" order="10">
      <category>DISTRIBUTION_CASE_ACTION_LIST</category>
      <filter-id>isCmCase</filter-id>
    </action>

    <!-- routing action -->

    <action id="ADD_STEP_BEFORE"
      link="javascript:document.getElementById('caseView:selectRouteElementsTypeForCreationForm:hiddenDocOrder').value = 'before';Richfaces.showModalPanel('selectRouteElementsTypePanel');" />

    <action id="ADD_STEP_AFTER"
      link="javascript:document.getElementById('caseView:selectRouteElementsTypeForCreationForm:hiddenDocOrder').value = 'after';Richfaces.showModalPanel('selectRouteElementsTypePanel');" />

    <action id="ADD_STEP_BETWEEN"
      link="javascript:document.getElementById('caseView:selectRouteElementsTypeForCreationForm:hiddenDocOrder').value = 'in';Richfaces.showModalPanel('selectRouteElementsTypePanel');" />

    <!-- hide profile for Administrator user -->
    <action id="Profile" >
      <filter-id>isNotVirtualUser</filter-id>
    </action>
    
  </extension>

  <extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="filters">

    <filter id="isNotVirtualUser">
      <rule grant="false">
        <condition>#{cmVirtualUserManager.isCurrentUserVirtual()}</condition>
      </rule>
    </filter>

    <filter id="newCmMailbox">
      <rule grant="true">
        <permission>AddChildren</permission>
        <type>MailboxRoot</type>
      </rule>
    </filter>

    <filter id="canCreateCase">
      <rule grant="true">
        <condition>
          #{cmMailboxActions.getCurrentMailboxHasProfile('cellule_courrier')}
        </condition>
      </rule>
    </filter>

    <filter id="isCmCase">
      <rule grant="true">
        <facet>Distributable</facet>
      </rule>
      <rule grant="false">
        <facet>CaseGroupable</facet>
      </rule>
    </filter>

    <filter id="isCmInitialCase">
      <rule grant="true">
        <facet>Distributable</facet>
        <condition>#{cmCaseActions.isInitialCase()}</condition>
      </rule>
      <rule grant="false">
        <facet>CaseGroupable</facet>
      </rule>
    </filter>

    <filter id="isDraft">
      <rule grant="true">
        <facet>Distributable</facet>
        <condition>#{currentCase.isDraft()}</condition>
      </rule>
      <rule grant="false">
        <facet>CaseGroupable</facet>
      </rule>
    </filter>

    <filter id="isNotDraft">
      <rule grant="false">
        <facet>Distributable</facet>
        <condition>#{currentCase.isDraft()}</condition>
      </rule>
    </filter>

    <filter id="isNotCmInitialCase">
      <rule grant="true">
        <facet>Distributable</facet>
      </rule>
      <rule grant="false">
        <condition>#{cmCaseActions.isInitialCase()}</condition>
      </rule>
    </filter>

    <filter id="isMailbox">
      <rule grant="true">
        <facet>Mailbox</facet>
      </rule>
    </filter>

    <filter id="isNotMailbox">
      <rule grant="false">
        <facet>Mailbox</facet>
      </rule>
    </filter>

    <filter id="isNotCmCase">
      <rule grant="false">
        <facet>Distributable</facet>
      </rule>
    </filter>

    <filter id="isCaseItem">
      <rule grant="true">
	 <condition>#{cmDocumentActions.isCaseItem()}</condition>
      </rule>
    </filter>

    <filter id="isNotCaseItem">
      <rule grant="false">
      	<condition>#{cmDocumentActions.isCaseItem()}</condition>
      </rule>
    </filter>

    <filter id="isCaseItemOrCase">
      <rule grant="true">
        <facet>Distributable</facet>
      </rule>
    </filter>

    <filter id="isNotCaseItemOrCase">
      <rule grant="false">
        <facet>Distributable</facet>
      </rule>
    </filter>

    <filter id="hideFromMailbox">
      <rule grant="false">
        <facet>Mailbox</facet>
      </rule>
    </filter>

    <filter id="isGenericMailbox">
      <rule grant="true">
        <condition>#{cmMailboxActions.isGenericMailbox()}</condition>
      </rule>
    </filter>

    <filter id="canDistributeCase">
      <rule grant="true">
        <condition>#{cmDistributionActions.canDistributeCase()}</condition>
      </rule>
    </filter>

    <filter id="canEditCaseItem">
      <rule grant="true">
        <condition>#{cmDocumentActions.canEditCurrentCaseItem}</condition>
      </rule>
    </filter>

    <filter id="canEditCase">
      <rule grant="true">
        <condition>#{cmCaseActions.canEditCurrentCase}</condition>
      </rule>
    </filter>

    <filter id="isCurrentCaseItemPreviewAvailable">
      <rule grant="true">
        <condition>
          #{cmDocumentActions.isCurrentCaseItemPreviewAvailable()}
        </condition>
      </rule>
    </filter>

    <filter id="isEmptyCase">
      <rule grant="false">
        <condition>#{cmCaseActions.isEmptyCase()}</condition>
      </rule>
    </filter>

  </extension>

</component>