Version 5.0.0 beta 6
This commit is contained in:
1 parent
57d9db6ce2
commit
fa2a720105
115 files changed
+1823
-1147
No files matched your search
+8
-10
@@ -6527,7 +6527,7 @@ abstract class Item extends Content
|
||||
$member = $member ?: Member::loggedIn();
|
||||
|
||||
/* Check it isn't hidden */
|
||||
if ( IPS::classUsesTrait( $this, 'IPS\Content\Hideble' ) and $this->hidden() )
|
||||
if ( $this->hidden() !== 0 )
|
||||
{
|
||||
/* If we're a moderator who can see hidden items it's fine, unless it's a guest post before register */
|
||||
if ( $this->hidden() !== -3 and static::canViewHiddenItems( $member, $this->containerWrapper() ) )
|
||||
@@ -7147,10 +7147,11 @@ abstract class Item extends Content
|
||||
|
||||
if ( IPS::classUsesTrait( $this, 'IPS\Content\FuturePublishing' ) AND $this->isFutureDate() AND static::canFuturePublish($member, $this->container()))
|
||||
{
|
||||
$menu->add( new ContentMenuLink( url: $this->url()->csrf()->setQueryString( array( 'action' => 'publish' ) ), languageString: 'publish', dataAttributes: ['data-confirm','title=\'{lang="publish_desc"}\''], identifier: 'publish' ) );
|
||||
$publish = new ContentMenuLink( url: $this->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'publish' ) ), languageString: 'publish', dataAttributes: [ 'title=\'{lang="publish_desc"}\'' ], identifier: 'publish' );
|
||||
$publish->requiresConfirm();
|
||||
$menu->add( $publish );
|
||||
}
|
||||
|
||||
|
||||
if( IPS::classUsesTrait( $this, 'IPS\Content\Pinnable' ) AND $this->canPin( $member ) )
|
||||
{
|
||||
$menu->add( new ContentMenuLink( $this->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'pin' ) ), 'pin', identifier: 'pin' ) );
|
||||
@@ -7217,8 +7218,7 @@ abstract class Item extends Content
|
||||
if( $this->canUnarchive( $member ) )
|
||||
{
|
||||
$unarchive = new ContentMenuLink( url: $this->url()->csrf()->setQueryString( array( 'do' => 'unarchive' ) ), languageString: 'unarchive');
|
||||
$unarchive->addAttribute( 'data-confirm')
|
||||
->addAttribute( 'data-confirmSubMessage', $this->unarchiveBlurb() );
|
||||
$unarchive->requiresConfirm( $this->unarchiveBlurb() );
|
||||
$menu->add( $unarchive );
|
||||
}
|
||||
|
||||
@@ -7262,7 +7262,7 @@ abstract class Item extends Content
|
||||
if( $this->canDelete( $member ) )
|
||||
{
|
||||
$delete = new ContentMenuLink( url: $this->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' =>'delete' ) ), languageString: 'delete');
|
||||
$delete->addAttribute( 'data-confirm' );
|
||||
$delete->requiresConfirm();
|
||||
$menu->add( $delete );
|
||||
}
|
||||
|
||||
@@ -7284,9 +7284,7 @@ abstract class Item extends Content
|
||||
if( $this->canToggleItemModeration( $member ) )
|
||||
{
|
||||
$toggle = new ContentMenuLink( url: $this->url()->csrf()->setQueryString( array( 'do' => 'toggleItemModeration' ) ), languageString: $this->itemModerationEnabled() ?'disable_topic_moderation' : 'enable_topic_moderation' );
|
||||
$toggle
|
||||
->addAttribute( 'data-confirm')
|
||||
->addAttribute( 'data-confirmSubMessage', Member::loggedIn()->language()->addToStack( $this->itemModerationEnabled() ? 'disable_topic_moderation_confirm' : 'enable_topic_moderation_confirm' ) );
|
||||
$toggle->requiresConfirm( $this->itemModerationEnabled() ? 'disable_topic_moderation_confirm' : 'enable_topic_moderation_confirm' );
|
||||
$menu->add( $toggle );
|
||||
}
|
||||
|
||||
@@ -7296,7 +7294,7 @@ abstract class Item extends Content
|
||||
foreach ( $actions as $action )
|
||||
{
|
||||
$actionLink = new ContentMenuLink( url: $this->url()->csrf()->setQueryString( array( 'do' => 'savedAction', 'action' => $action->_id ) ), languageString: $action->_title );
|
||||
$actionLink->addAttribute( 'data-confirm' );
|
||||
$actionLink->requiresConfirm();
|
||||
$menu->add( $actionLink );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user