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

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 $helperMember = new Default_View_Helper_BuildMemberUrl();
0023 $helperImage = new Default_View_Helper_Image();
0024 $loginUrl = '/login?redirect=' . $this->encryptUrl(Zend_Controller_Front::getInstance()->getRequest()->getRequestUri(), true);
0025 $txtUserFollows = '';
0026 $urlUserFollows = $this->buildProductUrl($this->product->project_id, 'unfollow');
0027 $imgFile = '/theme/flatui/img/icon-like-color.png';
0028 if (false == $this->userFollowsProject($this->authMember->member_id, $this->product->project_id)) {
0029     $txtUserFollows = '';
0030     $urlUserFollows = $this->buildProductUrl($this->product->project_id, 'follow');
0031     $imgFile = '/theme/flatui/img/icon-like.png';
0032 }
0033 $titleImage = $this->Image($this->product->image_big, array('width' => 1170, 'height' => 300));
0034 $imageTag = '<img src="' . $titleImage . '">';
0035 if (strpos($titleImage, 'default.png') !== false) {
0036     $imageTag = '';
0037 }
0038 ?>
0039 
0040 <?php //<script src="https://www.paypalobjects.com/js/external/apdg.js"></script> ?>
0041 
0042     <div class="container page-container">
0043 
0044         <!-- HEADER -->
0045 
0046         <?php
0047         echo $this->render('product/partials/productTopHeader.phtml',
0048             array(
0049                 "member" => $this->member,
0050                 "project" => $this->product,
0051                 "loginUrl" => $loginUrl,
0052                 'product_views' => $this->product_views,
0053                 'tab' => 'supporters',
0054                 'txtUserFollows' => $this->txtUserFollows,
0055                 'urlUserFollows' => $urlUserFollows,
0056                 'imgFile' => $this->imgFile
0057             ));
0058         ?>
0059 
0060         <!-- /HEADER -->
0061 
0062 
0063         <!-- PAGE BODY -->
0064 
0065         <div class="product-right full-width supporters-page">
0066 
0067             <!-- page content -->
0068 
0069             <div class="margin-top-40 product-details col-md-12 col-lg-12 col-sm-12 col-xs-12">
0070                 <?php if (count($this->supporting) > 0):
0071                     $countSupporter = count($this->supporting->toArray());
0072                     if ($countSupporter < 4) {
0073                         $g = $countSupporter;
0074                     } else {
0075                         $g = 4;
0076                     }
0077                     $h = 0;
0078                     $i = 3;
0079                     foreach ($this->supporting as $supporter):
0080                         $date = $this->humanTiming($supporter->create_time);
0081                         $i++;
0082                         $h++;
0083                         if ($i % 4 == 0) {
0084                             ?>
0085                             <!-- add row -->
0086                             <div class="row supporters-row">
0087                         <?php } ?>
0088                         <!-- supporter item -->
0089                         <div class="col-md-3 col-lg-3 col-sm-6 col-xs-6 post">
0090                             <div class="clearfix">
0091                                 <!-- thumbnail -->
0092                                 <div class="supporter-thumbnail relative margin-left-10 pull-left">
0093                                     <a href="<?php echo $helperMember->buildMemberUrl($supporter->username); ?>">
0094                                         <div class="profile-image-overlay-3 absolute"></div>
0095                                         <img src="<?= $helperImage->Image($supporter->profile_image_url,array('width' => 60, 'height' => 60, 'crop' => 2)); ?>"
0096                                              alt="<?= $supporter->username ?>" width="60">
0097                                     </a>
0098                                 </div>
0099                                 <!-- /thumbnail -->
0100                                 <!-- details -->
0101                                 <div class="supporter-details pull-left">
0102                                             <span class="date small lightgrey"><?= $date['age'] ?> <?= $date['unit'] ?>
0103                                                 ago</span>
0104 
0105                                     <h3 class="supporter-name"><?php echo $supporter->username; ?></h3>
0106                                           <span>
0107                                             $<?= $supporter->sum_plings ?>
0108                                           </span>
0109                                             <span>
0110                                             times supported <?= $supporter->count_support ?>
0111                                           </span>
0112 
0113                                 </div>
0114                                 <!-- /details -->
0115                                 <!-- comment -->
0116                                 <?php if ($supporter->comment) { ?>
0117                                     <div class="supporter-comment pull-left col-md-12 col-lg-12 col-sm-12 col-xs-12">
0118                                         <?php echo $supporter->comment; ?>
0119                                     </div>
0120                                 <?php } ?>
0121                                 <!-- /comment -->
0122                             </div>
0123                         </div>
0124                         <!-- /supporter item -->
0125                         <?php if (($h % $g == 0) OR ($h >= $countSupporter)) { ?>
0126                         </div>
0127                         <!-- /add row -->
0128                     <?php } ?>
0129                     <?php endforeach;
0130                 else: ?>
0131                     <div class="no-supporters">
0132                         <?= $this->translate('projects.supporter.noitems') ?>
0133                     </div>
0134                 <?php endif; ?>
0135             </div>
0136 
0137             <!-- /page content -->
0138 
0139         </div>
0140 
0141         <!-- /PAGE BPDY -->
0142 
0143     </div>
0144 
0145 <?php $this->inlineScript()->appendScript(
0146     '    $(document).ready(function(){
0147 
0148         });
0149     ');