Exemplo n.º 1
0
?>
				<small>
					<i class="ace-icon fa fa-angle-double-right"></i> <?php 
echo Translate::list_x([Translate::language()]);
?>
				</small>
			</h1>
		</div>
		<div class="space-6"></div>
		<p>
			<?php 
echo Html::a(Translate::add_a_new_x([Translate::language()]), ['create'], ['class' => 'btn btn-success']);
?>
		</p>
		<?php 
echo GridView::widget(['id' => 'language', 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'export' => false, 'responsive' => true, 'hover' => true, 'pjax' => true, 'columns' => [['class' => 'kartik\\grid\\SerialColumn'], ['attribute' => 'name', 'vAlign' => 'middle'], ['attribute' => 'code', 'vAlign' => 'middle'], ['attribute' => 'country', 'vAlign' => 'middle'], ['class' => 'kartik\\grid\\BooleanColumn', 'trueLabel' => Translate::in_use(), 'falseLabel' => Translate::not_in_use(), 'attribute' => 'status', 'vAlign' => 'middle'], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}{delete}']]]);
?>
	</div>
</div>
<script>
	<?php 
if (Yii::$app->getSession()->hasFlash('message')) {
    ?>
	alert('<?php 
    echo Yii::$app->getSession()->getFlash('message');
    ?>
');
	<?php 
}
?>
</script>
Exemplo n.º 2
0
	<div class="col-md-6 col-md-offset-3">

		<?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

		<?php 
echo $form->field($model, 'code')->textInput(['maxlength' => true]);
?>

		<?php 
echo $form->field($model, 'country')->textInput(['maxlength' => true]);
?>

		<?php 
echo $form->field($model, 'status')->dropDownList([0 => Translate::not_in_use(), 1 => Translate::in_use()], ['prompt' => Translate::choose_status()]);
?>

	</div>
</div>
<div class="clearfix form-actions">
	<div class="col-md-offset-3 col-md-6">
		<button class="btn btn-info" type="submit">
			<i class="ace-icon fa fa-check bigger-110"></i>
			<?php 
echo Translate::save();
?>
		</button>
		<button class="btn btn-back" type="reset">
			<i class="ace-icon fa fa-arrow-left bigger-110"></i>
			<?php