コード例 #1
0
    $id_checkbox = 'item-' . $ar_v['id_block'];
    $oBlock->oTpl->assign('infoblocks.list.cnt', $cnt + $offset);
    $oBlock->oTpl->assign('infoblocks.list.id_checkbox', $id_checkbox);
    $oBlock->oTpl->assign('infoblocks.list.block_name', $str_block_url);
    $oBlock->oTpl->assign('infoblocks.list.block_contents', $str_block_contents);
    $oBlock->oTpl->assign('infoblocks.list.id_block', $ar_v['id_block']);
    $oBlock->oTpl->assign('infoblocks.list.placement', $ar_places[$ar_v['block_place']]);
    $oBlock->oTpl->assign('infoblocks.list.status', '<span class="' . $ar_classnames[$ar_v['is_active']] . '">' . $ar_statuses[$ar_v['is_active']] . '</span>');
    /* Actions */
    $oJsMenuTr = new site_jsMenu();
    $oJsMenuTr->icon = '&#160;' . $this->V->str_class_dropdownmenu;
    $oJsMenuTr->event = 'onmouseover';
    $oJsMenuTr->classname = 'btn add';
    $oJsMenuTr->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=' . $oHref->get()), $this->oTkit->_(1042));
    $oJsMenuTr->append('javascript:oInfoblocks.remove_confirm(' . $ar_v['id_block'] . ')', $this->oTkit->_(1043));
    $oBlock->oTpl->assign('infoblocks.list.actions', $oJsMenuTr->get_html());
    $oBlock->oTpl->parse_block('infoblocks.list');
    ++$cnt;
}
$oBlock->oTpl->assign('v:th_n', '№');
$oBlock->oTpl->assign('l:1023', $this->oTkit->_(1023));
$oBlock->oTpl->assign('l:1033', $this->oTkit->_(1033));
$oBlock->oTpl->assign('l:1036', $this->oTkit->_(1036));
/* Records found */
$oBlock->oTpl->assign('l:1057', $this->oTkit->_(1057));
/* Placement */
$oBlock->oTpl->assign('l:1067', $this->oTkit->_(1067));
/* Status */
$oBlock->oTpl->assign('v:id_table', 'infoblocks-list');
$this->oOutput->append_js('jsF.stripe("infoblocks-list");');
$oBlock->oTpl->assign('v:cnt_records', $cnt_records);
コード例 #2
0
 public function create_navbar()
 {
     if (defined('SITE_THIS_SCRIPT') && SITE_THIS_SCRIPT == $this->V->file_index) {
         return;
     }
     #$ar_menu[$this->oTkit->_( '1000' )][] = '';
     $ar_menu[$this->oTkit->_('1000')][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => ''), array('title' => $this->oTkit->_('1152')), $this->oTkit->_('1152'));
     /* Add */
     $ar_menu[$this->oTkit->_('1001')][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 'a.add,t.items'), array(), $this->oTkit->_('1003'));
     $ar_menu[$this->oTkit->_('1001')][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 'a.add,t.infoblocks'), array('title' => $this->oTkit->_('1054')), $this->oTkit->_('1054'));
     /* Manage */
     $ar_menu[$this->oTkit->_('1006')][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 'a.manage,t.items'), array('title' => $this->oTkit->_('1003')), $this->oTkit->_('1003'));
     $ar_menu[$this->oTkit->_('1006')][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 'a.manage,t.fields'), array('title' => $this->oTkit->_('1020')), $this->oTkit->_('1020'));
     $ar_menu[$this->oTkit->_('1006')][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 'a.manage,t.infoblocks'), array('title' => $this->oTkit->_('1054')), $this->oTkit->_('1054'));
     $ar_menu[$this->oTkit->_('1006')][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 'a.manage,t.az'), array('title' => $this->oTkit->_(1209)), $this->oTkit->_(1209));
     $ar_menu[$this->oTkit->_('1006')][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 'a.manage,t.translations'), array('title' => $this->oTkit->_(1190)), $this->oTkit->_(1190));
     /* Setup */
     $ar_menu[$this->oTkit->_(1007)][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 'a.setup,t.systemsettings'), array('title' => $this->oTkit->_(1040)), $this->oTkit->_(1040));
     /* Service */
     /* Service - Maintenance */
     $ar_menu[$this->oTkit->_(1008)][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 'a.mnt,t.service'), array('title' => $this->oTkit->_(1110)), $this->oTkit->_(1110));
     /* Service - Localization */
     $oJsMenu = new site_jsMenu();
     $oJsMenu->icon = $this->oTkit->_(1183) . $this->V->str_class_dropdown;
     $oJsMenu->event = 'onmouseover';
     $oJsMenu->classname = '';
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.manage' . "" . 't.langs'), $this->oTkit->_(1181));
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.manage' . "" . 't.tvs'), $this->oTkit->_(1182));
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.manage' . "" . 't.translations'), $this->oTkit->_(1190));
     $ar_menu[$this->oTkit->_(1008)][] = $oJsMenu->get_html();
     /* Exchange - Export */
     $oJsMenu = new site_jsMenu();
     $oJsMenu->icon = $this->oTkit->_(1079) . $this->V->str_class_dropdown;
     $oJsMenu->event = 'onmouseover';
     $oJsMenu->classname = '';
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.export' . "" . 't.items'), $this->oTkit->_(1003));
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.export' . "" . 't.infoblocks'), $this->oTkit->_(1054));
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.export' . "" . 't.langs'), $this->oTkit->_(1181));
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.export' . "" . 't.tvs'), $this->oTkit->_(1182));
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.export' . "" . 't.az'), $this->oTkit->_(1209));
     $ar_menu[$this->oTkit->_(1009)][] = $oJsMenu->get_html();
     /* Exchange - Import */
     $oJsMenu = new site_jsMenu();
     $oJsMenu->icon = $this->oTkit->_(1077) . $this->V->str_class_dropdown;
     $oJsMenu->event = 'onmouseover';
     $oJsMenu->classname = '';
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.import' . "" . 't.items'), $this->oTkit->_(1003));
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.import' . "" . 't.infoblocks'), $this->oTkit->_(1054));
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.import' . "" . 't.langs'), $this->oTkit->_(1181));
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.import' . "" . 't.tvs'), $this->oTkit->_(1182));
     $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=a.import' . "" . 't.az'), $this->oTkit->_(1209));
     $ar_menu[$this->oTkit->_(1009)][] = $oJsMenu->get_html();
     /* Right-side menu*/
     $ar_menu_right[$this->oTkit->_('1011')][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 't.user,a.edit,s.pass'), array('title' => $this->oTkit->_('1012')), $this->oTkit->_('1012'));
     $ar_menu_right[$this->oTkit->_('1011')][] = $this->oHtmlAdm->a_href(array($this->V->file_index, 'arg[area]' => 't.user,a.edit,s.profile'), array('title' => $this->oTkit->_('1013')), $this->oTkit->_('1013'));
     /* */
     $ar_str = $ar_js_menublocks = array();
     $ar_str[] = '<ul>';
     $ar_str[] = '<li><p></p></li>';
     $cnt = 1;
     $cnt_current = 0;
     $ar_str_sub = array();
     foreach ($ar_menu as $str_menu => $ar_a) {
         /* @temp Indicators */
         foreach ($ar_a as $sub_k => $sub_v) {
             $cmp_1 = preg_replace('/href="(.*?)"(.*)/', "\\1", $sub_v);
             if (strlen($this->gv['_area']) > 1 && strpos($cmp_1, '=' . $this->gv['_area']) !== false) {
                 $ar_a[$sub_k] = str_replace('href=', 'class="on" href=', $sub_v);
                 $cnt_current = $cnt;
             }
         }
         $ar_str[] = '<li>' . $this->oHtmlAdm->a_href(array('javascript:void(0)'), array('title' => $str_menu, 'onclick' => 'oGwNavbar.sub(this)', 'id' => 'a-' . $cnt), $str_menu) . '</li>';
         $ar_str_sub[] = '<div id="ch-' . $cnt . '" class="gw-navbar-sub hidden"><ul><li>' . implode('</li><li>', $ar_a) . '</li></ul></div>';
         $ar_js_menublocks[] = $cnt;
         ++$cnt;
     }
     $ar_str[] = '<li class="navbar-right"><p></p></li>';
     foreach ($ar_menu_right as $str_menu => $ar_a) {
         /* Indicators */
         /* @temp */
         foreach ($ar_a as $sub_k => $sub_v) {
             if (strlen($this->gv['_area']) > 1 && strpos($sub_v, '=' . $this->gv['_area']) !== false) {
                 $ar_a[$sub_k] = str_replace('href=', 'class="on" href=', $sub_v);
                 $cnt_current = $cnt;
             }
         }
         $ar_str[] = '<li class="navbar-right">' . $this->oHtmlAdm->a_href(array('javascript:void(0)'), array('title' => $str_menu, 'onclick' => 'oGwNavbar.sub(this)', 'id' => 'a-' . $cnt), $str_menu) . '</li>';
         $ar_str_sub[] = '<div id="ch-' . $cnt . '" class="navbar-right gw-navbar-sub hidden"><ul><li>' . implode('</li><li>', $ar_a) . '</li></ul></div>';
         $ar_js_menublocks[] = $cnt;
         ++$cnt;
     }
     $this->oOutput->append_js('jsF.Set( "menublocks", "[' . implode(',', $ar_js_menublocks) . ']" );');
     /* Highlight the current section */
     if ($cnt_current) {
         $this->oOutput->append_js(' oGwNavbar.sub( fn_getElementById(\'a-' . $cnt_current . '\') ); ');
     } else {
         $this->oOutput->append_js(' oGwNavbar.sub( fn_getElementById(\'a-1\') ); ');
     }
     $ar_str[] = '</ul>';
     #		prn_r( $ar_str );
     #prn_r( $ar_str_sub );
     return implode('', $ar_str) . implode('', $ar_str_sub);
 }
