Jake Vanderwerf
2026-07-05 fff721dd185f5b97f7ae7a6e64189e55887ff590
inc/ui/CRUDSkeleton.php
@@ -38,6 +38,7 @@
   protected string $singular = '';
   protected string $plural = '';
   protected string $icon;
   protected string $emptyState = '';
   // Capabilities
   protected array $caps = [];
@@ -145,6 +146,15 @@
      return $this;
   }
   public function icon(string $icon):void
   {
      $this->icon = $icon;
   }
   public function getIcon():string
   {
      return $this->icon;
   }
   /**
    * Set content type information
    */
@@ -533,7 +543,7 @@
    * Render the CRUD interface
    */
   public function render(): void {
      $config = $this->build();
      $classes = array_merge(['dashboard-page', $this->dataType], $this->additionalClasses);
//    ob_start();
@@ -1102,15 +1112,23 @@
   }
   protected function renderEmptyState():string
   {
      ob_start();
      ?>
      <div class="empty-state">
         <h3><?=jvbDashIcon($this->icon)?>Nothing here<?=jvbDashIcon($this->icon)?></h3>
         <p>It doesn't look like you have any <?=$this->plural ?> yet.</p>
         <p><small><i>Add many by uploading images above.</i>, or click the "<?=jvbDashIcon('plus-square')?>" button to add one at a time.</small></p>
      </div>
      <?php
      return ob_get_clean();
      return empty($this->emptyState) ? sprintf(
         '<div class="empty-state">
            <h3>%sNothing here%s</h3>
            <p>It doesn\'t look like you have any %s yet.</p>
         <p><small><i>Add many by uploading images above.</i>, or click the "%s" button to add one at a time.</small></p>
         </div>',
         jvbDashIcon($this->icon),
         jvbDashIcon($this->icon),
         $this->plural,
         jvbDashIcon('plus-square')
      ) : $this->emptyState;
   }
   public function setEmptyState(string $state):void
   {
      $this->emptyState = $state;
   }
   protected function renderGalleryPreviewTemplate():void