summaryrefslogtreecommitdiff
path: root/protected/views/site
diff options
context:
space:
mode:
authorPatrick Seeger <pseeger@ccwn.org>2012-04-13 23:44:38 +0200
committerPatrick Seeger <pseeger@ccwn.org>2012-04-13 23:44:38 +0200
commit69bffb7fe85347621f41c0baed839452e72930e1 (patch)
tree8446bced1732932fd741e91ff8dba88b1e56693b /protected/views/site
parenta098922f681a9a1362202580a26b132501df4b1b (diff)
Erstes Yii Projekt
Diffstat (limited to 'protected/views/site')
-rw-r--r--protected/views/site/contact.php81
-rw-r--r--protected/views/site/error.php12
-rw-r--r--protected/views/site/index.php16
-rw-r--r--protected/views/site/login.php49
-rw-r--r--protected/views/site/pages/about.php10
5 files changed, 168 insertions, 0 deletions
diff --git a/protected/views/site/contact.php b/protected/views/site/contact.php
new file mode 100644
index 0000000..51f90a9
--- /dev/null
+++ b/protected/views/site/contact.php
@@ -0,0 +1,81 @@
+<?php
+$this->pageTitle=Yii::app()->name . ' - Contact Us';
+$this->breadcrumbs=array(
+ 'Contact',
+);
+?>
+
+<h1>Contact Us</h1>
+
+<?php if(Yii::app()->user->hasFlash('contact')): ?>
+
+<div class="flash-success">
+ <?php echo Yii::app()->user->getFlash('contact'); ?>
+</div>
+
+<?php else: ?>
+
+<p>
+If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
+</p>
+
+<div class="form">
+
+<?php $form=$this->beginWidget('CActiveForm', array(
+ 'id'=>'contact-form',
+ 'enableClientValidation'=>true,
+ 'clientOptions'=>array(
+ 'validateOnSubmit'=>true,
+ ),
+)); ?>
+
+ <p class="note">Fields with <span class="required">*</span> are required.</p>
+
+ <?php echo $form->errorSummary($model); ?>
+
+ <div class="row">
+ <?php echo $form->labelEx($model,'name'); ?>
+ <?php echo $form->textField($model,'name'); ?>
+ <?php echo $form->error($model,'name'); ?>
+ </div>
+
+ <div class="row">
+ <?php echo $form->labelEx($model,'email'); ?>
+ <?php echo $form->textField($model,'email'); ?>
+ <?php echo $form->error($model,'email'); ?>
+ </div>
+
+ <div class="row">
+ <?php echo $form->labelEx($model,'subject'); ?>
+ <?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>128)); ?>
+ <?php echo $form->error($model,'subject'); ?>
+ </div>
+
+ <div class="row">
+ <?php echo $form->labelEx($model,'body'); ?>
+ <?php echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>50)); ?>
+ <?php echo $form->error($model,'body'); ?>
+ </div>
+
+ <?php if(CCaptcha::checkRequirements()): ?>
+ <div class="row">
+ <?php echo $form->labelEx($model,'verifyCode'); ?>
+ <div>
+ <?php $this->widget('CCaptcha'); ?>
+ <?php echo $form->textField($model,'verifyCode'); ?>
+ </div>
+ <div class="hint">Please enter the letters as they are shown in the image above.
+ <br/>Letters are not case-sensitive.</div>
+ <?php echo $form->error($model,'verifyCode'); ?>
+ </div>
+ <?php endif; ?>
+
+ <div class="row buttons">
+ <?php echo CHtml::submitButton('Submit'); ?>
+ </div>
+
+<?php $this->endWidget(); ?>
+
+</div><!-- form -->
+
+<?php endif; ?> \ No newline at end of file
diff --git a/protected/views/site/error.php b/protected/views/site/error.php
new file mode 100644
index 0000000..4607ff3
--- /dev/null
+++ b/protected/views/site/error.php
@@ -0,0 +1,12 @@
+<?php
+$this->pageTitle=Yii::app()->name . ' - Error';
+$this->breadcrumbs=array(
+ 'Error',
+);
+?>
+
+<h2>Error <?php echo $code; ?></h2>
+
+<div class="error">
+<?php echo CHtml::encode($message); ?>
+</div> \ No newline at end of file
diff --git a/protected/views/site/index.php b/protected/views/site/index.php
new file mode 100644
index 0000000..b44b2e6
--- /dev/null
+++ b/protected/views/site/index.php
@@ -0,0 +1,16 @@
+<?php $this->pageTitle=Yii::app()->name; ?>
+
+<h1>Welcome to <i><?php echo CHtml::encode(Yii::app()->name); ?></i></h1>
+
+<p>Congratulations! You have successfully created your Yii application.</p>
+
+<p>You may change the content of this page by modifying the following two files:</p>
+<ul>
+ <li>View file: <tt><?php echo __FILE__; ?></tt></li>
+ <li>Layout file: <tt><?php echo $this->getLayoutFile('main'); ?></tt></li>
+</ul>
+
+<p>For more details on how to further develop this application, please read
+the <a href="http://www.yiiframework.com/doc/">documentation</a>.
+Feel free to ask in the <a href="http://www.yiiframework.com/forum/">forum</a>,
+should you have any questions.</p> \ No newline at end of file
diff --git a/protected/views/site/login.php b/protected/views/site/login.php
new file mode 100644
index 0000000..c53bf62
--- /dev/null
+++ b/protected/views/site/login.php
@@ -0,0 +1,49 @@
+<?php
+$this->pageTitle=Yii::app()->name . ' - Login';
+$this->breadcrumbs=array(
+ 'Login',
+);
+?>
+
+<h1>Login</h1>
+
+<p>Please fill out the following form with your login credentials:</p>
+
+<div class="form">
+<?php $form=$this->beginWidget('CActiveForm', array(
+ 'id'=>'login-form',
+ 'enableClientValidation'=>true,
+ 'clientOptions'=>array(
+ 'validateOnSubmit'=>true,
+ ),
+)); ?>
+
+ <p class="note">Fields with <span class="required">*</span> are required.</p>
+
+ <div class="row">
+ <?php echo $form->labelEx($model,'username'); ?>
+ <?php echo $form->textField($model,'username'); ?>
+ <?php echo $form->error($model,'username'); ?>
+ </div>
+
+ <div class="row">
+ <?php echo $form->labelEx($model,'password'); ?>
+ <?php echo $form->passwordField($model,'password'); ?>
+ <?php echo $form->error($model,'password'); ?>
+ <p class="hint">
+ Hint: You may login with <tt>demo/demo</tt> or <tt>admin/admin</tt>.
+ </p>
+ </div>
+
+ <div class="row rememberMe">
+ <?php echo $form->checkBox($model,'rememberMe'); ?>
+ <?php echo $form->label($model,'rememberMe'); ?>
+ <?php echo $form->error($model,'rememberMe'); ?>
+ </div>
+
+ <div class="row buttons">
+ <?php echo CHtml::submitButton('Login'); ?>
+ </div>
+
+<?php $this->endWidget(); ?>
+</div><!-- form -->
diff --git a/protected/views/site/pages/about.php b/protected/views/site/pages/about.php
new file mode 100644
index 0000000..c6c05dc
--- /dev/null
+++ b/protected/views/site/pages/about.php
@@ -0,0 +1,10 @@
+<?php
+$this->pageTitle=Yii::app()->name . ' - About';
+$this->breadcrumbs=array(
+ 'About',
+);
+?>
+<h1>About</h1>
+
+<p>This is a "static" page. You may change the content of this page
+by updating the file <tt><?php echo __FILE__; ?></tt>.</p> \ No newline at end of file