File indexing completed on 2024-12-29 05:24:38
0001 <?php 0002 /** 0003 * ocs-webserver 0004 * 0005 * Copyright 2016 by pling GmbH. 0006 * 0007 * This file is part of ocs-webserver. 0008 * 0009 * This program is free software: you can redistribute it and/or modify 0010 * it under the terms of the GNU Affero General Public License as 0011 * published by the Free Software Foundation, either version 3 of the 0012 * License, or (at your option) any later version. 0013 * 0014 * This program is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 * GNU Affero General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU Affero General Public License 0020 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 **/ 0022 0023 $helpImage = new Default_View_Helper_Image(); 0024 $helpBuildProductUrl = new Default_View_Helper_BuildProductUrl(); 0025 $helpCatTitle = new Default_View_Helper_CatTitle(); 0026 ?> 0027 0028 <div class="sidebar-content"> 0029 <span><?= $this->moreProductsTitle ?>: </span> 0030 <div class=""> 0031 <div class="row product-row" > 0032 <?php 0033 foreach ($this->moreProducts as $product): 0034 $product->catTitle = $helpCatTitle->catTitle($product->project_category_id); 0035 $product->title = Default_Model_HtmlPurify::purify($product->title); 0036 if($product->project_id==0 || is_null($product->project_id)) { 0037 continue; 0038 } 0039 $imgUrl = $helpImage->Image($product->image_small, array('width' => 200, 'height' => 160)); 0040 $title = substr($product->title, 0, 20) . ' - ' . substr($product->catTitle, 0, 20); 0041 $title = str_replace('"', '”', $title); 0042 ?> 0043 <!-- product item --> 0044 <div class="col-md-3 col-lg-3 col-sm-4 col-xs-3 product-thumbnail" 0045 data-toggle="popover" 0046 data-trigger="hover" 0047 data-html="true" 0048 data-placement="top" 0049 data-content="<div class='profile-img-product'> 0050 <img class='imgpopover' src='<?= $imgUrl ?>'/> 0051 </div> 0052 <div class='content'> 0053 <div class='title'> 0054 <p><?= $title ?></p> 0055 <p>updated: <?= $this->printDate($product->changed_at) ?></p> 0056 </div> 0057 </div>"> 0058 <!-- product thumbnail --> 0059 <a 0060 href="<?= $helpBuildProductUrl->buildProductUrl($product->project_id) ?>" 0061 title="<?= $product->title ?>"> 0062 <img src="<?= $helpImage->Image($product->image_small, array('width' => 80, 'height' => 80)); ?>" 0063 alt="product"> 0064 </a> 0065 <!-- /product thumbnail --> 0066 </div> 0067 <!-- /product item --> 0068 <?php endforeach; ?> 0069 0070 0071 <div class="externallinkclone"> 0072 <?php 0073 foreach ($this->moreProducts as $product): 0074 if($product->project_id==0 || is_null($product->project_id)) { 0075 echo '<a href="'.$product->external_link.'">'.$product->external_link.'</a>'; 0076 } 0077 0078 endforeach; 0079 ?> 0080 </div> 0081 0082 </div> 0083 </div> 0084 </div> 0085 <style type="text/css"> 0086 0087 .externallinkclone { 0088 display: block; 0089 float: left; 0090 clear: both; 0091 padding-top:20px; 0092 padding-left:20px; 0093 } 0094 .externallinkclone a{ 0095 display: block; 0096 } 0097 .product-row{ 0098 margin-top: 0px; 0099 } 0100 0101 </style>