<commit_before><div class="menu_top">
    <ul id="navigation">
        <li class="house"><?php echo link_to(image_tag('home.png', 'alt=Home'),'board/index');?></li>
        <li>
            <a href="#" class="subtitle"><?php echo __('My Preferences');?></a>
            <ul class="submenu">
              <li><?php echo link_to(__('My Profile'),'user/profile');?></li>
              <li><?php echo link_to(__('My Widgets'),'user/widget');?></li>
              <li><?php echo link_to(__('My Preferences'),'user/preferences');?></li>
              <li><?php echo link_to(__('Saved Specimens list'),'savesearch/index?specimen=1');?></li>
              <li><?php echo link_to(__('Saved search'),'savesearch/index');?></li>
            </ul>
        </li>
        <li>
            <a href="#" class="subtitle"><?php echo __('Searches');?></a>
            <ul class="submenu">
                <li>
                    <a href="#" class="subtitle"><?php echo __('Catalogues');?> »</a>
                    <ul class="submenu lvl_2">
                        <li><?php echo link_to(__('Taxonomy'),'taxonomy/index');?></li>
                        <li><?php echo link_to(__('Chronostratigraphy'),'chronostratigraphy/index');?></li>
                        <li><?php echo link_to(__('Lithostratigraphy'),'lithostratigraphy/index');?></li>
                        <li><?php echo link_to(__('Lithology'),'lithology/index');?></li>
                        <li><?php echo link_to(__('Mineralogy'),'mineralogy/index');?></li>
                        <li><?php echo link_to(__('Expeditions'),'expedition/index');?></li>
                        <li><?php echo link_to(__('I.G. Numbers'),'igs/index');?></li>
                        <li><?php echo link_to(__('Institutions'),'institution/index');?></li>
                        <li><?php echo link_to(__('People'),'people/index');?></li>
                        <?php if($sf_user->getDbUserType() >= Users::ENCODER) : ?>
                          <li><?php echo link_to(__('Sampling location'),'gtu/index');?></li>
                        <?php endif ; ?>
                        <li><?php echo link_to(__('Collecting Methods'),'methods_and_tools/methodsIndex');?></li>
                        <li><?php echo link_to(__('Collecting Tools'),'methods_and_tools/toolsIndex');?></li>
                        <li><?php echo link_to(__('Expeditions and Igs'),'expeditionsIgs/index');?></li> 
                    </ul>
                </li>
                <li><?php echo link_to(__('Specimens'),'specimensearch/index');?></li>
                <li>
                  <a href="#" class="subtitle"><?php echo __('Pinned Items');?> »</a>
                  <ul class="submenu lvl_2">
                    <li><?php echo link_to(sprintf(__('Specimens (%d)'), count($sf_user->getAllPinned('specimen'))),'specimensearch/search?pinned=true&source=specimen');?></li>
                    <li><?php echo link_to(sprintf(__('Individuals (%d)'), count($sf_user->getAllPinned('individual'))),'specimensearch/search?pinned=true&source=individual');?></li>
                    <li><?php echo link_to(sprintf(__('Parts (%d)'), count($sf_user->getAllPinned('part'))),'specimensearch/search?pinned=true&source=part');?></li>
                  </ul>
                </li>

                <li><?php echo link_to(__('Collections'),'collection/index');?></li>
                <li><?php echo link_to(__('Loans'),'loan/index');?></li>
            </ul>
        </li>
        <?php if($sf_user->isAtLeast(Users::ENCODER)) : ?>
        <li>
            <a href="#" class="subtitle"><?php echo __('Add');?></a>
            <ul class="submenu">
                <li>
                    <a href="#" class="subtitle"><?php echo __('Catalogues');?> »</a>
                    <ul class="submenu lvl_2">
                        <li><?php echo link_to(__('Taxonomy'),'taxonomy/new');?></li>
                        <li><?php echo link_to(__('Chronostratigraphy'),'chronostratigraphy/new');?></li>
                        <li><?php echo link_to(__('Lithostratigraphy'),'lithostratigraphy/new');?></li>
                        <li><?php echo link_to(__('Lithology'),'lithology/new');?></li>
                        <li><?php echo link_to(__('Mineralogy'),'mineralogy/new');?></li>
                        <li><?php echo link_to(__('Expeditions'),'expedition/new');?></li>
                        <li><?php echo link_to(__('RBINS I.G. Numbers'),'igs/new');?></li>
                        <li><?php echo link_to(__('Institutions'),'institution/new');?></li>
                        <li><?php echo link_to(__('People'),'people/new');?></li>
                        <li><?php echo link_to(__('Sampling location'),'gtu/new');?></li>
                        <li><?php echo link_to(__('Collecting Methods'),'methods_and_tools/new?notion=method');?></li>
                        <li><?php echo link_to(__('Collecting Tools'),'methods_and_tools/new?notion=tool');?></li>
                    </ul>
                </li>
                <li><?php echo link_to(__('Specimens'),'specimen/new');?></li>
                <?php if($sf_user->isAtLeast(Users::MANAGER)) : ?>
                <li><?php echo link_to(__('Collections'),'collection/new');?></li>
                <li><?php echo link_to(__('Loans'),'loan/new');?></li>
                <?php endif ?>
            </ul>
        </li>
        <?php endif ?>
        <?php if($sf_user->isAtLeast(Users::ENCODER) ): ?>
        <li>
            <a href="" class="subtitle"><?php echo __('Administration');?></a>
            <ul class="submenu">
                <li><?php echo link_to(__('Mass Actions'),'massactions/index');?></li>
                <li><?php echo link_to(__('Import'),'import/index');?></li>
                <?php if($sf_user->isAtLeast(Users::ADMIN) ): ?>
                  <li><?php echo link_to(__('Big Brother'),'bigbro/index');?></li>
                <?php endif ; ?>
                <?php if($sf_user->isAtLeast(Users::MANAGER) ): ?>
                  <li>
                    <a href="#" class="subtitle"><?php echo __('User');?> »</a>
                    <ul class="submenu lvl_2">
                      <li><?php echo link_to(__('Add'),'user/new');?></li>
                      <li><?php echo link_to(__('Search'),'user/index');?></li>
                    </ul>
                  </li>
                <?php endif ?>
            </ul>
        </li>
        <?php endif ?>
        <li>
            <a href="" class="subtitle"><?php echo __('Help');?></a>
            <ul class="submenu">
                <li><?php echo link_to(__('Help'),'help/index');?></li>                
                <li><?php echo link_to(__('Contacts'),'help/contact');?></li>
                <li><?php echo link_to(__('Contribute'),'help/contrib');?></li>
                <li><?php echo link_to(__('About'),'help/about');?></li>
            </ul>
        </li>
        <li class="exit" ><?php echo link_to(image_tag('exit.png', 'alt=Exit'),'account/logout');?></li>
    </ul>
