Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: SOF-TEAM/web-demo
base: 6c5a0b062d
...
head fork: SOF-TEAM/web-demo
compare: c3b18a7599
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
View
1  webApp2/bootdemo/protected/config/main.php
@@ -10,6 +10,7 @@
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
+ 'theme'=>'bootstrap', // requires you to copy the theme under your themes directory
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Web Application',
View
3  webApp2/bootdemo/themes/bootstrap/css/styles.css
@@ -0,0 +1,3 @@
+#page {
+ padding-top: 60px;
+}
View
1  webApp2/bootdemo/themes/bootstrap/views/.htaccess
@@ -0,0 +1 @@
+deny from all
View
24 webApp2/bootdemo/themes/bootstrap/views/layouts/column2.php
@@ -0,0 +1,24 @@
+<?php /* @var $this Controller */ ?>
+<?php $this->beginContent('//layouts/main'); ?>
+<div class="row">
+ <div class="span9">
+ <div id="content">
+ <?php echo $content; ?>
+ </div><!-- content -->
+ </div>
+ <div class="span3">
+ <div id="sidebar">
+ <?php
+ $this->beginWidget('zii.widgets.CPortlet', array(
+ 'title'=>'Operations',
+ ));
+ $this->widget('bootstrap.widgets.TbMenu', array(
+ 'items'=>$this->menu,
+ 'htmlOptions'=>array('class'=>'operations'),
+ ));
+ $this->endWidget();
+ ?>
+ </div><!-- sidebar -->
+ </div>
+</div>
+<?php $this->endContent(); ?>
View
53 webApp2/bootdemo/themes/bootstrap/views/layouts/main.php
@@ -0,0 +1,53 @@
+<?php /* @var $this Controller */ ?>
+<!DOCTYPE html>
+<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" />
+
+ <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/styles.css" />
+
+ <title><?php echo CHtml::encode($this->pageTitle); ?></title>
+
+ <?php Yii::app()->bootstrap->register(); ?>
+</head>
+
+<body>
+
+<?php $this->widget('bootstrap.widgets.TbNavbar',array(
+ 'items'=>array(
+ array(
+ 'class'=>'bootstrap.widgets.TbMenu',
+ '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 class="container" id="page">
+
+ <?php if(isset($this->breadcrumbs)):?>
+ <?php $this->widget('bootstrap.widgets.TbBreadcrumbs', 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>
View
67 webApp2/bootdemo/themes/bootstrap/views/site/contact.php
@@ -0,0 +1,67 @@
+<?php
+/* @var $this SiteController */
+/* @var $model ContactForm */
+/* @var $form TbActiveForm */
+
+$this->pageTitle=Yii::app()->name . ' - Contact Us';
+$this->breadcrumbs=array(
+ 'Contact',
+);
+?>
+
+<h1>Contact Us</h1>
+
+<?php if(Yii::app()->user->hasFlash('contact')): ?>
+
+ <?php $this->widget('bootstrap.widgets.TbAlert', array(
+ 'alerts'=>array('contact'),
+ )); ?>
+
+<?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('bootstrap.widgets.TbActiveForm', array(
+ 'id'=>'contact-form',
+ 'type'=>'horizontal',
+ 'enableClientValidation'=>true,
+ 'clientOptions'=>array(
+ 'validateOnSubmit'=>true,
+ ),
+)); ?>
+
+ <p class="note">Fields with <span class="required">*</span> are required.</p>
+
+ <?php echo $form->errorSummary($model); ?>
+
+ <?php echo $form->textFieldRow($model,'name'); ?>
+
+ <?php echo $form->textFieldRow($model,'email'); ?>
+
+ <?php echo $form->textFieldRow($model,'subject',array('size'=>60,'maxlength'=>128)); ?>
+
+ <?php echo $form->textAreaRow($model,'body',array('rows'=>6, 'class'=>'span8')); ?>
+
+ <?php if(CCaptcha::checkRequirements()): ?>
+ <?php echo $form->captchaRow($model,'verifyCode',array(
+ 'hint'=>'Please enter the letters as they are shown in the image above.<br/>Letters are not case-sensitive.',
+ )); ?>
+ <?php endif; ?>
+
+ <div class="form-actions">
+ <?php $this->widget('bootstrap.widgets.TbButton',array(
+ 'buttonType'=>'submit',
+ 'type'=>'primary',
+ 'label'=>'Submit',
+ )); ?>
+ </div>
+
+<?php $this->endWidget(); ?>
+
+</div><!-- form -->
+
+<?php endif; ?>
View
25 webApp2/bootdemo/themes/bootstrap/views/site/index.php
@@ -0,0 +1,25 @@
+<?php
+/* @var $this SiteController */
+
+$this->pageTitle=Yii::app()->name;
+?>
+
+<?php $this->beginWidget('bootstrap.widgets.TbHeroUnit',array(
+ 'heading'=>'Welcome to '.CHtml::encode(Yii::app()->name),
+)); ?>
+
+<p>Congratulations! You have successfully created your Yii application.</p>
+
+<?php $this->endWidget(); ?>
+
+<p>You may change the content of this page by modifying the following two files:</p>
+
+<ul>
+ <li>View file: <code><?php echo __FILE__; ?></code></li>
+ <li>Layout file: <code><?php echo $this->getLayoutFile('main'); ?></code></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>
View
47 webApp2/bootdemo/themes/bootstrap/views/site/login.php
@@ -0,0 +1,47 @@
+<?php
+/* @var $this SiteController */
+/* @var $model LoginForm */
+/* @var $form CActiveForm */
+
+$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('bootstrap.widgets.TbActiveForm', array(
+ 'id'=>'login-form',
+ 'type'=>'horizontal',
+ 'enableClientValidation'=>true,
+ 'clientOptions'=>array(
+ 'validateOnSubmit'=>true,
+ ),
+)); ?>
+
+ <p class="note">Fields with <span class="required">*</span> are required.</p>
+
+ <?php echo $form->textFieldRow($model,'username'); ?>
+
+ <?php echo $form->passwordFieldRow($model,'password',array(
+ 'hint'=>'Hint: You may login with <kbd>demo</kbd>/<kbd>demo</kbd> or <kbd>admin</kbd>/<kbd>admin</kbd>',
+ )); ?>
+
+ <?php echo $form->checkBoxRow($model,'rememberMe'); ?>
+
+ <div class="form-actions">
+ <?php $this->widget('bootstrap.widgets.TbButton', array(
+ 'buttonType'=>'submit',
+ 'type'=>'primary',
+ 'label'=>'Login',
+ )); ?>
+ </div>
+
+<?php $this->endWidget(); ?>
+
+</div><!-- form -->

No commit comments for this range

Something went wrong with that request. Please try again.