aboutsummaryrefslogtreecommitdiffstats
path: root/mod/message.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-11 21:30:23 -0700
committerFriendika <info@friendika.com>2011-10-11 21:30:23 -0700
commitdf7702709b07560af1d469f0835586af317f39b0 (patch)
treef53784dc3be1e60ff201c2debe4ab76e7bb0d6da /mod/message.php
parent3ef7dcac4b84f6f78dcba5cd768fc08f9cfc1067 (diff)
downloadvolse-hubzilla-df7702709b07560af1d469f0835586af317f39b0.tar.gz
volse-hubzilla-df7702709b07560af1d469f0835586af317f39b0.tar.bz2
volse-hubzilla-df7702709b07560af1d469f0835586af317f39b0.zip
common tabs to notifications and mail
Diffstat (limited to 'mod/message.php')
-rw-r--r--mod/message.php35
1 files changed, 23 insertions, 12 deletions
diff --git a/mod/message.php b/mod/message.php
index d4772d026..39aa0479f 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -45,21 +45,32 @@ function message_content(&$a) {
$myprofile = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
- if (($a->argc > 1) && ($a->argv[1] === 'new')) {
- $tab = 'new';
- } else if ($a->argc == 2 && $a->argv[1] === 'sent') {
- $tab = 'sent';
- } else {
- $tab = 'inbox';
- }
-
+
+ $tabs = array(
+ array(
+ 'label' => t('Inbox'),
+ 'url'=> $a->get_baseurl() . '/message',
+ 'sel'=> (($a->argc == 1) ? 'active' : ''),
+ ),
+ array(
+ 'label' => t('Outbox'),
+ 'url' => $a->get_baseurl() . '/message/sent',
+ 'sel'=> (($a->argv[1] == 'sent') ? 'active' : ''),
+ ),
+ array(
+ 'label' => t('New Message'),
+ 'url' => $a->get_baseurl() . '/message/new',
+ 'sel'=> (($a->argv[1] == 'new') ? 'active' : ''),
+ ),
+ );
+ $tpl = get_markup_template('common_tabs.tpl');
+ $tab_content = replace_macros($tpl, array('$tabs'=>$tabs));
+
+
$tpl = get_markup_template('mail_head.tpl');
$header = replace_macros($tpl, array(
'$messages' => t('Messages'),
- '$inbox' => t('Inbox'),
- '$outbox' => t('Outbox'),
- '$new' => t('New Message'),
- '$activetab' => $tab
+ '$tab_content' => $tab_content
));