12 $apalines = $this->widget(
'common.modules.apalines.widgets.ApaLinesWidget',
14 'channel' =>
'test1,test2,test3',
15 'max_age_of_news' => 24*30*12,
16 'max_count_of_news' => 50
22 <h1>APA LINES NEWS PRESENTATION</h1>
26 if(!isset($_GET[
'id'])):
27 foreach($apalines->data as $line):
29 <div
class=
"overview">
31 <a href=
"<?php echo $line['detailed_link']; ?>">
32 <h3
class=
"title"><?php echo $line[
'title']; ?></h3>
34 <p
class=
"header"><?php echo $line[
'header']; ?></p>
35 <?php
if(count($line[
'multimedia'])){ ?>
36 <div
class=
"images_wrapper">
39 foreach($line[
'multimedia'] as $mm){
40 echo
"<a rel='{$mm['doc_id']}' href='{$mm['files']['original']['href']}'>";
41 echo CHtml::image($mm[
'files'][
'thumbnail'][
'href']);
49 foreach($line[
'bg_news'] as $bg_line): ?>
51 <a href=
"<?php echo $bg_line['detailed_link']; ?>">
52 <h3
class=
"title"><?php echo $bg_line[
'title']; ?></h3>
54 <p
class=
"header"><?php echo $bg_line[
'header']; ?></p>
55 <?php
if(count($bg_line[
'multimedia'])){ ?>
56 <div
class=
"images_wrapper">
59 foreach($bg_line[
'multimedia'] as $mm){
60 echo
"<a rel='{$mm['doc_id']}' href='{$mm['files']['original']['href']}'>";
61 echo CHtml::image($mm[
'files'][
'thumbnail'][
'href']);
75 $line = $apalines->data;
79 <div
class=
"detailed_view">
82 if(isset($line[
'multimedia']) && is_array($line[
'multimedia'])){
83 foreach($line[
'multimedia'] as $mm){
84 echo
"<a rel='{$mm['doc_id']}' href='{$mm['files']['original']['href']}'>";
85 echo CHtml::image($mm[
'files'][
'thumbnail'][
'href']);
92 <h3
class=
"title"><?php echo $line[
'title']; ?></h3>
93 <p
class=
"header"><?php echo $line[
'text']; ?></p>
94 <?php
if(count($line[
'bg_news'])): ?>
95 <div
class=
"child_news">
96 <h3>Related news:</h3>
99 foreach($line[
'bg_news'] as $bg_line){
100 echo
"<li><a href='{$bg_line['detailed_link']}'>{$bg_line['title']}</a></li>";
111 echo
"<h3>The news was not found</h3>";
118 .apalines .overview .line{
119 border-bottom: 1px dotted blue;
121 padding-bottom: 15px;
123 .apalines .overview .bg_line{
124 border-left: 1px solid black;
129 .apalines .overview .images_wrapper{
132 .apalines .overview .images{
134 border: 1px solid #000;
141 .apalines .overview img{
144 .apalines .detailed_view .images,
145 .apalines .detailed_view .info{
150 .apalines .detailed_view .images{
153 .apalines .detailed_view .info{
157 border-left: 1px solid black;
159 .apalines .detailed_view img{
167 <script type=
"text/javascript">
169 'transitionIn' :
'none',
170 'transitionOut' :
'none',
171 'titlePosition' :
'over',
172 'titleFormat' :
function(title, currentArray, currentIndex, currentOpts) {
173 return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) +
' / ' + currentArray.length + (title.length ?
' ' + title :
'') +
'</span>';