mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 17:02:19 +00:00
added set language feature; phrasen plugin with optional reload if non responsive phrasen are used; stundenplan header mode & buttons reworked
This commit is contained in:
@@ -34,6 +34,7 @@ class Cis4 extends FHC_Controller
|
||||
show_error("name couldn't be loaded for username ".getAuthUID());
|
||||
}
|
||||
$begruesung = getData($begruesung);
|
||||
|
||||
$this->load->view('CisVue/Dashboard.php',["name"=> $begruesung]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,15 @@ class Dashboard extends Auth_Controller
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('CisVue/Dashboard.php');
|
||||
|
||||
$this->load->model('person/Person_model','PersonModel');
|
||||
$begruesung = $this->PersonModel->getFirstName(getAuthUID());
|
||||
if(isError($begruesung))
|
||||
{
|
||||
show_error("name couldn't be loaded for username ".getAuthUID());
|
||||
}
|
||||
$begruesung = getData($begruesung);
|
||||
$this->load->view('CisVue/Dashboard.php',["name"=> $begruesung]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,8 +28,11 @@ class Phrasen extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'loadModule' => self::PERM_ANONYMOUS
|
||||
'loadModule' => self::PERM_ANONYMOUS,
|
||||
'setLanguage' => self::PERM_ANONYMOUS
|
||||
]);
|
||||
|
||||
$this->load->helper('hlp_language');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
@@ -43,4 +46,18 @@ class Phrasen extends FHCAPI_Controller
|
||||
$this->load->library('PhrasesLib', [$module], 'pj');
|
||||
$this->terminateWithSuccess(json_decode($this->pj->getJSON()));
|
||||
}
|
||||
}
|
||||
|
||||
public function setLanguage()
|
||||
{
|
||||
$postParams = $this->getPostJSON();
|
||||
$language = $postParams->language;
|
||||
$categories = $postParams->categories;
|
||||
|
||||
setUserLanguage($language);
|
||||
|
||||
$this->load->library('PhrasesLib', array($categories, $language), 'p');
|
||||
|
||||
$phrases = $this->p->setPhrases($categories, $language);
|
||||
$this->terminateWithSuccess($phrases);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user