1
0

Adjustments to The ProgramsView

This commit is contained in:
Mike Schwörer 2014-05-28 21:29:49 +02:00
parent b5fd33e012
commit ad5226a1d1
5 changed files with 148 additions and 118 deletions

View File

@ -63,64 +63,47 @@
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="main.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/config/main.php">
<file leaf-file-name="styles.css" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/css/styles.css">
<provider selected="true" editor-type-id="text-editor">
<state line="55" column="22" selection-start="1133" selection-end="1133" vertical-scroll-proportion="-20.26923" vertical-offset="408" max-vertical-offset="1768">
<state line="104" column="18" selection-start="1642" selection-end="1642" vertical-scroll-proportion="0.0" vertical-offset="1280" max-vertical-offset="1887">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="error.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/views/site/error.php">
<file leaf-file-name="thumbnailPreview.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/components/views/thumbnailPreview.php">
<provider selected="true" editor-type-id="text-editor">
<state line="11" column="37" selection-start="242" selection-end="242" vertical-scroll-proportion="-7.1923075" vertical-offset="0" max-vertical-offset="357">
<state line="8" column="18" selection-start="159" selection-end="159" vertical-scroll-proportion="-5.230769" vertical-offset="0" max-vertical-offset="1241">
<folding>
<element signature="n#style#0;n#img#0;n#a#0;n#div#0;n#div#0;n#div#0;n#li#0;n#!!top" expanded="true" />
<marker date="1401304594530" expanded="true" signature="302:361" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="671:791" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="827:1029" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="827:955" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="1076:1525" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="1106:1317" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="1355:1525" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="1380:1466" placeholder="..." />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.php" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/www/protected/views/programs/index.php">
<provider selected="true" editor-type-id="text-editor">
<state line="34" column="37" selection-start="676" selection-end="676" vertical-scroll-proportion="0.7314974" vertical-offset="153" max-vertical-offset="1054">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="dev.php" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/www/protected/config/env/dev.php">
<file leaf-file-name="ThumbnailPreview.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/components/ThumbnailPreview.php">
<provider selected="true" editor-type-id="text-editor">
<state line="19" column="48" selection-start="465" selection-end="465" vertical-scroll-proportion="0.46896553" vertical-offset="51" max-vertical-offset="850">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="SiteController.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/controllers/SiteController.php">
<provider selected="true" editor-type-id="text-editor">
<state line="33" column="44" selection-start="624" selection-end="624" vertical-scroll-proportion="-17.653847" vertical-offset="102" max-vertical-offset="1921">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="debugerror.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/views/site/debugerror.php">
<provider selected="true" editor-type-id="text-editor">
<state line="11" column="73" selection-start="263" selection-end="263" vertical-scroll-proportion="-7.1923075" vertical-offset="0" max-vertical-offset="459">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/index.php">
<provider selected="true" editor-type-id="text-editor">
<state line="9" column="58" selection-start="368" selection-end="371" vertical-scroll-proportion="-5.8846154" vertical-offset="0" max-vertical-offset="323">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="prod.php" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/www/protected/config/env/prod.php">
<provider selected="true" editor-type-id="text-editor">
<state line="19" column="43" selection-start="479" selection-end="479" vertical-scroll-proportion="-12.423077" vertical-offset="0" max-vertical-offset="612">
<state line="4" column="16" selection-start="84" selection-end="84" vertical-scroll-proportion="-2.6153846" vertical-offset="0" max-vertical-offset="442">
<folding />
</state>
</provider>
@ -166,21 +149,21 @@
<option value="$PROJECT_DIR$/www/protected/views/programs/view.php" />
<option value="$PROJECT_DIR$/www/protected/views/site/about.php" />
<option value="$PROJECT_DIR$/www/protected/components/ProgramHelper.php" />
<option value="$PROJECT_DIR$/www/protected/components/ThumbnailPreview.php" />
<option value="$PROJECT_DIR$/www/protected/models/Program.php" />
<option value="$PROJECT_DIR$/www/protected/views/programs/_search.php" />
<option value="$PROJECT_DIR$/www/protected/views/programs/_view.php" />
<option value="$PROJECT_DIR$/www/protected/views/programs/_form.php" />
<option value="$PROJECT_DIR$/www/protected/controllers/ProgramsController.php" />
<option value="$PROJECT_DIR$/www/protected/views/programs/index.php" />
<option value="$PROJECT_DIR$/www/css/styles.css" />
<option value="$PROJECT_DIR$/www/protected/components/views/thumbnailPreview.php" />
<option value="$PROJECT_DIR$/www/protected/config/main.php" />
<option value="$PROJECT_DIR$/www/protected/config/env/prod.php" />
<option value="$PROJECT_DIR$/www/protected/controllers/SiteController.php" />
<option value="$PROJECT_DIR$/www/protected/views/site/debugerror.php" />
<option value="$PROJECT_DIR$/www/index.php" />
<option value="$PROJECT_DIR$/www/protected/config/env/dev.php" />
<option value="$PROJECT_DIR$/www/protected/components/ThumbnailPreview.php" />
<option value="$PROJECT_DIR$/www/protected/components/views/thumbnailPreview.php" />
<option value="$PROJECT_DIR$/www/css/styles.css" />
<option value="$PROJECT_DIR$/www/protected/views/programs/index.php" />
</list>
</option>
</component>
@ -711,7 +694,7 @@
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Framework" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3294766" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39766702" sideWeight="0.4997245" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32837406" sideWeight="0.5002755" order="9" side_tool="true" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32731137" sideWeight="0.5002755" order="9" side_tool="true" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2214876" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32943678" sideWeight="0.4997245" order="6" side_tool="false" content_ui="tabs" />
@ -896,13 +879,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/ProgramHelper.php">
<provider selected="true" editor-type-id="text-editor">
<state line="24" column="42" selection-start="549" selection-end="549" vertical-scroll-proportion="-15.692307" vertical-offset="0" max-vertical-offset="1360">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/programs/admin.php">
<provider selected="true" editor-type-id="text-editor">
<state line="1" column="0" selection-start="6" selection-end="66" vertical-scroll-proportion="-0.49827588" vertical-offset="306" max-vertical-offset="1411">
@ -917,13 +893,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/ThumbnailPreview.php">
<provider selected="true" editor-type-id="text-editor">
<state line="10" column="22" selection-start="235" selection-end="235" vertical-scroll-proportion="-6.5384617" vertical-offset="0" max-vertical-offset="425">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/framework/yiilite.php">
<provider selected="true" editor-type-id="text-editor">
<state line="7877" column="20" selection-start="228630" selection-end="228630" vertical-scroll-proportion="0.3474427" vertical-offset="133372" max-vertical-offset="176647">
@ -977,20 +946,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/css/styles.css">
<provider selected="true" editor-type-id="text-editor">
<state line="69" column="19" selection-start="1105" selection-end="1105" vertical-scroll-proportion="0.0" vertical-offset="652" max-vertical-offset="1292">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/programs/index.php">
<provider selected="true" editor-type-id="text-editor">
<state line="29" column="68" selection-start="670" selection-end="670" vertical-scroll-proportion="-9.884615" vertical-offset="236" max-vertical-offset="901">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/controllers/ProgramsController.php">
<provider selected="true" editor-type-id="text-editor">
<state line="49" column="49" selection-start="1250" selection-end="1250" vertical-scroll-proportion="-12.423077" vertical-offset="510" max-vertical-offset="3587">
@ -998,32 +953,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/views/thumbnailPreview.php">
<provider selected="true" editor-type-id="text-editor">
<state line="11" column="60" selection-start="374" selection-end="374" vertical-scroll-proportion="-7.1923075" vertical-offset="0" max-vertical-offset="1207">
<folding>
<element signature="n#style#0;n#p#0;n#div#1;n#div#0;n#div#0;n#li#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#2;n#div#0;n#div#0;n#li#0;n#!!top" expanded="true" />
<marker date="1401285656346" expanded="true" signature="-1:-1" placeholder="..." />
<marker date="1401285656346" expanded="true" signature="-1:-1" placeholder="..." />
<marker date="1401285656346" expanded="true" signature="-1:-1" placeholder="..." />
<marker date="1401285656346" expanded="true" signature="-1:-1" placeholder="..." />
<marker date="1401285656346" expanded="true" signature="-1:-1" placeholder="..." />
<marker date="1401285656346" expanded="true" signature="-1:-1" placeholder="..." />
<marker date="1401285656346" expanded="true" signature="-1:-1" placeholder="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/site/index.php">
<provider selected="true" editor-type-id="text-editor">
<state line="42" column="76" selection-start="847" selection-end="847" vertical-scroll-proportion="-19.615385" vertical-offset="204" max-vertical-offset="1564">
<folding>
<marker date="1401267568830" expanded="true" signature="-1:-1" placeholder="SELECT * FRO..Programme..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/site/about.php">
<provider selected="true" editor-type-id="text-editor">
<state line="26" column="78" selection-start="790" selection-end="790" vertical-scroll-proportion="0.762069" vertical-offset="0" max-vertical-offset="1530">
@ -1101,6 +1030,60 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/site/index.php">
<provider selected="true" editor-type-id="text-editor">
<state line="42" column="76" selection-start="847" selection-end="847" vertical-scroll-proportion="-19.615385" vertical-offset="204" max-vertical-offset="1564">
<folding>
<marker date="1401267568830" expanded="true" signature="-1:-1" placeholder="SELECT * FRO..Programme..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/ThumbnailPreview.php">
<provider selected="true" editor-type-id="text-editor">
<state line="4" column="16" selection-start="84" selection-end="84" vertical-scroll-proportion="-2.6153846" vertical-offset="0" max-vertical-offset="442">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/views/thumbnailPreview.php">
<provider selected="true" editor-type-id="text-editor">
<state line="8" column="18" selection-start="159" selection-end="159" vertical-scroll-proportion="-5.230769" vertical-offset="0" max-vertical-offset="1241">
<folding>
<element signature="n#style#0;n#img#0;n#a#0;n#div#0;n#div#0;n#div#0;n#li#0;n#!!top" expanded="true" />
<marker date="1401304594530" expanded="true" signature="302:361" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="671:791" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="827:1029" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="827:955" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="1076:1525" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="1106:1317" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="1355:1525" placeholder="..." />
<marker date="1401304594530" expanded="true" signature="1380:1466" placeholder="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/css/styles.css">
<provider selected="true" editor-type-id="text-editor">
<state line="104" column="18" selection-start="1642" selection-end="1642" vertical-scroll-proportion="0.0" vertical-offset="1280" max-vertical-offset="1887">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/components/ProgramHelper.php">
<provider selected="true" editor-type-id="text-editor">
<state line="34" column="8" selection-start="749" selection-end="931" vertical-scroll-proportion="0.32185885" vertical-offset="391" max-vertical-offset="1360">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/www/protected/views/programs/index.php">
<provider selected="true" editor-type-id="text-editor">
<state line="34" column="37" selection-start="676" selection-end="676" vertical-scroll-proportion="0.7314974" vertical-offset="153" max-vertical-offset="1054">
<folding />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>

