Example #1
0
<?php

/* @var $this UserController */
/* @var $model User */
$this->breadcrumbs = array('Users' => array('index'), 'Manage');
$this->menu = array(array('icon' => 'glyphicon glyphicon-list', 'label' => 'List User', 'url' => array('index')), array('icon' => 'glyphicon glyphicon-plus-sign', 'label' => 'Create User', 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#user-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<?php 
echo BsHtml::pageHeader('Manage', 'Users');
?>
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title"><?php 
echo BsHtml::button('Advanced search', array('class' => 'search-button', 'icon' => BsHtml::GLYPHICON_SEARCH, 'color' => BsHtml::BUTTON_COLOR_PRIMARY), '#');
?>
</h3>
    </div>
    <div class="panel-body">
        <p>
            You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>
                &lt;&gt;</b>
            or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
        </p>

        <div class="search-form" style="display:none">
            <?php 
$this->renderPartial('_search', array('model' => $model));
?>
        </div>
Example #2
0
        ?>
        -<?php 
        echo $val->ACT_FICTICIO;
        ?>
 <small><?php 
        echo $val->ACT_NOMBRE;
        ?>
</small><br>
	<?php 
    }
    ?>
	<?php 
    if (!$value->actions) {
        ?>
		No hay nada
	<?php 
    }
    ?>
      </div>
    </div>
  </div>
<?php 
}
?>
</div>
<div>
<?php 
echo BsHtml::button('Contraer Modulos', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'onclick' => "\$('.acc').collapse('hide')"));
echo BsHtml::button('Expandir Modulos', array('color' => BsHtml::BUTTON_COLOR_INFO, 'onclick' => "\$('.acc').collapse('show')"));
?>
</div>
Example #3
0
<?php

$this->breadcrumbs = array('Box-O-Matic' => array('/snapcms/boxomatic/index'), 'Customers');
$this->page_heading = 'Customers';
Yii::app()->clientScript->registerScript('search', "\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('user-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
$this->menu = array(array('icon' => 'glyphicon glyphicon-plus-sign', 'label' => 'Create Customer', 'url' => array('user/create')), array('icon' => 'glyphicon glyphicon-export', 'label' => 'Export Customers', 'url' => array('user/export')));
Yii::app()->clientScript->registerScript('initPageSize', <<<EOD
\t\$('.change-pageSize').live('change', function() {
\t\t\$.fn.yiiGridView.update('user-grid',{ data:{ pageSize: \$(this).val() }})
\t});
EOD
, CClientScript::POS_READY);
$this->beginWidget('bootstrap.widgets.BsPanel', array('title' => BsHtml::button('Advanced search', array('data-toggle' => 'collapse', 'data-target' => '#search-form', 'class' => 'search-button', 'icon' => BsHtml::GLYPHICON_SEARCH, 'color' => BsHtml::BUTTON_COLOR_PRIMARY), '#')));
?>
	<div id="search-form" class="search-form collapse">
		<?php 
echo $this->renderPartial('_search', array('model' => $model));
?>
	</div><!-- search-form -->
	<?php 
$dataProvider = $model->search();
?>
	<?php 
$pageSize = Yii::app()->user->getState('pageSize', 10);
?>
	<?php 
$this->widget('bootstrap.widgets.BsGridView', array('id' => 'user-grid', 'cssFile' => '', 'dataProvider' => $dataProvider, 'summaryText' => 'Displaying {start}-{end} of {count} result(s). ' . CHtml::dropDownList('pageSize', $pageSize, array(5 => 5, 10 => 10, 20 => 20, 50 => 50, 100 => 100), array('class' => 'change-pageSize')) . ' rows per page', 'filter' => $model, 'columns' => array('id', 'first_name', 'last_name', 'email', array('name' => 'balance', 'value' => 'SnapFormat::currency($data->balance)'), array('name' => 'tag_name_search', 'filter' => Tag::getUsedTags('Users'), 'value' => 'CHtml::value($data,"tag_names")'), array('class' => 'bootstrap.widgets.BsButtonColumn', 'template' => '{view}{update}{delete}{login}{reset_password}', 'buttons' => array('login' => array('label' => '<i class="glyphicon glyphicon-user"></i>', 'url' => 'array("user/loginAs","id"=>$data->id)', 'options' => array('title' => 'Login As')), 'reset_password' => array('label' => '<i class="glyphicon glyphicon-lock"></i>', 'url' => 'array("user/resetPassword","id"=>$data->id)', 'options' => array('confirm' => 'Are you sure you want to reset this user\'s password and send them a welcome email?', 'title' => 'Reset Password')))))));
$this->endWidget();
Example #4
0
 /**
  * Renders the button
  */
 public function renderButton()
 {
     if (!empty($this->buttonOptions) && is_array($this->buttonOptions)) {
         BsArray::defaultValue('data-toggle', 'modal', $this->buttonOptions);
         if ($this->remote !== null) {
             $this->buttonOptions['data-remote'] = CHtml::normalizeUrl($this->remote);
         }
         $selector = '#' . $this->htmlOptions['id'];
         $label = BsArray::popValue('label', $this->buttonOptions, 'button');
         $attr = isset($this->buttonOptions['data-remote']) ? 'data-target' : 'href';
         BsArray::defaultValue($attr, $selector, $this->buttonOptions);
         echo BsHtml::button($label, $this->buttonOptions);
     }
 }
Example #5
0
<?php

/* @var $this PostController */
/* @var $model Post */
$this->breadcrumbs = array('Posts' => array('index'), 'Manage');
$this->menu = array(array('icon' => 'glyphicon glyphicon-list', 'label' => 'Listar Post', 'url' => array('index')), array('icon' => 'glyphicon glyphicon-plus-sign', 'label' => 'Crear Post', 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#post-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<?php 
echo BsHtml::pageHeader('Administrar', 'Posts');
?>
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title"><?php 
echo BsHtml::button('Búsqueda Avanzada', array('class' => 'search-button', 'icon' => BsHtml::GLYPHICON_SEARCH, 'color' => BsHtml::BUTTON_COLOR_PRIMARY), '#');
?>
</h3>
    </div>
    
    <div class="panel-body">
        <div class="search-form" style="display:none">
            <?php 
$this->renderPartial('_search', array('model' => $model));
?>
        </div>

        <?php 
$this->widget('bootstrap.widgets.BsGridView', array('id' => 'post-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', 'title', 'content', 'tags', 'status', 'create_time', array('class' => 'bootstrap.widgets.BsButtonColumn'))));
?>
    </div>
Example #6
0
    ?>
		<tr>
			<td><?php 
    echo $key + 1;
    ?>
</td>
			<td><?php 
    echo $model->emp_nombre;
    ?>
</td>
			<td><?php 
    echo $model->lic_fecha_creacion;
    ?>
</td>
			<td><?php 
    echo $model->lic_usos;
    ?>
</td>
			<td>
				<?php 
    echo BsHtml::Button(BsHtml::icon(BsHtml::GLYPHICON_TRASH) . ' Eliminar', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'size' => BsHtml::BUTTON_SIZE_SMALL, 'data-target' => '#Eliminar' . $key, 'data-toggle' => 'modal'));
    $this->widget('bootstrap.widgets.BsModal', array('id' => 'Eliminar' . $key, 'header' => "¿Desea eliminar a '{$model->emp_nombre}' ?", 'content' => "<p>Se quitara de la lista {$model->emp_nombre}</p>", 'footer' => array(BsHtml::Button('Eliminar de todos modos', array('onclick' => "window.location.href='deleteLI/{$model->lic_id}'", 'color' => BsHtml::BUTTON_COLOR_PRIMARY)), BsHtml::button('Cancelar', array('data-dismiss' => 'modal')))));
    echo BsHtml::Button(BsHtml::icon(BsHtml::GLYPHICON_EDIT) . ' Modificar', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'size' => BsHtml::BUTTON_SIZE_SMALL, 'onclick' => "window.location.href='updateLI/{$model->lic_id}'"));
    ?>
			</td>
		</tr>
	<?php 
}
?>
	</tbody>
