Feature: multi language (VI, EN, JA)
CR: sonh (fake)
This commit is contained in:
@@ -15,9 +15,13 @@ use app\models\ListManagement;
|
||||
*/
|
||||
class CaptureLogsController extends Controller {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function init() {
|
||||
parent::init();
|
||||
Yii::$app->language = Yii::$app->session->get("language") ? Yii::$app->session->get("language")["name"] : "vi-VI";
|
||||
if (Yii::$app->user->isGuest)
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
|
||||
public function behaviors() {
|
||||
return [
|
||||
'verbs' => [
|
||||
@@ -37,7 +41,7 @@ class CaptureLogsController extends Controller {
|
||||
$t = date_format(date_create_from_format('H:i d/m/Y', $to), 'U');
|
||||
}
|
||||
|
||||
$this->view->title = "Lịch sử hệ thống";
|
||||
$this->view->title = Yii::t("app", "LICH_SU_HE_THONG");
|
||||
$searchModel = new CaptureLogsSearch();
|
||||
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
|
||||
if (!$all)
|
||||
@@ -63,7 +67,9 @@ class CaptureLogsController extends Controller {
|
||||
'f' => $f,
|
||||
't' => $t,
|
||||
// 'idAuto' => $idAuto,
|
||||
"staffArray" => ListManagement::staffArray()
|
||||
"staffArray" => ListManagement::staffArray(),
|
||||
"typeArray" => ListManagement::typeArray(),
|
||||
"genderArray" => ListManagement::genderArray(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -108,7 +114,7 @@ class CaptureLogsController extends Controller {
|
||||
return $model;
|
||||
}
|
||||
|
||||
throw new NotFoundHttpException('The requested page does not exist.');
|
||||
throw new NotFoundHttpException(Yii::t("app", "KHONG_TIM_THAY_THONG_TIN"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user