File indexing completed on 2025-05-04 05:29:24
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 $helperBaseUrl = new Default_View_Helper_BaseUrl(); 0024 $helperBuildProductUrl = new Default_View_Helper_BuildProductUrl(); 0025 $helperServerUrl = new Zend_View_Helper_ServerUrl(); 0026 $helperTruncate = new Default_View_Helper_Truncate(); 0027 $helperImage = new Default_View_Helper_Image(); 0028 $helperGetAuthUser = new Default_View_Helper_GetAuthUser(); 0029 $auth = Zend_Auth::getInstance(); 0030 $memberId = null; 0031 if ($auth->hasIdentity()) { 0032 $memberId = $auth->getStorage()->read()->member_id; 0033 } 0034 ?> 0035 <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3"> 0036 <div class="prod-widget-box left"> 0037 <div id="pling-it-box"> 0038 0039 <div class="claim-it"> 0040 0041 <?php if (false == empty($this->product->claimed_by_member)) { ?> 0042 <a role="button" id="claim-it" href="javascript:;"> 0043 <span class="btn-pling-2 disabled"><?= $this->translate('claim requested') ?></span> 0044 </a> 0045 <?php } else { 0046 if ($auth->hasIdentity()) { ?> 0047 <a role="button" id="claim-it" href="#modalClaim" data-toggle="modal"> 0048 <span class="btn-pling-2"><?= $this->translate('claimable') ?></span> 0049 </a> 0050 <?php } else { ?> 0051 <a id="claim-it" href="/register" data-target="#modal-dialog" 0052 data-toggle="#modal-dialog"> 0053 <span class="btn-pling-2"><?= $this->translate('join community to claim') ?></span> 0054 </a> 0055 <?php } 0056 } ?> 0057 0058 </div> 0059 0060 <!-- confirm claim modal --> 0061 0062 <div id="modalClaim" class="modal fade"> 0063 <div class="modal-dialog content-modal"> 0064 <div class="modal-content"> 0065 <!-- dialog contents --> 0066 <div class="modal-header"> 0067 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> 0068 <h3 class="center"><?= $this->translate('Claim Confirmation') ?></h3> 0069 </div> 0070 <div class="modal-body"> 0071 <?= $this->translate('You are the owner and want to claim this product?') ?><br/> 0072 <?= $this->translate('Click YES to agree and have read <a href="/content/terms" target="_blank">"terms and conditions"</a>.') ?> 0073 </div> 0074 <!-- dialog buttons --> 0075 <div class="modal-footer"> 0076 <a href="<?= $helperBuildProductUrl->buildProductUrl($this->product->project_id, 'claim', 0077 array('m' => $memberId)) ?>" 0078 role="button" class="btn btn-primary"> 0079 <?= $this->translate('YES') ?> 0080 </a> 0081 <a href="#" 0082 role="button" 0083 class="btn btn-primary" 0084 data-dismiss="modal" 0085 aria-hidden="true"><?= $this->translate('NO') ?></a> 0086 </div> 0087 </div> 0088 </div> 0089 </div> 0090 <!-- /confirm claim modal --> 0091 0092 0093 </div> 0094 </div> 0095 </div> 0096 0097 <!-- /pling it box -->