Changeset 13151
- Timestamp:
- 11/06/09 00:33:47 (2 weeks ago)
- Files:
-
- trunk/calendar.php (modified) (1 diff)
- trunk/templates/base/scripts/BxBaseSearchResult.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/calendar.php
r13133 r13151 39 39 $aDateParams = explode('/', $sDate); 40 40 $oSearch = new BxTemplSearchProfile('calendar', (int)$aDateParams[0], (int)$aDateParams[1], (int)$aDateParams[2]); 41 $oSearch -> aConstants['linksTempl']['browseAll'] = 'calendar.php?'; 42 41 43 $sCode = $oSearch->displayResultBlock(); 42 return $oSearch->displaySearchBox('<div class="search_container">' . $sCode . '</div>', $oSearch->showPagination()); 44 return $oSearch->displaySearchBox('<div class="search_container">' 45 . $sCode . '</div>', $oSearch->showPagination(false, false, false)); 43 46 } 44 47 trunk/templates/base/scripts/BxBaseSearchResult.php
r13055 r13151 157 157 } 158 158 159 function showPagination($bAdmin = false) { 159 function showPagination($bAdmin = false, $bChangePage = true, $bPageReload = true) { 160 $sPageLink = $this->getCurrentUrl('browseAll', 0, ''); 160 161 $aLinkAddon = $this->getLinkAddByPrams(); 162 163 if($aLinkAddon) { 164 foreach($aLinkAddon as $mKey => $sValue) 165 { 166 $sPageLink .= $sValue; 167 } 168 } 169 170 if(!$this->id) { 171 $this->id = 0; 172 } 173 161 174 $oPaginate = new BxDolPaginate(array( 162 'page_url' => $ this->getCurrentUrl('browseAll', 0, ''),175 'page_url' => $sPageLink, 163 176 'count' => $this->aCurrent['paginate']['totalNum'], 164 177 'per_page' => $this->aCurrent['paginate']['perPage'], … … 166 179 'per_page_changer' => true, 167 180 'page_reloader' => true, 168 'on_change_page' => 'return !loadDynamicBlock('.$this->id.', \'searchKeywordContent.php?searchMode=ajax§ion[]='.$this->aCurrent['name'].'&keyword='.process_pass_data($_REQUEST['keyword']).$aLinkAddon['params'].'&page={page}&per_page={per_page}\');',169 'on_change_per_page' => 'return !loadDynamicBlock('.$this->id.', \'searchKeywordContent.php?searchMode=ajax§ion[]='.$this->aCurrent['name'].'&keyword='.process_pass_data($_REQUEST['keyword']).$aLinkAddon['params'].'&page=1&per_page=\' + this.value);'181 'on_change_page' => !$bPageReload ? '' : 'return !loadDynamicBlock('.$this->id.', \'searchKeywordContent.php?searchMode=ajax§ion[]='.$this->aCurrent['name'].'&keyword='.process_pass_data($_REQUEST['keyword']).$aLinkAddon['params'].'&page={page}&per_page={per_page}\');', 182 'on_change_per_page' => !$bChangePage ? '' : 'return !loadDynamicBlock('.$this->id.', \'searchKeywordContent.php?searchMode=ajax§ion[]='.$this->aCurrent['name'].'&keyword='.process_pass_data($_REQUEST['keyword']).$aLinkAddon['params'].'&page=1&per_page=\' + this.value);' 170 183 )); 171 184 $sPaginate = '<div class="clear_both"></div>'.$oPaginate->getPaginate(); … … 198 211 } 199 212 //paginate 200 $aLinks['paginate'] .= '&page= '.$this->aCurrent['paginate']['page'];201 $aLinks['paginate'] .= '&per_page= '.$this->aCurrent['paginate']['perPage'];213 $aLinks['paginate'] .= '&page={page}'; 214 $aLinks['paginate'] .= '&per_page={per_page}'; 202 215 return $aLinks; 203 216 }

