Skip to content

Commit

Permalink
Added statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Dec 2, 2016
1 parent ff63119 commit 5808b54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/grid/DomainGridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ public static function defaultColumns()
'filterInputOptions' => ['style' => 'width:120px'],
'value' => function ($model) {
$out = State::widget(compact('model'));
if ($model->is_freezed || $model->is_holded) {
$status = [];
if ($model->is_freezed || $model->is_holded || $model->wp_freezed) {
$out .= '<br>';
$out .= $model->is_freezed ? Html::tag('span', Html::tag('span', '', ['class' => Menu::iconClass('fa-snowflake-o')]) . ' ' . Yii::t('hipanel:domain', 'Froze'), ['class' => 'label label-info']) : '';
$out .= $model->is_holded ? ' ' . Html::tag('span', Html::tag('span', '', ['class' => Menu::iconClass('fa-ban')]) . ' ' . Yii::t('hipanel:domain', 'Held'), ['class' => 'label label-warning']) : '';
$status[] = $model->is_freezed ? Html::tag('span', Html::tag('span', '', ['class' => Menu::iconClass('fa-snowflake-o')]) . ' ' . Yii::t('hipanel:domain', 'Froze'), ['class' => 'label label-info']) : '';
$status[] = $model->wp_freezed ? Html::tag('span', Html::tag('span', '', ['class' => Menu::iconClass('fa-snowflake-o')]) . ' ' . Yii::t('hipanel:domain', 'WP Froze'), ['class' => 'label label-info']) : '';
$status[] = $model->is_holded ? Html::tag('span', Html::tag('span', '', ['class' => Menu::iconClass('fa-ban')]) . ' ' . Yii::t('hipanel:domain', 'Held'), ['class' => 'label label-warning']) : '';
}

return $out;
return $out . implode('&nbsp;', $status);
},
],
'whois_protected' => [
Expand Down
1 change: 1 addition & 0 deletions src/messages/ru/hipanel:domain.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
'This domain is available for registration' => 'Этот домен доступен для регистрации',

'Froze' => 'Заморожен',
'WP Froze' => 'WP Заморожен',
'Held' => 'Не делегируется',
'Enable WHOIS-protect freeze' => 'Заморозить WHOIS-protect',
'Disable WHOIS-protect freeze' => 'Разморозить WHOIS-protect',
Expand Down

0 comments on commit 5808b54

Please sign in to comment.