1
0

Renamed "Programme" to "Programs"/"Program"

This commit is contained in:
2014-05-28 11:02:52 +02:00
parent fa36f26f2e
commit 98fb0f1cec
19 changed files with 263 additions and 312 deletions

View File

@@ -44,8 +44,8 @@
[
['label' => 'Home', 'url' => '/', 'active' => ($this->selectedNav === 'index')],
['label' => 'Blog', 'url' => '#', 'active' => ($this->selectedNav === 'blog')],
['label' => 'Programme', 'url' => '/programme/', 'active' => ($this->selectedNav === 'prog')],
['label' => '', 'items' => ProgrammeHelper::GetProgDropDownList(), 'htmlOptions' => ['class' => 'dropdown-append']],
['label' => 'Programs', 'url' => '/programs/', 'active' => ($this->selectedNav === 'prog')],
['label' => '', 'items' => ProgramHelper::GetProgDropDownList(), 'htmlOptions' => ['class' => 'dropdown-append']],
['label' => 'About', 'url' => '/about', 'active' => ($this->selectedNav === 'about')],
['label' => '[[Log "'.Yii::app()->user->name.'" out]]', 'url' => '/logout', 'visible' => !Yii::app()->user->isGuest]
],

View File

@@ -1,20 +0,0 @@
<?php
/* @var $this ProgrammeController */
/* @var $model Programme */
?>
<?php
$this->breadcrumbs=array(
'Programme'=>array('index'),
'Create',
);
$this->menu=array(
array('label'=>'List Programme', 'url'=>array('index')),
array('label'=>'Manage Programme', 'url'=>array('admin')),
);
?>
<h1>Create Programme</h1>
<?php $this->renderPartial('_form', array('model'=>$model)); ?>

View File

@@ -1,23 +0,0 @@
<?php
/* @var $this ProgrammeController */
/* @var $model Programme */
?>
<?php
$this->breadcrumbs=array(
'Programme'=>array('index'),
$model->Name=>array('view','id'=>$model->ID),
'Update',
);
$this->menu=array(
array('label'=>'List Programme', 'url'=>array('index')),
array('label'=>'Create Programme', 'url'=>array('create')),
array('label'=>'View Programme', 'url'=>array('view', 'id'=>$model->ID)),
array('label'=>'Manage Programme', 'url'=>array('admin')),
);
?>
<h1>Update Programme <?php echo $model->ID; ?></h1>
<?php $this->renderPartial('_form', array('model'=>$model)); ?>

View File

@@ -1,13 +1,13 @@
<?php
/* @var $this ProgrammeController */
/* @var $model Programme */
/* @var $this ProgramController */
/* @var $model Program */
/* @var $form TbActiveForm */
?>
<div class="form">
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
'id'=>'programme-form',
'id'=>'program-form',
// Please note: When you enable ajax validation, make sure the corresponding
// controller action is handling ajax validation correctly.
// There is a call to performAjaxValidation() commented in generated controller code.

View File

@@ -1,6 +1,6 @@
<?php
/* @var $this ProgrammeController */
/* @var $model Programme */
/* @var $this ProgramController */
/* @var $model Program */
/* @var $form CActiveForm */
?>

View File

@@ -1,6 +1,6 @@
<?php
/* @var $this ProgrammeController */
/* @var $data Programme */
/* @var $this ProgramController */
/* @var $data Program */
?>
<div class="view">

View File

