HomeHelpTrac

Ignore:
Timestamp:
05/25/09 00:00:45 (3 years ago)
Author:
Anton Lesnikov
Message:
  1. Updated admin panels for News, Feedback and Payment modules.
  2. Improvements for design box in admin panel.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/admin_design.inc.php

    r10542 r10599  
    5656} 
    5757 
    58 function DesignBoxAdmin($sTitle, $sContent, $sTopItems = '', $sBottomItems = '', $iIndex = 1) { 
     58function DesignBoxAdmin($sTitle, $sContent, $mixedTopItems = '', $sBottomItems = '', $iIndex = 1) {     
     59    if(is_array($mixedTopItems)) { 
     60        $mixedButtons = array(); 
     61        foreach($mixedTopItems as $sId => $aAction) 
     62            $mixedButtons[] = array( 
     63                'id' => $sId, 
     64                'title' => htmlspecialchars_adv(_t($aAction['title'])), 
     65                'class' => isset($aAction['class']) ? ' class="' . $aAction['class'] . '"' : '', 
     66                'icon' => isset($aAction['icon']) ? '<img' . $sClass . ' src="' . $aAction['icon'] . '" />' : '', 
     67                'href' => isset($aAction['href']) ? ' href="' . htmlspecialchars_adv($aAction['href']) . '"' : '', 
     68                'target' => isset($aAction['target'])  ? ' target="' . $aAction['target'] . '"' : '', 
     69                'on_click' => isset($aAction['onclick']) ? ' onclick="' . $aAction['onclick'] . '"' : '', 
     70                'bx_if:hide_active' => array( 
     71                    'condition' => !isset($aAction['active']) || $aAction['active'] != 1, 
     72                    'content' => array() 
     73                ), 
     74                'bx_if:hide_inactive' => array( 
     75                    'condition' => isset($aAction['active']) && $aAction['active'] == 1, 
     76                    'content' => array() 
     77                ) 
     78            ); 
     79    } 
     80    else  
     81        $mixedButtons = $mixedTopItems; 
     82 
    5983    return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_' . (int)$iIndex . '.html', array( 
    6084        'title' => $sTitle, 
    61         'top_items' => $sTopItems, 
     85        'bx_repeat:actions' => $mixedButtons, 
    6286        'content' => $sContent, 
    6387        'bottom_items' => $sBottomItems         
Note: See TracChangeset for help on using the changeset viewer.