Skip to content

Commit

Permalink
- Fixed bug #6814: The drafts of top level nodes can't be removed.
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/patrick.allaert/svn-git/ezp-repo/ezpublish/stable/3.5@12506 a01eee8c-daba-0310-acae-fa49f3023285
  • Loading branch information
Sergiy Pushchin committed Jul 13, 2005
1 parent 63cc8de commit 70de49c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 24 deletions.
7 changes: 1 addition & 6 deletions design/admin/templates/content/versions.tpl
Expand Up @@ -130,7 +130,7 @@

{* Remove. *}
<td>
{section show=and( or( eq( $Versions.item.status, 0 ),eq( $Versions.item.status, 3), eq( $Versions.item.status, 4 ) ), $can_remove )}
{section show=or( eq( $Versions.item.status, 0 ),eq( $Versions.item.status, 3), eq( $Versions.item.status, 4 ) )}
<input type="checkbox" name="DeleteIDArray[]" value="{$Versions.item.id}" title="{'Select version #%version_number for removal.'|i18n( 'design/admin/content/versions',, hash( '%version_number', $Versions.item.version ) )}" />
{section-else}
<input type="checkbox" name="" value="" disabled="disabled" title="{'Version #%version_number can not be removed because it is either the published version of the object or because you do not have permissions to remove it.'|i18n( 'design/admin/content/versions',, hash( '%version_number', $Versions.item.version ) )}" />
Expand Down Expand Up @@ -202,12 +202,7 @@
{* 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">
{section show=$can_remove}
<input class="button" type="submit" name="RemoveButton" value="{'Remove selected'|i18n( 'design/admin/content/versions' )}" title="{'Remove the selected versions from the object.'|i18n( 'design/admin/content/versions' )}" />
{section-else}
<input class="button-disabled" type="submit" name="RemoveButton" value="{'Remove selected'|i18n( 'design/admin/content/versions' )}" disabled="disabled" title="{'You do not have permissions to remove versions from this object.'|i18n( 'design/admin/content/versions' )}" />
{/section}

<input type="hidden" name="EditLanguage" value="{$edit_language}" />
<input type="hidden" name="DoNotEditAfterCopy" value="" />
</div>
Expand Down
16 changes: 4 additions & 12 deletions design/standard/templates/content/versions.tpl
Expand Up @@ -44,11 +44,7 @@

<table class="list" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
{section show=$can_remove}
<th colspan="2">
{section-else}
<th>
{/section}
{"Version"|i18n("design/standard/content/version")}:
</th>
<th>
Expand All @@ -68,13 +64,11 @@
</tr>
{section name=Version loop=$version_list sequence=array(bglight,bgdark)}
<tr>
{section show=$can_remove}
<td class="{$Version:sequence}">
{section show=or(eq($Version:item.status,0),eq($Version:item.status,3),eq($Version:item.status,4))}
<td class="{$Version:sequence}">
{section show=or(eq($Version:item.status,0),eq($Version:item.status,3),eq($Version:item.status,4))}
<input type="checkbox" name="DeleteIDArray[]" value="{$Version:item.id}" />
{/section}
</td>
{/section}
{/section}
</td>
<td class="{$Version:sequence}">
<a href={concat("/content/versionview/",$object.id,"/",$Version:item.version,"/",$edit_language|not|choose(array($edit_language,"/"),""))|ezurl}>{$Version:item.version}</a>
{section show=eq($Version:item.version,$object.current_version)}*{/section}
Expand All @@ -101,13 +95,11 @@
{/section}
</tr>
{/section}
{section show=$can_remove}
<tr>
<td colspan="8">
{include uri="design:gui/trash.tpl"}
</td>
</tr>
{/section}
</table>

{include name=navigator
Expand Down
1 change: 1 addition & 0 deletions doc/changelogs/3.5/unstable/CHANGELOG-3.5.4rc1-to-3.5.4
Expand Up @@ -10,5 +10,6 @@ Changes from 3.5.4rc1 to 3.5.4
- Fixed bug #6884: Wrong customer name in order details.
- Fixed bug #6757: eZMail does not set the required Date header.
- Fixed bug #5766: Typo in shop/module.php.
- Fixed bug #6814: The drafts of top level nodes can't be removed

*Translations:
12 changes: 6 additions & 6 deletions kernel/content/versions.php
Expand Up @@ -67,8 +67,8 @@
if ( $object->attribute( 'can_edit' ) )
$canEdit = true;

if ( $object->attribute( 'can_remove' ) )
$canRemove = true;
$canRemove = true;

$http =& eZHTTPTool::instance();

if ( $http->hasSessionVariable( 'ExcessVersionHistoryLimit' ) )
Expand Down Expand Up @@ -177,11 +177,11 @@
if ( $Module->hasActionParameter( 'EditLanguage' ) and
$Module->actionParameter( 'EditLanguage' ) )
$EditLanguage = $Module->actionParameter( 'EditLanguage' );

if ( !$http->hasPostVariable( 'DoNotEditAfterCopy' ) )
{
{
return $Module->redirectToView( 'edit', array( $ObjectID, $newVersionID, $EditLanguage ) );
}
}
}
}
}
Expand Down Expand Up @@ -265,7 +265,7 @@
$tpl->setVariable( 'versions', $versions );
$tpl->setVariable( 'edit_warning', $editWarning );
$tpl->setVariable( 'can_edit', $canEdit );
$tpl->setVariable( 'can_remove', $canRemove );
//$tpl->setVariable( 'can_remove', $canRemove );
$tpl->setVariable( 'user_id', $user->attribute( 'contentobject_id' ) );

$Result = array();
Expand Down

0 comments on commit 70de49c

Please sign in to comment.