From a9b3b28d001941921aa70d37fdc87c758a163a44 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 05 Jun 2026 16:47:03 +0000
Subject: [PATCH] =Some hefty changes to FeedBlock. Transitioning to loading first page in php to save on extra requests. Got a bit to do yet, but I have to work on Northeh for a bit here.

---
 inc/registrar/Fields.php |   75 ++++++++++++++++++++++++++-----------
 1 files changed, 53 insertions(+), 22 deletions(-)

diff --git a/inc/registrar/Fields.php b/inc/registrar/Fields.php
index f310a3f..522b5d1 100644
--- a/inc/registrar/Fields.php
+++ b/inc/registrar/Fields.php
@@ -50,9 +50,56 @@
 
 	public function addPostFields():void
 	{
+		$statuses = [
+//					'all' => [
+//						'icon' => 'infinity',
+//						'label' => 'Everything',
+//					],
+			'publish' => [
+				'icon' => 'eye',
+				'label' => 'Live',
+			],
+			'draft' => [
+				'icon' => 'eye-closed',
+				'label' => 'Hidden',
+			],
+			'trash' => [
+				'label' => 'Scrapped',
+				'icon' => 'trash',
+			],
+//			'delete'	=> [
+//				'label'	=> 'Permanently Delete',
+//				'icon'	=> 'trash'
+//			]
+		];
+		if ($this->registrar->hasFeature('is_calendar')) {
+			$statuses = [
+				'future'	=> [
+					'icon'	=> '',
+					'label'	=> 'Upcoming',
+				],
+				'past'	=> [
+					'icon'	=> '',
+					'label'	=> 'Past',
+				],
+				'repeat'	=> [
+					'icon'	=> '',
+					'label'	=> 'Repeating',
+				],
+				'draft' => [
+					'icon' => 'eye-closed',
+					'label' => 'Hidden',
+				],
+				'trash' => [
+					'label' => 'Scrapped',
+					'icon' => 'trash',
+				],
+			];
+		}
 		$fields = [
 			'post_thumbnail'	=> [
 				'type'	=> 'upload',
+				'subtype'	=> 'image',
 				'multiple'=> false,
 				'label'	=> 'Main Image',
 			],
@@ -60,6 +107,11 @@
 				'type'	=> 'datetime',
 				'label'	=> 'Date',
 			],
+			'post_modified' => [
+				'type'	=> 'datetime',
+				'label'	=> 'Date Modified',
+				'hidden'	=> true,
+			],
 			'post_content' => [
 				'type'	=> 'textarea',
 				'quill'	=> true,
@@ -79,28 +131,7 @@
 				'type'		=> 'radio',
 				'label'		=> 'Status',
 				'default'	=> 'draft',
-				'options'	=> [
-					'all' => [
-						'icon' => 'infinity',
-						'label' => 'Everything',
-					],
-					'publish' => [
-						'icon' => 'eye',
-						'label' => 'Live',
-					],
-					'draft' => [
-						'icon' => 'eye-closed',
-						'label' => 'Hidden',
-					],
-					'trash' => [
-						'label' => 'Scrapped',
-						'icon' => 'trash',
-					],
-					'delete'	=> [
-						'label'	=> 'Permanently Delete',
-						'icon'	=> 'trash'
-					]
-				]
+				'options'	=> $statuses
 			]
 		];
 

--
Gitblit v1.10.0