From 16d738f9a4bb74e68b56307ff96ea14de9cff908 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 29 Mar 2024 15:26:00 +0000 Subject: [PATCH] started with template fixes --- Admin/Install/Navigation.install.json | 40 ++++++++--- Theme/Backend/mail-create.tpl.php | 10 +-- Theme/Backend/mail-dashboard.tpl.php | 9 --- Theme/Backend/mail-inbox.tpl.php | 93 ++++++++++++++++++++++++++ Theme/Backend/mail-templates.tpl.php | 29 +------- Theme/Backend/message-settings.tpl.php | 4 +- 6 files changed, 130 insertions(+), 55 deletions(-) create mode 100644 Theme/Backend/mail-inbox.tpl.php diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 4550f82..fe4b0d8 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -18,7 +18,7 @@ "pid": "/", "type": 3, "subtype": 1, - "name": "Inbox", + "name": "Dashboard", "uri": "{/base}/messages/dashboard?{?}", "target": "self", "icon": null, @@ -33,6 +33,22 @@ "pid": "/", "type": 3, "subtype": 1, + "name": "Inbox", + "uri": "{/base}/messages/inbox?{?}", + "target": "self", + "icon": null, + "order": 4, + "from": "Messages", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1001201001, + "children": [], + "status": 3 + }, + { + "id": 1001204001, + "pid": "/", + "type": 3, + "subtype": 1, "name": "Outbox", "uri": "{/base}/messages/outbox?{?}", "target": "self", @@ -41,10 +57,11 @@ "from": "Messages", "permission": { "permission": 2, "category": null, "element": null }, "parent": 1001201001, - "children": [] + "children": [], + "status": 3 }, { - "id": 1001204001, + "id": 1001205001, "pid": "/", "type": 3, "subtype": 1, @@ -56,10 +73,11 @@ "from": "Messages", "permission": { "permission": 2, "category": null, "element": null }, "parent": 1001201001, - "children": [] + "children": [], + "status": 3 }, { - "id": 1001205001, + "id": 1001206001, "pid": "/", "type": 3, "subtype": 1, @@ -71,10 +89,11 @@ "from": "Messages", "permission": { "permission": 2, "category": null, "element": null }, "parent": 1001201001, - "children": [] + "children": [], + "status": 3 }, { - "id": 1001206001, + "id": 1001207001, "pid": "/", "type": 3, "subtype": 1, @@ -86,10 +105,11 @@ "from": "Messages", "permission": { "permission": 2, "category": null, "element": null }, "parent": 1001201001, - "children": [] + "children": [], + "status": 3 }, { - "id": 1001207001, + "id": 1001208001, "pid": "/", "type": 3, "subtype": 1, @@ -104,7 +124,7 @@ "children": [] }, { - "id": 1001208001, + "id": 1001209001, "pid": "/", "type": 3, "subtype": 1, diff --git a/Theme/Backend/mail-create.tpl.php b/Theme/Backend/mail-create.tpl.php index f098b99..30cc43f 100755 --- a/Theme/Backend/mail-create.tpl.php +++ b/Theme/Backend/mail-create.tpl.php @@ -18,12 +18,12 @@ echo $this->data['nav']->render(); ?>
-
-
-
-
+
+
+
+
-
+
diff --git a/Theme/Backend/mail-dashboard.tpl.php b/Theme/Backend/mail-dashboard.tpl.php index 2789115..5251c8e 100755 --- a/Theme/Backend/mail-dashboard.tpl.php +++ b/Theme/Backend/mail-dashboard.tpl.php @@ -72,21 +72,12 @@ echo $this->data['nav']->render(); ?>
getHtml('Channels'); ?>
- asdf -
-
- -
-
getHtml('Email'); ?>
-
- asdf
getHtml('Chat'); ?>
- asdf
diff --git a/Theme/Backend/mail-inbox.tpl.php b/Theme/Backend/mail-inbox.tpl.php new file mode 100644 index 0000000..2789115 --- /dev/null +++ b/Theme/Backend/mail-inbox.tpl.php @@ -0,0 +1,93 @@ +connect('{imap.gmail.com:993/imap/ssl}INBOX', 'dev.orange.management@gmail.com', 'DEV_PASSWORD'); +$unseen = $mail->getInboxUnseen(); +$seen = $mail->getInboxSeen(); +$quota = $mail->getQuota(); +*/ + +$messages = $this->data['messages'] ?? []; + +$previous = empty($messages) ? 'messages/dashboard' : 'messages/dashboard?{?}&id=' . \reset($messages)->id . '&ptype=p'; +$next = empty($messages) ? 'messages/dashboard' : 'messages/dashboard?{?}&id=' . \end($messages)->id . '&ptype=n'; + +echo $this->data['nav']->render(); ?> + +
+
+
+
getHtml('Messages'); ?>download
+ + + + + $value) : ++$count; + $url = UriFactory::build('{/base}/messages/mail/view?{?}&id=' . $value->uid); ?> + + +
+ getHtml('Tag'); ?> + getHtml('Subject'); ?> + getHtml('From'); ?> + getHtml('Date'); ?> +
+ printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>> + printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>>printHtml(\str_replace('_',' ', \mb_decode_mimeheader($value->subject))); ?> + printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>>printHtml($value->from); ?> + printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>>printHtml((new \DateTime($value->date))->format('Y-m-d H:i:s')); ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+ +
+
+ +
+ + +
+
getHtml('Channels'); ?>
+
+ asdf +
+
+ +
+
getHtml('Email'); ?>
+
+ asdf +
+
+ +
+
getHtml('Chat'); ?>
+
+ asdf +
+
+
+
diff --git a/Theme/Backend/mail-templates.tpl.php b/Theme/Backend/mail-templates.tpl.php index c5baa58..9fbe902 100755 --- a/Theme/Backend/mail-templates.tpl.php +++ b/Theme/Backend/mail-templates.tpl.php @@ -22,7 +22,7 @@ $next = empty($messages) ? 'messages/dashboard' : 'messages/dashboard?{?}&id echo $this->data['nav']->render(); ?>
-
+
getHtml('Templates'); ?>download
@@ -51,31 +51,4 @@ echo $this->data['nav']->render(); ?> getHtml('Next', '0', '0'); ?> - -
- - -
-
getHtml('Channels'); ?>
-
- asdf -
-
- -
-
getHtml('Email'); ?>
-
- asdf -
-
- -
-
getHtml('Chat'); ?>
-
- asdf -
-
-
diff --git a/Theme/Backend/message-settings.tpl.php b/Theme/Backend/message-settings.tpl.php index 7354c1e..948bbe0 100755 --- a/Theme/Backend/message-settings.tpl.php +++ b/Theme/Backend/message-settings.tpl.php @@ -12,9 +12,7 @@ */ declare(strict_types=1); -$mail = new \phpOMS\Message\Mail\Imap(); -$mail->connect('{imap.gmail.com:993/imap/ssl}', 'dev.orange.management@gmail.com', 'DEV_PASSWORD'); -$boxes = $mail->getBoxes(); +$boxes = []; echo $this->data['nav']->render(); ?>