Changed {{core.ignorecase}} to false
// git config --unset-all core.ignorecase false
This commit is contained in:
3
www/protected/views/blogpost/_ajaxMarkdownPreview.php
Normal file
3
www/protected/views/blogpost/_ajaxMarkdownPreview.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
echo ParsedownHelper::parse($Content);
|
||||
57
www/protected/views/blogpost/_form.php
Normal file
57
www/protected/views/blogpost/_form.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/* @var $this BlogPostController */
|
||||
/* @var $model BlogPost */
|
||||
/* @var $form TbActiveForm */
|
||||
?>
|
||||
|
||||
<div class="form">
|
||||
|
||||
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
|
||||
'id'=>'blog-post-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.
|
||||
// See class documentation of CActiveForm for details on this.
|
||||
'enableAjaxValidation'=>false,
|
||||
)); ?>
|
||||
|
||||
<p class="help-block">Fields with <span class="required">*</span> are required.</p>
|
||||
|
||||
<?php echo $form->errorSummary($model); ?>
|
||||
|
||||
<?php
|
||||
if ($model->isNewRecord)
|
||||
echo $form->textFieldControlGroup($model,'Date',array('span'=>5, 'value' => date('Y-m-d')));
|
||||
else
|
||||
echo $form->textFieldControlGroup($model,'Date',array('span'=>5, ));
|
||||
?>
|
||||
|
||||
<?php echo $form->textFieldControlGroup($model,'Title',array('span'=>8)); ?>
|
||||
|
||||
<?php echo $form->textAreaControlGroup($model,'Content',array('rows'=>30,'span'=>8)); ?>
|
||||
|
||||
<?php echo MsHtml::ajaxButton ("Preview", CController::createUrl('blog/ajaxMarkdownPreview'),
|
||||
[
|
||||
'type'=>'POST',
|
||||
'data' => ['Content' => 'js: $("#BlogPost_Content").val()'],
|
||||
'update' => '#markdownAjaxContent',
|
||||
'error'=>'function(msg){alert("An error has happened" + JSON.stringify(msg));}',
|
||||
]); ?>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<div class="well markdownOwner" id="markdownAjaxContent">
|
||||
<?php $this->renderPartial('_ajaxMarkdownPreview', ['Content' => $model->Content, ], false, true); ?>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<?php echo TbHtml::submitButton($model->isNewRecord ? 'Create' : 'Save',array(
|
||||
'color'=>TbHtml::BUTTON_COLOR_PRIMARY,
|
||||
'size'=>TbHtml::BUTTON_SIZE_LARGE,
|
||||
)); ?>
|
||||
</div>
|
||||
|
||||
<?php $this->endWidget(); ?>
|
||||
|
||||
</div><!-- form -->
|
||||
26
www/protected/views/blogpost/_search.php
Normal file
26
www/protected/views/blogpost/_search.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/* @var $this BlogPostController */
|
||||
/* @var $model BlogPost */
|
||||
/* @var $form CActiveForm */
|
||||
?>
|
||||
|
||||
<div class="wide form">
|
||||
|
||||
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
|
||||
'action'=>Yii::app()->createUrl($this->route),
|
||||
'method'=>'get',
|
||||
)); ?>
|
||||
|
||||
<?php echo $form->textFieldControlGroup($model,'ID',array('span'=>5)); ?>
|
||||
|
||||
<?php echo $form->textFieldControlGroup($model,'Date',array('span'=>5)); ?>
|
||||
|
||||
<?php echo $form->textAreaControlGroup($model,'Content',array('rows'=>6,'span'=>8)); ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<?php echo TbHtml::submitButton('Search', array('color' => TbHtml::BUTTON_COLOR_PRIMARY,));?>
|
||||
</div>
|
||||
|
||||
<?php $this->endWidget(); ?>
|
||||
|
||||
</div><!-- search-form -->
|
||||
25
www/protected/views/blogpost/_view.php
Normal file
25
www/protected/views/blogpost/_view.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/* @var $this BlogPostController */
|
||||
/* @var $data BlogPost */
|
||||
?>
|
||||
|
||||
<div class="view">
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('ID')); ?>:</b>
|
||||
<?php echo CHtml::link(CHtml::encode($data->ID),array('view','id'=>$data->ID)); ?>
|
||||
<br />
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('Date')); ?>:</b>
|
||||
<?php echo CHtml::encode($data->Date); ?>
|
||||
<br />
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('Title')); ?>:</b>
|
||||
<?php echo CHtml::encode($data->Title); ?>
|
||||
<br />
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('Content')); ?>:</b>
|
||||
<?php echo CHtml::encode($data->Content); ?>
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
57
www/protected/views/blogpost/admin.php
Normal file
57
www/protected/views/blogpost/admin.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/* @var $this BlogPostController */
|
||||
/* @var $model BlogPost */
|
||||
|
||||
|
||||
$this->breadcrumbs=array(
|
||||
'Blog Posts'=>array('index'),
|
||||
'Manage',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'List BlogPost', 'url'=>array('index')),
|
||||
array('label'=>'Create BlogPost', 'url'=>array('create')),
|
||||
);
|
||||
|
||||
Yii::app()->clientScript->registerScript('search', "
|
||||
$('.search-button').click(function(){
|
||||
$('.search-form').toggle();
|
||||
return false;
|
||||
});
|
||||
$('.search-form form').submit(function(){
|
||||
$('#blog-post-grid').yiiGridView('update', {
|
||||
data: $(this).serialize()
|
||||
});
|
||||
return false;
|
||||
});
|
||||
");
|
||||
?>
|
||||
|
||||
<h1>Manage Blog Posts</h1>
|
||||
|
||||
<p>
|
||||
You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b>
|
||||
<></b>
|
||||
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
|
||||
</p>
|
||||
|
||||
<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button btn')); ?>
|
||||
<div class="search-form" style="display:none">
|
||||
<?php $this->renderPartial('_search',array(
|
||||
'model'=>$model,
|
||||
)); ?>
|
||||
</div><!-- search-form -->
|
||||
|
||||
<?php $this->widget('bootstrap.widgets.TbGridView',array(
|
||||
'id'=>'blog-post-grid',
|
||||
'dataProvider'=>$model->search(),
|
||||
'filter'=>$model,
|
||||
'columns'=>array(
|
||||
'ID',
|
||||
'Date',
|
||||
'Title',
|
||||
array(
|
||||
'class'=>'bootstrap.widgets.TbButtonColumn',
|
||||
),
|
||||
),
|
||||
)); ?>
|
||||
20
www/protected/views/blogpost/create.php
Normal file
20
www/protected/views/blogpost/create.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/* @var $this BlogPostController */
|
||||
/* @var $model BlogPost */
|
||||
?>
|
||||
|
||||
<?php
|
||||
$this->breadcrumbs=array(
|
||||
'Blog Posts'=>array('index'),
|
||||
'Create',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'List BlogPost', 'url'=>array('index')),
|
||||
array('label'=>'Manage BlogPost', 'url'=>array('admin')),
|
||||
);
|
||||
?>
|
||||
|
||||
<h1>Create BlogPost</h1>
|
||||
|
||||
<?php $this->renderPartial('_form', array('model'=>$model)); ?>
|
||||
36
www/protected/views/blogpost/index.php
Normal file
36
www/protected/views/blogpost/index.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/* @var $this BlogPostController */
|
||||
/* @var $blogposts BlogPost[] */
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
$this->pageTitle = 'Blog - ' . Yii::app()->name;
|
||||
|
||||
$this->breadcrumbs = array(
|
||||
'Blog' => array('/blog'),
|
||||
);
|
||||
|
||||
$this->selectedNav = 'blog';
|
||||
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<?php echo MsHtml::pageHeader("Blog", "My personal programming blog"); ?>
|
||||
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach($blogposts as $blogpost) {
|
||||
$i++;
|
||||
|
||||
$this->widget('BlogLink',
|
||||
[
|
||||
'date' => new DateTime($blogpost->Date),
|
||||
'caption' => $blogpost->Title,
|
||||
'link' => $blogpost->getLink(),
|
||||
]);
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
26
www/protected/views/blogpost/update.php
Normal file
26
www/protected/views/blogpost/update.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/* @var $this BlogPostController */
|
||||
/* @var $model BlogPost */
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
$this->pageTitle = 'Update Blogpost - ' . Yii::app()->name;
|
||||
|
||||
$this->breadcrumbs = array(
|
||||
'BlogPosts' => array('index'),
|
||||
$model->Title => array('/blog/view/' . $model->ID),
|
||||
'Update',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'List BlogPost', 'url'=>array('index')),
|
||||
array('label'=>'Create BlogPost', 'url'=>array('create')),
|
||||
array('label'=>'View BlogPost', 'url'=>array('view', 'id'=>$model->ID)),
|
||||
array('label'=>'Manage BlogPost', 'url'=>array('admin')),
|
||||
);
|
||||
?>
|
||||
|
||||
<h1>Update BlogPost <?php echo $model->ID; ?></h1>
|
||||
|
||||
<?php $this->renderPartial('_form', array('model'=>$model)); ?>
|
||||
33
www/protected/views/blogpost/view.php
Normal file
33
www/protected/views/blogpost/view.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/* @var $this BlogPostController */
|
||||
/* @var $model BlogPost */
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
$this->pageTitle = 'Blogpost: ' . $model->Title . ' - ' . Yii::app()->name;
|
||||
|
||||
$this->breadcrumbs = array(
|
||||
'Blog' => array('/blog'),
|
||||
$model->Title,
|
||||
);
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<?php echo MsHtml::pageHeader("Blog", "My personal programming blog"); ?>
|
||||
|
||||
<div class="blogOwner well markdownOwner" id="markdownAjaxContent">
|
||||
<?php echo ParsedownHelper::parse($model->Content); ?>
|
||||
|
||||
<div class="blogFooter">
|
||||
<div class="blogFooterLeft">
|
||||
<?php echo $model->Title; ?>
|
||||
</div>
|
||||
<div class="blogFooterRight">
|
||||
<?php echo $model->getDateTime()->format('d.m.Y'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
8
www/protected/views/highscores/list_top50.php
Normal file
8
www/protected/views/highscores/list_top50.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/* @var $this HighscoresController */
|
||||
/* @var $game HighscoreGames */
|
||||
|
||||
for ($i = 0; $i < 50; $i++)
|
||||
{
|
||||
print($game->ENTRIES[$i]->POINTS . '||' . htmlentities($game->ENTRIES[$i]->PLAYER) . "\r\n");
|
||||
}
|
||||
102
www/protected/views/highscores/listentries.php
Normal file
102
www/protected/views/highscores/listentries.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
/* @var $this HighscoresController */
|
||||
/* @var $game HighscoreGames */
|
||||
/* @var $start int */
|
||||
/* @var $highlight int */
|
||||
/* @var $pagesize int */
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>highscores</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body {
|
||||
background-color: #DDF;
|
||||
padding: 1em 1em 0em;
|
||||
}
|
||||
|
||||
table {
|
||||
margin: auto;
|
||||
width: 80%;
|
||||
text-align: center;
|
||||
border-spacing: 0px;
|
||||
}
|
||||
|
||||
table td { padding: 2px 0px; }
|
||||
table td { width: 25%; }
|
||||
table td:last-child { width: 50%; }
|
||||
|
||||
caption {
|
||||
font-weight: bolder;
|
||||
text-decoration: underline;
|
||||
font-size: x-large;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #008;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:hover { text-decoration: none; }
|
||||
|
||||
#headline > td { text-decoration: underline; }
|
||||
#highlight {
|
||||
font-weight: bolder;
|
||||
background-color: #CCF;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<caption><?php echo $game->NAME; ?></caption>
|
||||
<tr id="headline" >
|
||||
<td>rank</td>
|
||||
<td>points</td>
|
||||
<td>name</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
$current = 0;
|
||||
foreach ($game->ENTRIES as $entry)
|
||||
{
|
||||
$current++;
|
||||
|
||||
if ($current >= $start && $current - $start <= $pagesize)
|
||||
{
|
||||
if ($current == $highlight)
|
||||
echo '<tr id="highlight">';
|
||||
else
|
||||
echo "<tr>";
|
||||
echo "<td>$current</td>";
|
||||
echo "<td>$entry->POINTS</td>";
|
||||
echo "<td>$entry->PLAYER</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
$more = max(0, $start - $pagesize);
|
||||
$less = $start + $pagesize;
|
||||
|
||||
echo '<tr>';
|
||||
if ($start > 0)
|
||||
echo '<td><a href="' . "/Highscores/list?gameid=$game->ID&start=$more&highlight=$highlight" . '">[more points]</a></td>';
|
||||
else
|
||||
echo '<td></td>';
|
||||
echo '<td></td>';
|
||||
if ($start + $pagesize < count($game->ENTRIES))
|
||||
echo '<td><a href="' . "/Highscores/list?gameid=$game->ID&start=$less&highlight=$highlight" . '">[less points]</a></td>';
|
||||
else
|
||||
echo '<td></td>';
|
||||
echo '</tr>';
|
||||
|
||||
?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
36
www/protected/views/highscores/listgames.php
Normal file
36
www/protected/views/highscores/listgames.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/* @var $this HighscoresController */
|
||||
/* @var $games HighscoreGames[] */
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>highscores</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body {
|
||||
background-color: #DDF;
|
||||
padding: 1em 1em 0em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #008;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:hover { text-decoration: none; }
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
foreach ($games as $game)
|
||||
{
|
||||
echo '<a href="' . $game->getListLink() . '">' . $game->NAME . '</a><br>' . "\r\n";
|
||||
}
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user