Add language support for projects controller

This commit is contained in:
Eike Foken
2011-04-21 21:46:47 +02:00
parent c4c7988b5d
commit bc67619ce2
5 changed files with 49 additions and 8 deletions

View File

@@ -2,13 +2,22 @@
class Projects extends CI_Controller {
/**
* Constructor.
*/
public function __construct() {
parent::__construct();
$this->load->model('project');
$this->load->helper('tree');
// load language file
$this->lang->load(strtolower($this->router->class));
}
/**
* List all projects the user has access to.
* Lists all projects the user has access to.
*/
public function getAvailable() {
$this->load->model('project');
$this->load->helper('tree');
$path = $this->input->get_post('node');
switch($path) {
@@ -29,18 +38,18 @@ class Projects extends CI_Controller {
array(
'id' => '/projects/own',
'cls' => 'folder',
'text' => "Eigene Projekte",
'text' => lang('projects_own'),
'icon' => base_url() . 'assets/images/icons/folder.png',),
array(
'id' => '/projects/shared',
'cls' => 'leaf',
'text' => "Für mich freigegeben",
'text' => lang('projects_shared'),
'icon' => base_url() . 'assets/images/icons/folder-share.png',
),
array(
'id' => '/projects/public',
'cls' => 'folder',
'text' => "Öffentliche Projekte",
'text' => lang('projects_public'),
'icon' => base_url() . 'assets/images/icons/folder-network.png',
),
);