<commit_before><? defined('C5_EXECUTE') or die("Access Denied."); ?>
<div class="ccm-panel-content-inner">

<? if (count($frequentPageTypes) || count($otherPageTypes)) {?>
	<h5><?=t('New Page')?></h5>
	<ul class="ccm-panel-sitemap-list">
	<? foreach($frequentPageTypes as $pt) { ?>
		<li><a href="<?=URL::to('/ccm/system/page/', 'create', $pt->getPageTypeID())?>"><?=$pt->getPageTypeDisplayName()?></a></li>
	<? } ?>
    <? foreach($otherPageTypes as $pt) { ?>
        <li data-page-type="other" <? if (count($frequentPageTypes)) { ?>style="display: none"<? } ?>><a href="<?=URL::to('/ccm/system/page/', 'create', $pt->getPageTypeID())?>"><?=$pt->getPageTypeDisplayName()?></a></li>
    <? } ?>

    <? if (count($frequentPageTypes) && count($otherPageTypes)) { ?>
        <li class="ccm-panel-sitemap-more-page-types"><a href="#" data-sitemap="show-more"><i class="fa fa-caret-down"></i> <?=t('More')?></a></li>
    <? } ?>
	</ul>

    <script type="text/javascript">
    $(function() {
        $('a[data-sitemap=show-more]').on('click', function() {
            $('li[data-page-type=other]').show();
            $(this).parent().remove();
        });
    });
    </script>
<? } ?>

<?
if ($canViewSitemap) { ?>
	<h5><?=t('Sitemap')?></h5>
	<div id="ccm-sitemap-panel-sitemap"></div><commit_msg>Prevent default behaviour when showing all available page types<commit_after><? defined('C5_EXECUTE') or die("Access Denied."); ?>
<div class="ccm-panel-content-inner">

<? if (count($frequentPageTypes) || count($otherPageTypes)) {?>
	<h5><?=t('New Page')?></h5>
	<ul class="ccm-panel-sitemap-list">
	<? foreach($frequentPageTypes as $pt) { ?>
		<li><a href="<?=URL::to('/ccm/system/page/', 'create', $pt->getPageTypeID())?>"><?=$pt->getPageTypeDisplayName()?></a></li>
	<? } ?>
    <? foreach($otherPageTypes as $pt) { ?>
        <li data-page-type="other" <? if (count($frequentPageTypes)) { ?>style="display: none"<? } ?>><a href="<?=URL::to('/ccm/system/page/', 'create', $pt->getPageTypeID())?>"><?=$pt->getPageTypeDisplayName()?></a></li>
    <? } ?>

    <? if (count($frequentPageTypes) && count($otherPageTypes)) { ?>
        <li class="ccm-panel-sitemap-more-page-types"><a href="#" data-sitemap="show-more"><i class="fa fa-caret-down"></i> <?=t('More')?></a></li>
    <? } ?>
	</ul>

    <script type="text/javascript">
    $(function() {
        $('a[data-sitemap=show-more]').on('click', function(e) {
            e.preventDefault();
            $('li[data-page-type=other]').show();
            $(this).parent().remove();
        });
    });
    </script>
<? } ?>

<?
if ($canViewSitemap) { ?>
	<h5><?=t('Sitemap')?></h5>
	<div id="ccm-sitemap-panel-sitemap"></div>
{'fraction_non_alphanumeric': 0.2833644859813084, 'fraction_numerical': 0.003738317757009346, 'mean_word_length': 4.15606936416185, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 99, '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': '806675', 'n_tokens_mistral': 999, 'n_tokens_neox': 1003, 'n_words': 124}