Browse the code
| Revision log Information on the revision | |
|---|---|
| Revision: | 381 (differences) |
| Author: | xbright |
| Log message: |
* Fixed a few bugs (forge administrator can now enter all dashboards) * Added the ability to report a bug even if there is no version registered |
| Change revision: | |
0
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php // This file is a part of CodingTeam. Take a look at <http://codingteam.org>. // Copyright © 2007-2010 Erwan Briand <erwan@codingteam.net> // // This program is free software: you can redistribute it and/or modify it // under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, version 3 only. // // This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public // License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. class ProjectsMenu { private $ct_db, $lang, $ct_session, $page, $xmlmodule; public $notepadmenu, $pagemenu; function __construct($db, $lang, $session, $page, $xmlmodule) { // Acces to database $this->ct_db = $db; $this->lang = $lang; $this->ct_session = $session; $this->page = $page; $this->xmlmodule = $xmlmodule; $views = array(); foreach ($this->xmlmodule as $view) $views[(string) $view['name']] = (string) $view['active']; // Notepad menu $this->notepadmenu = array('module' => 'projects', 'link' => 'projects', 'title' => i18n('Projects'), 'position' => 1, 'force_login' => FALSE); // Page menu $this->pagemenu = '<ul id="rootmenu">'; if ($views['default'] == 'TRUE') $this->pagemenu .= '<li '.( (!isset($this->page[2])) ? 'class="current"><a href="projects"><img src="public/images/icons/stock/form/stock_form-time-field.png" style="float: left;padding-right: 5px;" alt="time" />' : '><a href="projects">' ).i18n('Latest projects').'</a></li>'; if ($views['browse'] == 'TRUE') { $this->pagemenu .= '<li '.( (isset($this->page[2]) && $this->page[2] == 'browse') ? 'class="current"><a href="projects/browse"><img src="public/images/icons/actions/edit-find.png" style="float: left;padding-right: 5px;" alt="find" />' : '><a href="projects/browse">' ).i18n('Browse all projects').' <img src="public/images/dropdown.png" alt="dropdown" /></a> <ul class="submenu"> <li><a href="projects/browse/map#category"><span style="float: right;">»</span>'.i18n('Category').'</a> <ul class="subsubmenu">'; require(CT_BASEDIR.'/inc/data/categories.php'); asort($categories); foreach ($categories as $key => $value) { $catarray = explode('-', $key); if (empty($catarray[1])) { $this->pagemenu .= '<li><a href="projects/browse/category/'.$key.'">'.$value.'</a></li>'; } } $this->pagemenu .='</ul> </li> <li><a href="projects/browse/map#system"><span style="float: right;">»</span>'.i18n('System').'</a> <ul class="subsubmenu">'; $systems = array('posix' => 'POSIX (GNU/Linux, BSD, UNIX)', 'bsd' => 'BSD (*BSD, Mac OS)', 'msdos' => 'MS-DOS - Microsoft Windows', 'others' => i18n('Others'), 'all' => i18n('Platform independant') ); foreach ($systems as $key => $value) $this->pagemenu .= '<li><a href="projects/browse/system/'.$key.'">'.$value.'</a></li>'; $this->pagemenu .='</ul> </li> <li><a href="projects/browse/map#license"><span style="float: right;">»</span>'.i18n('License').'</a> <ul class="subsubmenu">'; require(CT_BASEDIR.'/inc/data/licenses.php'); asort($licenses); foreach ($licenses as $key => $value) $this->pagemenu .= '<li><a href="projects/browse/license/'.$key.'">'.$value.'</a></li>'; $this->pagemenu .='</ul> </li> <li><a href="projects/browse/map#language">'.i18n('Language').'</a></li> <li><a href="projects/browse/map#translation">'.i18n('Translation').'</a></li> </ul> </li>'; } if ($views['tags'] == 'TRUE') $this->pagemenu .= '<li '.( (isset($this->page[2]) && $this->page[2] == 'tags') ? 'class="current"><a href="projects/tags"><img src="public/images/icons/status/weather-overcast.png" style="float: left;padding-right: 5px;" alt="tags" />' : '><a href="projects/tags">' ).i18n('Tags cloud').'</a></li>'; if ($views['add'] == 'TRUE') $this->pagemenu .= '<li '.( (isset($this->page[2]) && $this->page[2] == 'add') ? 'class="current"><a href="projects/add"><img src="public/images/icons/actions/list-add.png" style="float: left;padding-right: 5px;" alt="add" />' : '><a href="projects/add">' ).i18n('Add a project').'</a></li>'; $this->pagemenu .= '</ul>'; } function getNotepadMenu() { return $this->notepadmenu; } function getPageMenu() { return $this->pagemenu; } } ?>

CodingTeam