Add language support for projects controller
This commit is contained in:
@@ -64,7 +64,7 @@ $autoload['libraries'] = array('database','session');
|
||||
| $autoload['helper'] = array('url', 'file');
|
||||
*/
|
||||
|
||||
$autoload['helper'] = array('url', 'html', 'script');
|
||||
$autoload['helper'] = array('url', 'html', 'script', 'language');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -3,12 +3,21 @@
|
||||
class Projects extends CI_Controller {
|
||||
|
||||
/**
|
||||
* List all projects the user has access to.
|
||||
* Constructor.
|
||||
*/
|
||||
public function getAvailable() {
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->model('project');
|
||||
$this->load->helper('tree');
|
||||
|
||||
// load language file
|
||||
$this->lang->load(strtolower($this->router->class));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all projects the user has access to.
|
||||
*/
|
||||
public function getAvailable() {
|
||||
$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',
|
||||
),
|
||||
);
|
||||
|
||||
11
application/language/english/projects_lang.php
Normal file
11
application/language/english/projects_lang.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
$lang['project_own'] = "Own project";
|
||||
$lang['projects_own'] = "Own projects";
|
||||
$lang['project_shared'] = "Shared project";
|
||||
$lang['projects_shared'] = "Shared projects";
|
||||
$lang['project_public'] = "Public project";
|
||||
$lang['projects_public'] = "Public projects";
|
||||
|
||||
/* End of file projects_lang.php */
|
||||
/* Location: ./application/language/german/projects_lang.php */
|
||||
10
application/language/german/index.html
Executable file
10
application/language/german/index.html
Executable file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
11
application/language/german/projects_lang.php
Normal file
11
application/language/german/projects_lang.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
$lang['project_own'] = "Eigenes Projekt";
|
||||
$lang['projects_own'] = "Eigene Projekte";
|
||||
$lang['project_shared'] = "Für mich freigegeben";
|
||||
$lang['projects_shared'] = "Für mich freigegeben";
|
||||
$lang['project_public'] = "Öffentliches Projekt";
|
||||
$lang['projects_public'] = "Öffentliche Projekte";
|
||||
|
||||
/* End of file projects_lang.php */
|
||||
/* Location: ./application/language/german/projects_lang.php */
|
||||
Reference in New Issue
Block a user