File indexing completed on 2025-05-04 05:29:20

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 $helperPrintDate = new Default_View_Helper_PrintDate();
0024 $updateTime = $helperPrintDate->printDate($this->product->project_changed_at);
0025 $helperBuildProductUrl = new Default_View_Helper_BuildProductUrl();
0026 $helperFetchSubcategoriesForProduct = new Default_View_Helper_FetchCategoriesForProductAsString();
0027 $helperImage = new Default_View_Helper_Image();
0028 ?>
0029 <div class="explore-product col-lg-12 col-md-12 col-sm-12 col-xs-12">
0030     <div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
0031         <div class="rownum">
0032             <?= intval($this->rownum)?>.
0033         </div>        
0034     </div>
0035     <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 explore-product-imgcolumn">
0036         <figure>
0037             <a href="<?= $helperBuildProductUrl->buildProductUrl($this->product->project_id, ''); ?>">
0038                 <div class="text-center">
0039                 <img src="<?php echo $helperImage->Image($this->product->image_small, array('width' => 167, 'height' => 167)); ?>" class="explore-product-image"/>
0040                 </div>
0041             </a>
0042         </figure>
0043     </div>
0044     <div class="explore-product-details col-lg-7 col-md-7 col-sm-7 col-xs-7">
0045         <h3>
0046           <?php 
0047                 $version = Default_Model_HtmlPurify::purify($this->product->version);
0048                 $product_title = Default_Model_HtmlPurify::purify($this->product->title);
0049             ?>
0050             <a href="<?= $helperBuildProductUrl->buildProductUrl($this->product->project_id, ''); ?>"><?=$product_title ?> <span style="font-size: smaller; padding-left: 20px"><?php echo $version ?> </span></a>
0051         </h3>
0052        
0053         <b style="display: block; margin-bottom: 5px"><?php echo $helperFetchSubcategoriesForProduct->fetchCategoriesForProductAsString($this->product->project_id) ?></b>
0054         <?php
0055             if (false === empty($this->product->package_names)) {
0056                 $list_packages = explode(',', $this->product->package_names);
0057                 $resultString = "";
0058                 foreach ($list_packages as $item) {
0059                     $resultString = $resultString . ' <span class="packagetypeos" > ' . stripslashes($item) . '</span>';
0060                 }
0061                 echo $resultString;
0062             }
0063             
0064         ?>
0065         
0066         <div class="productInfo">
0067        <?php
0068                 //$count_plingers = $this->product->count_plingers;
0069                 $count_comments = $this->product->count_comments;
0070                 //echo ($count_plingers>0 ? '<span class="cntSupporters">'.$count_plingers.' supporter':'').($count_plingers>1?'s':'').($count_plingers>0?'</span>':'') ;
0071                 echo ($count_comments>0 ? '<span class="cntComments">'.$count_comments.' comment':'').($count_comments>1?'s':'').($count_comments>0?'</span>':'') ;
0072                 ?>
0073         </div>            
0074     </div>
0075     <div class="explore-product-plings col-lg-2 col-md-2 col-sm-2 col-xs-2">
0076         <!-- RATING -->
0077         <?php
0078         $this->widgetRating = new stdClass();
0079         $this->widgetRating->project_id = $this->product->project_id;
0080         $this->widgetRating->laplace_score = $this->product->laplace_score;
0081         $this->widgetRating->count_likes = $this->product->count_likes;
0082         $this->widgetRating->count_dislikes = $this->product->count_dislikes;
0083         echo $this->render('partials/widgetRating.phtml'); ?>
0084         <!-- /RATING -->
0085         <div class="progress">
0086             <div class="bar no-goal">
0087             </div>
0088         </div>
0089          
0090         <div class="collected">
0091           
0092              <span><?php echo $updateTime ?></span>
0093         </div>
0094         
0095     </div>
0096 </div><!-- END .explore-product -->