/html/mod_wsportfolio_menu/portfolio.php
PHP | 187 lines | 127 code | 47 blank | 13 comment | 85 complexity | 9775823fff10160521358ad121c847af MD5 | raw file
- <?php
- /**
- * @package Joomla.Site
- * @subpackage mod_menu
- *
- * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
- * @license GNU General Public License version 2 or later; see LICENSE.txt
- */
- defined('_JEXEC') or die;
- // Note. It is important to remove spaces between elements.
- $jinput = JFactory::getApplication()->input;
- $wslimitstart = $jinput->getInt('wspmstart',0);
- $wstotal = count($list);
- if($wspm_limit_items > 0) {
- if($wspm_limit_items < $wstotal) { $wstotal = $wspm_limit_items; }
- }
- $wslimit = $wspm_pagination_limit;
- if(($wslimitstart < 0) || ($wslimitstart >= $wstotal) ) { $wslimitstart = 0; }
- ?>
- <div id="wspm" <?php if ( $wspm_rtl == 'false' ) echo 'class="wspm-rtl"' ;?>>
- <?php // - - - - - - - - - - - - - - - - - - - - - - - - - - - - FILTER BAR DEFAULT - - - - - - - - - - - - - - - - - - - - - - - - - - - - ?>
-
- <?php if ( $wspm_filter_layout == 'default' ) : ?>
-
- <div class="filters-default row">
- <div class="<?php if ( $wspm_filter_show_asc_desc == '1' or $wspm_filter_show_shuffle == '1' ) { echo 'col-sm-9'; } else { echo 'col-sm-12'; } ?>">
- <?php if ( $wspm_filter_show_filters == '1' ) echo $wspm_all_active_filters; ?>
- </div>
- <div class="<?php if ( $wspm_filter_show_asc_desc == '1' or $wspm_filter_show_shuffle == '1' ) { echo 'col-sm-3 text-right'; } else { echo 'col-sm-12'; } ?>">
- <?php if ( $wspm_filter_show_shuffle == '1' ) echo $wspm_filter_shuffle; ?>
- <?php if ( $wspm_filter_show_asc_desc == '1' ) echo $wspm_filter_asc_desc; ?>
- </div>
- </div>
-
- <div class="wspm-spacer"></div>
-
- <?php endif; ?>
-
- <?php // - - - - - - - - - - - - - - - - - - - - - - - - - - - - FILTER BAR DROPDOWN - - - - - - - - - - - - - - - - - - - - - - - - - - - - ?>
-
- <?php if ( $wspm_filter_layout == 'dropdown' ) : ?>
-
- <div class="filters-dropdown row">
- <div class="<?php if ( $wspm_filter_show_asc_desc == '1' or $wspm_filter_show_shuffle == '1' ) { echo 'col-xs-6'; } else { echo 'col-sm-12'; } ?>">
- <?php if ( $wspm_filter_show_filters == '1' ) : ?>
- <div class="wspm-dropdown">
- <div class="wspm-dropdown-button margin-bottom hide-me-on-mobile">
- <a href="javascript:void(0);">
- <?php echo $wspm_filter_toggle_text; ?>
- <i class="fa fa-times fa-fw fa-close-icon"></i>
- </a>
- </div>
- <div class="wspm-dropdown-content">
- <?php echo $wspm_all_active_filters; ?>
- </div>
- </div>
- <?php endif; ?>
- </div>
- <div class="<?php if ( $wspm_filter_show_asc_desc == '1' or $wspm_filter_show_shuffle == '1' ) { echo 'col-xs-6 text-right'; } else { echo 'col-sm-12'; } ?>">
- <?php if ( $wspm_filter_show_shuffle == '1' ) echo $wspm_filter_shuffle; ?>
- <?php if ( $wspm_filter_show_asc_desc == '1' ) echo $wspm_filter_asc_desc; ?>
- </div>
- </div>
-
- <div class="wspm-spacer"></div>
-
- <?php endif; ?>
-
- <?php // - - - - - - - - - - - - - - - - - - - - - - - - - - - - FILTER BAR SLIDEOUT - - - - - - - - - - - - - - - - - - - - - - - - - - - - ?>
- <?php if ( $wspm_filter_layout == 'slideout' ) : ?>
-
- <div class="filters-slideout">
- <div class="row">
- <div class="<?php if ( $wspm_filter_show_asc_desc == '1' or $wspm_filter_show_shuffle == '1' ) { echo 'col-sm-9'; } else { echo 'col-sm-12'; } ?>">
- <?php if ( $wspm_filter_show_filters == '1' ) echo '<a class="wspm-slideout" href="javascript:void(0);">'.$wspm_filter_toggle_text.'</a><div class="wspm-slideout-hidden">'.$wspm_all_active_filters.'</div>'; ?>
- </div>
- <div class="<?php if ( $wspm_filter_show_asc_desc == '1' or $wspm_filter_show_shuffle == '1' ) { echo 'col-sm-3 text-right'; } else { echo 'col-sm-12'; } ?>">
- <?php if ( $wspm_filter_show_shuffle == '1' ) echo $wspm_filter_shuffle; ?>
- <?php if ( $wspm_filter_show_asc_desc == '1' ) echo $wspm_filter_asc_desc; ?>
- </div>
- </div>
- </div>
-
- <div class="wspm-spacer"></div>
-
- <?php endif; ?>
-
- <div id="wspm-container">
-
- <?php // - - - - - - - - - - - - - - - - - - - - - - - - - - - - PRELOADER - - - - - - - - - - - - - - - - - - - - - - - - - - - - ?>
-
- <?php if ( $wspm_preloader == '1' ) : ?>
-
- <div id="wspm-mask">
- <div id="wspm-loader" <?php if ( $wspm_preloader_image == '') { echo 'class="default-preloader"'; } else { echo 'style="background-image: url('.$wspm_preloader_image.');"'; } ?>></div>
- </div>
-
- <?php endif; ?>
-
- <?php // - - - - - - - - - - - - - - - - - - - - - - - - - - - - PORTFOLIO INIT - - - - - - - - - - - - - - - - - - - - - - - - - - - - ?>
-
- <div
- id="wspm-init"
- class="row <?php echo $class_sfx;?>"
- <?php $tag = ''; if ($params->get('tag_id') != null) { $tag = $params->get('tag_id').''; echo ' id="'.$tag.'"'; } ?>
- >
- <?php if ( $wspm_filter_layout == 'stamp' ) : ?>
-
- <div class="filters-stamp stamp col-lg-<?php echo $wspm_stamp_grid_lg; ?> col-md-<?php echo $wspm_stamp_grid_md; ?> col-sm-<?php echo $wspm_stamp_grid_sm; ?> col-xs-<?php echo $wspm_stamp_grid_xs; ?> item">
- <div class="stamp-inner">
- <div class="clearfix"></div>
- <?php if ( $wspm_filter_show_filters == '1' ) echo $wspm_all_active_filters; ?>
- <?php if ( $wspm_filter_show_asc_desc == '1' ) echo $wspm_filter_asc_desc; ?>
- <?php if ( $wspm_filter_show_shuffle == '1' ) echo $wspm_filter_shuffle; ?>
- <div class="clearfix"></div>
- </div>
- </div>
-
- <?php endif; ?>
-
- <?php
-
-
- /*
- $wspm_limit_items_basic = 0;
-
- foreach ($list as $i => &$item) : if ($wspm_limit_items_basic++ == $wspm_limit_items) break; require JModuleHelper::getLayoutPath('mod_wsportfolio_menu', 'portfolio_url'); endforeach;
- */
-
- $st = $wslimitstart;
- $maxi = $st + $wslimit;
- if($maxi > $wstotal) { $maxi = $wstotal; }
-
- for($x=$st;$x<$maxi;$x++ ) {
- $item = '';
- $item = $list[$x];
- require JModuleHelper::getLayoutPath('mod_wsportfolio_menu', 'portfolio_url');
- }
-
-
- ?>
-
- <div class="<?php echo $wspm_item_size.' wspm-item wspm-item-sizer'; ?>"></div>
-
- </div>
-
- </div>
-
- <?php
- $uri = JFactory::getURI();
- $uri->delVar('wspmstart');
- $absolute_url = $uri->toString();
- $seiten = 0; $seiten = ceil($wstotal / $wslimit) ;
- if($seiten > 1) {
- $firstl = ''; if(strpos($absolute_url, '?')) { $firstl = $absolute_url . '&wspmstart=0'; } else { $firstl = $absolute_url . '?wspmstart=0'; }
- $lastl = ''; if(strpos($absolute_url, '?')) { $lastl = $absolute_url . '&wspmstart=' . (($seiten - 1 ) * $wslimit); } else { $lastl = $absolute_url . '?wspmstart=' . (($seiten - 1 ) * $wslimit); }
- ?>
- <div style="float: right;">
- <div class="wspm-pagination clearfix">
- <a class="<?php if($wslimitstart == 0) { echo 'disabled'; } ?>" href="<?php echo JRoute::_($firstl); ?>"><i class="fa fa-step-backward"></i></a>
- <?php
- for($x=0;$x<$seiten;$x++) {
- $link = ''; $licl = '';
- if(strpos($absolute_url, '?')) { $link = $absolute_url . '&wspmstart=' . ($x * $wslimit); } else { $link = $absolute_url . '?wspmstart=' . ($x * $wslimit); }
- if( ($x * $wslimit) == $wslimitstart ) { $licl = 'active'; }
- echo '<a class="'.$licl.'" title="'.($x + 1).'" href="'.JRoute::_($link).'">'.($x + 1).'</a>';
- }
- ?>
- <a class="<?php if($wslimitstart == (($seiten - 1 ) * $wslimit)) { echo 'disabled'; } ?>" href="<?php echo JRoute::_($lastl); ?>"><i class="fa fa-step-forward"></i></a>
- </div>
- </div>
- <?php } ?>
-
-
- </div>