diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-08-14 11:27:16 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-08-14 11:27:16 +0000 |
| commit | d3ca93a34895a2b99cb07661e3b19421268af1db (patch) | |
| tree | 7bdcc380db84b5d795cd02dbfbaa68d86fc846f3 /roundcubemail/program/steps | |
| parent | f310872f808cf4a76dccf9e87b2cdc724a1b9cdc (diff) | |
Added template object for current mailbox name (#1485256)
git-svn-id: https://svn.roundcube.net/trunk@1647 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 22 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/list.inc | 2 | ||||
| -rw-r--r-- | roundcubemail/program/steps/mail/show.inc | 1 |
3 files changed, 25 insertions, 0 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 7a986c16b..a40811155 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -529,6 +529,27 @@ function rcmail_get_messagecount_text($count=NULL, $page=NULL) return Q($out); } +/** + * + */ +function rcmail_mailbox_name_display($attrib) +{ + global $RCMAIL; + + if (!$attrib['id']) + $attrib['id'] = 'rcmmailboxname'; + + $RCMAIL->output->add_gui_object('mailboxname', $attrib['id']); + + return html::span($attrib, rcmail_get_mailbox_name_text()); +} + +function rcmail_get_mailbox_name_text() +{ + global $RCMAIL; + return rcmail_localize_foldername($RCMAIL->imap->get_mailbox_name()); +} + /** * Convert the given message part to proper HTML @@ -1179,6 +1200,7 @@ $OUTPUT->add_handlers(array( 'messages' => 'rcmail_message_list', 'messagecountdisplay' => 'rcmail_messagecount_display', 'quotadisplay' => 'rcmail_quota_display', + 'mailboxname' => 'rcmail_mailbox_name_display', 'messageheaders' => 'rcmail_message_headers', 'messagebody' => 'rcmail_message_body', 'messagecontentframe' => 'rcmail_messagecontent_frame', diff --git a/roundcubemail/program/steps/mail/list.inc b/roundcubemail/program/steps/mail/list.inc index e2fafc2fc..e09919cb2 100644 --- a/roundcubemail/program/steps/mail/list.inc +++ b/roundcubemail/program/steps/mail/list.inc @@ -51,6 +51,8 @@ $pages = ceil($count/$IMAP->page_size); $OUTPUT->set_env('messagecount', $count); $OUTPUT->set_env('pagecount', $pages); $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count)); +$OUTPUT->command('set_mailboxname', rcmail_get_mailbox_name_text()); + // add message rows diff --git a/roundcubemail/program/steps/mail/show.inc b/roundcubemail/program/steps/mail/show.inc index ef88c7baf..4256458d3 100644 --- a/roundcubemail/program/steps/mail/show.inc +++ b/roundcubemail/program/steps/mail/show.inc @@ -194,6 +194,7 @@ function rcmail_remote_objects_msg($attrib) $OUTPUT->add_handlers(array( 'messageattachments' => 'rcmail_message_attachments', + 'mailboxname' => 'rcmail_mailbox_name_display', 'blockedobjects' => 'rcmail_remote_objects_msg')); |
