<?xml version="1.0" encoding="UTF-8"?>
<meta id="meta.user" label="CONF_MESSAGE[Text Metadata]" description="CONF_MESSAGE[Simple metadata implementation stored in a hidden file.]"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
	<class_definition filename="plugins/meta.user/UserMetaManager.php" classname="Pydio\Access\Meta\UserGenerated\UserMetaManager"/>
	<client_settings icon="plugins/access.mysql/resources/images/mysql_icon.png">
		<resources>
			<i18n namespace="meta.user" path="plugins/meta.user/i18n" />
			<js file="plugins/meta.user/class.MetaCellRenderer.js" className="MetaCellRenderer"/>
			<js file="plugins/meta.user/js/build/ReactMeta.js" className="ReactMeta"/>
		</resources>
	</client_settings>
	<server_settings>
		<!--<param name="meta_file_name" type="string" label="CONF_MESSAGE[Meta File]" description="CONF_MESSAGE[Hidden file used inside folders to save meta data]" mandatory="true" default=".ajxp_meta"/>-->
		<param name="meta_fields" type="string" replicationTitle="Fields Definitions" replicationDescription="List fields and their associated types to be associated with data" replicationMandatory="true" replicationGroup="group1" label="CONF_MESSAGE[Field ID]" description="CONF_MESSAGE[Id of fiels, use standard characters here.]" mandatory="true" default="comment_field"/>
		<param name="meta_labels" type="string" replicationGroup="group1" label="CONF_MESSAGE[Label]" description="CONF_MESSAGE[Label of the field, human friendly]" mandatory="true" default="My Comments"/>
		<param name="meta_types" type="select" choices="string|CONF_MESSAGE[Short text],textarea|CONF_MESSAGE[Long text],creator|CONF_MESSAGE[Created by...],updater|CONF_MESSAGE[Last updated by...],stars_rate|CONF_MESSAGE[Stars Rating],css_label|CONF_MESSAGE[Color labels],choice|CONF_MESSAGE[Selection (set choices in Additional Info)],tags|CONF_MESSAGE[Tags (extensible sets of values)]" replicationGroup="group1" label="CONF_MESSAGE[Field Type]" description="CONF_MESSAGE[Type of field]" mandatory="true" default="string"/>
		<param name="meta_visibility" type="select" replicationGroup="group1" label="CONF_MESSAGE[Column visibility]" description="CONF_MESSAGE[Set default visibility.]" mandatory="true" default="visible" choices="visible|CONF_MESSAGE[Visible],hidden|CONF_MESSAGE[Hidden]"/>
		<param name="meta_additional" type="string" replicationGroup="group1" label="CONF_MESSAGE[Additional info]" description="CONF_MESSAGE[Depending on the field type. Currently used for selection only]" mandatory="false"/>
	</server_settings>
	<registry_contributions>
		<hooks>
			<serverCallback hookName="node.info" methodName="extractMeta" applyCondition="$apply=($args[2]!='minimal');"/>
			<serverCallback hookName="node.change" methodName="updateMetaLocation" defer="true"/>
		</hooks>
		<client_configs>
			<template_part ajxpId="search_container" ajxpClass="SearchEngine" ajxpOptions='{"toggleResultsVisibility":"search_results_cont", "searchChooserAsResultsHeader":true, "openSearchInput":"true", "openSearchStickLeftTo":"topPane", "toggleResultsFitTo":"cpane_tabs", "fitMarginBottom":0, "toggleResultsOffsetRight":0, "toggleResultsOffsetTop":0, "detailThumbSize":24}' theme="orbit"/>
			<template_part ajxpId="search_container" ajxpClass="SearchEngine" ajxpOptions='{"toggleResultsVisibility":"search_results_cont", "searchChooserAsResultsHeader":true, "openSearchInput":"true", "openSearchStickLeftTo":"cpane_container", "toggleResultsFitTo":"cpane_tabs", "fitMarginBottom":0, "toggleResultsOffsetRight":0, "toggleResultsOffsetTop":0, "detailThumbSize":24}' theme="material"/>
			<component_config component="FilesList">
				<columns><!-- Dynamically generated by the plugin  --></columns>
			</component_config>
			<component_config component="InfoPanel">
                <infoPanel mime="generic_file,generic_dir" reactComponent="ReactMeta.InfoPanel" theme="material" weight="10"/>
			</component_config>
		</client_configs>
		<actions>
            <action name="meta_user_list_tags">
                <processing>
                    <serverCallback methodName="listTags"/>
                </processing>
            </action>
            <action name="edit_user_meta_mass">
                <gui text="meta.user.1" title="meta.user.1" iconClass="mdi mdi-tag-multiple" hasAccessKey="false">
                    <context selection="true" dir="" recycle="hidden"
                             actionBar="true" contextMenu="true" infoPanel="false"
                             actionBarGroup="put,info_panel" inZip="false">
                    </context>
                    <selectionContext dir="true" file="file" recycle="false" unique="false" multipleOnly="true"/>
                </gui>
                <rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""/>
                <processing>
                    <clientCallback module="ReactMeta.Callbacks.editMeta"/>
                </processing>
            </action>
			<action name="edit_user_meta">
				<gui text="meta.user.1" title="meta.user.1" iconClass="mdi mdi-tag" hasAccessKey="false" weight="10">
					<context selection="true" dir="" recycle="hidden"
						actionBar="true" contextMenu="true" infoPanel="false"
						actionBarGroup="0_get" inZip="false">
					</context>
					<selectionContext dir="true" file="file" recycle="false" unique="false"/>
					</gui>
				<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""/>
				<processing>
					<clientCallback module="ReactMeta.Callbacks.editMeta"/>
					<serverCallback methodName="editMeta" restParams="/file+" developerComment="Edit user-defined metadata on a node">
                        <input_param name="file" type="path" description="Path to the node to edit"/>
                        <input_param name="ANY" type="ANY"
                                     description="User-defined metadata key(s) and their corresponding values"/>
					</serverCallback>
					</processing>
			</action>
		</actions>
	</registry_contributions>
	<dependencies>
		<!-- Wrapper type plugins only -->
		<pluginClass pluginName="access.fs|access.ftp|access.demo"/>
	</dependencies>
</meta>
