File indexing completed on 2025-05-04 05:29:20
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 $modelCategory = new Default_Model_DbTable_ProjectCategory(); 0023 $this->dataCategory = $modelCategory->findSingleRow($this->cat_id); 0024 $store_config = Zend_Registry::get('store_config'); 0025 $host = $store_config->host; 0026 $og_server = $this->serverUrl(true); 0027 $catTitle = ''; 0028 if($this->dataCategory['project_category_id']) 0029 { 0030 $catTitle = $this->dataCategory['title']; 0031 } 0032 if($this->filters['order'] == 'latest'){ 0033 $og_title = 'Browse '.$catTitle.' Latest | '.$host; 0034 }else if($this->filters['order'] == 'top'){ 0035 $og_title = 'Browse '.$catTitle.' Top | '.$host; 0036 }else{ 0037 $og_title='Browse '.$catTitle.' | '.$host; 0038 } 0039 $og_description = $og_title .'| A community for free and open source software and libre content'; 0040 $this->templateConfigData = Zend_Registry::get('store_template'); 0041 $og_image = 'https://' . $_SERVER['HTTP_HOST'] .$this->templateConfigData['logo']; 0042 $this->doctype(Zend_View_Helper_Doctype::XHTML1_RDFA); 0043 $this->headMeta()->appendProperty('og:type', 'website'); 0044 $this->headMeta()->appendProperty('og:url', $og_server); 0045 $this->headMeta()->appendProperty('og:title', $og_title); 0046 $this->headMeta()->appendProperty('og:site_name',$host); 0047 $this->headMeta()->appendProperty('og:description',$og_description); 0048 $this->headMeta()->appendProperty('og:image',$og_image); 0049 0050 0051 $helperBuildExploreUrl = new Default_View_Helper_BuildExploreUrl(); 0052 $modelInfo = new Default_Model_Info(); 0053 0054 $this->countSupporters = $modelInfo->getCountAllSupporters(); 0055 $this->supporters = $modelInfo->getNewActiveSupporters(7); 0056 $this->headLink()->appendStylesheet('/theme/flatui/css/explore_index.css'); 0057 0058 0059 if($this->inputFilterOriginal ==1) 0060 { 0061 $checkedOriginal = ' checked'; 0062 }else 0063 { 0064 $checkedOriginal = ''; 0065 } 0066 0067 ?> 0068 0069 <style> 0070 0071 @media (max-width:720px){ 0072 0073 body > .panel.panel-default.pull-left { 0074 max-width: 100%; 0075 overflow-y: hidden; 0076 } 0077 0078 #explore-content .GridFlex .content { 0079 padding-right: 15px; 0080 min-width: 400px; 0081 } 0082 0083 #explore-content .GridFlex .sidebar-right { 0084 width: 400px; 0085 flex: none !important; 0086 margin: 0 auto; 0087 } 0088 0089 #explore-content .GridFlex .content .explore-products { 0090 padding: 0 !important; 0091 } 0092 0093 .explore-products .product-list .explore-product { 0094 position: relative; 0095 padding-left: 20px; 0096 padding-right: 50px; 0097 } 0098 0099 .explore-products .product-list .explore-product > .col-xs-1 { 0100 position: absolute; 0101 top: 10px; 0102 left: 10px; 0103 padding: 0; 0104 } 0105 0106 .explore-products .product-list .explore-product .explore-product-imgcolumn { 0107 width: 20%; 0108 } 0109 0110 .explore-products .product-list .explore-product .explore-product-details { 0111 width: 80%; 0112 } 0113 0114 .explore-products .product-list .explore-product .explore-product-plings { 0115 position: absolute; 0116 top: 10px; 0117 right: 0; 0118 width: 50px; 0119 } 0120 0121 .explore-products .product-list .explore-product .explore-product-plings .rating { 0122 width: 100%; 0123 } 0124 0125 .pling-nav-tabs ul.nav-tabs>li:last-child { 0126 float: right; 0127 padding: 10px; 0128 font-size: 12px; 0129 } 0130 0131 #explore-content .sidebar-right-info .prod-widget-box { 0132 width: 100%; 0133 } 0134 0135 } 0136 0137 @media (max-width:611px){ 0138 #explore-content .GridFlex .content { 0139 padding-right: 0; 0140 min-width: 100%; 0141 } 0142 0143 #explore-content .GridFlex .sidebar-left { 0144 flex: none !important; 0145 width: 100%; 0146 } 0147 0148 #explore-content .GridFlex .sidebar-right { 0149 flex: none !important; 0150 width: 100%; 0151 padding: 0; 0152 } 0153 } 0154 0155 .filter_browse_tag_group { 0156 margin-right: 5px; 0157 } 0158 0159 </style> 0160 0161 <link href="/theme/react/product-browse/style/music-player.css" rel="stylesheet" type="text/css"/> 0162 <link href="/theme/react/assets/css/product-browse.css" rel="stylesheet" type="text/css"/> 0163 0164 <main id="explore-content"> 0165 <section class="wrapper" id="products-wrapper"> 0166 <span class="glyphicon togglesidebar" id="btnTogglesidebar" ></span> 0167 <div class="GridFlex"> 0168 <div class="GridFlex-cell sidebar-left" > 0169 <?php $time_start = microtime(true);echo $this->render('explore/partials/filter.phtml'); $time_elapsed = microtime(true) - $time_start; ?> 0170 <?php if(Zend_Auth::getInstance()->hasIdentity() AND Zend_Auth::getInstance()->getIdentity()->roleName == 'admin') { 0171 echo '<div class="alert alert-warning" role="alert"><strong>Rendering Time: </strong>'.$time_elapsed.' s</div>'; 0172 }?> 0173 </div> 0174 <div class="GridFlex-cell content"> 0175 <div id="product-browse-container"></div> 0176 </div> 0177 <?php 0178 $time_start = microtime(true); 0179 $this->comments = $modelInfo->getLatestComments(5, $this->cat_id, $this->tags); 0180 //$donations = $modelInfo->getLatestPlings(5, $this->cat_id); 0181 $topprods = $modelInfo->getMostDownloaded(100, $this->cat_id, $this->tags); 0182 $asidehide = ''; 0183 if(!$this->catabout && count($this->comments)==0 && count($topprods)==0 ) 0184 { 0185 $asidehide = 'hide'; 0186 } 0187 $this->show_git = false; 0188 ?> 0189 <div class="GridFlex-cell sidebar-right"> 0190 <aside id="explore-sidebar <?=$asidehide?>" > 0191 <?php 0192 echo $this->render('/home/partials/common_rightsidebar.phtml'); 0193 ?> 0194 0195 <div class="row sidebar-right-info" > 0196 <?php 0197 if (count($topprods) > 0) { 0198 ?> 0199 <span class="commentTitle"> Popularity <span class="small light"> (based on plings, downloads, etc.)</span></span> 0200 0201 <div class="prod-widget-box right bgwhite" id="mostdownloaded"> 0202 <?php 0203 $this->rownum = 1; 0204 foreach ($topprods as $this->product) { 0205 echo $this->render('explore/partials/productTop.phtml'); 0206 $this->rownum++; 0207 } 0208 ?> 0209 </div> 0210 <?php } ?> 0211 0212 </div> 0213 </aside> 0214 <?php 0215 $time_elapsed = microtime(true) - $time_start; 0216 if(Zend_Auth::getInstance()->hasIdentity() AND Zend_Auth::getInstance()->getIdentity()->roleName == 'admin') { 0217 echo '<div class="alert alert-warning" role="alert"><strong>Rendering Time: </strong>'.$time_elapsed.' s</div>'; 0218 }?> 0219 </div> 0220 </div> 0221 </section> 0222 0223 <div class="tooltip_templates" style="display: none"> 0224 <span id="tooltip_content"> 0225 <i class="fa fa-spinner"></i> 0226 </span> 0227 </div> 0228 </main> 0229 <script type="text/javascript"> 0230 var categories = <?php echo $this->categoriesJson ?>; 0231 var catId = <?php echo $this->cat_idJson ?>; 0232 var filters = <?php echo $this->filtersJson ?>; 0233 var products = <?php echo $this->productsJson ?>; 0234 var topProducts = <?php echo $this->topprodsJson ?>; 0235 var comments = <?php echo $this->commentsJson ?>; 0236 var supporters = <?php echo json_encode($this->supporters) ?>; 0237 var pagination = { 0238 totalcount:<?php echo $this->totalcount ?>, 0239 page:<?php echo $this->page ?>, 0240 pagelimit:<?php echo $this->pageLimit ?> 0241 } 0242 var view = "explore"; 0243 0244 var browseListType = "<?php echo $this->browseListType ?>"; 0245 0246 </script> 0247 <script type="text/javascript" src="/theme/react/product-browse/product-browse.js"></script> 0248 <?php $this->inlineScript()->appendScript( 0249 ' $(document).ready(function(){ 0250 TooltipUser.setup("tooltipuserleft","left"); 0251 TooltipUser.setup("tooltipuser","right"); 0252 FilterBrowseOriginalFn.setup(); 0253 FilterBrowseTagGroupFn.setup(); 0254 }); 0255 ');