streams/Code/Widget/Mailmenu.php

43 lines
1 KiB
PHP
Raw Normal View History

2017-03-16 03:56:12 +00:00
<?php
2022-02-16 04:08:28 +00:00
namespace Code\Widget;
2017-03-16 03:56:12 +00:00
2022-02-16 04:08:28 +00:00
use Code\Render\Theme;
2022-02-12 20:43:29 +00:00
2021-12-02 23:02:31 +00:00
class Mailmenu
{
2017-03-16 03:56:12 +00:00
2021-12-02 23:02:31 +00:00
public function widget($arr)
{
2017-03-16 03:56:12 +00:00
2021-12-03 03:01:39 +00:00
if (!local_channel()) {
2021-12-02 23:02:31 +00:00
return;
2021-12-03 03:01:39 +00:00
}
2017-03-16 03:56:12 +00:00
2022-02-12 20:43:29 +00:00
return replace_macros(Theme::get_template('message_side.tpl'), array(
2021-12-02 23:02:31 +00:00
'$title' => t('Private Mail Menu'),
'$combined' => array(
'label' => t('Combined View'),
'url' => z_root() . '/mail/combined',
'sel' => (argv(1) == 'combined'),
),
'$inbox' => array(
'label' => t('Inbox'),
'url' => z_root() . '/mail/inbox',
'sel' => (argv(1) == 'inbox'),
),
'$outbox' => array(
'label' => t('Outbox'),
'url' => z_root() . '/mail/outbox',
'sel' => (argv(1) == 'outbox'),
),
'$new' => array(
'label' => t('New Message'),
'url' => z_root() . '/mail/new',
'sel' => (argv(1) == 'new'),
)
));
}
2017-03-16 03:56:12 +00:00
}