summaryrefslogtreecommitdiff
path: root/protected/views
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
parenta098922f681a9a1362202580a26b132501df4b1b (diff)
Erstes Yii Projekt
Diffstat (limited to 'protected/views')
-rw-r--r--protected/views/layouts/column1.php5
-rw-r--r--protected/views/layouts/column2.php21
-rw-r--r--protected/views/layouts/main.php58
-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
8 files changed, 252 insertions, 0 deletions
diff --git a/protected/views/layouts/column1.php b/protected/views/layouts/column1.php
new file mode 100644
index 0000000..f70b154
--- /dev/null
+++ b/protected/views/layouts/column1.php
@@ -0,0 +1,5 @@
+<?php $this->beginContent('//layouts/main'); ?>
+<div id="content">
+ <?php echo $content; ?>
+</div><!-- content -->
+<?php $this->endContent(); ?> \ No newline at end of file
diff --git a/protected/views/layouts/column2.php b/protected/views/layouts/column2.php
new file mode 100644
index 0000000..e435a69
--- /dev/null
+++ b/protected/views/layouts/column2.php
@@ -0,0 +1,21 @@
+<?php $this->beginContent('//layouts/main'); ?>
+<div class="span-19">
+ <div id="content">
+ <?php echo $content; ?>
+ </div><!-- content -->
+</div>
+<div class="span-5 last">
+ <div id="sidebar">
+ <?php
+ $this->beginWidget('zii.widgets.CPortlet', array(
+ 'title'=>'Operations',
+ ));
+ $this->widget('zii.widgets.CMenu', array(
+ 'items'=>$this->menu,
+ 'htmlOptions'=>array('class'=>'operations'),
+ ));
+ $this->endWidget();
+ ?>
+ </div><!-- sidebar -->
+</div>
+<?php $this->endContent(); ?> \ No newline at end of file
diff --git a/protected/views/layouts/main.php b/protected/views/layouts/main.php
new file mode 100644
index 0000000..f2ff75a
--- /dev/null
+++ b/protected/views/layouts/main.php
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="language" content="en" />
+
+ <!-- blueprint CSS framework -->
+ <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
+ <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
+ <!--[if lt IE 8]>
+ <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
+ <![endif]-->
+
+ <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
+ <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />
+
+ <title><?php echo CHtml::encode($this->pageTitle); ?></title>
+</head>
+
+<body>
+
+<div class="container" id="page">
+
+ <div id="header">
+ <div id="logo"><?php echo CHtml::encode(Yii::app()->name); ?></div>
+ </div><!-- header -->
+
+ <div id="mainmenu">
+ <?php $this->widget('zii.widgets.CMenu',array(
+ 'items'=>array(
+ array('label'=>'Home', 'url'=>array('/site/index')),
+ array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
+ array('label'=>'Contact', 'url'=>array('/site/contact')),
+ array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
+ array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
+ ),
+ )); ?>
+ </div><!-- mainmenu -->
+ <?php if(isset($this->breadcrumbs)):?>
+ <?php $this->widget('zii.widgets.CBreadcrumbs', array(
+ 'links'=>$this->breadcrumbs,
+ )); ?><!-- breadcrumbs -->
+ <?php endif?>
+
+ <?php echo $content; ?>
+
+ <div class="clear"></div>
+
+ <div id="footer">
+ Copyright &copy; <?php echo date('Y'); ?> by My Company.<br/>
+ All Rights Reserved.<br/>
+ <?php echo Yii::powered(); ?>
+ </div><!-- footer -->
+
+</div><!-- page -->
+
+</body>
+</html>
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