Exemple #1
0
                <?php 
    foreach ($availabilities as $availability) {
        ?>
                    <tr>
                        <td class="project-title">
                            <a href="<?php 
        echo Url::toRoute(['save', 'id' => $availability->id, 'languageId' => $currentLanguage->id]);
        ?>
">
                                <?php 
        echo $availability->translation->title;
        ?>
                            </a>
                        </td>
                        <td><?php 
        echo ManageButtons::widget(['model' => $availability]);
        ?>
</td>
                    </tr>
                <?php 
    }
    ?>
            </table>
        <?php 
}
?>

        <p>
            <?php 
echo Html::a(Yii::t('shop', 'Add'), ['save'], ['class' => 'btn btn-primary btn-xs pull-right']);
?>
Exemple #2
0
                $i++;
            }
        }
    }
    return Html::a($content, Url::toRoute(['add-image', 'id' => $model->id, 'languageId' => Language::getCurrent()->id]));
}, 'label' => Yii::t('shop', 'Images'), 'format' => 'html', 'contentOptions' => ['class' => 'col-md-1 project-people']], ['headerOptions' => ['class' => 'text-center col-md-1'], 'attribute' => \Yii::t('shop', 'Status'), 'value' => function ($model) {
    switch ($model->status) {
        case Product::STATUS_ON_MODERATION:
            return Html::button(Yii::$app->user->can('moderateProductCreation') ? Html::a(\Yii::t('shop', 'On moderation'), Url::toRoute(['save', 'id' => $model->id, 'languageId' => Language::getCurrent()->id]), ['class' => '']) : Html::tag('span', \Yii::t('shop', 'On moderation')), ['class' => 'col-md-12 btn btn-warning btn-xs']);
            break;
        case Product::STATUS_DECLINED:
            return Html::tag('p', \Yii::t('shop', 'Declined'), ['class' => 'col-md-12 btn btn-danger btn-xs']);
            break;
        case Product::STATUS_SUCCESS:
            return Html::tag('p', \Yii::t('shop', 'Success'), ['class' => 'col-md-12 btn btn-primary btn-xs']);
            break;
        default:
            return $model->status;
    }
}, 'label' => Yii::t('shop', 'Status'), 'format' => 'html', 'filter' => Html::activeDropDownList($searchModel, 'status', [Product::STATUS_ON_MODERATION => \Yii::t('shop', 'On moderation'), Product::STATUS_DECLINED => \Yii::t('shop', 'Declined'), Product::STATUS_SUCCESS => \Yii::t('shop', 'Success')], ['class' => 'form-control', 'prompt' => 'Любой статус']), 'contentOptions' => ['class' => 'project-title text-center col-md-1']], ['headerOptions' => ['class' => 'text-center col-md-2'], 'attribute' => \Yii::t('shop', 'Manage'), 'value' => function ($model) {
    return ManageButtons::widget(['model' => $model]);
}, 'format' => 'raw', 'contentOptions' => ['class' => 'col-md-2 text-center']]]]);
?>
        <?php 
Pjax::end();
?>
        <?php 
echo \Yii::t('shop', 'Count of waiting moderation products is') . ' <b>' . $notModeratedProductsCount . '</b>';
?>
    </div>
</div>
Exemple #3
0
        ?>
                                </td>
                                <td>
                                    <?php 
        if (!empty($country->translation->title)) {
            ?>
                                        <?php 
            echo $country->translation->title;
            ?>
                                    <?php 
        }
        ?>
                                </td>
                                <td>
                                    <?php 
        echo ManageButtons::widget(['model' => $country]);
        ?>
                                </td>
                            </tr>
                        <?php 
    }
    ?>
                        </tbody>
                    <?php 
}
?>
                </table>

                <a href="<?php 
echo Url::to(['/shop/country/save', 'languageId' => Language::getCurrent()->id]);
?>