@@ -1,16 +1,16 @@
<?php
/* @var $this ProgrammeController */
/* @var $model Programme */
/* @var $this ProgramController */
/* @var $model Program */
$this->breadcrumbs=array(
'Programme'=>array('index'),
'Programs'=>array('index'),
'Manage',
);
$this->menu=array(
array('label'=>'List Programme', 'url'=>array('index')),
array('label'=>'Create Programme', 'url'=>array('create')),
array('label'=>'List Program', 'url'=>array('index')),
array('label'=>'Create Program', 'url'=>array('create')),
);
Yii::app()->clientScript->registerScript('search', "
@@ -19,7 +19,7 @@ $('.search-button').click(function(){
return false;
});
$('.search-form form').submit(function(){
$('#programme-grid').yiiGridView('update', {
$('#program-grid').yiiGridView('update', {
data: $(this).serialize()
});
return false;
@@ -30,7 +30,7 @@ $('.search-form form').submit(function(){
?>
<h1>Manage Programmes</h1>
<h1>Manage Program</h1>
<p>
You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>
@@ -47,7 +47,7 @@ or <b>=</b>) at the beginning of each of your search values to specify how the c
<br><br>
<?php $this->widget('bootstrap.widgets.TbGridView',array(
'type' => TbHtml::GRID_TYPE_BORDERED,
'id'=>'programme-grid',
'id'=>'program-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(

View File

@@ -0,0 +1,20 @@
<?php
/* @var $this ProgramController */
/* @var $model Program */
?>
<?php
$this->breadcrumbs=array(
'Programs'=>array('index'),
'Create',
);
$this->menu=array(
array('label'=>'List Program', 'url'=>array('index')),
array('label'=>'Manage Program', 'url'=>array('admin')),
);
?>
<h1>Create Program</h1>
<?php $this->renderPartial('_form', array('model'=>$model)); ?>

View File

@@ -1,16 +1,16 @@
<?php
/* @var $this ProgrammeController */
/* @var $this ProgramController */
/* @var $dataProvider CActiveDataProvider */
?>
<?php
$this->breadcrumbs = array(
'Programme',
'Programs',
);
$this->menu = array(
array('label' => 'Create Programme', 'url' => array('create')),
array('label' => 'Manage Programme', 'url' => array('admin')),
array('label' => 'Create Program', 'url' => array('create')),
array('label' => 'Manage Program', 'url' => array('admin')),
);
?>
@@ -21,7 +21,7 @@ $this->menu = array(
<br>
<?php
foreach (Programme::model()->findAll() as $record) {
foreach (Program::model()->findAll() as $record) {
echo "<div class='well'>";
echo nl2br(print_r($record->attributes, true));
echo "</div>";

View File

@@ -0,0 +1,23 @@
<?php
/* @var $this ProgramController */
/* @var $model Program */
?>
<?php
$this->breadcrumbs=array(
'Programs'=>array('index'),
$model->Name=>array('view','id'=>$model->ID),
'Update',
);
$this->menu=array(
array('label'=>'List Program', 'url'=>array('index')),
array('label'=>'Create Program', 'url'=>array('create')),
array('label'=>'View Program', 'url'=>array('view', 'id'=>$model->ID)),
array('label'=>'Manage Program', 'url'=>array('admin')),
);
?>
<h1>Update Program <?php echo $model->ID; ?></h1>
<?php $this->renderPartial('_form', array('model'=>$model)); ?>

View File

@@ -1,24 +1,24 @@
<?php
/* @var $this ProgrammeController */
/* @var $model Programme */
/* @var $this ProgramController */
/* @var $model Program */
?>
<?php
$this->breadcrumbs=array(
'Programme'=>array('index'),
'Programs'=>array('index'),
$model->Name,
);
$this->menu=array(
array('label'=>'List Programme', 'url'=>array('index')),
array('label'=>'Create Programme', 'url'=>array('create')),
array('label'=>'Update Programme', 'url'=>array('update', 'id'=>$model->ID)),
array('label'=>'Delete Programme', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->ID),'confirm'=>'Are you sure you want to delete this item?')),
array('label'=>'Manage Programme', 'url'=>array('admin')),
array('label'=>'List Program', 'url'=>array('index')),
array('label'=>'Create Program', 'url'=>array('create')),
array('label'=>'Update Program', 'url'=>array('update', 'id'=>$model->ID)),
array('label'=>'Delete Program', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->ID),'confirm'=>'Are you sure you want to delete this item?')),
array('label'=>'Manage Program', 'url'=>array('admin')),
);
?>
<h1>View Programme #<?php echo $model->ID; ?></h1>
<h1>View Program #<?php echo $model->ID; ?></h1>
<?php $this->widget('zii.widgets.CDetailView',array(
'htmlOptions' => array(

View File

@@ -22,9 +22,9 @@ $this->selectedNav = 'about';
<div class="well cstm-well-light">
<p>Welcome to my private homepage.</p>
<p>My name is Mike Schwörer, and this is my homepage - here i upload programs i write in my free time and sometimes i even write a blog entry. </p>
<p>My name is Mike Schwörer, and this is my homepage - here i upload program i write in my free time and sometimes i even write a blog entry. </p>
<p>If you want you can look <?php echo TbHtml::link('here', '#'); // TODO Add Link ?> at the things I programmed </p>
<p>If you want you can look <?php echo TbHtml::link('here', '/programs'); ?> at the things I programd </p>
</div>
<div class="well cstm-well-light">

View File

@@ -40,7 +40,7 @@ $this->selectedNav = 'index';
<?php
$connection = Yii::app()->db;
$command=$connection->createCommand("SELECT * FROM programme");
$command=$connection->createCommand("SELECT * FROM Programme");
$command->execute(); // a non-query SQL statement execution
// or execute an SQL query and fetch the result set
$reader=$command->query();