2014-05-19 10:16:43 +02:00
|
|
|
<?php
|
2014-06-06 09:47:15 +02:00
|
|
|
/* @var $this ProgramsController */
|
2014-05-28 11:02:52 +02:00
|
|
|
/* @var $model Program */
|
2014-05-19 10:16:43 +02:00
|
|
|
?>
|
|
|
|
|
|
|
|
<?php
|
2014-06-10 13:27:17 +02:00
|
|
|
|
|
|
|
$this->pageTitle = $model->Name . ' - ' . Yii::app()->name;
|
|
|
|
|
2014-06-12 14:36:34 +02:00
|
|
|
$this->breadcrumbs = array(
|
|
|
|
'Programs' => array('index'),
|
2014-05-19 10:16:43 +02:00
|
|
|
$model->Name,
|
|
|
|
);
|
2014-09-28 02:37:53 +02:00
|
|
|
|
|
|
|
array_push($this->css_files, "/css/lightbox.css");
|
|
|
|
|
2014-06-12 14:36:34 +02:00
|
|
|
?>
|
2014-05-19 10:16:43 +02:00
|
|
|
|
2014-06-12 14:36:34 +02:00
|
|
|
<?php
|
|
|
|
if (!$model->visible && Yii::app()->user->name != 'admin') {
|
|
|
|
throw new CHttpException(400, "You cannot view this program");
|
|
|
|
}
|
2014-05-19 10:16:43 +02:00
|
|
|
?>
|
|
|
|
|
2014-09-03 19:13:45 +02:00
|
|
|
<div class="progview_container">
|
2014-07-05 21:15:24 +02:00
|
|
|
<?php if (!$model->enabled) echo TbHtml::alert(TbHtml::ALERT_COLOR_WARNING, TbHtml::b('Warning!') . ' This programm is for normal users disabled'); ?>
|
|
|
|
<?php if (!$model->visible) echo TbHtml::alert(TbHtml::ALERT_COLOR_WARNING, TbHtml::b('Warning!') . ' This programm is for normal users invisible'); ?>
|
2014-06-30 22:51:59 +02:00
|
|
|
|
2014-06-12 14:36:34 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="span3">
|
|
|
|
<div class="well progview_infocol">
|
|
|
|
<h2 class="text-center">Info</h2>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="progview_infocontent">
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>Stars:</td>
|
|
|
|
<td><?php echo $model->getStarHTML(); ?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Downloads:</td>
|
|
|
|
<td><?php echo TbHtml::badge($model->Downloads, array('color' => TbHtml::BADGE_COLOR_SUCCESS)); ?></td>
|
|
|
|
</tr>
|
2014-07-20 16:37:49 +02:00
|
|
|
<?php if ($model->highscore_gid >= 0): ?>
|
|
|
|
<tr>
|
|
|
|
<td>Highscore:</td>
|
|
|
|
<td><?php echo TbHtml::badge($model->getHighscoreGame()->getMaximumScore()->POINTS, array('color' => TbHtml::BADGE_COLOR_SUCCESS)); ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php endif ?>
|
2014-06-12 14:36:34 +02:00
|
|
|
<tr>
|
|
|
|
<td>Languages:</td>
|
|
|
|
<td><?php foreach ($model->getLanguageList() as $lang) echo TbHtml::badge($lang, array('color' => TbHtml::BADGE_COLOR_INFO)); ?></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Added:</td>
|
|
|
|
<td><?php echo TbHtml::badge($model->getDateTime()->format('d.m.Y'), array('color' => TbHtml::BADGE_COLOR_INFO)); ?></td>
|
|
|
|
</tr>
|
2014-06-12 15:37:03 +02:00
|
|
|
<?php if ($model->version != null): ?>
|
|
|
|
<tr>
|
|
|
|
<td>Version:</td>
|
|
|
|
<td><?php echo TbHtml::badge($model->version->Version, array('color' => TbHtml::BADGE_COLOR_INFO)); ?></td>
|
|
|
|
</tr>
|
|
|
|
<?php endif ?>
|
2014-06-12 14:36:34 +02:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="text-right progview_inforow">
|
|
|
|
<?php if ($model->uses_absCanv): ?>
|
|
|
|
<a href="/programs/view/AbsCanvas">
|
2014-07-05 21:15:24 +02:00
|
|
|
<?php echo TbHtml::badge('AbsCanvas', array('color' => TbHtml::BADGE_COLOR_WARNING)); ?>
|
2014-06-12 14:36:34 +02:00
|
|
|
</a>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<?php echo TbHtml::badge($model->programming_lang, array('color' => TbHtml::BADGE_COLOR_WARNING)); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="span6">
|
2014-07-05 21:15:24 +02:00
|
|
|
<?php
|
|
|
|
$this->widget('ProgDescription',
|
|
|
|
[
|
|
|
|
'program' => $model,
|
|
|
|
]
|
|
|
|
);
|
|
|
|
?>
|
2014-09-06 15:39:39 +02:00
|
|
|
<div class="disqus_owner">
|
|
|
|
<?php
|
|
|
|
$this->widget(
|
|
|
|
'ext.YiiDisqusWidget.YiiDisqusWidget',
|
|
|
|
[
|
|
|
|
'shortname' => 'mikescher-de',
|
|
|
|
'identifier' => 'programs/view/' + $model->ID,
|
|
|
|
'title' => $model->Name,
|
|
|
|
'url' => $model->getAbsoluteLink(),
|
|
|
|
'category_id' => '3253400', // = programs/view
|
|
|
|
]
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
</div>
|
2014-06-12 14:36:34 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="span3">
|
|
|
|
<div class="well">
|
2014-09-03 19:25:56 +02:00
|
|
|
<a href="<?php echo $model->getImagePath(); ?>" data-lightbox="img_prev" data-title="<?php echo $model->Name; ?>">
|
|
|
|
<img src="<?php echo $model->getImagePath(); ?>" class="progview_image" />
|
|
|
|
</a>
|
2014-06-12 14:36:34 +02:00
|
|
|
|
|
|
|
<div class="progview_donwloadbtns">
|
|
|
|
<?php
|
|
|
|
echo TbHtml::linkbutton('Download',
|
|
|
|
[
|
|
|
|
'block' => true,
|
|
|
|
'color' => TbHtml::BUTTON_COLOR_PRIMARY,
|
|
|
|
'size' => TbHtml::BUTTON_SIZE_DEFAULT,
|
2014-07-19 19:35:53 +02:00
|
|
|
'Content' => 'nofollow',
|
2014-09-28 02:37:53 +02:00
|
|
|
'url' => $model->getDownloadLink(),
|
2014-06-12 14:36:34 +02:00
|
|
|
]);
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php
|
2014-07-05 21:15:24 +02:00
|
|
|
if (!empty($model->github_url))
|
2014-06-12 14:36:34 +02:00
|
|
|
echo TbHtml::linkbutton('Github',
|
|
|
|
[
|
|
|
|
'block' => true,
|
|
|
|
'color' => TbHtml::BUTTON_COLOR_INFO,
|
|
|
|
'size' => TbHtml::BUTTON_SIZE_DEFAULT,
|
|
|
|
'url' => $model->github_url,
|
|
|
|
]);
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php
|
2014-07-05 21:15:24 +02:00
|
|
|
if (!empty($model->sourceforge_url))
|
2014-06-12 14:36:34 +02:00
|
|
|
echo TbHtml::linkbutton('Sourceforge',
|
|
|
|
[
|
|
|
|
'block' => true,
|
|
|
|
'color' => TbHtml::BUTTON_COLOR_INFO,
|
|
|
|
'size' => TbHtml::BUTTON_SIZE_DEFAULT,
|
|
|
|
'url' => $model->sourceforge_url,
|
|
|
|
]);
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php
|
2014-07-05 21:15:24 +02:00
|
|
|
if (!empty($model->homepage_url))
|
2014-06-12 14:36:34 +02:00
|
|
|
echo TbHtml::linkbutton('Homepage',
|
|
|
|
[
|
|
|
|
'block' => true,
|
|
|
|
'color' => TbHtml::BUTTON_COLOR_INFO,
|
|
|
|
'size' => TbHtml::BUTTON_SIZE_DEFAULT,
|
|
|
|
'url' => $model->homepage_url,
|
|
|
|
]);
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
if ($model->highscore_gid >= 0)
|
|
|
|
echo TbHtml::linkbutton('Highscore',
|
|
|
|
[
|
|
|
|
'block' => true,
|
|
|
|
'color' => TbHtml::BUTTON_COLOR_SUCCESS,
|
|
|
|
'size' => TbHtml::BUTTON_SIZE_DEFAULT,
|
2014-09-28 02:37:53 +02:00
|
|
|
'url' => '/Highscores/list?gameid=' . $model->highscore_gid,
|
2014-06-12 14:36:34 +02:00
|
|
|
]);
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|