コード例 #3
0
$oBlock->oTpl->assign('v:lang_select1', $oJsMenu->get_html());
/* Select languages: Target */
$oHref_select->set('source', $this->gv['area']['source']);
$oJsMenu = new site_jsMenu();
$oJsMenu->icon = '&#160;' . $this->ar_languages[$this->gv['area']['target']] . $this->V->str_class_dropdown;
$oJsMenu->event = 'onclick';
$oJsMenu->classname = '';
foreach ($this->ar_languages as $id_lang => $lang_name) {
    if ($id_lang == $this->gv['area']['target']) {
        $this->oOutput->append_js('jsF.Set("lang_name_target", "' . $lang_name . '");');
        continue;
    }
    $oHref_select->set('target', $id_lang);
    $oJsMenu->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=' . $oHref_select->get()), $lang_name);
}
$oBlock->oTpl->assign('v:lang_select2', $oJsMenu->get_html());
$this->oOutput->append_js('jsF.Set( "id_lang_target", "' . $this->gv['area']['target'] . '" );');
$this->oOutput->append_js('jsF.Set( "id_lang_source", "' . $this->gv['area']['source'] . '" );');
$this->oOutput->append_js('jsF.Set( "ar_id_pids", ["' . implode('","', $ar_id_pids) . '"] );');
$this->oOutput->append_js('jsF.Set( "ar_id_tv_source", ["' . implode('","', $ar_id_tv_source) . '"] );');
$this->oOutput->append_js('jsF.Set( "ar_id_tv_target", ["' . implode('","', $ar_id_tv_target) . '"] );');
/**
 * ----------------------------------------------
 * Assign values for HTML-template
 * ----------------------------------------------
 */
