Version 5.0.0 beta 10
This commit is contained in:
1 parent
56979f8ee8
commit
264eeb97e0
325 files changed
+6442
-1849
No files matched your search
@@ -578,7 +578,13 @@ class Album extends Model
|
||||
|
||||
$return[] = new Text( 'album_name', $album ? $album->name : '', $required ?: NULL );
|
||||
|
||||
$return[] = new Editor( 'album_description', $album ? $album->description : '', FALSE, array( 'app' => 'gallery', 'key' => 'Albums', 'autoSaveKey' => ( $album ? "gallery_album_{$album->id}_desc" : "gallery-new-album" ), 'attachIds' => $album ? array( $album->id, NULL, 'description' ) : NULL ) );
|
||||
$return[] = new Editor( 'album_description', $album ? $album->description : '', FALSE, array(
|
||||
'app' => 'gallery',
|
||||
'key' => 'Albums',
|
||||
'autoSaveKey' => ( $album ? "gallery_album_{$album->id}_desc" : "gallery-new-album" ),
|
||||
'attachIds' => $album ? array( $album->id, NULL, 'description' ) : NULL,
|
||||
'allowAttachments' => false
|
||||
) );
|
||||
|
||||
$return[] = new Node( 'album_category', $category?->id, $required ?: NULL, array(
|
||||
'class' => 'IPS\gallery\Category',
|
||||
|
||||
@@ -36,6 +36,7 @@ use IPS\gallery\Album;
|
||||
use IPS\gallery\Application;
|
||||
use IPS\gallery\Category;
|
||||
use IPS\gallery\Image;
|
||||
use IPS\Helpers\Badge;
|
||||
use IPS\Helpers\Menu;
|
||||
use IPS\Member;
|
||||
use IPS\Node\Model;
|
||||
@@ -752,4 +753,25 @@ Filter
|
||||
}
|
||||
return $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return badges that should be displayed with the content header
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function badges() : array
|
||||
{
|
||||
$badges = parent::badges();
|
||||
|
||||
if( $this->type == Album::AUTH_TYPE_PRIVATE )
|
||||
{
|
||||
$badges[] = new Badge( Badge::BADGE_WARNING, 'album_private_badge' );
|
||||
}
|
||||
elseif( $this->type == Album::AUTH_TYPE_RESTRICTED )
|
||||
{
|
||||
$badges[] = new Badge( Badge::BADGE_WARNING, 'album_friend_only_badge' );
|
||||
}
|
||||
|
||||
return $badges;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user