View File

@ -60,12 +60,47 @@
}
ul.nav li.dropdown-append:hover > ul.dropdown-menu {
display: block;
display: block;
}
/* programs/view
/* ThumbnalPreview
-------------------------------------------------- */
.progThumbnailCaption {
color: #2C3E50;
text-decoration: none;
}
.progThumbnailCaption:active,
.progThumbnailCaption:visited,
.progThumbnailCaption:link,
.progThumbnailCaption:hover {
/*color: #2C3E50;*/
text-decoration: none;
}
.thumbnailParentSpan {
width: 270px;
}
.thumbnailParentSpan > div {
min-height: 600px;
}
.thumbnailParentSpan > div > div {
padding: 0;
}
.thumbnailInnerHead {
padding: 4px;
height: 225px;
overflow-y: hidden;
}
.thumbnailInnerFooter {
text-align: left;
}
.thumbnailInnerDescription {
min-height: 120px;
}

View File

@ -2,6 +2,7 @@
class ThumbnailPreview extends CWidget {
public $caption = '';
public $link = '';
public $description = '';
public $category = '';
public $language = [];

View File

@ -2,21 +2,23 @@
/* @var $this ThumbnailPreview */
?>
<li class="span3" style="width: 270px">
<div style="min-height: 600px">
<div class="thumbnail" style="padding: 0;">
<div style="padding:4px; height: 225px; overflow-y: hidden">
<img style="width: 100%" src="<?php echo $this->image; ?>">
<li class="span3 thumbnailParentSpan">
<div >
<div class="thumbnail">
<div class="thumbnailInnerHead">
<a href="<?php echo $this->link; ?>">
<img style="width: 100%" src="<?php echo $this->image; ?>">
</a>
</div>
<div class="caption">
<?php //TODO Line out css to styles.css !!!!
<?php
if ( strlen($this->caption) > 13)
echo '<h3 class="progThumbnailCaption">' . $this->caption . '</h3>';
echo '<h3><a class="progThumbnailCaption" href="' . $this->link . '">' . $this->caption . '</a></h3>';
else
echo '<h2 class="progThumbnailCaption">' . $this->caption . '</h2>';
echo '<h2><a class="progThumbnailCaption" href="' . $this->link . '">' . $this->caption . '</a></h2>';
?>
<p style="min-height: 70px;"><?php echo $this->description; ?></p>
<p class="thumbnailInnerDescription"><?php echo $this->description; ?></p>
<p>
<?php
@ -36,7 +38,7 @@
}
?>
</div>
<div class="modal-footer" style="text-align: left">
<div class="modal-footer thumbnailInnerFooter">
<div class="text-center">
<?php
for ($i = 0; $i < 4; $i++) {

View File

@ -15,19 +15,28 @@ $this->menu = array(
?>
<div class="container">
<h1>My Programs</h1>
<br><br>
<div class="row-fluid">
<?php
$all = Program::model()->findAll();
$criteria = new CDbCriteria;
$criteria->order = "add_date DESC";
$criteria->condition = "visible=1";
$all = Program::model()->findAll($criteria);
$rows = ceil((count($all) / 4));
for ($i = 0; $i < $rows; $i++) {
echo '<ul class="thumbnails">';
foreach (array_slice(Program::model()->findAll(), $i * 4, 4) as $record) {
foreach (array_slice($all, $i * 4, 4) as $record) {
$this->widget('ThumbnailPreview',
[
'caption' => $record->attributes['Thumbnailname'],
'link' => '/programs/view/' . $record->attributes['Name'],
'description' => $record->attributes['Description'],
'category' => $record->attributes['Kategorie'],
'language' => explode("|", $record->attributes['Language']),