$oBlock->oTpl->assign('v:th_n', '№');
$oBlock->oTpl->assign('l:1033', $this->oTkit->_(1033));
/* Pages */
$oBlock->oTpl->assign('l:1036', $this->oTkit->_(1036));
/* Records found */
コード例 #4
0
    $lang_url = $this->oHtmlAdm->a_href(array($this->V->file_index, '#area' => $oHref_edit->get()), array('class' => 'btn edit'), $ar_v['lang_name'] . ' - ' . $ar_v['lang_native'] . '<span class="icon-edt"></span>');
    $oBlock->oTpl->assign('langs.list.lang_url', $lang_url);
    $oBlock->oTpl->assign('langs.list.iso639-1', $ar_v['isocode1']);
    $oBlock->oTpl->assign('langs.list.iso639-3', $ar_v['isocode3']);
    $oBlock->oTpl->assign('langs.list.region', $ar_regions[$ar_v['region']]);
    $oBlock->oTpl->assign('langs.list.locale', $ar_v['isocode1'] . '_' . $ar_v['region']);
    $new_status = $ar_v['is_active'] ? GW_STATUS_OFF : GW_STATUS_ON;
    $oBlock->oTpl->assign('langs.list.status', '<a class="btn" href="javascript:void(0)" onclick="oLangs.onoff(this, ' . $ar_v['id_lang'] . ', ' . $new_status . ')"><span class="' . $ar_classnames[$ar_v['is_active']] . '">' . $ar_statuses[$ar_v['is_active']] . '</span></a>');
    /* Actions */
    $oJsMenuTr = new site_jsMenu();
    $oJsMenuTr->icon = '&#160;' . $this->V->str_class_dropdownmenu;
    $oJsMenuTr->event = 'onmouseover';
    $oJsMenuTr->classname = 'btn add';
    $oJsMenuTr->append($this->oHtmlAdm->url_normalize($this->V->file_index . '?#area=' . $oHref_edit->get()), $this->oTkit->_(1042));
    $oJsMenuTr->append('javascript:oLangs.remove_confirm(' . $ar_v['id_lang'] . ')', $this->oTkit->_(1043));
    $oBlock->oTpl->assign('langs.list.actions', $oJsMenuTr->get_html());
    $oBlock->oTpl->parse_block('langs.list');
    ++$cnt;
}
$oBlock->oTpl->assign('v:th_n', '№');
$oBlock->oTpl->assign('l:1033', $this->oTkit->_(1033));
/* Pages */
$oBlock->oTpl->assign('l:1036', $this->oTkit->_(1036));
/* Records found */
$oBlock->oTpl->assign('l:1023', $this->oTkit->_(1023));
/* Actions */
$oBlock->oTpl->assign('l:1067', $this->oTkit->_(1067));
/* Status */
$oBlock->oTpl->assign('l:1184', $this->oTkit->_(1184));
/* Language name */
$oBlock->oTpl->assign('l:1185', $this->oTkit->_(1185));