From 12b6a3359ee5c0aec3f90c46d96da0e7963afd4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Wed, 4 Jun 2014 18:06:38 +0200 Subject: [PATCH] Added FullProgPreview to Indexpage --- .idea/workspace.xml | 344 +++++++++++------- DB_Changes.txt | 3 +- www/css/styles.css | 70 ++++ www/protected/components/MsHtml.php | 35 +- www/protected/components/SeededRandom.php | 2 +- .../components/widgets/FullProgPreview.php | 16 + .../ThumbnailProgPreview.php} | 4 +- .../widgets/views/fullProgPreview.php | 72 ++++ .../views/thumbnailProgPreview.php} | 3 +- www/protected/config/main.php | 1 + .../controllers/ProgramsController.php | 2 + www/protected/models/Program.php | 4 +- www/protected/views/msmain/index.php | 89 ++--- www/protected/views/programs/index.php | 2 +- 14 files changed, 436 insertions(+), 211 deletions(-) create mode 100644 www/protected/components/widgets/FullProgPreview.php rename www/protected/components/{ThumbnailPreview.php => widgets/ThumbnailProgPreview.php} (81%) create mode 100644 www/protected/components/widgets/views/fullProgPreview.php rename www/protected/components/{views/thumbnailPreview.php => widgets/views/thumbnailProgPreview.php} (97%) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7afef9c..1c0de88 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,13 +2,13 @@ - + - - - + + + @@ -66,9 +66,10 @@ - + - + + @@ -77,28 +78,43 @@ - + - - + + - - - - - + + - - + + - + + + + + + + + + + + + + + + + + + + @@ -107,7 +123,16 @@ - + + + + + + + + + + @@ -126,9 +151,6 @@ @@ -534,6 +561,36 @@ + + + + + @@ -722,15 +784,15 @@ - + - + @@ -758,21 +820,6 @@ - - - - - - - - - - - - - - - @@ -858,38 +905,16 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -907,9 +932,7 @@ - - - + @@ -919,23 +942,12 @@ - - - + - - - - - - - - - - + @@ -952,32 +964,19 @@ - - - - - - - - - - + - - - + - - - + @@ -991,9 +990,10 @@ - + + All private @@ -1012,20 +1012,6 @@ - - - - - - - - - - - - - - @@ -1033,46 +1019,130 @@ - + - - - - - - - - - - - - - - - + - + + + + + + + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DB_Changes.txt b/DB_Changes.txt index dd8482e..30c7db3 100644 --- a/DB_Changes.txt +++ b/DB_Changes.txt @@ -4,4 +4,5 @@ programme -> Added Column ThumbnailName programme -> Added Column programming_lang programme -> Changed Sieb_des_Erasthothenes -> Sieb des Erasthothenes (also ren Imagefiles) programme -> Adjusted Star Ratings -programme -> Niripsa[visible] = 0 \ No newline at end of file +programme -> Niripsa[visible] = 0 +programme -> ms4_programs \ No newline at end of file diff --git a/www/css/styles.css b/www/css/styles.css index 76bd639..66058b4 100644 --- a/www/css/styles.css +++ b/www/css/styles.css @@ -153,6 +153,28 @@ ul.nav li.dropdown-append:hover > ul.dropdown-menu { .collHeader { border: 1px solid #D7E0E2; padding: 0; + margin-left: 0; + + position: relative; + + /* .well */ + min-height: 20px; + box-shadow: none; + border-radius: 6px; + background-color: #ECF0F1; + margin-bottom: 20px; +} + +.collHeaderLinkParent { + background-color: #ECF0F1; + + transition: background-color .25s ease-in-out; + -moz-transition: background-color .25s ease-in-out; + -webkit-transition: background-color .25s ease-in-out; +} + +.collHeaderLinkParent:hover { + background-color: #D7E0E2; } .collHeaderSpan-front { @@ -175,4 +197,52 @@ ul.nav li.dropdown-append:hover > ul.dropdown-menu { padding: 0 5px; margin-top: 2px; +} + +.collHeaderLink { + left: 0; + top: 0; + + width: 100%; + height: 100%; + + position: absolute; +} + + +/* FullProgPreview +-------------------------------------------------- */ + +.fpp_parent { + background-color: #D7E0E2; +} + +.fpp_previewImg { + width: 260px; + border-radius: 6px; + box-shadow: 0 0 15px 0px #333; +} + +.fpp_title { + margin-top: -5px; +} + +.fpp_description { + max-width: 260px +} + +.fpp_footer { + background-color: #ECF0F1; + + margin-left: -19px; + margin-right: -19px; + margin-bottom: -19px; + + padding-top: 19px; + padding-left: 19px; + padding-right: 19px; + + border: 2px solid #D7E0E2; + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; } \ No newline at end of file diff --git a/www/protected/components/MsHtml.php b/www/protected/components/MsHtml.php index 4d48a95..c3af13b 100644 --- a/www/protected/components/MsHtml.php +++ b/www/protected/components/MsHtml.php @@ -1,13 +1,32 @@ -
' . $date->format('d.m.y') . '
-
' . $caption . '
-
- - '; + if (empty($link)) { + return + '
+
' . $date->format('d.m.Y') . '
+
' . $caption . '
+
+
+ '; + } else { + return + '
+
' . $date->format('d.m.Y') . '
+
' . $caption . '
+
+   +
+ '; + } + } } \ No newline at end of file diff --git a/www/protected/components/SeededRandom.php b/www/protected/components/SeededRandom.php index 3c9c322..27bfbd9 100644 --- a/www/protected/components/SeededRandom.php +++ b/www/protected/components/SeededRandom.php @@ -40,6 +40,6 @@ class SeededRandom { $now = getdate(); - return ($now['year'] % 100) * 366 + $now['yday']; + return ($now['year'] % 100) * 366 + $now['yday'] /* * $now['seconds'] */; } } \ No newline at end of file diff --git a/www/protected/components/widgets/FullProgPreview.php b/www/protected/components/widgets/FullProgPreview.php new file mode 100644 index 0000000..29f48db --- /dev/null +++ b/www/protected/components/widgets/FullProgPreview.php @@ -0,0 +1,16 @@ +render('fullProgPreview'); + } +} + +?> \ No newline at end of file diff --git a/www/protected/components/ThumbnailPreview.php b/www/protected/components/widgets/ThumbnailProgPreview.php similarity index 81% rename from www/protected/components/ThumbnailPreview.php rename to www/protected/components/widgets/ThumbnailProgPreview.php index b12b969..d7cff7a 100644 --- a/www/protected/components/ThumbnailPreview.php +++ b/www/protected/components/widgets/ThumbnailProgPreview.php @@ -1,6 +1,6 @@ date == null) $this->date = new DateTime('2000-01-01'); - $this->render('thumbnailPreview'); + $this->render('thumbnailProgPreview'); } } diff --git a/www/protected/components/widgets/views/fullProgPreview.php b/www/protected/components/widgets/views/fullProgPreview.php new file mode 100644 index 0000000..66f0dd8 --- /dev/null +++ b/www/protected/components/widgets/views/fullProgPreview.php @@ -0,0 +1,72 @@ + + +
+
+ +

caption; ?>

+ +
+ +
+
+ + + +
+ +
+
+

+ program->Name; ?> + + program->Sterne) + echo TbHtml::icon(TbHtml::ICON_STAR); + else + echo TbHtml::icon(TbHtml::ICON_STAR_EMPTY); + } + ?> +

+ + + +
+ +

+ program->Description; ?> +

+ +

+ program->Kategorie)) { + echo TbHtml::icon(TbHtml::ICON_TAG); + echo $this->program->Kategorie . ''; + } + ?> +

+ +

+ program->getLanguageList() as $lang) { + echo TbHtml::icon(TbHtml::ICON_GLOBE); + echo $lang; + echo '       '; + } + ?> +

+
+
+
+ +
+ +
\ No newline at end of file diff --git a/www/protected/components/views/thumbnailPreview.php b/www/protected/components/widgets/views/thumbnailProgPreview.php similarity index 97% rename from www/protected/components/views/thumbnailPreview.php rename to www/protected/components/widgets/views/thumbnailProgPreview.php index a81c52d..9f290c1 100644 --- a/www/protected/components/views/thumbnailPreview.php +++ b/www/protected/components/widgets/views/thumbnailProgPreview.php @@ -1,5 +1,5 @@
  • @@ -45,6 +45,7 @@ echo '       '; } ?> +