//Récupération du répertoire des documents livrables
var versionSpace = space.parent.childByNamePath("Documents livrables");
if (versionSpace != null)
{
//On récupère la liste des enfants de l'espace
var childList = versionSpace.children;
//On copie la liste des fichiers dans un dossier de sauvegarde
var saveSpace = space.childByNamePath("Anciens livrables");
var date = new Date();
var name = "Livrable"+date.getDay()+"-"+date.getMonth()+"-"+date.getYear();
var livrableSpace = saveSpace.createFolder(name);
/*On déplace chaque fils*/
for (var i=0; i<childList.length; i++) {
childList[i].move(livrableSpace);
}
}
<config>
<actions>
<action id="nom_action">
<permissions>
<permission allow="true">Write</permission>
</permissions>
<label-id>label_action</label-id>
<image>/images/extension/nom_image</image>
<script>/Company Home/Data Dictionnary/Scripts/nom_script</script>
<params>
<param name="id">#{actionContext.id}</param>
</params>
</action>
<!– Action group for each space in browse screen –>
<action-group id="space_browse">
<action idref="nom_action" />
</action-group>
</actions>
</config>
Voilà normalement ça doit suffire à créer une action avec une icône qui apparaitra pour chaque espace au même niveau que visualiser les métadonnées. <config>
<actions>
<action id="ViderLivrablesDocuments">
<permissions>
<permission allow="true">Write</permission>
</permissions>
<label-id>ViderLivrablesDocuments</label-id>
<!–image>/images/extension/nom_image</image–>
<script>/Company Home/Data Dictionnary/Scripts/ViderVersionFigee.js</script>
<params>
<param name="id">#{actionContext.id}</param>
</params>
</action>
<!– Action group for each space in browse screen –>
<action-group id="GCA3">
<action idref="ViderLivrablesDocuments" />
</action-group>
</actions>
</config>
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.