File indexing completed on 2024-12-29 05:24:41

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 $buildMemberUrl = new Default_View_Helper_BuildMemberUrl();
0024 
0025 ?>
0026 <div id="comments-frame">
0027     <?php
0028     if (count($this->donations) == 0) {
0029         echo '<div> Be the first to donate</div>';
0030     } else {
0031         foreach ($this->donations as $donation) {
0032             $currency = new Zend_Currency();
0033 
0034             $humanTiming = new Default_View_Helper_HumanTiming();
0035             $age = $humanTiming->humanTiming($donation['create_time']);
0036             ?>
0037             <div class="comment-row">
0038                 <div class="comment">
0039                     <figure class="supporter-thumbnail relative">
0040                         <a href="<?= $buildMemberUrl->buildMemberUrl($donation['username']) ?>"
0041                            title="<?= $donation['username'] ?>">
0042                             <img src="<?= $donation['profile_image_url']; ?>" alt="<?= $donation['username'] ?>">
0043                         </a>
0044                     </figure>
0045                     <div class="comment-content">
0046                         <div class="popover-title">
0047                             <span class="name"><a
0048                                     href="<?= $buildMemberUrl->buildMemberUrl($donation['username']) ?>"><?php echo $donation['username']; ?></a></span>
0049                             <?php
0050                             if (!$donation['amount'] == 0) {
0051                                 ?>
0052                                 <span class="amount"> donated $<?php echo $donation['amount'] ?></span>
0053                                 <?php
0054                             }
0055                             ?>
0056                             <span class="small lightgrey"> <?= $age['age'] ?> <span class="light"><?= $age['unit'] ?>
0057                                     ago</span> </span>
0058                         </div>
0059                         <div class="popover-content">
0060                             <p><?= $donation['comment_text'] ?></p>
0061                         </div>
0062                     </div>
0063                 </div>
0064             </div>
0065             <?php
0066         }
0067     }
0068     ?>
0069 </div>