</div>

<?php if($sf_user->getPreference('gtu_google_activated', true)):?>
  <script src="http://maps.google.com/maps/api/js?v=3.3&amp;sensor=false"></script>
<?php endif;?>

<script  type="text/javascript">
 var with_gmap= <?php echo $sf_user->getPreference('gtu_google_activated', true) ? 'true' : 'false';?>;
$(document).ready(function()
{
   $('#navigation').delegate('a.subtitle', 'mouseover', function(event) {
      var self = $(this),
         qtip = '.qtip.ui-tooltip',
         container = $(event.delegateTarget || event.liveFired),
         submenu = self.next('ul'),
 
      // Determine whether this is a top-level menu
      isTopMenu = self.parents(qtip).length < 1;
 
      // If it's not a top level and we can't find a sub-menu... return
      if(isTopMenu && !submenu.length) { return false; }
      /*
       * Top-level menus will be placed below the menu item, all others
       * will be placed to the right of each other, top aligned.
       */
      position = isTopMenu ?
         { my: 'top center', at: 'bottom center' } :
         { my: 'top left', at: 'right top' }<commit_msg>Avoid loading twice preferences<commit_after><div class="menu_top">
    <ul id="navigation">
        <li class="house"><?php echo link_to(image_tag('home.png', 'alt=Home'),'board/index');?></li>
        <li>
            <a href="#" class="subtitle"><?php echo __('My Preferences');?></a>
            <ul class="submenu">
              <li><?php echo link_to(__('My Profile'),'user/profile');?></li>
              <li><?php echo link_to(__('My Widgets'),'user/widget');?></li>
              <li><?php echo link_to(__('My Preferences'),'user/preferences');?></li>
              <li><?php echo link_to(__('Saved Specimens list'),'savesearch/index?specimen=1');?></li>
              <li><?php echo link_to(__('Saved search'),'savesearch/index');?></li>
            </ul>
        </li>
        <li>
            <a href="#" class="subtitle"><?php echo __('Searches');?></a>
            <ul class="submenu">
                <li>
                    <a href="#" class="subtitle"><?php echo __('Catalogues');?> »</a>
                    <ul class="submenu lvl_2">
                        <li><?php echo link_to(__('Taxonomy'),'taxonomy/index');?></li>
                        <li><?php echo link_to(__('Chronostratigraphy'),'chronostratigraphy/index');?></li>
                        <li><?php echo link_to(__('Lithostratigraphy'),'lithostratigraphy/index');?></li>
                        <li><?php echo link_to(__('Lithology'),'lithology/index');?></li>
                        <li><?php echo link_to(__('Mineralogy'),'mineralogy/index');?></li>
                        <li><?php echo link_to(__('Expeditions'),'expedition/index');?></li>
                        <li><?php echo link_to(__('I.G. Numbers'),'igs/index');?></li>
                        <li><?php echo link_to(__('Institutions'),'institution/index');?></li>
                        <li><?php echo link_to(__('People'),'people/index');?></li>
                        <?php if($sf_user->getDbUserType() >= Users::ENCODER) : ?>
                          <li><?php echo link_to(__('Sampling location'),'gtu/index');?></li>
                        <?php endif ; ?>
                        <li><?php echo link_to(__('Collecting Methods'),'methods_and_tools/methodsIndex');?></li>
                        <li><?php echo link_to(__('Collecting Tools'),'methods_and_tools/toolsIndex');?></li>
                        <li><?php echo link_to(__('Expeditions and Igs'),'expeditionsIgs/index');?></li> 
                    </ul>
                </li>
                <li><?php echo link_to(__('Specimens'),'specimensearch/index');?></li>
                <li>
                  <a href="#" class="subtitle"><?php echo __('Pinned Items');?> »</a>
                  <ul class="submenu lvl_2">
                    <li><?php echo link_to(sprintf(__('Specimens (%d)'), count($sf_user->getAllPinned('specimen'))),'specimensearch/search?pinned=true&source=specimen');?></li>
                    <li><?php echo link_to(sprintf(__('Individuals (%d)'), count($sf_user->getAllPinned('individual'))),'specimensearch/search?pinned=true&source=individual');?></li>
                    <li><?php echo link_to(sprintf(__('Parts (%d)'), count($sf_user->getAllPinned('part'))),'specimensearch/search?pinned=true&source=part');?></li>
                  </ul>
                </li>

                <li><?php echo link_to(__('Collections'),'collection/index');?></li>
                <li><?php echo link_to(__('Loans'),'loan/index');?></li>
            </ul>
        </li>
        <?php if($sf_user->isAtLeast(Users::ENCODER)) : ?>
        <li>
            <a href="#" class="subtitle"><?php echo __('Add');?></a>
            <ul class="submenu">
                <li>
                    <a href="#" class="subtitle"><?php echo __('Catalogues');?> »</a>
                    <ul class="submenu lvl_2">
                        <li><?php echo link_to(__('Taxonomy'),'taxonomy/new');?></li>
                        <li><?php echo link_to(__('Chronostratigraphy'),'chronostratigraphy/new');?></li>
                        <li><?php echo link_to(__('Lithostratigraphy'),'lithostratigraphy/new');?></li>
                        <li><?php echo link_to(__('Lithology'),'lithology/new');?></li>
                        <li><?php echo link_to(__('Mineralogy'),'mineralogy/new');?></li>
                        <li><?php echo link_to(__('Expeditions'),'expedition/new');?></li>
                        <li><?php echo link_to(__('RBINS I.G. Numbers'),'igs/new');?></li>
                        <li><?php echo link_to(__('Institutions'),'institution/new');?></li>
                        <li><?php echo link_to(__('People'),'people/new');?></li>
                        <li><?php echo link_to(__('Sampling location'),'gtu/new');?></li>
                        <li><?php echo link_to(__('Collecting Methods'),'methods_and_tools/new?notion=method');?></li>
                        <li><?php echo link_to(__('Collecting Tools'),'methods_and_tools/new?notion=tool');?></li>
                    </ul>
                </li>
                <li><?php echo link_to(__('Specimens'),'specimen/new');?></li>
                <?php if($sf_user->isAtLeast(Users::MANAGER)) : ?>
                <li><?php echo link_to(__('Collections'),'collection/new');?></li>
                <li><?php echo link_to(__('Loans'),'loan/new');?></li>
                <?php endif ?>
            </ul>
        </li>
        <?php endif ?>
        <?php if($sf_user->isAtLeast(Users::ENCODER) ): ?>
        <li>
            <a href="" class="subtitle"><?php echo __('Administration');?></a>
            <ul class="submenu">
                <li><?php echo link_to(__('Mass Actions'),'massactions/index');?></li>
                <li><?php echo link_to(__('Import'),'import/index');?></li>
                <?php if($sf_user->isAtLeast(Users::ADMIN) ): ?>
                  <li><?php echo link_to(__('Big Brother'),'bigbro/index');?></li>
                <?php endif ; ?>
                <?php if($sf_user->isAtLeast(Users::MANAGER) ): ?>
                  <li>
                    <a href="#" class="subtitle"><?php echo __('User');?> »</a>
                    <ul class="submenu lvl_2">
                      <li><?php echo link_to(__('Add'),'user/new');?></li>
                      <li><?php echo link_to(__('Search'),'user/index');?></li>
                    </ul>
                  </li>
                <?php endif ?>
            </ul>
        </li>
        <?php endif ?>
        <li>
            <a href="" class="subtitle"><?php echo __('Help');?></a>
            <ul class="submenu">
                <li><?php echo link_to(__('Help'),'help/index');?></li>                
                <li><?php echo link_to(__('Contacts'),'help/contact');?></li>
                <li><?php echo link_to(__('Contribute'),'help/contrib');?></li>
                <li><?php echo link_to(__('About'),'help/about');?></li>
            </ul>
        </li>
        <li class="exit" ><?php echo link_to(image_tag('exit.png', 'alt=Exit'),'account/logout');?></li>
    </ul>
</div>

<?php $is_google_active = $sf_user->getPreference('gtu_google_activated', true);
    if($is_google_active):?>
  <script src="http://maps.google.com/maps/api/js?v=3.3&amp;sensor=false"></script>
<?php endif;?>

<script  type="text/javascript">
 var with_gmap= <?php echo $is_google_active ? 'true' : 'false';?>;
$(document).ready(function()
{
   $('#navigation').delegate('a.subtitle', 'mouseover', function(event) {
      var self = $(this),
         qtip = '.qtip.ui-tooltip',
         container = $(event.delegateTarget || event.liveFired),
         submenu = self.next('ul'),
 
      // Determine whether this is a top-level menu
      isTopMenu = self.parents(qtip).length < 1;
 
      // If it's not a top level and we can't find a sub-menu... return
      if(isTopMenu && !submenu.length) { return false; }
      /*
       * Top-level menus will be placed below the menu item, all others
       * will be placed to the right of each other, top aligned.
       */
      position = isTopMenu ?
         { my: 'top center', at: 'bottom center' } :
         { my: 'top left', at: 'right top' }
{'fraction_non_alphanumeric': 0.20955723874622822, 'fraction_numerical': 0.000985282344971981, 'mean_word_length': 2.13695190264632, 'pattern_counts': {'":': 0, '<': 475, '<?xml version=': 0, '>': 496, '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': '508627', 'n_tokens_mistral': 5116, 'n_tokens_neox': 5002, 'n_words': 822}