mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-27 04:10:30 +08:00
Advanced application template
This commit is contained in:
16
apps/advanced/frontend/views/site/about.php
Normal file
16
apps/advanced/frontend/views/site/about.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
/**
|
||||
* @var yii\base\View $this
|
||||
*/
|
||||
$this->title = 'About';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<h1><?php echo Html::encode($this->title); ?></h1>
|
||||
|
||||
<p>
|
||||
This is the About page. You may modify the following file to customize its content:
|
||||
</p>
|
||||
|
||||
<code><?php echo __FILE__; ?></code>
|
||||
|
||||
46
apps/advanced/frontend/views/site/contact.php
Normal file
46
apps/advanced/frontend/views/site/contact.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\widgets\Captcha;
|
||||
|
||||
/**
|
||||
* @var yii\base\View $this
|
||||
* @var yii\widgets\ActiveForm $form
|
||||
* @var app\models\ContactForm $model
|
||||
*/
|
||||
$this->title = 'Contact';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<h1><?php echo Html::encode($this->title); ?></h1>
|
||||
|
||||
<?php if (Yii::$app->session->hasFlash('contactFormSubmitted')): ?>
|
||||
<div class="alert alert-success">
|
||||
Thank you for contacting us. We will respond to you as soon as possible.
|
||||
</div>
|
||||
<?php return; endif; ?>
|
||||
|
||||
<p>
|
||||
If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
|
||||
</p>
|
||||
|
||||
<?php $form = ActiveForm::begin(array(
|
||||
'options' => array('class' => 'form-horizontal'),
|
||||
'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge')),
|
||||
)); ?>
|
||||
<?php echo $form->field($model, 'name')->textInput(); ?>
|
||||
<?php echo $form->field($model, 'email')->textInput(); ?>
|
||||
<?php echo $form->field($model, 'subject')->textInput(); ?>
|
||||
<?php echo $form->field($model, 'body')->textArea(array('rows' => 6)); ?>
|
||||
<?php
|
||||
$field = $form->field($model, 'verifyCode');
|
||||
echo $field->begin()
|
||||
. $field->label()
|
||||
. Captcha::widget()
|
||||
. Html::activeTextInput($model, 'verifyCode', array('class' => 'input-medium'))
|
||||
. $field->error()
|
||||
. $field->end();
|
||||
?>
|
||||
<div class="form-actions">
|
||||
<?php echo Html::submitButton('Submit', null, null, array('class' => 'btn btn-primary')); ?>
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
47
apps/advanced/frontend/views/site/index.php
Normal file
47
apps/advanced/frontend/views/site/index.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @var yii\base\View $this
|
||||
*/
|
||||
$this->title = 'Welcome';
|
||||
?>
|
||||
<div class="jumbotron">
|
||||
<h1>Welcome!</h1>
|
||||
|
||||
<p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus
|
||||
commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
|
||||
<a class="btn btn-large btn-success" href="http://www.yiiframework.com">Get started with Yii</a>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- Example row of columns -->
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
<h2>Heading</h2>
|
||||
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
|
||||
condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod.
|
||||
Donec sed odio dui. </p>
|
||||
|
||||
<p><a class="btn" href="#">View details »</a></p>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<h2>Heading</h2>
|
||||
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
|
||||
condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod.
|
||||
Donec sed odio dui. </p>
|
||||
|
||||
<p><a class="btn" href="#">View details »</a></p>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<h2>Heading</h2>
|
||||
|
||||
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta
|
||||
felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum
|
||||
massa.</p>
|
||||
|
||||
<p><a class="btn" href="#">View details »</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
24
apps/advanced/frontend/views/site/login.php
Normal file
24
apps/advanced/frontend/views/site/login.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/**
|
||||
* @var yii\base\View $this
|
||||
* @var yii\widgets\ActiveForm $form
|
||||
* @var app\models\LoginForm $model
|
||||
*/
|
||||
$this->title = 'Login';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<h1><?php echo Html::encode($this->title); ?></h1>
|
||||
|
||||
<p>Please fill out the following fields to login:</p>
|
||||
|
||||
<?php $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal'))); ?>
|
||||
<?php echo $form->field($model, 'username')->textInput(); ?>
|
||||
<?php echo $form->field($model, 'password')->passwordInput(); ?>
|
||||
<?php echo $form->field($model, 'rememberMe')->checkbox(); ?>
|
||||
<div class="form-actions">
|
||||
<?php echo Html::submitButton('Login', null, null, array('class' => 'btn btn-primary')); ?>
|
||||
</div>
|
||||
<?php ActiveForm::end(); ?>
|
||||
Reference in New Issue
Block a user