Index: trunk/extension/ezxmlexport/design/admin2/javascript/ezxmlexport_contentclasses.js
===================================================================
--- trunk/extension/ezxmlexport/design/admin2/javascript/ezxmlexport_contentclasses.js	(revision 0)
+++ trunk/extension/ezxmlexport/design/admin2/javascript/ezxmlexport_contentclasses.js	(revision 0)
@@ -0,0 +1,75 @@
+function storeAvailableContentClassAttributesForExport()
+{
+	var serverURL = encodeURI( serverRoot + '/xmlexport/storeavailability' );
+    var postData = "";
+    var classID = $( '#eZXMLExportContentClassID' ).val();
+    var contentClassAttributeList = '';
+    alert( 300 );
+    if( $( '#ContentClassAvailableForXMLExport' ).attr( 'checked' ) == true )
+    {
+        classAction = "insert";
+
+        for( var i =0; i < contentClassAttributeIDList.length; i++ )
+        {
+            if( $( '#ContentAttribute_available_xml_export_' + contentClassAttributeIDList[i] ).attr( 'checked' ) == true )
+            {
+                contentClassAttributeList += "ContentClassAttributeIDList[]=" + contentClassAttributeIDList[i] + '&';
+            }
+        }
+    }
+    else
+    {
+        classAction = "remove";
+    }
+
+    postData = encodeURI( "ContentClassID=" + classID + '&Action=' + classAction + '&' + contentClassAttributeList );
+
+    var handleSuccess = function(o){
+        /* if(o.responseText !== undefined){ console.log('success !'); } */
+    }
+
+    var handleFailure = function(o){
+        /* if(o.responseText !== undefined){ console.log('failure !'); } */
+    }
+
+    function callback()
+    {
+        
+    };
+    alert( postData );
+    var request = $.post( serverURL, postData, callback );
+}
+
+
+function testFTP()
+{
+    var FTPHost     = $( '#FTPHost' ).val();
+    var FTPPort     = $( '#FTPPort' ).val();
+    var FTPLogin    = $( '#FTPLogin' ).val();
+    var FTPPassword = $( '#FTPPassword' ).val();
+    var FTPPath     = $( '#FTPPath' ).val();
+
+    var postString = 'FTPHost=' + FTPHost + '&FTPPort=' + FTPPort + '&FTPLogin=' + FTPLogin + '&FTPPassword=' + FTPPassword + '&FTPPath=' + FTPPath;
+    var postData   = encodeURI( postString );
+    var serverURL  = encodeURI( serverRoot + '/xmlexport/ftptest' );
+
+    function callback( o )
+    {
+    	if( o == 'OK' )
+        {
+    		$( '#FTPTestButton' ).removeClass( 'ftptestko' );
+            $( '#FTPTestButton' ).addClass( 'ftptestok' );
+            $( '#FTPSuccess' ).show();
+            $( '#FTPFailure' ).hide();            
+        }
+    	else
+    	{
+    		$( '#FTPTestButton' ).removeClass( 'ftptestok' );
+        	$( '#FTPTestButton' ).addClass( 'ftptestko' );
+            $( '#FTPSuccess' ).hide();
+            $( '#FTPFailure' ).show();
+    	}
+    }
+
+    var request = $.post( serverURL, postData, callback );
+}
\ No newline at end of file
Index: trunk/extension/ezxmlexport/design/admin2/stylesheets/ftprelated.css
===================================================================
--- trunk/extension/ezxmlexport/design/admin2/stylesheets/ftprelated.css	(revision 0)
+++ trunk/extension/ezxmlexport/design/admin2/stylesheets/ftprelated.css	(revision 0)
@@ -0,0 +1,41 @@
+.ftptestok
+{
+    background-color:green;
+    background-image:url(../images/inputbutton-attribute-bg.gif);
+    background-position:center top;
+    background-repeat:repeat-x;
+    border-color:#FFFFFF rgb(47, 71, 95) rgb(47, 71, 95) rgb(255, 255, 255);
+    border-style:solid;
+    border-width:2px;
+    color:#FFFFFF;
+    font-size:0.9em;
+    font-weight:normal;
+    padding:0em 0.25em;
+}
+
+.ftptestko
+{
+    background-color:red;
+    background-image:url(../images/inputbutton-attribute-bg.gif);
+    background-position:center top;
+    background-repeat:repeat-x;
+    border-color:#FFFFFF rgb(47, 71, 95) rgb(47, 71, 95) rgb(255, 255, 255);
+    border-style:solid;
+    border-width:2px;
+    color:#FFFFFF;
+    font-size:0.9em;
+    font-weight:normal;
+    padding:0em 0.25em;
+}
+
+#FTPSuccess
+{
+	display:none;
+	color:green;
+}
+
+#FTPFailure
+{
+    display:none;
+    color:red;
+}
Index: trunk/extension/ezxmlexport/design/admin2/templates/class/edit.tpl
===================================================================
--- trunk/extension/ezxmlexport/design/admin2/templates/class/edit.tpl	(revision 0)
+++ trunk/extension/ezxmlexport/design/admin2/templates/class/edit.tpl	(revision 0)
@@ -0,0 +1,442 @@
+{ezscript_require( array( 'ezxmlexport_contentclasses.js' ) )}
+<script type="text/javascript">
+    // super globals !!
+    var serverRoot = {'/'|ezurl( 'single', 'full' )};
+    var contentClassAttributeIDList = new Array();
+    {section var=Attributes loop=$attributes}
+        contentClassAttributeIDList.push( {$Attributes.item.id} );
+    {/section}
+</script>
+{* Warnings *}
+
+{def $class_xml_availability = fetch( 'xmlexport', 'class', hash( 'class_id',  $class.id ) )}
+{def $class_available_for_xml_export = false()}
+
+{if $class_xml_availability}
+    {set $class_available_for_xml_export = true()}
+{/if}
+
+{def $attribute_xml_availability = array()}
+{foreach $class_xml_availability as $item}
+    {set $attribute_xml_availability = $attribute_xml_availability|append( $item.contentclass_attribute_id )}
+{/foreach}
+
+{section show=$validation.processed}
+{* handle attribute validation errors *}
+{section show=$validation.attributes}
+<div class="message-error">
+<h2><span class="time">[{currentdate()|l10n( shortdatetime )}]</span> {'The class definition could not be stored.'|i18n( 'design/admin/class/edit' )}</h2>
+<p>{'The following information is either missing or invalid'|i18n( 'design/admin/class/edit' )}:</p>
+<ul>
+    {section var=UnvalidatedAttributes loop=$validation.attributes}
+    {section show=is_set( $UnvalidatedAttributes.item.reason )}
+        <li>attribute '{$UnvalidatedAttributes.item.identifier}': ({$UnvalidatedAttributes.item.id})
+            {$UnvalidatedAttributes.item.reason.text|wash}
+        <ul>
+        {section var=subitem loop=$UnvalidatedAttributes.item.reason.list}
+            <li>{if is_set( $subitem.identifier )}{$subitem.identifier|wash}: {/if}{$subitem.text|wash}</li>
+        {/section}
+        </ul>
+        </li>
+    {section-else}
+        <li>attribute '{$UnvalidatedAttributes.item.identifier}': {$UnvalidatedAttributes.item.name|wash} ({$UnvalidatedAttributes.item.id})</li>
+    {/section}
+    {/section}
+</ul>
+</div>
+{section-else}
+{* no attribute validation errors *}
+<div class="message-feedback">
+    <h2><span class="time">[{currentdate()|l10n( shortdatetime )}]</span> {'The class definition was successfully stored.'|i18n( 'design/admin/class/edit' )}</h2>
+</div>
+{/section}
+
+{section-else} {* !$validation|processed *}
+{* we're about to store the class, so let's handle basic class properties errors (name, identifier, presence of attributes) *}
+    {section show=or( $validation.class_errors )}
+    <div class="message-error">
+    <h2>{"The class definition contains the following errors"|i18n("design/admin/class/edit")}:</h2>
+    <ul>
+    {section var=ClassErrors loop=$validation.class_errors}
+        <li>{$ClassErrors.item.text}</li>
+    {/section}
+    </ul>
+    </div>
+    {/section}
+{/section}
+
+{* Main window *}
+<form action={concat( $module.functions.edit.uri, '/', $class.id, '/(language)/', $language_code )|ezurl} method="post" id="ClassEdit" name="ClassEdit">
+<input type="hidden" name="ContentClassHasInput" value="1" />
+
+<div id="controlbar-top" class="controlbar">
+{* DESIGN: Control bar START *}<div class="box-bc"><div class="box-ml">
+<div class="block">
+<div class="element">
+    <input id="eZXMLExportStoreButtonUp" class="defaultbutton" type="submit" name="eZXMLExportStoreButton"   value="{'OK'|i18n( 'design/admin/class/edit' )}" title="{'Store changes and exit from edit mode.'|i18n( 'design/admin/class/edit' )|wash}" />
+
+    {if eq( ezini( 'ClassSettings', 'ApplyButton', 'content.ini' ), 'enabled' )}
+    <input id="eZXMLExportApplyButtonUp" class="button" type="submit" name="eZXMLExportStoreButton"   value="{'Apply'|i18n( 'design/admin/class/edit' )}" title="{'Store changes and continue editing.'|i18n( 'design/admin/class/edit' )|wash}" />
+    {/if}
+
+    <input class="button" type="submit" name="DiscardButton" value="{'Cancel'|i18n( 'design/admin/class/edit' )}" title="{'Discard all changes and exit from edit mode.'|i18n( 'design/admin/class/edit' )|wash}" />
+</div>
+<div class="element">
+    {include uri="design:class/datatypes.tpl" name='DataTypes' id_name='DataTypeStringTop' selection_name='DataTypeString' datatypes=$datatypes current=$datatype}
+    <input class="button" type="submit" name="NewButton" value="{'Add attribute'|i18n( 'design/admin/class/edit' )}" title="{'Add a new attribute to the class. Use the menu on the left to select the attribute type.'|i18n( 'design/admin/class/edit' )|wash}" />
+</div>
+<div class="button-right">
+    <a href="JavaScript:void(0);" onclick="jQuery('#page').toggleClass('main-column-only');" class="controlbar-top-full-screen-toggle" title="{'Toggle fullscreen editing!'|i18n( 'design/admin/content/edit' )}">&nbsp;</a>
+</div>
+<div class="float-break"></div>
+</div>
+{* DESIGN: Control bar END *}</div></div>
+</div>
+
+
+<div class="context-block">
+{* DESIGN: Header START *}<div class="box-header">
+
+<h1 class="context-title" title="{'Class name and number of objects'|i18n( 'design/admin/class/view' )}">{$class.identifier|class_icon( 'normal', $class.name|wash )}&nbsp;{'Edit <%class_name> (%object_count)'|i18n( 'design/admin/class/edit',, hash( '%class_name', $class.nameList[$language_code], '%object_count', $class.object_count ) )|wash}</h1>
+
+{* DESIGN: Mainline *}<div class="header-mainline"></div>
+
+{* DESIGN: Header END *}</div>
+
+{* DESIGN: Content START *}
+<div class="box-content">
+
+<div class="context-information">
+<p class="left modified">{'Last modified'|i18n( 'design/admin/class/edit' )}:&nbsp;{$class.modified|l10n( shortdatetime )},&nbsp;{$class.modifier.contentobject.name|wash}</p>
+{def $locale = fetch( 'content', 'locale', hash( 'locale_code', $language_code ) )}
+<p class="right translation">{$locale.intl_language_name}&nbsp;<img src="{$language_code|flag_icon}" alt="{$language_code}" style="vertical-align: middle;" /></p>
+{undef $locale}
+<div class="break"></div>
+</div>
+
+<div class="context-attributes">
+
+    {* Name. *}
+    <div class="block">
+    <label for="className">{'Name'|i18n( 'design/admin/class/edit' )}:</label>
+    <input class="box" type="text" id="className" name="ContentClass_name" size="30" value="{$class.nameList[$language_code]|wash}" title="{'Use this field to set the informal name of the class. The name field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )|wash}" />
+    </div>
+
+    {* Identifier. *}
+    <div class="block">
+    <label for="ContentClass_identifier">{'Identifier'|i18n( 'design/admin/class/edit' )}:</label>
+    <input class="box" type="text" id="ContentClass_identifier" name="ContentClass_identifier" size="30" value="{$class.identifier|wash}" title="{'Use this field to set the internal name of the class. The identifier will be used in templates and in PHP code. Allowed characters are letters, numbers and underscores.'|i18n( 'design/admin/class/edit' )|wash}" />
+    </div>
+
+    {* Description. *}
+    <div class="block">
+    <label for="classDescription">{'Description'|i18n( 'design/admin/class/edit' )}:</label>
+    <input class="box" type="text" id="classDescription" name="ContentClass_description" size="30" value="{$class.descriptionList[$language_code]|wash}" title="{'Use this field to set the informal description of the class. The description field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )|wash}" />
+    </div>
+
+    {* Object name pattern. *}
+    <div class="block">
+    <label for="ContentClass_contentobject_name">{'Object name pattern'|i18n( 'design/admin/class/edit' )}:</label>
+    <input class="box" type="text" id="ContentClass_contentobject_name" name="ContentClass_contentobject_name" size="30" value="{$class.contentobject_name|wash}" title="{'Use this field to configure how the name of the objects are generated. Type in the identifiers of the attributes that should be used. The identifiers must be enclosed in angle brackets. Text outside angle brackets will be included as it is shown here.'|i18n( 'design/admin/class/edit' )|wash}" />
+    </div>
+
+    {* URL alias name pattern. *}
+    <div class="block">
+    <label for="ContentClass_url_alias_name">{'URL alias name pattern'|i18n( 'design/admin/class/edit' )}:</label>
+    <input class="box" type="text" id="ContentClass_url_alias_name" name="ContentClass_url_alias_name" size="30" value="{$class.url_alias_name|wash}" title="{'Use this field to configure how the url alias of the objects are generated (applies to nice URLs). Type in the identifiers of the attributes that should be used. The identifiers must be enclosed in angle brackets. Text outside angle brackets will be included as is.'|i18n( 'design/admin/class/edit' )|wash}" />
+    </div>
+
+    {* Container. *}
+    <div class="block">
+    <label for="ContentClass_is_container_checked">{'Container'|i18n( 'design/admin/class/edit' )}:</label>
+    <input type="hidden" name="ContentClass_is_container_exists" value="1" />
+    <input type="checkbox" id="ContentClass_is_container_checked" name="ContentClass_is_container_checked" value="{$class.is_container}" {if $class.is_container|eq( 1 )}checked="checked"{/if} title="{'Use this checkbox to allow instances of the class to have sub items. If checked, it will be possible to create new sub items. If not checked, the sub items will not be displayed.'|i18n( 'design/admin/class/edit' )|wash}" />
+    </div>
+
+    {* Class Default Sorting *}
+    <div class="block">
+    <label for="ContentClass_default_sorting_field">{'Default sorting of children'|i18n( 'design/admin/class/edit' )}:</label>
+    {def $sort_fields=fetch( content, available_sort_fields )
+         $title='Use these controls to set the default sorting method for the sub items of instances of the content class.'|i18n( 'design/admin/class/edit' )|wash }
+    <input type="hidden" name="ContentClass_default_sorting_exists" value="1" />
+    <select id="ContentClass_default_sorting_field" name="ContentClass_default_sorting_field" title="{$title}">
+    {foreach $sort_fields as $sf_key => $sf_item}
+        <option value="{$sf_key}" {if eq( $sf_key, $class.sort_field )}selected="selected"{/if}>{$sf_item}</option>
+    {/foreach}
+    </select>
+    <select id="ContentClass_default_sorting_order" name="ContentClass_default_sorting_order" title="{$title}">
+        <option value="0"{if eq($class.sort_order, 0)} selected="selected"{/if}>{'Descending'|i18n( 'design/admin/class/edit' )}</option>
+        <option value="1"{if eq($class.sort_order, 1)} selected="selected"{/if}>{'Ascending'|i18n( 'design/admin/class/edit' )}</option>
+    </select>
+    {undef $sort_fields $title}
+    </div>
+
+    {* Object availablility. *}
+    <div class="block">
+    <label for="ContentClass_always_available">{'Default object availability'|i18n( 'design/standard/class/edit' )}:</label>
+    <input type="hidden" name="ContentClass_always_available_exists" value="1" />
+    <input type="checkbox" id="ContentClass_always_available" name="ContentClass_always_available"{if $class.always_available|eq(1)} checked="checked"{/if} title="{'Use this checkbox to set the default availability for the objects of this class. The availability controls whether an object should be shown even if it does not exist in one of the languages specified by the "SiteLanguageList" setting. If this is the case, the system will use the main language of the object.'|i18n( 'design/admin/class/edit' )|wash}" />
+    </div>
+	
+	{* XML export availability *}
+    <div class="block">
+    <label>{'Class available for XML export'|i18n( 'design/admin/xmlexport' )}:</label>
+    <input type="checkbox" name="ContentClass_available_xml_export" id="ContentClassAvailableForXMLExport" {if $class_available_for_xml_export}checked="checked"{/if} title="{'Use this checkbox to set this class as available for XML export.'|i18n( 'design/admin/class/edit' )|wash}" />
+    </div>
+
+<div class="block">
+<h3>{'Class attributes'|i18n( 'design/admin/class/edit' )}:</h3>
+</div>
+{if $attributes}
+
+{def $attribute_categorys        = ezini( 'ClassAttributeSettings', 'CategoryList', 'content.ini' )
+     $attribute_default_category = ezini( 'ClassAttributeSettings', 'DefaultCategory', 'content.ini' )
+     $priority_value = 0}
+
+<table id="ezcca-edit-list" class="special" cellspacing="0" summary="{'List of class attributes'|i18n( 'design/admin/class/edit' )}">
+<tbody>
+{section var=Attributes loop=$attributes sequence=array( bglight, bgdark )}
+
+{set $priority_value = $priority_value|sum( 10 )}
+
+<tr class="ezcca-edit-list-item {$Attributes.sequence}"{if $last_changed_id|eq( $Attributes.item.id )} id="LastChangedID"{/if}>
+<td>
+<table cellspacing="0" summary="{'Class attribute item'|i18n( 'design/admin/class/edit' )}">
+<tr>
+    <th class="tight"><input type="checkbox" name="ContentAttribute_id_checked[]" value="{$Attributes.item.id}" title="{'Select attribute for removal. Click the "Remove selected attributes" button to remove the selected attributes.'|i18n( 'design/admin/class/edit' )|wash}" /></th>
+    <th class="wide">{$Attributes.number}. {$Attributes.item.name|wash} [{$Attributes.item.data_type.information.name|wash}] (id:{$Attributes.item.id})</th>
+    <th class="tight">
+      <div class="listbutton">
+          <input type="image" src={'button-move_down.gif'|ezimage} alt="{'Down'|i18n( 'design/admin/class/edit' )}" name="MoveDown_{$Attributes.item.id}" title="{'Use the order buttons to set the order of the class attributes. The up arrow moves the attribute one place up. The down arrow moves the attribute one place down.'|i18n( 'design/admin/class/edit' )|wash}" />&nbsp;
+          <input type="image" src={'button-move_up.gif'|ezimage} alt="{'Up'|i18n( 'design/admin/class/edit' )}" name="MoveUp_{$Attributes.item.id}" title="{'Use the order buttons to set the order of the class attributes. The up arrow moves the attribute one place up. The down arrow moves the attribute one place down.'|i18n( 'design/admin/class/edit' )|wash}" />
+          <input size="2" maxlength="4" type="text" name="ContentAttribute_priority[]" value="{$priority_value}" />
+      </div>
+    </th>
+</tr>
+<tr>
+<td>&nbsp;</td>
+<!-- Attribute input Start -->
+<td colspan="2">
+<input type="hidden" name="ContentAttribute_id[]" value="{$Attributes.item.id}" />
+<input type="hidden" name="ContentAttribute_position[]" value="{$Attributes.item.placement}" />
+
+
+{* Attribute name. *}
+<div class="block">
+<label for="ContentAttribute_name_{$Attributes.item.id}">{'Name'|i18n( 'design/admin/class/edit' )}:</label>
+<input class="box" type="text" id="ContentAttribute_name_{$Attributes.item.id}" name="ContentAttribute_name[]" value="{$Attributes.item.nameList[$language_code]|wash}" title="{'Use this field to set the informal name of the attribute. This field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )|wash}" />
+</div>
+
+{* Attribute identifier. *}
+<div class="block">
+<label for="ContentAttribute_identifier_{$Attributes.item.id}">{'Identifier'|i18n( 'design/admin/class/edit' )}:</label>
+<input class="box" type="text" id="ContentAttribute_identifier_{$Attributes.item.id}" name="ContentAttribute_identifier[]" value="{$Attributes.item.identifier}" title="{'Use this field to set the internal name of the attribute. The identifier will be used in templates and in PHP code. Allowed characters are letters, numbers and underscores.'|i18n( 'design/admin/class/edit' )|wash}" />
+</div>
+
+{* Attribute description. *}
+<div class="block">
+<label for="ContentAttribute_description_{$Attributes.item.id}">{'Description'|i18n( 'design/admin/class/edit' )}:</label>
+<input class="box" type="text" id="ContentAttribute_description_{$Attributes.item.id}" name="ContentAttribute_description[]" value="{$Attributes.item.descriptionList[$language_code]|wash}" title="{'Use this field to set the informal description of the attribute. This field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )|wash}" />
+</div>
+
+<!-- Attribute input End -->
+
+<!-- Attribute flags Start -->
+<div class="block">
+
+{* Required. *}
+<div class="element">
+<label for="ContentAttribute_is_required_{$Attributes.item.id}">
+<input type="checkbox" id="ContentAttribute_is_required_{$Attributes.item.id}" name="ContentAttribute_is_required_checked[]" value="{$Attributes.item.id}"  {if $Attributes.item.is_required}checked="checked"{/if} title="{'Use this checkbox to specify whether the user should be forced to enter information into the attribute.'|i18n( 'design/admin/class/edit' )|wash}" />
+{'Required'|i18n( 'design/admin/class/edit' )}
+</label>
+</div>
+
+{* Searchable. *}
+<div class="element">
+<label for="ContentAttribute_is_searchable_{$Attributes.item.id}">
+{if $Attributes.item.data_type.is_indexable}
+<input type="checkbox" id="ContentAttribute_is_searchable_{$Attributes.item.id}" name="ContentAttribute_is_searchable_checked[]" value="{$Attributes.item.id}"  {if $Attributes.item.is_searchable}checked="checked"{/if} title="{'Use this checkbox to specify whether the contents of the attribute should be indexed by the search engine.'|i18n( 'design/admin/class/edit' )|wash}" />
+{else}
+<input type="checkbox" id="ContentAttribute_is_searchable_{$Attributes.item.id}" name="ContentAttribute_is_searchable_checked[]" value="" disabled="disabled" title="{'The <%datatype_name> datatype does not support search indexing.'|i18n( 'design/admin/class/edit',, hash( '%datatype_name', $Attributes.item.data_type.information.name ) )|wash}" />
+{/if}
+{'Searchable'|i18n( 'design/admin/class/edit' )}
+</label>
+</div>
+
+{* Information collector. *}
+<div class="element">
+<label for="ContentAttribute_is_information_collector_{$Attributes.item.id}">
+{if $Attributes.item.data_type.is_information_collector}
+<input type="checkbox" id="ContentAttribute_is_information_collector_{$Attributes.item.id}" name="ContentAttribute_is_information_collector_checked[]" value="{$Attributes.item.id}"  {if $Attributes.item.is_information_collector}checked="checked"{/if} title="{'Use this checkbox to specify whether the attribute should collect input from users.'|i18n( 'design/admin/class/edit' )|wash}" />
+{else}
+<input type="checkbox" id="ContentAttribute_is_information_collector_{$Attributes.item.id}" name="ContentAttribute_is_information_collector_checked[]" value="" disabled="disabled" title="{'The <%datatype_name> datatype cannot be used as an information collector.'|i18n( 'design/admin/class/edit',, hash( '%datatype_name', $Attributes.item.data_type.information.name ) )|wash}" />
+{/if}
+{'Information collector'|i18n( 'design/admin/class/edit' )}
+</label>
+<div class="break"></div>
+</div>
+
+
+{* Disable translation. *}
+<div class="element">
+<label for="ContentAttribute_can_translate_{$Attributes.item.id}">
+<input type="checkbox" id="ContentAttribute_can_translate_{$Attributes.item.id}" name="ContentAttribute_can_translate_checked[]" value="{$Attributes.item.id}" {if or( $Attributes.item.can_translate|eq(0), $Attributes.item.data_type.properties.translation_allowed|not )}checked="checked"{/if} {if $Attributes.item.data_type.properties.translation_allowed|not}disabled="disabled"{/if} title="{'Use this checkbox for attributes that contain non-translatable content.'|i18n( 'design/admin/class/edit' )|wash}" />
+{'Disable translation'|i18n( 'design/admin/class/edit' )}
+</label>
+</div>
+
+{* Category. *}
+<div class="element">
+<label for="ContentAttribute_category_{$Attributes.item.id}">
+<select id="ContentAttribute_category_{$Attributes.item.id}" name="ContentAttribute_category_select[]"  title="{'Use this category to group attributes together in edit interface, some categories might also be hidden in full view if they are for instance only meta attributes.'|i18n( 'design/admin/class/edit' )|wash}">
+    <option value="">{'Default'|i18n( 'design/admin/class/edit' )} ({$attribute_categorys[ $attribute_default_category ]|wash})</option>
+    {foreach $attribute_categorys as $categoryIdentifier => $categoryName}
+        <option value="{$categoryIdentifier|wash}"{if $categoryIdentifier|eq( $Attributes.item.category )} selected="selected"{/if}>{$categoryName|wash}</option>
+    {/foreach}
+</select>
+{'Category'|i18n( 'design/admin/class/edit' )}
+</label>
+</div>
+
+{* Available for XML export *}
+<div class="element">
+<label>
+<input type="checkbox" name="ContentAttribute_available_xml_export[]" id="ContentAttribute_available_xml_export_{$Attributes.item.id}" value="{$Attributes.item.id}" {section show=$Attributes.item.can_translate|eq(0)}checked="checked"{/section} title="{'Use this checkbox to set this attribute available for XML export.'|i18n( 'design/admin/xmlexport' )}" {if $attribute_xml_availability|contains($Attributes.item.id)}checked="checked"{/if} />
+{'Available for XML export'|i18n( 'design/admin/xmlexport' )}
+</label>
+</div>
+
+</div>
+
+{class_attribute_edit_gui class_attribute=$Attributes.item}
+
+</td>
+</tr>
+<!-- Attribute flags End -->
+</table>
+</td>
+</tr>
+
+{/section}
+</tbody>
+</table>
+{undef $attribute_categorys $attribute_default_category $priority_value}
+{else}
+
+<div class="block">
+<p>{'This class does not have any attributes.'|i18n( 'design/admin/class/edit' )}</p>
+</div>
+{/if}
+
+</div>
+
+{* DESIGN: Content END *}</div>
+
+<div class="block">
+<div class="controlbar">
+{* DESIGN: Control bar START *}<div class="box-bc">
+
+<div class="block">
+    {* Remove selected attributes button *}
+    <div class="button-left">
+    {if $attributes}
+    <input class="button" type="submit" name="RemoveButton" value="{'Remove selected attributes'|i18n( 'design/admin/class/edit' )}" title="{'Remove the selected attributes.'|i18n( 'design/admin/class/edit' )|wash}" />
+    {else}
+    <input class="button-disabled" type="submit" name="RemoveButton" value="{'Remove selected attributes'|i18n( 'design/admin/class/edit' )}" title="{'Remove the selected attributes.'|i18n( 'design/admin/class/edit' )|wash}" disabled="disabled" />
+    {/if}
+    </div>
+    
+    <div class="button-right">
+    {include uri="design:class/datatypes.tpl" name=DataTypes id_name=DataTypeString datatypes=$datatypes current=$datatype}
+    <input class="button" type="submit" name="NewButton" value="{'Add attribute'|i18n( 'design/admin/class/edit' )}" title="{'Add a new attribute to the class. Use the menu on the left to select the attribute type.'|i18n( 'design/admin/class/edit' )|wash}" />
+    </div>
+    <div class="float-break"></div>
+</div>
+
+<div class="block">
+    <input id="eZXMLExportStoreButtonUp" class="defaultbutton" type="submit" name="StoreButton"   value="{'OK'|i18n( 'design/admin/class/edit' )}" title="{'Store changes and exit from edit mode.'|i18n( 'design/admin/class/edit' )|wash}" />
+
+    {if eq( ezini( 'ClassSettings', 'ApplyButton', 'content.ini' ), 'enabled' )}
+    <input id="eZXMLExportApplyButtonDown" class="button" type="submit" name="ApplyButton"   value="{'Apply'|i18n( 'design/admin/class/edit' )}" title="{'Store changes and continue editing.'|i18n( 'design/admin/class/edit' )|wash}" />
+    {/if}
+
+    <input class="button" type="submit" name="DiscardButton" value="{'Cancel'|i18n( 'design/admin/class/edit' )}" title="{'Discard all changes and exit from edit mode.'|i18n( 'design/admin/class/edit' )|wash}" />
+	<input type="hidden" id="eZXMLExportContentClassID" value="{$class.id}"/>
+</div>
+{* DESIGN: Control bar END *}</div>
+</div>
+</div>
+
+</div>
+
+</form>
+
+
+{literal}
+<script language="JavaScript" type="text/javascript">
+<!--
+jQuery(function( $ )//called on document.ready
+{
+    var el = $('#LastChangedID input[name^=ContentAttribute_name]');
+    if ( !el.size() )
+        el = $('#className');
+    window.scrollTo(0, Math.max( el.offset().top - 180, 0 ));
+    el.focus();
+
+    // Axaify all move up/down buttons
+    var moveButtons = $('#ezcca-edit-list div.listbutton input[name^=Move]');
+    moveButtons.click(function( e )
+    {
+        e.preventDefault();
+        var tr = $(this).closest('tr.ezcca-edit-list-item'), param = this.name.split('_'), up = param[0] === 'MoveUp';
+
+        // swap items in dom
+        if ( up )
+        {
+
+            var swap = tr.prev();
+            if ( !swap.size() )
+                return false;
+            swap.before( tr );
+        }
+        else
+        {
+            var swap = tr.next();
+            if ( !swap.size() )
+                return false;
+            swap.after( tr );
+        }
+
+        // swap priority number
+        var inp = tr.find('input[name^=ContentAttribute_priority]'), inp2 = swap.find('input[name^=ContentAttribute_priority]'), inpv = inp.val();
+        inp.val( inp2.val() );
+        inp2.val( inpv );
+
+        // store with ajax request
+        var postVar = { 'ContentClassHasInput': 0 };
+        postVar[ param[0] ] = param[1];
+        $.post( $('#ClassEdit').attr('action'), postVar );
+        return false;
+    });
+	
+	$("#eZXMLExportStoreButtonUp").bind( 'click', function(){
+                          storeAvailableContentClassAttributesForExport();
+        });
+        
+    $("#eZXMLExportApplyButtonUp").bind( 'click', function(){
+                          storeAvailableContentClassAttributesForExport();
+        });
+    
+	$("#eZXMLExportStoreButtonDown").bind( 'click', function(){
+                          storeAvailableContentClassAttributesForExport();
+        });
+        
+    $("#eZXMLExportApplyButtonDown").bind( 'click', function(){
+                          storeAvailableContentClassAttributesForExport();
+        });
+    
+});
+-->
+</script>
+{/literal}
Index: trunk/extension/ezxmlexport/design/admin2/templates/class/view.tpl
===================================================================
--- trunk/extension/ezxmlexport/design/admin2/templates/class/view.tpl	(revision 0)
+++ trunk/extension/ezxmlexport/design/admin2/templates/class/view.tpl	(revision 0)
@@ -0,0 +1,249 @@
+{include uri='design:class/window_controls.tpl'}
+
+{section show=$validation.processed}
+{section show=$validation.groups}
+<div class="message-warning">
+<h2><span class="time">[{currentdate()|l10n( shortdatetime )}]</span> {'Input did not validate'|i18n( 'design/admin/class/view' )}</h2>
+<ul>
+{section var=item loop=$validation.groups}
+    <li>{$item.text}</li>
+{/section}
+</ul>
+</div>
+{/section}
+{/section}
+
+
+<div class="context-block">
+{* DESIGN: Header START *}<div class="box-header">
+<h1 class="context-title" title="{'Class name and number of objects'|i18n( 'design/admin/class/view' )}">{$class.identifier|class_icon( 'normal', $class.nameList[$language_code]|wash )}&nbsp;{$class.nameList[$language_code]|wash} [{$class.object_count}]</h1>
+
+{* DESIGN: Mainline *}<div class="header-mainline"></div>
+
+{* DESIGN: Header END *}</div>
+
+{* DESIGN: Content START *}<div class="box-content">
+
+<div class="context-information">
+<p class="left modified">{'Last modified: %time, %username'|i18n( 'design/admin/class/view',, hash( '%username',$class.modifier.contentobject.name, '%time', $class.modified|l10n( shortdatetime ) ) )|wash}</p>
+{def $locale = fetch( 'content', 'locale', hash( 'locale_code', $language_code ) )}
+<p class="right translation">{$locale.intl_language_name}&nbsp;<img src="{$language_code|flag_icon}" alt="{$language_code}" style="vertical-align: middle;" /></p>
+{undef $locale}
+<div class="break"></div>
+</div>
+
+<div class="context-attributes">
+
+<div class="block">
+<div class="left">
+    <div class="block">
+        <h6>{'Name'|i18n( 'design/admin/class/view' )}:</h6>
+        {$class.nameList[$language_code]|wash}
+    </div>
+
+    <div class="block">
+        <h6>{'Identifier'|i18n( 'design/admin/class/view' )}:</h6>
+        {$class.identifier|wash}
+    </div>
+
+    <div class="block">
+        <h6>{'Description'|i18n( 'design/admin/class/view' )}:</h6>
+        {$class.descriptionList[$language_code]|wash}
+    </div>
+
+    <div class="block">
+        <h6>{'Object name pattern'|i18n( 'design/admin/class/view' )}:</h6>
+        {$class.contentobject_name|wash}
+    </div>
+
+    <div class="block">
+        <h6>{'URL alias name pattern'|i18n( 'design/admin/class/view' )}:</h6>
+        {$class.url_alias_name|wash}
+    </div>
+</div>
+
+<div class="right">
+    <div class="block">
+        <h6>{'Container'|i18n( 'design/admin/class/view' )}:</h6>
+        {if $class.is_container|eq(1)}
+            {'Yes'|i18n( 'design/admin/class/view' )}
+        {else}
+            {'No'|i18n( 'design/admin/class/view' )}
+        {/if}
+    </div>
+
+    <div class="block">
+        <h6>{'Default object availability'|i18n( 'design/admin/class/view' )}:</h6>
+        {if $class.always_available|eq(0)}
+            {'Not available'|i18n( 'design/admin/class/view' )}
+        {else}
+            {'Available'|i18n( 'design/admin/class/view' )}
+        {/if}
+    </div>
+
+    {*** Class Default Sorting ***}
+    <div class="block">
+    <h6>{'Default sorting of children'|i18n( 'design/admin/class/view' )}:</h6>
+    {def $sort_fields=fetch( content, available_sort_fields )}
+    {if is_set( $sort_fields[$class.sort_field] )} {$sort_fields[$class.sort_field]} {else}{$class.sort_field}{/if} / {if eq($class.sort_order, 0)}{'Descending'|i18n( 'design/admin/class/edit' )}{else}{'Ascending'|i18n( 'design/admin/class/edit' )}{/if}
+    {undef $sort_fields}</div>
+
+    <div class="block">
+        <h6>{'Object count'|i18n( 'design/admin/class/view' )}:</h6>
+        {$class.object_count}
+    </div>
+	
+{def $class_xml_availability = fetch( 'xmlexport', 'class', hash( 'class_id',  $class.id ) )}
+{def $class_available_for_xml_export = false()}
+
+{if $class_xml_availability}
+    {set $class_available_for_xml_export = true()}
+{/if}
+
+{def $attribute_xml_availability = array()}
+{foreach $class_xml_availability as $item}
+    {set $attribute_xml_availability = $attribute_xml_availability|append( $item.contentclass_attribute_id )}
+{/foreach}
+
+<div class="block">
+    <label>{'Availabe for XML export'|i18n( 'design/admin/class/view' )}:</label>
+    {$class_available_for_xml_export|choose( 'No', 'Yes' )|i18n( 'design/admin/xmlexport' )}
+</div>
+</div>
+<div class="float-break"></div>
+</div>
+
+<h2>{'Attributes'|i18n( 'design/admin/class/view' )}</h2>
+<table class="special" cellspacing="0">
+
+{def $attribute_categorys        = ezini( 'ClassAttributeSettings', 'CategoryList', 'content.ini' )
+     $attribute_default_category = ezini( 'ClassAttributeSettings', 'DefaultCategory', 'content.ini' )}
+
+{section var=Attributes loop=$attributes sequence=array( bglight, bgdark )}
+
+<tr>
+    <th colspan="5">{$Attributes.number}.&nbsp;{$Attributes.item.nameList[$language_code]|wash}&nbsp;[{$Attributes.item.data_type.information.name|wash}]&nbsp;(id:{$Attributes.item.id})</th>
+</tr>
+
+<tr class="{$Attributes.sequence}">
+    <td>
+        <input type="hidden" name="ContentAttribute_id[]" value="{$Attributes.item.id}" />
+        <input type="hidden" name="ContentAttribute_position[]" value="{$Attributes.item.placement}" />
+
+        <div class="block">
+            <h6>{'Name'|i18n( 'design/admin/class/view' )}:</h6>
+            <p>{$Attributes.item.nameList[$language_code]|wash}</p>
+        </div>
+    </td>
+
+    <td class="{$Attributes.sequence}">
+        <div class="block">
+            <h6>{'Identifier'|i18n( 'design/admin/class/view' )}:</h6>
+            <p>{$Attributes.item.identifier|wash}</p>
+        </div>
+    </td>
+
+    <td class="{$Attributes.sequence}">
+        <div class="block">
+            <h6>{'Category'|i18n( 'design/admin/class/view' )}:</h6>
+            {if $Attributes.item.category|not}
+                <p>{'Default'|i18n( 'design/admin/class/edit' )} ({$attribute_categorys[ $attribute_default_category ]|wash})</p>
+            {elseif is_set( $attribute_categorys[ $Attributes.item.category ] )}
+                <p>{$attribute_categorys[ $Attributes.item.category ]|wash}</p>
+            {else}
+                <p>{$attribute_categorys[ $attribute_default_category ]|wash}</p>
+            {/if}
+        </div>
+    </td>
+
+    <td class="{$Attributes.sequence}">
+        <div class="block">
+            <h6>{'Description'|i18n( 'design/admin/class/view' )}:</h6>
+            <p>{$Attributes.item.descriptionList[$language_code]|wash}</p>
+        </div>
+    </td>
+
+    <td rowspan="2">
+
+        <div class="block">
+          <h6>{'Flags'|i18n( 'design/admin/class/view' )}:</h6>
+        </div>
+
+        <div class="block">
+            <p>{if $Attributes.item.is_required}{'Is required'|i18n( 'design/admin/class/view' )}{else}{'Is not required'|i18n( 'design/admin/class/view' )}{/if}</p>
+        </div>
+
+        {if $Attributes.item.data_type.is_indexable}
+        <div class="block">
+            <p>{if $Attributes.item.is_searchable}{'Is searchable'|i18n( 'design/admin/class/view' )}{else}{'Is not searchable'|i18n( 'design/admin/class/view' )}{/if}</p>
+        </div>
+        {else}
+        <div class="block">
+            <p>{'Is not searchable'|i18n( 'design/admin/class/view' )}</p>
+        </div>
+        {/if}
+
+        {if $Attributes.item.data_type.is_information_collector}
+        <div class="block">
+            <p>{if $Attributes.item.is_information_collector}{'Collects information'|i18n( 'design/admin/class/view' )}{else}{'Does not collect information'|i18n( 'design/admin/class/view' )}{/if}</p>
+        </div>
+        {else}
+        <div class="block">
+            <p>{'Does not collect information'|i18n( 'design/admin/class/view' )}</p>
+        </div>
+        {/if}		
+
+        <div class="block">
+            <p>{if or( $Attributes.item.can_translate|eq(0), $Attributes.item.data_type.properties.translation_allowed|not )}{'Translation is disabled'|i18n( 'design/admin/class/view' )}{else}{'Translation is enabled'|i18n( 'design/admin/class/view' )}{/if}</p>
+        </div>
+		
+		<div class="block">
+            <p>{if $attribute_xml_availability|contains($Attributes.item.id)}{'Attribute is available for XML export'|i18n( 'design/admin/xmlexport' )}{else}{'Attribute is not available for XML export'|i18n( 'design/admin/xmlexport' )}{/if}</p>
+        </div>
+    </td>
+</tr>
+
+<tr class="{$Attributes.sequence}">
+    <td colspan="4">
+        {class_attribute_view_gui class_attribute=$Attributes.item}
+    </td>
+</tr>
+{/section}
+
+{undef $attribute_categorys $attribute_default_category}
+
+</table>
+
+</div>
+
+{* DESIGN: Content END *}</div>
+<div class="block">
+<div class="controlbar">
+{* DESIGN: Control bar START *}<div class="box-bc">
+        <form action={concat( '/class/edit/', $class.id )|ezurl} method="post">
+
+            {def $languages=$class.prioritized_languages
+                 $availableLanguages = fetch( 'content', 'prioritized_languages' )}
+            {if and( eq( $availableLanguages|count, 1 ), eq( $languages|count, 1 ), is_set( $languages[$availableLanguages[0].locale] ) )}
+                <input type="hidden" name="EditLanguage" value="{$availableLanguages[0].locale|wash()}" />
+            {else}
+                <select name="EditLanguage" title="{'Use this menu to select the language you want to use for editing then click the "Edit" button.'|i18n( 'design/admin/class/view' )|wash()}">
+                    {foreach $languages as $language}
+                        <option value="{$language.locale|wash()}">{$language.name|wash()}</option>
+                    {/foreach}
+                    {if gt( $class.can_create_languages|count, 0 )}
+                        <option value="">{'Another language'|i18n( 'design/admin/class/view')}</option>
+                    {/if}
+                </select>
+            {/if}
+            {undef $languages $availableLanguages}
+            <input class="button" type="submit" name="_DefaultButton" value="{'Edit'|i18n( 'design/admin/class/view' )}" title="{'Edit this class.'|i18n( 'design/admin/class/view' )}" />
+            {* <input class="button" type="submit" name="_DefaultButton" value="{'Remove'|i18n( 'design/admin/class/view' )}" /> *}
+        </form>
+{* DESIGN: Control bar END *}</div>
+</div>
+</div>
+{include uri="design:class/windows.tpl"}
+
+</div>
+
Index: trunk/extension/ezxmlexport/design/admin2/templates/xmlexport/ftpfield.tpl
===================================================================
--- trunk/extension/ezxmlexport/design/admin2/templates/xmlexport/ftpfield.tpl	(revision 0)
+++ trunk/extension/ezxmlexport/design/admin2/templates/xmlexport/ftpfield.tpl	(revision 0)
@@ -0,0 +1,33 @@
+<script type="text/javascript">
+{ezscript_require( array( 'ezxmlexport_contentclasses.js' ) )}
+{ezcss_require( array( 'ftprelated.css' ) )}
+{literal}
+(function( $ )
+{
+    $(document).ready( function()
+    {
+        $("#FTPTestButton").bind( 'click', function(){
+		                  testFTP(e);
+		});
+	});
+})(jQuery);
+{/literal}
+var serverRoot = {'/'|ezurl( 'single', 'full' )};
+</script>
+
+<div class="block">
+        <label>{'FTP target'|i18n('design/admin/xmlexport')} :</label>
+{if ezini( 'FTPSettings', 'FTPShipment', 'ezxmlexport.ini' )|eq( 'enabled' )}
+            <br/>
+            <label for="FTPHost">{'Host'|i18n( 'design/admin/xmlexport' )}</label> <input type="text" name="FTPHost" id="FTPHost" value="{$FTPHostValue|wash}"/>
+            <label for="FTPPort">{'Port'|i18n( 'design/admin/xmlexport' )}</label> <input type="text" name="FTPPort" id="FTPPort" value="{$FTPPortValue|wash}"/>
+            <label for="FTPLogin">{'Login'|i18n( 'design/admin/xmlexport' )}</label> <input type="text" name="FTPLogin" id="FTPLogin" value="{$FTPLoginValue|wash}"/>
+            <label for="FTPPassword">{'Password'|i18n( 'design/admin/xmlexport' )}</label> <input type="text" name="FTPPassword" id="FTPPassword" value="{$FTPPasswordValue|wash}"/>
+            <label for="FTPPath">{'Path'|i18n( 'design/admin/xmlexport' )}</label> <input type="text" name="FTPPath" id="FTPPath" value="{$FTPPathValue|wash}"/>
+            <p><input type="button" name="FTPTestButton" id="FTPTestButton" class="button" value="{'Test'|i18n('design/admin/xmlexport')}"/></p>
+            <div id="FTPSuccess">{'Connection test successful'|i18n( 'design/admin/xmlexport' )}</div>
+            <div id="FTPFailure">{'Connection test failed'|i18n( 'design/admin/xmlexport' )}</div>
+{else}
+    <p>{'FTP settings are disabled, you can enable them in ezxmlexport.ini if you want.'|i18n( 'design/admin/xmlexport' )}</p>
+{/if}
+</div>
\ No newline at end of file
