File: minisearch.php

package info (click to toggle)
turba2 2.0.2-1sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,996 kB
  • ctags: 1,071
  • sloc: php: 4,725; xml: 617; sql: 136; makefile: 62; sh: 46; perl: 17
file content (49 lines) | stat: -rw-r--r-- 1,436 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php

$block_name = _("Mini Search");

/**
 * Turba_Minisearch_Block:: Implementation of the Horde_Block API to
 * allows searching of addressbooks from the portal.
 *
 * $Horde: turba/lib/Block/minisearch.php,v 1.17 2004/12/11 15:43:13 jan Exp $
 *
 * @package Horde_Block
 */
class Horde_Block_turba_minisearch extends Horde_Block {

    var $_app = 'turba';

    /**
     * The title to go in this block.
     *
     * @return string   The title text.
     */
    function _title()
    {
        global $registry;

        $html  = Horde::link(Horde::url($registry->getInitialPage(), true), $registry->get('name'), 'header') . $registry->get('name') . '</a> :: ';
        $html .= Horde::link(Horde::applicationUrl('add.php', true), _("New Contact"), 'smallheader') . Horde::img('new.png', _("New Contact"), 'align="middle"', Horde::url($registry->getImageDir(), true, -1)) . ' ' . _("New Contact") . '</a>';

        return $html;
    }

    /**
     * The content to go in this block.
     *
     * @return string   The content
     */
    function _content()
    {
        global $browser, $registry, $prefs;
        require_once dirname(__FILE__) . '/../base.php';

        if ($browser->hasFeature('iframes')) {
            return Util::bufferOutput('include', TURBA_TEMPLATES . '/block/minisearch.inc');
        } else {
            return '<i>' . _("A browser that supports iFrames is required") . '</i>';
        }
    }

}