/** * UWAGA! * z tego widoku korzysta rowniez widok protected/modules/newsFeed/views/partials/_default.php * $this->renderPartial('//index/_item', array('doc'=>$data)); */ $docUrl = Yii::app()->createUrl('doc/view', array('indexname'=>Common::normalizeUrl($doc->getMainIndex()->pubIndexTranslations->name), 'urlname'=>Common::normalizeUrl($doc->version->title), 'docId'=>$doc->id)); $lead = ParseDocs::getLead($doc->version); $urlLenght = 25; if (!empty(Yii::app()->params['docDisplay']['urlLenght'])) { $urlLenght = (int)Yii::app()->params['docDisplay']['urlLenght']; } echo BSHtml::openTag('div', array('class'=>'row blog blog-medium index-item')); $mainImage = $doc->version->getGalleries('docList', 'onlyMain'); if (!empty($mainImage->url)) { //@todo - docelowo trzeba "rysowac" widok dokumentu z placeholderow $image = BSHtml::image($mainImage->url, $mainImage->alt, array('class'=>'img-responsive img-thumbnail')); if (in_array($doc->docType, array(8))) //pliki video maja ikone play { $image = BSHtml::tag('div', array('class'=>'img-video-overlay'), BSHtml::tag('i', array('class'=>'fa fa-play'),'').$image); } echo BSHtml::tag('div', array('class'=>'col-md-3'), BSHtml::link($image, $docUrl)); echo BSHtml::openTag('div', array('class'=>'col-md-9')); } else { echo BSHtml::openTag('div', array('class'=>'col-md-12')); } if (Yii::app()->getModule('flipbook')) echo BSHtml::tag('h3', array(), Yii::app()->getModule('flipbook')->createLink($doc, false,false, array(), $doc->version->isPaid)); else { $docArchive = (isset(Yii::app()->params['doc']['archiveInfo']) && Yii::app()->params['doc']['archiveInfo']!=0 && (isset($doc->version->validTo) && $doc->version->validTo'doc-index-archive-info'), 'Archiwalny '):'').$doc->version->title, $docUrl)); } echo BSHtml::openTag('div', array('class'=>'blog-post-tags')); echo BSHtml::openTag('ul', array('class'=>'list-unstyled list-inline blog-info blog-tags')); echo BSHtml::tag('li', array(), BSHtml::tag('i', array('class'=>'fa fa-calendar'), ' ') . ' ' . Yii::app()->dateFormatter->formatDateTime(CDateTimeParser::parse($doc->version->validFrom, 'yyyy-MM-dd HH:mm:ss'),'long',null)); if (!empty($doc->version->author)) { echo BSHtml::tag('li', array(), BSHtml::tag('i', array('class'=>'fa fa-user'), ' ') . BSHtml::link($doc->version->author->firstName.' '.$doc->version->author->lastName, Yii::app()->createUrl('/author/view', array('author'=>Common::normalizeUrl($doc->version->author->firstName.' '.$doc->version->author->lastName), 'authorId'=>$doc->version->author->id)), array('class'=>'authorName'),$doc->version->author->firstName.' '.$doc->version->author->lastName)); } echo BSHtml::closeTag('ul'); echo BSHtml::closeTag('div'); /*lead*/ echo !empty($lead) ? BSHtml::link(BSHtml::tag('p', array(), $lead . ' »'), $docUrl) : ''; /*end lead*/ echo BSHtml::openTag('div', array('class'=>'blog-post-tags')); echo BSHtml::openTag('ul', array('class'=>'list-unstyled list-inline blog-info blog-tags blog-list-indexes')); echo BSHtml::openTag('li'); echo BSHtml::tag('i', array('class'=>'fa fa-tags'), ''); if (Yii::app()->getModule('topMenu')) { Yii::import('topMenu.models.ModuleTopmenu'); $topMenuIds = CHtml::listData(ModuleTopmenu::model()->findAll(), 'indexId', 'indexId'); } if (!$doc->getMainIndex()->indexParent->isRoot() && (!empty($topMenuIds) && !isset($topMenuIds[$doc->getMainIndex()->indexParent->id]))) { echo BSHtml::link( strlen($doc->getMainIndex()->indexParent->pubIndexTranslations->name)>$urlLenght ? mb_substr($doc->getMainIndex()->indexParent->pubIndexTranslations->name,0,$urlLenght,'UTF-8').' ...' : $doc->getMainIndex()->indexParent->pubIndexTranslations->name, Yii::app()->createUrl('index/view', array('indexname'=>Common::normalizeUrl($doc->getMainIndex()->indexParent->pubIndexTranslations->name), 'indexId'=>$doc->getMainIndex()->indexParent->id)) ); } echo BSHtml::link( strlen($doc->getMainIndex()->pubIndexTranslations->name)>$urlLenght ? mb_substr($doc->getMainIndex()->pubIndexTranslations->name,0,$urlLenght,'UTF-8') . '...' : $doc->getMainIndex()->pubIndexTranslations->name, Yii::app()->createUrl('index/view', array('indexname'=>Common::normalizeUrl($doc->getMainIndex()->pubIndexTranslations->name), 'indexId'=>$doc->getMainIndex()->id)) ); echo BSHtml::closeTag('li'); echo BSHtml::closeTag('ul'); if (Yii::app()->getModule('flipbook')) echo Yii::app()->getModule('flipbook')->createLink($doc, ' Więcej', ' Czytaj w e-wydaniu', array('class'=>'btn-u btn-u-small pull-right'), $doc->version->isPaid); else { $docTitle = $doc->version->title; $docUrl = Yii::app()->createUrl('/doc/view', array('indexname'=>Common::normalizeUrl($doc->getMainIndex()->pubIndexTranslations->name), 'urlname'=>Common::normalizeUrl($doc->version->title), 'docId'=>$doc->id)); if (!empty(Yii::app()->params['index']['moreButtonSchema'])) $docLink = str_replace(array('[[DOCTITLE]]', '[[DOCURL]]'), array($docTitle, $docUrl), Yii::app()->params['index']['moreButtonSchema']); else $docLink = BSHtml::link(' Więcej', $docUrl, array('class'=>"btn-u btn-u-small pull-right")); echo $docLink; } echo BSHtml::closeTag('div'); echo BSHtml::closeTag('div'); echo BSHtml::closeTag('div'); ?>

E-Doradca Analiza Finansowa