File indexing completed on 2025-05-04 05:29:29
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 //$plingData = $this->userPlings($this->project_id); 0024 $productUpdates = $this->projectUpdates($this->project_id); 0025 $loopProductId = 'product' . $this->project_id; 0026 // $statusPayPal = $this->partialLoop()->view->member->paypal_mail; 0027 $object_text = (mb_strlen($this->description) < 300) ? $this->description : mb_substr($this->description, 0, 295, 'UTF-8') . ' ... '; 0028 $addedOnDate = $this->humanTiming($this->created_at); 0029 $addedOnText = $addedOnDate['age'] . ' ' . $addedOnDate['unit']; 0030 $updatedOnDate = $this->humanTiming($this->changed_at); 0031 $updatedOnText = $updatedOnDate['age'] . ' ' . $updatedOnDate['unit']; 0032 $websiteOwner = new Local_Verification_WebsiteProject(); 0033 $websiteAuthCode = $websiteOwner->generateAuthCode(stripslashes($this->link_1)); 0034 0035 $helperBuildCollectionUrl = new Default_View_Helper_BuildCollectionUrl(); 0036 $helperButton = new Default_View_Helper_ExternalPlingButton(); 0037 $helperButtonCode = new Default_View_Helper_ExternalPlingButtonSource(); 0038 $helperSupporterBox = new Default_View_Helper_ExternalSupporterBox(); 0039 $helperSupporterBoxSource = new Default_View_Helper_ExternalSupporterBoxSource(); 0040 $helperDonationList = new Default_View_Helper_ExternalDonationList(); 0041 $helperDonationListSource = new Default_View_Helper_ExternalDonationListSource(); 0042 $helperImage = new Default_View_Helper_Image(); 0043 ?> 0044 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 my-product-item" id="<?= $loopProductId ?>"> 0045 <!-- IMAGE --> 0046 <figure class="col-lg-1 col-md-3 col-sm-3 col-xs-3"> 0047 <img src="<?php echo $helperImage->Image($this->image_small, array('width' => 280, 'height' => 167)); ?>" 0048 class="explore-product-image" width="101" height="81"/> 0049 </figure> 0050 <!-- /IMAGE --> 0051 <!-- CONTENT --> 0052 <article class="col-lg-11 col-md-9 col-sm-9 col-xs-9"> 0053 <!-- title --> 0054 <div class="title"> 0055 <?php 0056 $versionTextOnly = $version = Default_Model_HtmlPurify::purify($this->version); 0057 $description = Default_Model_HtmlPurify::purify($object_text); 0058 ?> 0059 <h3><a href="<?= $helperBuildCollectionUrl->buildProductUrl($this->project_id) ?>"><?php echo $this->title; ?> <?php echo $version; ?></a><span style="font-weight: normal; font-size: small; color: #4e4e4e"> added </span><span style="font-weight: 700; font-size: small; color: #4e4e4e"><?= $addedOnText ?> ago</span><span style="font-weight: 700; font-size: small; float: right; color: #4e4e4e"> <?= $updatedOnText ?> ago</span><span style="font-weight: normal; font-size: small; float: right; color: #4e4e4e">updated </span></h3> 0060 0061 </div> 0062 <!-- /title --> 0063 <div> 0064 <span class="topics"> 0065 <span class="topicslink"> 0066 <?php 0067 $tagmodel = new Default_Model_Tags(); 0068 $tagsuser = $tagmodel->getTagsUser($this->project_id, Default_Model_Tags::TAG_TYPE_PROJECT); 0069 $tagscat = $tagmodel->getTagsCategory($this->project_id, Default_Model_Tags::TAG_TYPE_PROJECT); 0070 0071 0072 if(false === empty($tagscat)) 0073 { 0074 foreach (explode(',',$tagscat) as $tag) { 0075 ?> 0076 <a rel="nofollow" href="/search/projectSearchText/<?=$tag?>/t/<?=$tag?>/f/tags" class="topic-tag topic-tag-link usertagslabelcat"><?=$tag?></a> 0077 <?php 0078 } 0079 } 0080 0081 echo '<span class="topicsuser">'; 0082 if(false === empty($tagsuser)) 0083 { 0084 foreach (explode(',',$tagsuser) as $tag) { 0085 ?> 0086 <a rel="nofollow" href="/search/projectSearchText/<?=$tag?>/t/<?=$tag?>/f/tags" class="topic-tag topic-tag-link usertagslabel"><?=$tag?></a> 0087 <?php 0088 } 0089 } 0090 echo '</span>'; 0091 ?> 0092 </span> 0093 <span id="tagsuserselectpanel<?=$this->project_id?>" class="tagsuserselectpanel" style="display: none"> 0094 <select 0095 id="tagsuserselect<?=$this->project_id?>" 0096 name="tagsuser" 0097 multiple="true" 0098 class="taggingSelect2" 0099 data-pid="<?php echo $this->project_id?>" 0100 > 0101 <option value=""></option> 0102 <?php 0103 $element_value =$tagsuser; 0104 $value = empty($element_value) ? array() : explode(',',$element_value); 0105 foreach ($value as $v) { 0106 echo '<option value="'.$v.'" selected="selected">'.$v.'</option>'; 0107 } 0108 ?> 0109 </select> 0110 </span> 0111 0112 <button id="topic-tags-btn<?=$this->project_id?>" class="btn-link topic-tags-btn" type="button" >Manage tags</button> 0113 <span id="topic-tags-saved<?=$this->project_id?>" class="topic-tags-saved" style="display: none"><i class="fa fa-check"></i> Saved </span> 0114 0115 </span> 0116 </div> 0117 0118 0119 <!-- info --> 0120 <div class="info"> 0121 <ul> 0122 <?php 0123 $collection_cat_id = Zend_Registry::get('config')->settings->client->default->collection_cat_id; 0124 $ranking_cat_id = Zend_Registry::get('config')->settings->client->default->ranking_cat_id; 0125 $catText = "Collection"; 0126 if($this->project_category_id == $ranking_cat_id) { 0127 $catText = "Ranking"; 0128 } 0129 ?> 0130 <li><span>in</span><span><?php echo $catText; ?></span></li> 0131 <?php /**<li><span><?= $this->translate('supporters') ?> </span><span><?= $plingData['plingers'] ?></span></li> 0132 <li><span><?= $this->translate('collected') ?> </span><span><?= $plingData['plings'] ?></span></li> **/?> 0133 </ul> 0134 </div> 0135 <!-- /info --> 0136 <!-- text --> 0137 <div class="text"> 0138 <p><?= nl2br($description) ?></p> 0139 </div> 0140 0141 0142 0143 0144 0145 <!-- /text --> 0146 <!-- buttons --> 0147 <div class="buttons"> 0148 <div class="embed-btns pull-left"> 0149 <!-- verification --> 0150 0151 <!-- /verification --> 0152 <!-- embeded --> 0153 <?php /* 0154 <a href="#modal-button-code-<?= $loopProductId ?>" 0155 class="btn btn-native" 0156 data-toggle="modal"><?= $this->translate('Button') ?></a> 0157 */ ?> 0158 0159 <?php /* 0160 <a href="#modal-list-code-<?= $loopProductId ?>" 0161 class="btn btn-native" 0162 data-toggle="modal"><?= $this->translate('List') ?></a> 0163 <a href="#modal-widget-code-<?= $loopProductId ?>" 0164 rel="<?= $loopProductId ?>" 0165 class="btn btn-native widget-button" 0166 data-toggle="modal"><?= $this->translate('Widget') ?></a> 0167 */ ?> 0168 <!-- /embeded --> 0169 </div> 0170 0171 <!-- manage --> 0172 <div class="manage-btns pull-right margin-left-20"> 0173 <a role="button" href="<?= $helperBuildCollectionUrl->buildProductUrl($this->project_id, 'edit') ?>" class="btn btn-native" style="padding: 3px 6px;font-size: 12px;"> 0174 <?= $this->translate('Edit') ?> 0175 </a> 0176 0177 <!-- updates --> 0178 <a role="button" class="btn btn-native" href="#modal-updates" 0179 style="padding: 3px 6px;font-size: 12px;" 0180 data-toggle="modal" 0181 data-product-id="<?= $this->project_id ?>" 0182 data-product-title="<?= $this->title ?>" 0183 ><?= $this->translate('Changelog') ?></a> 0184 0185 <?php /*20200618 ronald: TODO: rebuild validation process 0186 <?php if ($this->link_1) { ?> 0187 <a href="#msg-box-code-<?= $loopProductId ?>" 0188 style="padding: 3px 6px;font-size: 12px;" 0189 class="btn btn-native margin-right-10" 0190 data-toggle="modal"><?= $this->translate('Verification') ?></a> 0191 <?php } ?> 0192 * 0193 */?> 0194 0195 0196 <?php /* 0197 <a href="#modal-box-code-<?= $loopProductId ?>" 0198 class="btn btn-native" 0199 data-toggle="modal"><?= $this->translate('Box') ?></a> 0200 */ 0201 ?> 0202 0203 0204 <!-- /updates --> 0205 <span class="publish-product-wrapper"> 0206 <?php $p_action = $this->isProjectActive($this->project_status) ? 'unpublish' : 'publish' ?> 0207 <a href="<?= $helperBuildCollectionUrl->buildProductUrl($this->project_id, $p_action, array('m' => $this->member_id)) ?>" 0208 style="padding: 3px 6px;font-size: 12px;" class="btn btn-native <?=($p_action=='unpublish')?'btn-pling-green':'btn-pling-red'?> " data-target="#<?= $loopProductId ?> .publish-product-wrapper"> 0209 <?=ucfirst($p_action) ?> 0210 </a> 0211 </span> 0212 <form method="post" action="<?= $helperBuildCollectionUrl->buildProductUrl($this->project_id, 'delete', array('m' => $this->member_id)) ?>" class="inline"> 0213 <button data-title="Delete Confirmation" data-callback="defaultCallbackConfirmation" data-message="Do you really want to delete this product?<br>This is permanent and can not be undone!" aria-label="Delete" class="btn btn-native btn-pling-red remove" style="font-size: 12px;padding: 3px 6px;"> 0214 Delete 0215 </button> 0216 </form> 0217 0218 </div> 0219 <!-- /manage --> 0220 0221 </div> 0222 <!-- /buttons --> 0223 </article> 0224 <!-- CONTENT --> 0225 <!-- MODALS --> 0226 0227 <!-- verification code --> 0228 <?php 0229 $verificationPopup = new Default_View_Helper_VerificationCodePopup(); 0230 echo $verificationPopup->verificationCodePopup($this, $this->link_1, 'msg-box-code-' . $loopProductId, $this); ?> 0231 <!-- /verification code --> 0232 0233 <?php $this->inlineScript()->appendScript( 0234 '$(document).ready(function(){ 0235 ButtonCode.setupClipboardCopy(\'div#modal-box-code-' . $loopProductId . '\'); 0236 ButtonCode.setupClipboardCopy(\'div#modal-button-code-' . $loopProductId . '\'); 0237 ButtonCode.setupClipboardCopy(\'div#modal-list-code-' . $loopProductId . '\'); 0238 });' 0239 ); 0240 ?> 0241 <!-- /MODALS --> 0242 </div> 0243 0244 <div class="my-product-divider col-lg-12 col-md-12 col-sm-12 col-xs-12"></div>