<commit_before>//- need cut base of ns menu path ('admin.menus.navbar')
- var MENU_BASE_NS_LEVEL = 3
//- need cut base of api path ('admin')
- var API_PATH_BASE_NS_LEVEL = 1
- var api_path_tail = self.head.apiPath.split('.').slice(API_PATH_BASE_NS_LEVEL).join('.')


//- Create next menu level
//-
//-   submenus (Array)         - submenus 
mixin _create_submenus(submenus)
  - var li_class
  ul.dropdown-menu
    - each item in submenus
      - if (item.childs)
        li.dropdown-submenu
          a(href=item.link, tabindex='-1')= self.t(item.title)
          mixin _create_submenus(item.childs)
      - else
        li
          a(href=item.link)= self.t(item.title)


//- Create admin top menu
//-
//-   menus (Object)  - menu container nodeca.config.menus.<menu_name>
mixin topnav_menu(menus)
  - var li_class
  - var item_path_tail<commit_msg>If ACP item without link, then take link from first chaild<commit_after>//- need cut base of ns menu path ('admin.menus.navbar')
- var MENU_BASE_NS_LEVEL = 3
//- need cut base of api path ('admin')
- var API_PATH_BASE_NS_LEVEL = 1
- var api_path_tail = self.head.apiPath.split('.').slice(API_PATH_BASE_NS_LEVEL).join('.')


//- Create next menu level
//-
//-   submenus (Array)         - submenus 
mixin _create_submenus(submenus)
  - var li_class
  - var item_link
  ul.dropdown-menu
    - each item in submenus
      - if (item.childs)
        // If ACP item without link, then take link from first chaild
        - if (!item.link)
          item_link = item.childs[0].link
        - else
          item_link = item.link
        li.dropdown-submenu
          a(href=item_link, tabindex='-1')= self.t(item.title)
          mixin _create_submenus(item.childs)
      - else
        li
          a(href=item.link)= self.t(item.title)


//- Create admin top menu
//-
//-   menus (Object)  - menu container nodeca.config.menus.<menu_name>
mixin topnav_menu(menus)
  - var li_class
  - var item_path_tail
{'fraction_non_alphanumeric': 0.12564102564102564, 'fraction_numerical': 0.0035897435897435897, 'mean_word_length': 2.4653641207815276, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2004370', 'n_tokens_mistral': 708, 'n_tokens_neox': 697, 'n_words': 165}