-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInternalHeader.class.php
More file actions
60 lines (50 loc) · 1.57 KB
/
InternalHeader.class.php
File metadata and controls
60 lines (50 loc) · 1.57 KB
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
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* Клас 'page_InternalHeader' - Шаблон за header с меню за вътрешните страници
*
* Файлът може да се подмени с друг
*
*
* @category ef
* @package page
* @author Milen Georgiev <milen@download.bg>
* @copyright 2006 - 2012 Experta OOD
* @license GPL 3
* @since v 0.1
* @link
*/
class page_InternalHeader extends core_ET {
/**
* Добавя елемент от менюто
*/
function addMenuItem($title, $row, $ctr, $act = 'default')
{
static $noFirst = array();
if (!Mode::is('screenMode', 'narrow')) {
if($noFirst[$row]) {
$this->header->append(" | ", $row);
} else {
$this->header->append("\n» ", $row);
}
} else {
if($noFirst[$row]) {
$this->header->append("\n<br>» ", $row);
} else {
$this->header->append("\n» ", $row);
}
}
$noFirst[$row] = TRUE;
if(Mode::get('pageMenu') == $title) {
$attr = array('class' => 'menuItem selected');
} else {
$attr = array('class' => 'menuItem');
}
if($ctr) {
$url = is_array($ctr) ? toUrl($ctr) : toUrl(array($ctr, $act));
$this->header->append(ht::createLink(tr($title), $url, FALSE, $attr), $row);
} else {
$this->header->append(tr($title) , $row);
}
$this->header->append("\n", $row);
}
}