File indexing completed on 2024-12-29 05:24:45
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 if (false === isset($this->params)) { 0024 $this->params = array(); 0025 } 0026 //$serverUrl = $this->serverUrl().'/'; 0027 $serverUrl = Zend_Registry::get('config')->settings->client->default->baseurl_store; 0028 $serverUrl = $serverUrl.'/'; 0029 $project_id = $this->params['project_id']; 0030 $target = $this->dom_target; 0031 ?> 0032 <span class="glyphicon glyphicon-refresh spinning" style="display: none"></span> 0033 <ul class="pagination pagination-sm" style="margin: 0;padding:0;"> 0034 <li class="<?php echo isset($this->previous) ? '' : 'disabled' ?>"> 0035 <a class="<?php echo isset($this->previous) ? 'paginationPartial' : '' ?>" 0036 href="<?php echo isset($this->previous) ? $serverUrl . 'p/'.$project_id.'/show/page/'.$this->previous : 'javascript:;'; ?>"> 0037 <span class="glyphicon glyphicon-chevron-left"></span> 0038 </a> 0039 </li> 0040 0041 <?php foreach ($this->pagesInRange as $page): ?> 0042 <?php if ($page != $this->current): ?> 0043 <li><a class="ajaxPartial paginationPartial" href="<?php echo $serverUrl . 'p/'.$project_id.'/show/page/'.$page ; ?>"><?php echo $page; ?></a></li> 0044 <?php else: ?> 0045 <li class="active"><a class="paginationPartial" href="<?php echo $serverUrl . 'p/'.$project_id.'/show/page/'.$page; ?>"><?php echo $page; ?></a> 0046 <?php endif; ?> 0047 <?php endforeach; ?> 0048 0049 <li class="<?php echo isset($this->next) ? '' : 'disabled' ?>"> 0050 <a class="<?php echo isset($this->next) ? 'paginationPartial' : ''?>" 0051 href="<?php echo isset($this->next) ? $serverUrl . 'p/'.$project_id.'/show/page/'.$this->next : 'javascript:;'; ?>"> 0052 <span class="glyphicon glyphicon-chevron-right"></span> 0053 </a> 0054 </li> 0055 </ul> 0056 <script type="application/javascript"> 0057 $(document).ready(function () { 0058 $('body').off('click', 'ul.pagination a.paginationPartial').on('click', 'ul.pagination a.paginationPartial',function(event) { 0059 event.preventDefault(); 0060 var target = 'div#'+$(this).closest(".comment-containers" ).attr('id'); 0061 var url = $(this).attr("href") + ' ' + target + ' > *'; 0062 $('html, body').scrollTop($(target).offset().top); 0063 $(target).find('.glyphicon.glyphicon-refresh.spinning').show(); 0064 $(target).load(url, function (response, status, xhr) { 0065 if (status == "error") { 0066 $(target).empty().html('Service is temporarily unavailable. Our engineers are working quickly to resolve this issue. <br/>Find out why you may have encountered this error.'); 0067 } 0068 ProductDetailCommentTooltip.setup(); 0069 }); 0070 return false; 0071 }); 0072 }); 0073 </script>