diff --git a/controller/smscontroller.php b/controller/smscontroller.php index 66ac20a..af37a61 100644 --- a/controller/smscontroller.php +++ b/controller/smscontroller.php @@ -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); } diff --git a/templates/main.php b/templates/main.php index d975252..cb0debf 100644 --- a/templates/main.php +++ b/templates/main.php @@ -6,7 +6,10 @@