From 9f1ec812d21a122e4989d91419cc4a7a90006b9b Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Mon, 1 Dec 2014 07:22:08 +0000 Subject: [PATCH] improving recognition --- yii/index.php | 50 +++---- yii/protected/messages/cn/dict.php | 45 ++++++ yii/protected/messages/en/dict.php | 53 +++++-- yii/protected/messages/ru/dict.php | 41 ++++-- yii/protected/models/DictionaryForm.php | 138 +++++++++--------- yii/protected/runtime/application.log | 67 +++++++++ .../views/site/_dictionaryResultView.php | 59 +++++++- yii/protected/views/site/dictionaryResult.php | 62 ++++---- 8 files changed, 361 insertions(+), 154 deletions(-) create mode 100644 yii/protected/messages/cn/dict.php diff --git a/yii/index.php b/yii/index.php index c769452..ced7a18 100644 --- a/yii/index.php +++ b/yii/index.php @@ -1,25 +1,25 @@ -run(); +run(); diff --git a/yii/protected/messages/cn/dict.php b/yii/protected/messages/cn/dict.php new file mode 100644 index 0000000..846bfed --- /dev/null +++ b/yii/protected/messages/cn/dict.php @@ -0,0 +1,45 @@ +{nounNominative}' => '很可能该单词原形就是 {nounNominative}', + + 'NGC_P1_NOMINATIVE_NC_SINGULAR_MALE' => '该单词本身即为单数第一格形式。 例句: Это один {noun}', + 'NGC_P1_NOMINATIVE_NC_SINGULAR_FEMALE' => '该单词本身即为单数第一格形式。 例句: Это одна {noun}', + 'NGC_P1_NOMINATIVE_NC_SINGULAR_NEUTER' => '该单词本身即为单数第一格形式。 例句: Это одно {noun}', + + 'NGC_P2_GENITIVE_NC_SINGULAR' => '该单词是单数第二格形式。 例句: Я возле одного {noun}', + + 'NGC_P3_DATIVE_NC_SINGULAR' => '该单词是单数第三格形式。 例句: Я дарю подарок одному {noun}', + + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE' => '该单词是单数第四格形式。 例句: Я не трогаю одного {noun}', + + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_MALE' => '该单词是单数第四格形式。例句: Я не трогаю один {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_FEMALE' => '该单词是单数第四格形式。例句: Я не трогаю одну {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_NEUTER' => '该单词是单数第四格形式。例句: Я не трогаю одно {noun}', + + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR' => '该单词是单数第五格形式。 例句: Я с одним {noun}', + + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR' => '该单词是单数第六格形式。 例句: Я разговариваю об одном {noun}', + + + 'NGC_P1_NOMINATIVE_NC_PLURAL' => '该单词是复数第一格形式。 例句: Это разные {noun}', + + 'NGC_P2_GENITIVE_NC_PLURAL' => '该单词是复数第二格形式。 例句: Я возле разных {noun}', + + 'NGC_P3_DATIVE_NC_PLURAL' => '该单词是复数第三格形式。 例句: Я дарю подарок разным {noun}', + + 'NGC_P4_ACCUSATIVE_NC_PLURAL_ANIMATE' => '该单词是复数第四格形式。 例句: Я не трогаю разных {noun}', + + 'NGC_P4_ACCUSATIVE_NC_PLURAL_INANIMATE' => '该单词是复数第四格形式。 例句: Я не трогаю разные {noun}', + + 'NGC_P5_INSTRUMENTAL_NC_PLURAL' => '该单词是复数第五格形式。 例句: Я с разными {noun}', + + 'NGC_P6_PREPOSITIONAL_NC_PLURAL' => '该单词是复数第六格形式。 例句: Я разговариваю о разных {noun}', + + 'ANIMATE' => '该单词是动物名词。', + 'INANIMATE' => '该单词是非动物名词。', + + + '{n} records found.' => '与 {n} 相关的搜索结果.', + + ); +?> \ No newline at end of file diff --git a/yii/protected/messages/en/dict.php b/yii/protected/messages/en/dict.php index 3b2095d..24c9b81 100644 --- a/yii/protected/messages/en/dict.php +++ b/yii/protected/messages/en/dict.php @@ -2,23 +2,48 @@ return array( 'Most likely, original word is {nounNominative}' => 'Most likely, original word is {nounNominative}', - 'Nominative case' => 'This word is in nominative case. I am {noun}', - - 'Genitive case' => 'This word is in genitive case. I am near {noun}', - - 'Dative case' => 'This word is in dative case. I give gift to {noun}', - - 'Accusative case' => 'This word is in accusative case. I don\'t disturb {noun}', - - 'Instrumental case' => 'This word is in instrumental case. I am with {noun}', - - 'Prepositional case' => 'This word is in prepositional case. I talk about {noun}', + 'NGC_P1_NOMINATIVE_NC_SINGULAR_MALE' => 'This word is in nominative case, in the singular. For example: This is one {noun}', + 'NGC_P1_NOMINATIVE_NC_SINGULAR_FEMALE' => 'This word is in nominative case, in the singular. For example: This is one {noun}', + 'NGC_P1_NOMINATIVE_NC_SINGULAR_NEUTER' => 'This word is in nominative case, in the singular. For example: This is one {noun}', - 'Singular form' => 'This word is in singular form. One ', - - 'Plural form' => 'This word is in plural form. Many ', + 'NGC_P2_GENITIVE_NC_SINGULAR' => 'This word is in genitive case, in the singular. For example: I am near one {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR' => 'This word is in dative case, in the singular. For example: I give gift to one {noun}', + + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', + + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', + + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_MALE' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_FEMALE' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_NEUTER' => 'This word is in accusative case, in the singular. For example: I don\'t disturb one {noun}', + + + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR' => 'This word is in instrumental case, in the singular. For example: I am with one {noun}', + + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR' => 'This word is in prepositional case, in the singular. For example: I talk about one {noun}', + + + 'NGC_P1_NOMINATIVE_NC_PLURAL' => 'This word is in nominative case, in the plural. For example: There are many {noun}', + + 'NGC_P2_GENITIVE_NC_PLURAL' => 'This word is in genitive case, in the plural. For example: I am near many {noun}', + + 'NGC_P3_DATIVE_NC_PLURAL' => 'This word is in dative case, in the plural. For example: I give gift to many {noun}', + + 'NGC_P4_ACCUSATIVE_NC_PLURAL_ANIMATE' => 'This word is in accusative case, in the plural. For example: I don\'t disturb many {noun}', + + 'NGC_P4_ACCUSATIVE_NC_PLURAL_INANIMATE' => 'This word is in accusative case, in the plural. For example: I don\'t disturb many {noun}', + + 'NGC_P5_INSTRUMENTAL_NC_PLURAL' => 'This word is in instrumental case, in the plural. For example: I am with many {noun}', + + 'NGC_P6_PREPOSITIONAL_NC_PLURAL' => 'This word is in prepositional case, in the plural. For example: I talk about many {noun}', + + 'ANIMATE' => 'Now this word is animate', + 'INANIMATE' => 'Now this word is inanimate', + '{n} records found.' => '{n} records found.', + + ); ?> \ No newline at end of file diff --git a/yii/protected/messages/ru/dict.php b/yii/protected/messages/ru/dict.php index 301837f..a0cb789 100644 --- a/yii/protected/messages/ru/dict.php +++ b/yii/protected/messages/ru/dict.php @@ -2,22 +2,45 @@ return array( 'Most likely, original word is {nounNominative}' => 'Скорее всего, это слово {nounNominative}', - 'Nominative case' => 'Это слово в именительном падеже. Я - {noun}', + 'NGC_P1_NOMINATIVE_NC_SINGULAR_MALE' => 'Это слово в именительном падеже в единственном числе. Например: Это один {noun}', + 'NGC_P1_NOMINATIVE_NC_SINGULAR_FEMALE' => 'Это слово в именительном падеже в единственном числе. Например: Это одна {noun}', + 'NGC_P1_NOMINATIVE_NC_SINGULAR_NEUTER' => 'Это слово в именительном падеже в единственном числе. Например: Это одно {noun}', - 'Genitive case' => 'Это слово в родительном падеже. Я возле {noun}', + 'NGC_P2_GENITIVE_NC_SINGULAR' => 'Это слово в родительном падеже в единственном числе. Например: Я возле одного {noun}', - 'Dative case' => 'Это слово в дательном падеже. Я дарю подарок {noun}', + 'NGC_P3_DATIVE_NC_SINGULAR' => 'Это слово в дательном падеже в единственном числе. Например: Я дарю подарок одному {noun}', - 'Accusative case' => 'Это слово в винительном падеже. Я не трогаю {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_ANIMATE' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю одного {noun}', - 'Instrumental case' => 'Это слово в творительном падеже. Я с {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю один {noun}', - 'Prepositional case' => 'Это слово в предложном падеже. Я разговариваю о {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_MALE' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю один {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_FEMALE' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю одну {noun}', + 'NGC_P4_ACCUSATIVE_NC_SINGULAR_INANIMATE_NEUTER' => 'Это слово в винительном падеже в единственном числе. Например: Я не трогаю одно {noun}', - 'Singular form' => 'Это слово в единственном числе.', - - 'Plural form' => 'Это слово в множественном числе.', + 'NGC_P5_INSTRUMENTAL_NC_SINGULAR' => 'Это слово в творительном падеже в единственном числе. Например: Я с одним {noun}', + 'NGC_P6_PREPOSITIONAL_NC_SINGULAR' => 'Это слово в предложном падеже в единственном числе. Например: Я разговариваю об одном {noun}', + + + 'NGC_P1_NOMINATIVE_NC_PLURAL' => 'Это слово в именительном падеже в множественном числе. Например: Это разные {noun}', + + 'NGC_P2_GENITIVE_NC_PLURAL' => 'Это слово в родительном падеже в множественном числе. Например: Я возле разных {noun}', + + 'NGC_P3_DATIVE_NC_PLURAL' => 'Это слово в дательном падеже в множественном числе. Например: Я дарю подарок разным {noun}', + + 'NGC_P4_ACCUSATIVE_NC_PLURAL_ANIMATE' => 'Это слово в винительном падеже в множественном числе. Например: Я не трогаю разных {noun}', + + 'NGC_P4_ACCUSATIVE_NC_PLURAL_INANIMATE' => 'Это слово в винительном падеже в множественном числе. Например: Я не трогаю разные {noun}', + + 'NGC_P5_INSTRUMENTAL_NC_PLURAL' => 'Это слово в творительном падеже в множественном числе. Например: Я с разными {noun}', + + 'NGC_P6_PREPOSITIONAL_NC_PLURAL' => 'Это слово в предложном падеже в множественном числе. Например: Я разговариваю о разных {noun}', + + 'ANIMATE' => 'В данном случае это слово одушевленное.', + 'INANIMATE' => 'В данном случае это слово неодушевленное.', + + '{n} records found.' => 'Найдено: {n} записей.', ); diff --git a/yii/protected/models/DictionaryForm.php b/yii/protected/models/DictionaryForm.php index de2719a..74d6cd1 100644 --- a/yii/protected/models/DictionaryForm.php +++ b/yii/protected/models/DictionaryForm.php @@ -1,69 +1,69 @@ -'{attribute} ' . Yii::t('app', 'Field should not be blank')), - - ); - } - - function attributeLabels(){ - return array( - 'request' => Yii::t('app', 'Please enter request:'), - ); - } - - public function getResponse() - { - $this->serverIsWorking = false; - $this->response = false; - - try - { - set_error_handler(function() { /* ignore errors */ }); - $this->jsonString = file_get_contents('http://localhost:8843/' . $this->request); - $this->response = json_decode($this->jsonString, true); - restore_error_handler(); - - if ($this->jsonString) - { - $this->serverIsWorking = true; - } - } - catch(Exception $ex) - { - $this->serverIsWorking = false; - } - - $this->serverIsWorking = true; - } - - public function resultCount() - { - return count($this->response['nouns']); - } - - public function getDataProvider() - { - $dataProvider=new CArrayDataProvider($this->response['nouns'], array( - 'id'=>'dictionaryResultDataProvider', - 'pagination'=>array( - 'pageSize'=>10, - ), - )); - - return $dataProvider; - } -} +'{attribute} ' . Yii::t('app', 'Field should not be blank')), + + ); + } + + function attributeLabels(){ + return array( + 'request' => Yii::t('app', 'Please enter request:'), + ); + } + + public function getResponse() + { + $this->serverIsWorking = false; + $this->response = false; + + try + { + set_error_handler(function() { /* ignore errors */ }); + $this->jsonString = file_get_contents('http://127.0.0.1:8843/' . $this->request); + $this->response = json_decode($this->jsonString, true); + restore_error_handler(); + + if ($this->jsonString) + { + $this->serverIsWorking = true; + } + } + catch(Exception $ex) + { + $this->serverIsWorking = false; + } + + $this->serverIsWorking = true; + } + + public function resultExists() + { + return ($this->response['nouns'] !== ""); + } + + public function getDataProvider() + { + $dataProvider=new CArrayDataProvider($this->response['nouns'], array( + 'id'=>'dictionaryResultDataProvider', + 'pagination'=>array( + 'pageSize'=>10, + ), + )); + + return $dataProvider; + } +} diff --git a/yii/protected/runtime/application.log b/yii/protected/runtime/application.log index 0938f96..767a6f1 100644 --- a/yii/protected/runtime/application.log +++ b/yii/protected/runtime/application.log @@ -1043,3 +1043,70 @@ Stack trace: REQUEST_URI=/cj/index.php?r=site/dictionary HTTP_REFERER=http://localhost/cj/index.php?r=site/dictionary --- +2014/11/29 02:55:14 [error] [php] Undefined index: nominativeSingularForm (C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\_dictionaryResultView.php:13) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CListView.php(291): SiteController->renderFile() +#1 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(167): CListView->renderItems() +#2 unknown(0): CListView->renderSection() +#3 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(150): preg_replace_callback() +#4 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(135): CListView->renderContent() +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#6 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(20): SiteController->widget() +#7 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#8 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#11 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#12 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#14 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#15 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#16 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#17 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#18 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#19 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/29 02:58:27 [error] [php] Undefined index: nominativeSingularForm (C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\_dictionaryResultView.php:13) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CListView.php(291): SiteController->renderFile() +#1 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(167): CListView->renderItems() +#2 unknown(0): CListView->renderSection() +#3 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(150): preg_replace_callback() +#4 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(135): CListView->renderContent() +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(173): CListView->run() +#6 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(22): SiteController->widget() +#7 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#8 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#9 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#10 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#11 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#12 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#14 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#15 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#16 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#17 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#18 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#19 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary +2014/11/29 03:01:19 [error] [php] array_slice() expects parameter 1 to be array, string given (C:\Workplace\yii1.1.15\framework\web\CArrayDataProvider.php:95) +Stack trace: +#0 C:\Workplace\yii1.1.15\framework\zii\widgets\CBaseListView.php(111): CArrayDataProvider->getData() +#1 C:\Workplace\yii1.1.15\framework\zii\widgets\CListView.php(211): CListView->init() +#2 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(147): CListView->init() +#3 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(172): SiteController->createWidget() +#4 C:\Workplace\Apache2.4\htdocs\cj\protected\views\site\dictionaryResult.php(23): SiteController->widget() +#5 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(126): require() +#6 C:\Workplace\yii1.1.15\framework\web\CBaseController.php(95): SiteController->renderInternal() +#7 C:\Workplace\yii1.1.15\framework\web\CController.php(869): SiteController->renderFile() +#8 C:\Workplace\yii1.1.15\framework\web\CController.php(782): SiteController->renderPartial() +#9 C:\Workplace\Apache2.4\htdocs\cj\protected\controllers\SiteController.php(69): SiteController->render() +#10 C:\Workplace\yii1.1.15\framework\web\actions\CInlineAction.php(49): SiteController->actionDictionary() +#11 C:\Workplace\yii1.1.15\framework\web\CController.php(308): CInlineAction->runWithParams() +#12 C:\Workplace\yii1.1.15\framework\web\CController.php(286): SiteController->runAction() +#13 C:\Workplace\yii1.1.15\framework\web\CController.php(265): SiteController->runActionWithFilters() +#14 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(282): SiteController->run() +#15 C:\Workplace\yii1.1.15\framework\web\CWebApplication.php(141): CWebApplication->runController() +#16 C:\Workplace\yii1.1.15\framework\base\CApplication.php(180): CWebApplication->processRequest() +#17 C:\Workplace\Apache2.4\htdocs\cj\index.php(25): CWebApplication->run() +REQUEST_URI=/cj/index.php?r=site/dictionary diff --git a/yii/protected/views/site/_dictionaryResultView.php b/yii/protected/views/site/_dictionaryResultView.php index 338f904..2471bd6 100644 --- a/yii/protected/views/site/_dictionaryResultView.php +++ b/yii/protected/views/site/_dictionaryResultView.php @@ -10,15 +10,64 @@ $this->pageTitle=Yii::t('app', Yii::app()->name);

-{nounNominative}'))?> +{nounNominative}'))?>

- -

+ - + +$animateSuffix = ""; +if ($data["animated"] === "true") +{ + $animateSuffix = "ANIMATE"; +} +else +{ + $animateSuffix = "INANIMATE"; +} + +$genderSuffix = ""; +if ($data["animated"] !== "true" && $data["count"] === "NC_SINGULAR") +{ + if ($data["gender"] === "0") + { + $genderSuffix = "_MALE"; + } + else if ($data["gender"] === "1") + { + $genderSuffix = "_FEMALE"; + } + else + { + $genderSuffix = "_NEUTER"; + } +} + + + +if ($data["grammaticalCase"] === "NGC_P4_ACCUSATIVE") +{ + $combinedStr = $data["grammaticalCase"] . "_" . $data["count"] . "_" . $animateSuffix . $genderSuffix; + echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "
"; + +} +else if ($data["grammaticalCase"] === "NGC_P1_NOMINATIVE") +{ + $combinedStr = $data["grammaticalCase"] . "_" . $data["count"] . $genderSuffix; + echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "
"; + +} +else +{ + $combinedStr = $data["grammaticalCase"] . "_" . $data["count"]; + echo str_replace('{noun}', $request, Yii::t('dict', $combinedStr)) . "
"; +} + + +echo Yii::t('dict', $animateSuffix) . "
"; + +?>

diff --git a/yii/protected/views/site/dictionaryResult.php b/yii/protected/views/site/dictionaryResult.php index a69d32d..5b620c4 100644 --- a/yii/protected/views/site/dictionaryResult.php +++ b/yii/protected/views/site/dictionaryResult.php @@ -1,32 +1,30 @@ -pageTitle=Yii::t('app', Yii::app()->name) . ' - ' . Yii::t('app', 'Dictionary'); - -?> - -

- -

- -resultCount(), Yii::t('app', '{n} records found.')); - -echo '
'; - -if ($model->resultCount() !== 0) -{ -$this->widget('zii.widgets.CListView', array( - 'dataProvider'=>$model->getDataProvider(), - 'itemView'=>'_dictionaryResultView', - 'template'=>"{items}\n{pager}", - 'viewData'=>array( 'request' => $model->request ), -)); -} - - - -?> - - +pageTitle=Yii::t('app', Yii::app()->name) . ' - ' . Yii::t('app', 'Dictionary'); + +?> + +

+ +

+getDataProvider()->itemCount, Yii::t('dict', '{n} records found.'))?> +

+ +resultExists()) +{ +$this->widget('zii.widgets.CListView', array( + 'dataProvider'=>$model->getDataProvider(), + 'itemView'=>'_dictionaryResultView', + 'template'=>"{items}\n{pager}", + 'viewData'=>array( 'request' => $model->request ), +)); +} + + + + +?> + +