Index: trunk/packages/ezwebin_extension/ezextension/ezwebin/design/ezwebin/stylesheets/content.css
===================================================================
--- trunk/packages/ezwebin_extension/ezextension/ezwebin/design/ezwebin/stylesheets/content.css	(revision 3289)
+++ trunk/packages/ezwebin_extension/ezextension/ezwebin/design/ezwebin/stylesheets/content.css	(working copy)
@@ -2926,4 +2926,18 @@
 div.shop-userregister ul li
 {
     background-image: none;
+}
+
+/* Sort view (works like in admin) */
+
+div.controlbar label
+{
+    display:inline;
+    padding:0;
+    vertical-align:bottom;
+}
+
+div.controlbar div.right
+{
+    text-align:right;
 }
\ No newline at end of file
Index: trunk/packages/ezwebin_extension/ezextension/ezwebin/design/ezwebin/templates/children.tpl
===================================================================
--- trunk/packages/ezwebin_extension/ezextension/ezwebin/design/ezwebin/templates/children.tpl	(revision 0)
+++ trunk/packages/ezwebin_extension/ezextension/ezwebin/design/ezwebin/templates/children.tpl	(revision 0)
@@ -0,0 +1,259 @@
+{set scope=global persistent_variable=hash('left_menu', false(),
+                                           'extra_menu', false(),
+                                           'show_path', true())}
+
+<div class="border-box">
+<div class="border-tl"><div class="border-tr"><div class="border-tc"></div></div></div>
+<div class="border-ml"><div class="border-mr"><div class="border-mc float-break">
+
+<div class="content-view-children">
+
+<!-- Children START -->
+
+<div class="context-block">
+<form name="children" method="post" action={'content/action'|ezurl}>
+<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
+{* Generic children list for admin interface. *}
+{def $item_type = ezpreference( 'admin_list_limit' )
+     $priority_sorting = $node.sort_array[0][0]|eq( 'priority' )
+     $node_can_edit = $node.can_edit
+     $node_name     = $node.name
+     $number_of_items = min( $item_type, 3)|choose( 10, 10, 25, 50 )
+     $children_count = fetch( content, list_count, hash( parent_node_id, $node.node_id,
+                                                      objectname_filter, $view_parameters.namefilter ) )
+     $children = fetch( content, list, hash( parent_node_id, $node.node_id,
+                                          sort_by, $node.sort_array,
+                                          limit, $number_of_items,
+                                          offset, $view_parameters.offset,
+                                          objectname_filter, $view_parameters.namefilter ) ) }
+
+{* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr">
+
+<h2 class="context-title"><a href={$node.url_alias|ezurl}>{$node_name|wash}</a>&nbsp;-&nbsp;{'Sub items [%children_count]'|i18n( 'design/admin/node/view/full',, hash( '%children_count', $children_count ) )}</h2>
+
+{* DESIGN: Subline *}<div class="header-subline"></div>
+
+{* DESIGN: Header END *}</div></div></div></div></div></div>
+
+{* DESIGN: Content START *}<div class="box-ml"><div class="box-mr"><div class="box-content">
+
+{* If there are children: show list and buttons that belong to the list. *}
+{if $children}
+
+{* Items per page and view mode selector. *}
+<div class="context-toolbar">
+<div class="block">
+<div class="left">
+    <p>
+    {switch match=$number_of_items}
+        {case match=25}
+        <a href={'/user/preferences/set/admin_list_limit/1'|ezurl} title="{'Show 10 items per page.'|i18n( 'design/admin/node/view/full' )}">10</a>
+        <span class="current">25</span>
+        <a href={'/user/preferences/set/admin_list_limit/3'|ezurl} title="{'Show 50 items per page.'|i18n( 'design/admin/node/view/full' )}">50</a>
+        {/case}
+
+        {case match=50}
+        <a href={'/user/preferences/set/admin_list_limit/1'|ezurl} title="{'Show 10 items per page.'|i18n( 'design/admin/node/view/full' )}">10</a>
+        <a href={'/user/preferences/set/admin_list_limit/2'|ezurl} title="{'Show 25 items per page.'|i18n( 'design/admin/node/view/full' )}">25</a>
+        <span class="current">50</span>
+        {/case}
+
+        {case}
+        <span class="current">10</span>
+        <a href={'/user/preferences/set/admin_list_limit/2'|ezurl} title="{'Show 25 items per page.'|i18n( 'design/admin/node/view/full' )}">25</a>
+        <a href={'/user/preferences/set/admin_list_limit/3'|ezurl} title="{'Show 50 items per page.'|i18n( 'design/admin/node/view/full' )}">50</a>
+        {/case}
+    {/switch}
+    </p>
+</div>
+<div class="right">
+    <p>
+    {* switch match=ezpreference( 'admin_children_viewmode' )}
+        {case match='thumbnail'}
+        <a href={'/user/preferences/set/admin_children_viewmode/list'|ezurl} title="{'Display sub items using a simple list.'|i18n( 'design/admin/node/view/full' )}">{'List'|i18n( 'design/admin/node/view/full' )}</a>
+        <span class="current">{'Thumbnail'|i18n( 'design/admin/node/view/full' )}</span>
+        <a href={'/user/preferences/set/admin_children_viewmode/detailed'|ezurl} title="{'Display sub items using a detailed list.'|i18n( 'design/admin/node/view/full' )}">{'Detailed'|i18n( 'design/admin/node/view/full' )}</a>
+        {/case}
+
+        {case match='detailed'}
+        <a href={'/user/preferences/set/admin_children_viewmode/list'|ezurl} title="{'Display sub items using a simple list.'|i18n( 'design/admin/node/view/full' )}">{'List'|i18n( 'design/admin/node/view/full' )}</a>
+        <a href={'/user/preferences/set/admin_children_viewmode/thumbnail'|ezurl} title="{'Display sub items as thumbnails.'|i18n( 'design/admin/node/view/full' )}">{'Thumbnail'|i18n( 'design/admin/node/view/full' )}</a>
+        <span class="current">{'Detailed'|i18n( 'design/admin/node/view/full' )}</span>
+        {/case}
+
+        {case}
+        <span class="current">{'List'|i18n( 'design/admin/node/view/full' )}</span>
+        <a href={'/user/preferences/set/admin_children_viewmode/thumbnail'|ezurl} title="{'Display sub items as thumbnails.'|i18n( 'design/admin/node/view/full' )}">{'Thumbnail'|i18n( 'design/admin/node/view/full' )}</a>
+        <a href={'/user/preferences/set/admin_children_viewmode/detailed'|ezurl} title="{'Display sub items using a detailed list.'|i18n( 'design/admin/node/view/full' )}">{'Detailed'|i18n( 'design/admin/node/view/full' )}</a>
+        {/case}
+    {/switch *}
+    </p>
+</div>
+
+<div class="break"></div>
+
+</div>
+</div>
+
+
+{* detail mode *}
+<div class="content-navigation-childlist">
+    <table class="list" cellspacing="0">
+    <tr>
+        {* Priority column *}
+        {if $priority_sorting}
+            <th class="priority">{'Priority'|i18n( 'design/admin/node/view/full' )}</th>
+        {/if}
+
+        {* Name column *}
+        <th class="name">{'Name'|i18n( 'design/admin/node/view/full' )}</th>
+
+        {* Class type column *}
+        <th class="class">{'Type'|i18n( 'design/admin/node/view/full' )}</th>
+
+        {* Modifier column *}
+        <th class="modifier">{'Modifier'|i18n( 'design/admin/node/view/full' )}</th>
+
+        {* Modified column *}
+        <th class="modified">{'Modified'|i18n( 'design/admin/node/view/full' )}</th>
+
+        {* Section column *}
+        <th class="section">{'Section'|i18n( 'design/admin/node/view/full' )}</th>
+    </tr>
+
+    {foreach $children as $child sequence array( 'bglight', 'bgdark' ) as $sequence_style}
+    {def $section_object = fetch( 'section', 'object', hash( 'section_id', $child.object.section_id ) )}
+
+        <tr class="{$sequence_style}">
+
+        {* Priority *}
+        {if $priority_sorting}
+            <td>
+            {if node_can_edit}
+                <input class="priority" type="text" name="Priority[]" size="3" value="{$child.priority}" title="{'Use the priority fields to control the order in which the items appear. You can use both positive and negative integers. Click the "Update priorities" button to apply the changes.'|i18n( 'design/admin/node/view/full' )|wash}" />
+                <input type="hidden" name="PriorityID[]" value="{$child.node_id}" />
+            {else}
+                <input class="priority" type="text" name="Priority[]" size="3" value="{$child.priority}" title="{'You are not allowed to update the priorities because you do not have permission to edit <%node_name>.'|i18n( 'design/admin/node/view/full',, hash( '%node_name', $node_name ) )|wash}" disabled="disabled" />
+            {/if}
+            </td>
+        {/if}
+
+        {* Name *}
+        <td>{$child.name|wash}</td>
+
+        {* Class type *}
+        <td class="class">{$child.class_name|wash}</td>
+
+        {* Modifier *}
+        <td class="modifier">{$child.object.current.creator.name|wash}</td>
+
+        {* Modified *}
+        <td class="modified">{$child.object.modified|l10n( shortdatetime )}</td>
+
+        {* Section *}
+        <td>{if $section_object}{$section_object.name|wash}{else}<i>{'Unknown'|i18n( 'design/admin/node/view/full' )}</i>{/if}</td>
+
+      </tr>
+    {undef $section_object}
+    {/foreach}
+    </table>
+</div>
+
+{* Else: there are no children. *}
+{else}
+
+<div class="block">
+    <p>{'The current item does not contain any sub items.'|i18n( 'design/admin/node/view/full' )}</p>
+</div>
+
+{/if}
+
+<div class="context-toolbar">
+{include name=navigator
+         uri='design:navigator/alphabetical.tpl'
+         page_uri=$node.url_alias
+         item_count=$children_count
+         view_parameters=$view_parameters
+         node_id=$node.node_id
+         item_limit=$number_of_items}
+</div>
+
+{* DESIGN: Content END *}</div></div></div>
+
+
+{* Button bar for remove and update priorities buttons. *}
+<div class="controlbar">
+
+{* DESIGN: Control bar START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-tc"><div class="box-bl"><div class="box-br">
+
+
+<div class="block">
+
+    {* Update priorities button *}
+    <div class="left">
+    {if and( $priority_sorting, $node_can_edit, $children_count )}
+        <input class="button" type="submit" name="UpdatePriorityButton" value="{'Update priorities'|i18n( 'design/admin/node/view/full' )}" title="{'Apply changes to the priorities of the items in the list above.'|i18n( 'design/admin/node/view/full' )}" />
+        <input type="hidden" name="RedirectURIAfterPriority" value="websitetoolbar/sort/{$node.node_id}" />
+    {else}
+        <input class="button-disabled" type="submit" name="UpdatePriorityButton" value="{'Update priorities'|i18n( 'design/admin/node/view/full' )}" title="{'You cannot update the priorities because you do not have permission to edit the current item or because a non-priority sorting method is used.'|i18n( 'design/admin/node/view/full' )}" disabled="disabled" />
+    {/if}
+    </div>
+
+    {* Sorting *}
+	<div class="right">
+	<label>{'Sorting'|i18n( 'design/admin/node/view/full' )}:</label>
+	
+	{def $sort_fields = hash( 6, 'Class identifier'|i18n( 'design/admin/node/view/full' ),
+	                          7, 'Class name'|i18n( 'design/admin/node/view/full' ),
+	                          5, 'Depth'|i18n( 'design/admin/node/view/full' ),
+	                          3, 'Modified'|i18n( 'design/admin/node/view/full' ),
+	                          9, 'Name'|i18n( 'design/admin/node/view/full' ),
+	                          8, 'Priority'|i18n( 'design/admin/node/view/full' ),
+	                          2, 'Published'|i18n( 'design/admin/node/view/full' ),
+	                          4, 'Section'|i18n( 'design/admin/node/view/full' ) )
+	    $title = 'You cannot set the sorting method for the current location because you do not have permission to edit the current item.'|i18n( 'design/admin/node/view/full' )
+	    $disabled = ' disabled="disabled"' }
+	
+	{if $node_can_edit}
+	    {set $title    = 'Use these controls to set the sorting method for the sub items of the current location.'|i18n( 'design/admin/node/view/full' )}
+	    {set $disabled = ''}
+	    <input type="hidden" name="ContentObjectID" value="{$node.contentobject_id}" />
+	    <input type="hidden" name="RedirectURIAfterSorting" value="websitetoolbar/sort/{$node.node_id}" />
+	{/if}
+	
+	<select name="SortingField" title="{$title}"{$disabled}>
+	{section var=Sort loop=$sort_fields}
+	    <option value="{$Sort.key}" {section show=eq( $Sort.key, $node.sort_field )}selected="selected"{/section}>{$Sort.item}</option>
+	{/section}
+	</select>
+	
+	<select name="SortingOrder" title="{$title}"{$disabled}>
+	    <option value="0"{section show=eq($node.sort_order, 0)} selected="selected"{/section}>{'Descending'|i18n( 'design/admin/node/view/full' )}</option>
+	    <option value="1"{section show=eq($node.sort_order, 1)} selected="selected"{/section}>{'Ascending'|i18n( 'design/admin/node/view/full' )}</option>
+	</select>
+	
+	<input {section show=$disabled}class="button-disabled"{section-else}class="button"{/section} type="submit" name="SetSorting" value="{'Set'|i18n( 'design/admin/node/view/full' )}" title="{$title}" {$disabled} />
+	
+	{undef $sort_fields $title $disabled}
+	</div>
+
+<div class="break"></div>
+
+</div>
+
+{* DESIGN: Control bar END *}</div></div></div></div></div></div>
+
+</div>
+
+</form>
+
+</div>
+
+<!-- Children END -->
+
+{undef}
+</div>
+
+</div></div></div>
+<div class="border-bl"><div class="border-br"><div class="border-bc"></div></div></div>
+</div>
\ No newline at end of file
Index: trunk/packages/ezwebin_extension/ezextension/ezwebin/modules/websitetoolbar/module.php
===================================================================
--- trunk/packages/ezwebin_extension/ezextension/ezwebin/modules/websitetoolbar/module.php	(revision 3289)
+++ trunk/packages/ezwebin_extension/ezextension/ezwebin/modules/websitetoolbar/module.php	(working copy)
@@ -2,10 +2,10 @@
 //
 // Created on: <17-Aug-2004 12:57:54 ls>
 //
-// SOFTWARE NAME: eZ publish
-// SOFTWARE RELEASE: 3.9.2
+// SOFTWARE NAME: eZ Publish
+// SOFTWARE RELEASE: 4.x
 // BUILD VERSION: 18839
-// COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS
+// COPYRIGHT NOTICE: Copyright (C) 1999-2008 eZ Systems AS
 // SOFTWARE LICENSE: GNU General Public License v2.0
 // NOTICE: >
 //   This program is free software; you can redistribute it and/or
@@ -31,6 +31,17 @@
 
 $ViewList = array();
 
+$ViewList['sort'] = array(
+    'functions' => array( ),
+    'script' => 'sort.php',
+    'params' => array( 'NodeID' ),
+    'unordered_params' => array( 'language' => 'Language',
+                                 'offset' => 'Offset',
+                                 'year' => 'Year',
+                                 'month' => 'Month',
+                                 'day' => 'Day' )
+    );
+
 $FunctionList['use'] = array( 'Class' => array( 'name'=> 'Class',
                                                 'values'=> array(),
                                                 'path' => 'classes/',
Index: trunk/packages/ezwebin_extension/ezextension/ezwebin/modules/websitetoolbar/sort.php
===================================================================
--- trunk/packages/ezwebin_extension/ezextension/ezwebin/modules/websitetoolbar/sort.php	(revision 0)
+++ trunk/packages/ezwebin_extension/ezextension/ezwebin/modules/websitetoolbar/sort.php	(revision 0)
@@ -0,0 +1,98 @@
+<?php
+//
+// Created on: <30-Oct-2008 09:31:00 ar>
+//
+// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
+// SOFTWARE NAME: eZ Publish
+// SOFTWARE RELEASE: 4.x
+// COPYRIGHT NOTICE: Copyright (C) 2008 eZ Systems AS
+// SOFTWARE LICENSE: GNU General Public License v2.0
+// NOTICE: >
+//   This program is free software; you can redistribute it and/or
+//   modify it under the terms of version 2.0  of the GNU General
+//   Public License as published by the Free Software Foundation.
+//
+//   This program is distributed in the hope that it will be useful,
+//   but WITHOUT ANY WARRANTY; without even the implied warranty of
+//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//   GNU General Public License for more details.
+//
+//   You should have received a copy of version 2.0 of the GNU General
+//   Public License along with this program; if not, write to the Free
+//   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+//   MA 02110-1301, USA.
+//
+//
+// ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
+//
+
+include_once( 'kernel/common/template.php' );
+
+$nodeID = isset( $Params['NodeID'] ) ? (int) $Params['NodeID'] : 0;
+$Result = array();
+$node   = false;
+$viewParameters = array( 'offset' => $Params['Offset'],
+                         'year' => $Params['Year'],
+                         'month' => $Params['Month'],
+                         'day' => $Params['Day'],
+                         'namefilter' => false );
+
+if ( isset( $Params['UserParameters'] ) )
+{
+    $viewParameters = array_merge( $viewParameters, $Params['UserParameters'] );
+}
+
+
+if ( $nodeID !== 0 )
+{
+	$node = eZContentObjectTreeNode::fetch( $nodeID );
+}
+
+if ( !$node instanceof eZContentObjectTreeNode )
+{
+   $Result['content'] = ezi18n( 'design/standard/ezwebin', 'Invalid or missing parameter: %parameter', null, array( '%parameter' => 'NodeID' ) );
+   return $Result;
+}
+
+$tpl = templateInit();
+$tpl->setVariable( 'node', $node );
+$tpl->setVariable( 'view_parameters', $viewParameters );
+$tpl->setVariable( 'persistent_variable', false );
+
+$parents = $node->attribute( 'path' );
+
+$path = array();
+$titlePath = array();
+foreach ( $parents as $parent )
+{
+    $path[] = array( 'text' => $parent->attribute( 'name' ),
+                     'url' => '/content/view/full/' . $parent->attribute( 'node_id' ),
+                     'url_alias' => $parent->attribute( 'url_alias' ),
+                     'node_id' => $parent->attribute( 'node_id' ) );
+}
+
+$titlePath = $path;
+$path[] = array( 'text' => $node->attribute( 'name' ),
+                 'url' => false,
+                 'url_alias' => false,
+                 'node_id' => $node->attribute( 'node_id' ) );
+
+$titlePath[] = array( 'text' => $node->attribute( 'name' ),
+                      'url' => false,
+                      'url_alias' => false );
+
+$tpl->setVariable( 'node_path', $path );
+
+
+$Result['content'] = $tpl->fetch( 'design:children.tpl' );
+$Result['path'] = $path;
+$Result['title_path'] = $titlePath;
+
+$contentInfoArray = array();
+$contentInfoArray['persistent_variable'] = $tpl->variable( 'persistent_variable' );
+$Result['content_info'] = $contentInfoArray;
+
+
+return $Result;
+
+?>
\ No newline at end of file
