mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 07:56:23 +00:00
Improve mailbox management for navigation
This commit is contained in:
parent
d456178c18
commit
0a7e6f09f8
@ -35,8 +35,20 @@ class SmsController extends Controller {
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function index () {
|
||||
$mboxes = array(
|
||||
'PNLConversations' => array(
|
||||
'label' => 'Conversations',
|
||||
'phoneNumbers' => $this->smsMapper->getAllPeersPhoneNumbers($this->userId),
|
||||
'url' => \OCP\Util::linkToAbsolute('ocsms', 'index.php', array('feed' => 'conversations'))
|
||||
),
|
||||
'PNLDrafts' => array(
|
||||
'label' => 'Drafts',
|
||||
'phoneNumbers' => array(),
|
||||
'url' => \OCP\Util::linkToAbsolute('ocsms', 'index.php', array('feed' => 'drafts'))
|
||||
)
|
||||
)
|
||||
$params = array('user' => $this->userId,
|
||||
"PNLConversations" => $this->smsMapper->getAllPeersPhoneNumbers($this->userId)
|
||||
'mailboxes' => $mboxes
|
||||
);
|
||||
return new TemplateResponse($this->appName, 'main', $params);
|
||||
}
|
||||
|
@ -6,7 +6,10 @@
|
||||
<div id="app">
|
||||
<div id="app-navigation">
|
||||
<?php print_unescaped($this->inc('part.navigation')); ?>
|
||||
<?php print_unescaped($this->inc('part.settings')); ?>
|
||||
<?php /*print_unescaped($this->inc('part.settings'));*/ ?>
|
||||
</div>
|
||||
|
||||
<div id="app-mailbox-content">
|
||||
</div>
|
||||
|
||||
<div id="app-content">
|
||||
|
@ -1,19 +1,12 @@
|
||||
<ul>
|
||||
<?php if (count($_["PNLConversations"]) > 0) { ?>
|
||||
<li><a href="#">Conversations</a>
|
||||
<ul>
|
||||
<?php foreach ($_["PNLConversations"] as $number) { ?>
|
||||
<li><?php p($number); ?></li>
|
||||
<?php } ?>
|
||||
</ul></li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (count($_["PNLDrafts"]) > 0) { ?>
|
||||
<li><a href="#">Drafts</a>
|
||||
<ul>
|
||||
<?php foreach ($_["PNLDrafts"] as $number) { ?>
|
||||
<li><?php p($number); ?></li>
|
||||
<?php } ?>
|
||||
</ul></li>
|
||||
<?php } ?>
|
||||
<?php foreach ($_['mailboxes'] as $mboxName => $mailbox) { ?>
|
||||
<?php if (count($mailbox['phoneNumbers']) > 0) { ?>
|
||||
<li><a href="<?php p($mailbox['url']); ?>"><?php p($mailbox['label']); ?></a>
|
||||
<ul>
|
||||
<?php foreach ($mailbox['phoneNumbers'] as $number) { ?>
|
||||
<li><?php p($number); ?></li>
|
||||
<?php } ?>
|
||||
</ul></li>
|
||||
<?php }
|
||||
} ?>
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user