File indexing completed on 2025-05-04 05:29:21

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 $modelInfo = new Default_Model_Info();
0023 //$this->supporters = $modelInfo->getNewActiveSupporters(9);
0024 $this->supporters = $modelInfo->getNewActiveSupportersForSectionAll(9);
0025 
0026 $helpPrintDate = new Default_View_Helper_PrintDate();
0027 
0028 $git_url = Zend_Registry::get('config')->settings->server->opencode->host;
0029 ?>
0030 
0031 <style>
0032 .s40 {
0033     min-width: 40px;
0034     min-height: 40px;
0035 }
0036 .s40.avatar, .s40.avatar-container {
0037     width: 40px;
0038     height: 40px;
0039     margin-right: 10px;
0040 }
0041 .avatar, .avatar-container {
0042     border-radius: 3px;
0043 }
0044 
0045 .avatar-container .avatar {
0046     border-radius: 0;
0047     border: 0;
0048     height: auto;
0049     width: 100%;
0050     margin: 0;
0051     align-self: center;
0052 }
0053 .identicon.bg2 {
0054     background-color: #e8eaf6;
0055 }
0056 .identicon.s40 {
0057     font-size: 16px;
0058     line-height: 38px;
0059 }
0060 
0061 .git-project {
0062     border-bottom: 1px solid #ccd4d8;
0063     padding-top: 5px;
0064     padding-bottom: 5px;
0065     overflow: hidden;
0066 }
0067 
0068 .git-project:last-child {
0069     border-bottom: none;
0070 }
0071 
0072 </style>    
0073 
0074 
0075         <div class="downloadDiv" >
0076             <a href="https://www.pling.com/p/1175480/"><img src="/images/system/ocsstore-download-button.png" /></a>
0077         </div>
0078 
0079 
0080         <?php
0081             if($this->is_startpage) {
0082         ?>
0083 
0084         <div  class="supportDiv  withborder" >    
0085             <span><b><?=$this->countSupporters?></b> people support </span>        
0086             <span style="display: block">
0087             those who create freedom
0088              </span>
0089              <div class="row">
0090                 <?php 
0091                         $i=0;
0092                        foreach ($this->supporters as $user) {                                                      
0093                         if($i++>6) break;
0094                    ?>         
0095                    <a href="<?php echo $this->buildMemberUrl($user['username']); ?>" class="tooltipuserleft" data-tooltip-content="#tooltip_content" data-user="<?=$user['member_id']?>">                   
0096                         <img height="25" width="25" src="<?php echo $this->Image($user['profile_image_url'], array('width' => '25', 'height' => '25', 'crop' => 2)); ?>" class="supporterx" />                   
0097                    </a>
0098                    <?php } ?>
0099              </div>
0100              <span>
0101                     <a href="/supporters">see all</a>
0102              </span>
0103         </div>
0104 
0105         <?php
0106             }
0107         ?>
0108 
0109         <div class="supportDiv" >
0110         <?php 
0111                 $config = Zend_Registry::get('config')->settings->client->default;
0112                 $baseurlStore = $config->baseurl_store;
0113                 $identity = Zend_Auth::getInstance()->getIdentity();
0114                 if(null == $identity || (null != $identity && !$this->isSupporter($identity->member_id))) {                                                  
0115         ?>
0116             <a href="<?= $baseurlStore ?>/support" class="btn btn-primary btn-lg active btn-block" role="button" aria-pressed="true">Become a Supporter</a>
0117         <?php   } else if((null != $identity && $this->isSupporter($identity->member_id))) { ?>
0118             <a href="<?= $baseurlStore ?>/support" class="btn btn-primary btn-lg active btn-block" role="button" aria-pressed="true">Thank you for your support!</a>
0119         <?php   }?>
0120         </div>
0121 
0122         <div  class="row sidebar-right-info" >       
0123             <?php
0124                 if ($this->storeabout) {
0125                 ?>
0126                     <div class="prod-widget-box right catabout" id="storecontent">
0127                         <?php include $this->storeabout; ?>
0128                     </div>
0129                 <?php
0130                 }
0131                 ?>
0132             
0133              <?php
0134                 if ($this->catabout) {
0135                 ?>
0136                     <div class="prod-widget-box right catabout" id="catcontent">
0137                         <?php include $this->catabout; ?>
0138                     </div>
0139                 <?php
0140                 }
0141                 ?>
0142 
0143             <?php
0144                 $storeConfig = Zend_Registry::isRegistered('store_config') ? Zend_Registry::get('store_config') : null;
0145                 if($storeConfig->config_id_name=='kde-store' || $storeConfig->config_id_name=='kde' )
0146                 {
0147                         $this->moderators = $modelInfo->getModeratorsList();
0148                        ?>
0149                        <span class="newsTitle"> Moderators  </span>
0150                        <div class="prod-widget-box right bgwhite" >
0151                             <?php 
0152                                  foreach ($this->moderators as $mod) {
0153                             ?>
0154                             <a href="<?php echo $this->buildMemberUrl($mod['username']); ?>" class="tooltipuserleft" data-tooltip-content="#tooltip_content" data-user="<?=$mod['member_id']?>">                   
0155                                 <img height="25" width="25" src="<?php echo $this->Image($mod['profile_image_url'], array('width' => '25', 'height' => '25', 'crop' => 2)); ?>" class="supporterx" />                   
0156                            </a>
0157                             <?php }?>
0158                        </div>
0159                        <?php 
0160                 }
0161             ?>
0162                        
0163             <?php
0164                 
0165                 $store_config = Zend_Registry::get('store_config');
0166                 $is_show_blog_news = $store_config->is_show_blog_news;
0167                 if($is_show_blog_news==1 && $this->is_startpage == true) {
0168             ?>           
0169             
0170             <span class="newsTitle"> News </span>
0171             <div class="prod-widget-box right bgwhite " id="rss-feeds"> </div>                  
0172             
0173             <?php
0174                 }
0175             ?>
0176             
0177             <?php
0178                 
0179                 $is_show_forum_news = $store_config->is_show_forum_news;
0180                 if($is_show_forum_news==1) {
0181             ?>
0182         
0183             <span class="newsTitle"> Forum </span>
0184             <div class="prod-widget-box right bgwhite " id="blogJson"> </div>     
0185            
0186             <?php
0187                 }
0188             ?>            
0189             
0190             <?php
0191                 
0192                 $is_show_git_projects = $store_config->is_show_git_projects;
0193                 if($is_show_git_projects==1 && $this->show_git == true) {
0194             ?>
0195             
0196             <span class="newsTitle"> Git-Projects </span>
0197              <div class="prod-widget-box right bgwhite" id="lastgitprojects"></div>          
0198             
0199             <?php
0200                 }
0201             ?>
0202             
0203             <?php  if (count($this->comments) > 0) {
0204                 ?>
0205             <span class="newsTitle"> Comments </span>
0206             <div class="prod-widget-box right bgwhite" id="lastcomments">
0207                 <?php
0208                 foreach ($this->comments as $this->comment) {
0209                     echo $this->render('explore/partials/comment.phtml');
0210                 }
0211                 ?>
0212             </div>          
0213             <?php } ?>           
0214             
0215         </div>
0216 
0217 <?php $this->inlineScript()->appendScript(
0218     '    $(document).ready(function(){                               
0219                 RssNews.setup();   
0220                 BlogJson.setup();             
0221                 GitlabNewProjectsJson.setup("'.$git_url.'");   
0222             });
0223         ');