Copyright 2005-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Ben Chavet (ben@horde.org)
Автор: Duck (duck@obala.net)
Наследование: extends Horde_Tree_Renderer_Html
Пример #1
0
    case '2':
        $threads_template = 'messages/flat';
        if (!$prefs->isLocked('thread_view_bodies')) {
            $actions[] = Horde::link($url->add('bodies', 0), _("Hide bodies")) . _("Hide bodies") . '</a>';
            $actions[] = Horde::link($url->add('bodies', 1), _("Thread")) . _("Thread") . '</a>';
        }
        $threads = $messages->getThreadsUi($threads_list, $col_headers, $view_bodies, $threads_template);
        break;
    case '1':
        $threads_template = 'messages/flat_thread';
        if (!$prefs->isLocked('thread_view_bodies')) {
            $actions[] = Horde::link($url->add('bodies', 0), _("Hide bodies")) . _("Hide bodies") . '</a>';
            $actions[] = Horde::link($url->add('bodies', 2), _("Flat")) . _("Flat") . '</a>';
        }
        /* Resort messages by thread */
        $tree = new Agora_Tree_Flat('flatthread');
        foreach ($threads_list as &$node) {
            $tree->addNode(array('id' => $node['message_id'], 'parent' => $node['parent'], 'label' => $node['body'], 'right' => $node));
        }
        $threads = $tree->getTree();
        break;
    default:
        $threads_template = false;
        if (!$prefs->isLocked('thread_view_bodies')) {
            $actions[] = Horde::link($url->add('bodies', 1), _("View bodies")) . _("View bodies") . '</a>';
        }
        $threads = $messages->getThreadsUi($threads_list, $col_headers, $view_bodies, $threads_template);
        break;
}
/* Set up the main template tags. */
Horde::startBuffer();