SHARE
TWEET

Untitled

a guest Jan 23rd, 2017 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <alfresco-config>
  2.  
  3.     <config evaluator="string-compare" condition="DocumentLibrary">
  4.         <aspects>
  5.             <visible>
  6.                 <aspect name="itdiavgeia:abstractDiavgeia" />
  7.                 <aspect name="itdiavgeia:simpleDiavgeia" />
  8.                 <aspect name="itdiavgeia:diavgeiaPublished" />
  9.                 <aspect name="itdiavgeia:contractDiavgeia" />
  10.             </visible>
  11.         </aspects>
  12.     </config>
  13.  
  14.     <config evaluator="aspect" condition="itdiavgeia:simpleDiavgeia">
  15.         <forms>
  16.             <form>
  17.                 <field-visibility>
  18.                     <!-- fields from my example aspect -->
  19.                     <show id="itdiavgeia:financialYear" />
  20.                     <show id="itdiavgeia:budgettype" />
  21.                     <show id="itdiavgeia:entryNumber" />
  22.                     <show id="itdiavgeia:partialead" />
  23.                 </field-visibility>
  24.             </form>
  25.         </forms>
  26.     </config>
  27.  
  28.     <config evaluator="aspect" condition="itdiavgeia:diavgeiaPublished">
  29.         <forms>
  30.             <form>
  31.                 <field-visibility>
  32.                     <!-- fields from my example aspect -->
  33.                     <show id="itdiavgeia:ada" />
  34.                     <show id="itdiavgeia:submissionTimestamp" />
  35.                     <show id="itdiavgeia:versionId" />
  36.                     <show id="itdiavgeia:status" />
  37.                     <show id="itdiavgeia:url" />
  38.                     <show id="itdiavgeia:documentUrl" />
  39.                 </field-visibility>
  40.             </form>
  41.         </forms>
  42.     </config>
  43.  
  44.     <config evaluator="aspect" condition="itdiavgeia:abstractDiavgeia">
  45.         <forms>
  46.             <!-- Default form configuration used on the document details and edit
  47.                 metadata pages -->
  48.             <form>
  49.                 <field-visibility>
  50.                     <show id="cm:name" />
  51.                     <show id="cm:title" />
  52.                     <show id="cm:description" />
  53.                     <show id="cm:categories" />
  54.                     <show id="itdiavgeia:subject" />
  55.                     <show id="itdiavgeia:protocolNumber" />
  56.                     <show id="itdiavgeia:organizationId" />
  57.                     <show id="itdiavgeia:thematicCategoryIds" />
  58.                     <show id="itdiavgeia:decisionTypeId" />
  59.                     <show id="itdiavgeia:unitIds" />
  60.                     <show id="itdiavgeia:signerIds" />
  61.                 </field-visibility>
  62.                 <appearance>
  63.                     <field id="cm:categories">
  64.                         <control>
  65.                             <control-param name="compactMode">true</control-param>
  66.                         </control>
  67.                     </field>
  68.                 </appearance>
  69.             </form>
  70.  
  71.             <form id="search">
  72.                 <field-visibility>
  73.                     <show id="cm:name" />
  74.                     <show id="cm:title" />
  75.                     <show id="cm:description" />
  76.                     <show id="cm:categories" force="true" />
  77.                     <show id="itdiavgeia:subject" />
  78.                     <show id="itdiavgeia:protocolNumber" />
  79.                     <show id="itdiavgeia:organizationId" />
  80.                     <show id="itdiavgeia:thematicCategoryIds" />
  81.                     <show id="itdiavgeia:decisionTypeId" />
  82.                     <show id="itdiavgeia:unitIds" />
  83.                     <show id="itdiavgeia:signerIds" />
  84.                 </field-visibility>
  85.                 <appearance>
  86.                     <field id="cm:categories">
  87.                         <control>
  88.                             <control-param name="compactMode">true</control-param>
  89.                         </control>
  90.                     </field>
  91.                 </appearance>
  92.             </form>
  93.         </forms>
  94.     </config>
  95.  
  96.    
  97.     <!-- DocLibAction publishdecision : start -->
  98.    
  99.     <!-- tooo much for indicators, not needed in this case -->
  100.     <config evaluator="string-compare" condition="DocumentLibrary">
  101.         <indicators>
  102.             <indicator id="it.share.doclib.action.indicator.isPushishedContractToDiavgeia"
  103.                        icon="diavgeia"
  104.                        index="100"
  105.                        label="doclib.action.publishdecision.label">
  106.                 <evaluator>it.share.doclib.action.evaluator.isPushishedContractToDiavgeia</evaluator>
  107.             </indicator>
  108.         </indicators>
  109.     </config>
  110.                
  111.     <!--config evaluator="string-compare" condition="DocLibCustom">
  112.         <dependencies>
  113.             <js src="components/documentlibrary/edu/auth/components/custom-doclib-actions-publishdecision.js" />
  114.         </dependencies>
  115.     </config-->
  116.    
  117.     <config evaluator="string-compare" condition="DocLibActions">
  118.         <actions>
  119.             <!-- id: the global identifier for this action -->
  120.             <!-- type: link | pagelink | javascript | -->
  121.             <action id="doclib.action.publishdecision"
  122.                       icon="document-move-to"
  123.                       type="javascript"
  124.                       label="doclib.action.publishdecision.label"> <!-- add-doclib-actions-custom.properties -->
  125.              <!--  notAspect="smf:smartFolder,smf:smartFolderChild"  -->
  126.    
  127.              <!--  There can be one or more parameters set for an action. In case of a javascript action
  128.                     they will be passed into the Java Script code, there is one special parameter with the name 'function'
  129.                     that sets the Java Script function that should be called when the action is executed.
  130.                     onActionCallWebScript -->
  131.              <param name="function">onActionFormDialog</param>
  132.              <!-- Additional parameters iff onFormDialog function -->
  133.              <param name="itemKind">action</param>
  134.              <param name="itemId">publish-contract-action-executer</param> <!-- Repository action id = Spring Bean id -->
  135.              <param name="mode">create</param>
  136.              <param name="destination">{node.nodeRef}</param>
  137.              <param name="successMessage">doclib.action.publishdecision.msg.success</param>
  138.              <param name="failureMessage">doclib.action.publishdecision.msg.failure</param>
  139.    
  140.               <!-- Spring Bean id for an evaluator that is called by the system to find out if the action
  141.                 should be visible or not in the UI.
  142.                 An evaluator extends the org.alfresco.web.evaluator.BaseEvaluator class.
  143.                 You can negate the result of calling the evaluator by setting the negate attribute to true: <evaluator negate="true">
  144.                 In our case we just set it to true, till requirements change. -->
  145.                 <!--<evaluator>it.share.doclib.action.evaluator.canPushishContractToDiavgeia</evaluator>-->
  146.                 <!--<evaluator negate="true">it.share.doclib.action.evaluator.isPushishedContractToDiavgeia</evaluator>-->
  147.             </action>
  148.         </actions>
  149.                      
  150.         <!-- Define where in the user interface the Send-to-protocol action should be displayed.
  151.                 document-browse | document-details | folder-browse | folder-details | document-link-browse |
  152.                 document-link-details | folder-link-browse | folder-link-details -->
  153.         <!-- share-documentlibrary-config.xml configuration file contains the highest index for each group -->
  154.         <actionGroups>
  155.             <actionGroup id="empty"/>
  156.             <actionGroup id="document-browse">
  157.                 <action index="500" id="doclib.action.publishdecision" />
  158.             </actionGroup>
  159.             <actionGroup id="document-details">
  160.                 <!-- add action button on the top -->
  161.                 <action index="500" id="doclib.action.publishdecision" />
  162.                 <!-- evaluator>it.share.doclib.action.evaluator.canSendToProtocol</evaluator-->
  163.             </actionGroup>
  164.         </actionGroups>
  165.     </config>
  166.  
  167.     <!-- if you wand to add a form in the action -->
  168.     <config evaluator="string-compare"
  169.         condition="publish-contract-action-executer"> <!-- ID for the Repository Action that this form is associated with -->
  170.         <forms>
  171.             <form>
  172.                 <field-visibility>
  173.                     <show id="afm"/>
  174.                     <show id="name"/>
  175.                     <show id="amount"/>
  176.                     <show id="duration"/>
  177.                     <show id="username"/>
  178.                     <show id="password"/>
  179.                 </field-visibility>
  180.                 <appearance>
  181.                     <field id="afm" label-id="doclib.action.publishdecision.form.field.afm" mandatory="true" set="text"/>
  182.                     <field id="name" label-id="doclib.action.publishdecision.form.field.name" mandatory="true" set="text"/>
  183.                     <field id="duration" label-id="doclib.action.publishdecision.form.field.duration" mandatory="true" set="text"/>
  184.                     <field id="amount" label-id="doclib.action.publishdecision.form.field.duration" mandatory="true" set="number"/>
  185.                     <field id="username" label-id="doclib.action.publishdecision.form.field.username" mandatory="true" set="text"/>
  186.                     <field id="password" label-id="doclib.action.publishdecision.form.field.pass" mandatory="true" set="text">
  187.  
  188.                     </field>
  189.                 </appearance>
  190.             </form>
  191.         </forms>
  192.     </config>
  193.     <!-- DocLibAction publishdecision : end -->            
  194.                
  195. </alfresco-config>
RAW Paste Data
Top