</table>
Example #7
0
?>

<div class="row">
<?php 
foreach ($model as $key => $value) {
    ?>
	<div class="col-sm-6 col-md-4">
		<div class="thumbnail">
	<?php 
    echo CHtml::link(BsHtml::imageThumbnail(Yii::app()->request->baseUrl . "/images/modulo/" . $value->PER_IMG, '', $htmlOptions = array('style' => 'width: 350px; height: 300px;border-radius: 15px;margin-top: 5px;')), array('evaluacion/module/' . $value->PER_ID));
    ?>
		<h3><?php 
    echo $value->PER_NOMBRE;
    ?>
</h3>
        <p><?php 
    echo $value->PER_DESCRIPCION;
    ?>
</p>
        <?php 
    echo BsHtml::button('Módulos', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'onclick' => "window.location.href='module/{$value->PER_ID}'"));
    ?>
        <?php 
    echo BsHtml::button('Preguntas', array('color' => BsHtml::BUTTON_COLOR_INFO, 'onclick' => "window.location.href='demo/{$value->PER_ID}'"));
    ?>
		</div>
	</div>
<?php 
}
?>
</div>
Example #8
0
<div class="row">
	<table class="table table-bordered table-striped">
		<tr>
			<th style="width:20px">#</th>
			<th>Módulo</th>
			<th style="width:85px">Opciones</th>
		</tr>
<?php 
foreach ($model as $key => $value) {
    ?>
		<tr>
			<td><?php 
    echo $key + 1;
    ?>
</td>
			<td><?php 
    echo $value->MOD_NOMBRE;
    ?>
</td>
			<td><?php 
    echo BsHtml::button('Empezar', array('color' => BsHtml::BUTTON_COLOR_PRIMARY, 'size' => BsHtml::BUTTON_SIZE_MINI));
    ?>
</td>
		</tr>
<?php 
}
?>
	</table>

</div>