Added FullProgPreview to Indexpage
This commit is contained in:
16
www/protected/components/widgets/FullProgPreview.php
Normal file
16
www/protected/components/widgets/FullProgPreview.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
class FullProgPreview extends CWidget {
|
||||
/**
|
||||
* @var $program Program
|
||||
*/
|
||||
public $program;
|
||||
|
||||
public $caption = ' ?? caption ?? ';
|
||||
|
||||
public function run() {
|
||||
$this->render('fullProgPreview');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
24
www/protected/components/widgets/ThumbnailProgPreview.php
Normal file
24
www/protected/components/widgets/ThumbnailProgPreview.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
class ThumbnailProgPreview extends CWidget {
|
||||
public $caption = '';
|
||||
public $link = '';
|
||||
public $enabled = true;
|
||||
public $description = '';
|
||||
public $category = '';
|
||||
public $language = [];
|
||||
public $starcount = 0;
|
||||
public $downloads = 0;
|
||||
public $date = null;
|
||||
public $image = '';
|
||||
public $programminglang = '???';
|
||||
|
||||
public function run() {
|
||||
if ($this->date == null)
|
||||
$this->date = new DateTime('2000-01-01');
|
||||
|
||||
$this->render('thumbnailProgPreview');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
72
www/protected/components/widgets/views/fullProgPreview.php
Normal file
72
www/protected/components/widgets/views/fullProgPreview.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/* @var $this FullProgPreview */
|
||||
?>
|
||||
|
||||
<div class="well fpp_parent">
|
||||
<div class="container">
|
||||
|
||||
<h1> <?php echo $this->caption; ?> </h1>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<a href="<?php echo $this->program->getLink(); ?>">
|
||||
<img class="fpp_previewImg" src="<?php echo $this->program->getImagePath(); ?>"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="span9">
|
||||
<div>
|
||||
<h2 class="fpp_title">
|
||||
<?php echo $this->program->Name; ?>
|
||||
|
||||
<?php
|
||||
for ($i = 0; $i < 4; $i++) {
|
||||
if ($i < $this->program->Sterne)
|
||||
echo TbHtml::icon(TbHtml::ICON_STAR);
|
||||
else
|
||||
echo TbHtml::icon(TbHtml::ICON_STAR_EMPTY);
|
||||
}
|
||||
?>
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<p class="fpp_description">
|
||||
<?php echo $this->program->Description; ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
if (!empty($this->program->Kategorie)) {
|
||||
echo TbHtml::icon(TbHtml::ICON_TAG);
|
||||
echo $this->program->Kategorie . '';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
foreach ($this->program->getLanguageList() as $lang) {
|
||||
echo TbHtml::icon(TbHtml::ICON_GLOBE);
|
||||
echo $lang;
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="fpp_footer">
|
||||
<p>
|
||||
<a class="btn btn-primary btn-large" href="<?php echo $this->program->getLink(); ?>">
|
||||
Show »
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/* @var $this ThumbnailProgPreview */
|
||||
?>
|
||||
|
||||
<li class="thumbnailParentSpan">
|
||||
<div >
|
||||
<div class="thumbnail <?php if (! $this->enabled) print("thumbnailDisabled"); ?>">
|
||||
<div class="thumbnailInnerHead">
|
||||
<a <?php if($this->enabled) echo 'href="'. $this->link . '"'; ?>>
|
||||
<img class="thumbnailInnerImage <?php if (! $this->enabled) print('grayscale'); ?>" src="<?php echo $this->image; ?>">
|
||||
</a>
|
||||
</div>
|
||||
<div class="caption">
|
||||
<?php $h_level = (strlen($this->caption) > 13) ? ["<h3>", "</h3>"] : ["<h2>", "</h2>"]; ?>
|
||||
|
||||
<?php echo $h_level[0]; ?>
|
||||
|
||||
<?php
|
||||
if ($this->enabled)
|
||||
echo '<a class="progThumbnailCaption" href="' . $this->link . '">' . $this->caption . '</a>';
|
||||
else
|
||||
echo '<a class="progThumbnailCaption">' . $this->caption . '</a>';
|
||||
?>
|
||||
|
||||
<?php echo $h_level[1]; ?>
|
||||
|
||||
<p class="thumbnailInnerDescription">
|
||||
<?php echo $this->description; ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
if (!empty($this->category)) {
|
||||
echo TbHtml::icon(TbHtml::ICON_TAG);
|
||||
echo $this->category . '';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
foreach ($this->language as $lang) {
|
||||
echo TbHtml::icon(TbHtml::ICON_GLOBE);
|
||||
echo $lang;
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer thumbnailInnerFooter">
|
||||
<div class="text-center">
|
||||
<?php
|
||||
for ($i = 0; $i < 4; $i++) {
|
||||
if ($i < $this->starcount)
|
||||
echo TbHtml::icon(TbHtml::ICON_STAR);
|
||||
else
|
||||
echo TbHtml::icon(TbHtml::ICON_STAR_EMPTY);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span4"><b><?php echo $this->downloads; ?></b><br/>
|
||||
<small>Downloads</small>
|
||||
</div>
|
||||
<div class="span4"><b><?php echo $this->date->format('d.m.y'); ?></b><br/>
|
||||
<small>Added On</small>
|
||||
</div>
|
||||
<div class="span4"><b><?php echo $this->programminglang; ?></b><br/>
|
||||
<small>Language</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
Reference in New Issue
Block a user