Skip to content

Commit

Permalink
Merge pull request #102 from moltam/searc-empty-command-hint
Browse files Browse the repository at this point in the history
Add usage hint for the search empty command
  • Loading branch information
moltam authored Apr 30, 2017
2 parents 322267f + 3806124 commit 899e0b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions controllers/actions/TranslateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function run()
return $this->controller->render('translate', [
'dataProvider' => $dataProvider,
'searchModel' => $searchModel,
'searchEmptyCommand' => $this->controller->module->searchEmptyCommand,
'language_id' => Yii::$app->request->get('language_id', ''),
]);
}
Expand Down
7 changes: 6 additions & 1 deletion views/language/translate.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/* @var $language_id string */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $searchModel lajax\translatemanager\models\searches\LanguageSourceSearch */
/* @var $searchEmptyCommand string */

$this->title = Yii::t('language', 'Translation into {language_id}', ['language_id' => $language_id]);
$this->params['breadcrumbs'][] = ['label' => Yii::t('language', 'Languages'), 'url' => ['list']];
Expand Down Expand Up @@ -59,7 +60,11 @@
[
'format' => 'raw',
'attribute' => 'translation',
'filterInputOptions' => ['class' => 'form-control', 'id' => 'translation'],
'filterInputOptions' => [
'class' => 'form-control',
'id' => 'translation',
'placeholder' => $searchEmptyCommand ? Yii::t('language', 'Enter "{command}" to search for empty translations.', ['command' => $searchEmptyCommand]) : '',
],
'label' => Yii::t('language', 'Translation'),
'content' => function ($data) {
return Html::textarea('LanguageTranslate[' . $data->id . ']', $data->translation, ['class' => 'form-control translation', 'data-id' => $data->id, 'tabindex' => $data->id]);
Expand Down

0 comments on commit 899e0b0

Please sign in to comment.