File indexing completed on 2025-05-04 05:29:31
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 $this->tab = 'activities'; 0024 $helpProductUrl = new Default_View_Helper_BuildProductUrl(); 0025 $helpDate = new Default_View_Helper_PrintDate(); 0026 ?> 0027 <main class="user-admin-page"> 0028 <?php echo $this->render('user/partials/userHeader_top.phtml'); ?> 0029 <section class="body-wrap"> 0030 <section class="wrapper product-page"> 0031 <!-- PAGE BODY --> 0032 <section class="my-products-page"> 0033 <!-- NAVIGATION --> 0034 <?php echo $this->render('user/partials/userHeader.phtml'); ?> 0035 <!-- /NAVIGATION --> 0036 <?php 0037 if((count($this->comments)+count($this->votes)+count($this->donations)+count($this->featured))==0){ 0038 ?> 0039 <div class="my-products-heading"> 0040 <h1 class="page-title left"><?= $this->translate('no activities yet') ?></h1> 0041 </div> 0042 <?php } 0043 else 0044 { 0045 ?> 0046 <div class="my-products-heading"> 0047 <h1 class="page-title left"> <?= $this->translate('Activities') ?> </h1> 0048 </div> 0049 <?php }?> 0050 0051 <div class="my-products-list"> 0052 <div class="row"> 0053 <div class="col-lg-12 title"><?php if(count($this->featured)>0) { echo count($this->featured). ' featured product'.(count($this->featured)>1?'s':'');}?> </div> 0054 </div> 0055 <?php foreach ($this->featured as $f) { ?> 0056 <div class="row"> 0057 <div class="col-lg-12"> 0058 <span> 0059 <?php 0060 echo $f['title'].' is featured'; 0061 ?> 0062 </span> 0063 </div> 0064 </div> 0065 <?php 0066 } 0067 ?> 0068 0069 0070 <div class="row"> 0071 <div class="col-lg-12 title"><?php if(count($this->comments)>0) { echo count($this->comments). ' Comment'.(count($this->comments)>1?'s':'');}?> </div> 0072 </div> 0073 <?php foreach ($this->comments as $comment) { ?> 0074 <div class="row"> 0075 <div class="col-lg-12"> 0076 <span> 0077 <?php 0078 $comment_text = Default_Model_HtmlPurify::purify($comment['comment_text']); 0079 $comment_title = Default_Model_HtmlPurify::purify($comment['title']); 0080 ?> 0081 <?php 0082 echo $comment['username'].' comments on <span class="projecTitle"><a href="'.$helpProductUrl->buildProductUrl($comment['project_id']).'">'. $comment_title . '</a></span> : <span class="commentText"> '.$comment_text.' </span> <span class="commentTime"> '.$helpDate->printDate($comment['comment_created_at']).'</span>'; 0083 ?> 0084 </span> 0085 </div> 0086 </div> 0087 0088 <?php 0089 } 0090 ?> 0091 0092 <div class="row"> 0093 <div class="col-lg-12 title"><?php if(count($this->votes)>0) { echo count($this->votes). ' vote'.(count($this->votes)>1?'s':'');}?> </div> 0094 </div> 0095 <?php foreach ($this->votes as $vote) { ?> 0096 <div class="row"> 0097 <div class="col-lg-12"> 0098 <span> 0099 <?php 0100 echo '1 '.($vote['user_like']==1?' upvote':' downvote').' on <span class="projecTitle"><a href="'.$helpProductUrl->buildProductUrl($vote['project_id']).'">'. $vote['title'] . '</a></span><span class="commentTime"> '.$helpDate->printDate($vote['created_at']).'</span>'; 0101 ?> 0102 </span> 0103 </div> 0104 </div> 0105 0106 <?php 0107 } 0108 ?> 0109 0110 <div class="row"> 0111 <div class="col-lg-12 title"><?php if(count($this->donations)>0) { echo count($this->donations). ' donation'.(count($this->donations)>1?'s':'');}?> </div> 0112 </div> 0113 <?php foreach ($this->donations as $donation) { ?> 0114 <div class="row"> 0115 <div class="col-lg-12"> 0116 <span> 0117 <?php 0118 echo $donation['username'].' donates on <span class="projecTitle"><a href="'.$helpProductUrl->buildProductUrl($donation['project_id']).'">'. $donation['title'] . '</a></span> : <span class="commentText"> '.$donation['comment'].' </span><span class="commentTime"> '.$helpDate->printDate($donation['create_time']).'</span>'; 0119 ?> 0120 </span> 0121 </div> 0122 </div> 0123 0124 <?php 0125 } 0126 ?> 0127 </div> 0128 0129 <section style="text-align: center;"> 0130 </section> 0131 0132 </section> 0133 0134 <!-- /PAGE BODY --> 0135 0136 </section> 0137 0138 </section> 0139 0140 </main>