<commit_before><!-- CSS -->
<link rel="stylesheet" type="text/css" href="/devwidgets/categories/css/categories.css" />

<div class="categories_widget">
    <div id="categories_items_container" class="jcarousel-skin-tango"><!----></div>
    <div id="categories_expand_contract">
        <div class="categories_contract" style="display:none;"><!----></div>
        <div class="categories_expand"><!----></div>
        <span class="s3d-bold">__MSG__CHOOSE_A_CATEGORY__</span>
    </div>
</div>

<div id="categories_items_template"><!--
    <div id="categories_items_scroll">
        <a href="/categories" title="__MSG__VIEW_ALL__" class="categories_view_all_link">
            <button class="s3d-button s3d-overlay-button s3d-header-smaller-button" id="categories_view_all">__MSG__VIEW_ALL__</button>
        </a>
        <div id="categories_view_next_raquo"></div>
        <div id="categories_items_scroll_buttons">
            {var count = 1}
            {for item in directory}
                {if item_index % 4 == 0}
                    {if count == 1}
                        <div class="categories_items_scroll_scrollbutton categories_items_scroll_selected" id="scroll_${count}"></div>
                    {else}
                        <div class="categories_items_scroll_deselected categories_items_scroll_scrollbutton" id="scroll_${count}"></div>
                    {/if}
                {/if}
                {var count = count + 1}
            {/for}
        </div>
    </div>
    <div id="categories_items_content">
        <ul>
            {for item in directory}
                {if item.spacer}
                    <li>
                        <div class="categories_item categories_spacer">
                            __MSG__IE_PLACEHOLDER__
                        </div>
                    </li>
                {else}
                    <li>
                        <div class="categories_item">
                            <a href="/category#l=${item.id}" class="s3d-regular-links categories_item_header_link">${item.title}</a>
                            <span class="categories_item_header_meta">${item.count} content items</span>
                            {if item.content}
                                {if item.content["sakai:pooled-content-file-name"]}
                                    <hr class="s3d-split-line fl-push">
                                    {var thumbnail = sakai.api.Content.getThumbnail(item.content)}
                                    {if thumbnail}
                                        <img src="${thumbnail}" class="categories_item_content_preview" alt="${item.content["sakai:pooled-content-file-name"]|safeOutput}"/>
                                    {else}
                                        <img src="${sakai.api.Content.getMimeTypeData(sakai.api.Content.getMimeType(item.content)).URL}" class="categories_item_content_preview"/>
                                    {/if}
                                    <a href="/content#p=${item.content["_path"]|safeURL}/${item.content["sakai:pooled-content-file-name"]|safeURL}" class="s3d-regular-links s3d-bold">${sakai.api.Util.applyThreeDots(item.content["sakai:pooled-content-file-name"], 70, null, "s3d-bold")}</a>
                                    <span style="display:none"><span class="categories_item_descriptive_text">__MSG__BY__</span> <a href="/~${item.content["sakai:pool-content-created-for"]}" class="s3d-regular-links s3d-bold">${item.content["sakai:pool-content-created-for"]}</a></span>
                                    {if item.content["sakai:description"]}
                                        {var size = 125}
                                        <span class="categories_content_description">${sakai.api.Util.applyThreeDots(item.content["sakai:description"], size)}</span>
                                    {/if}
                                    <span class="categories_content_category_description"><span class="categories_content_usedin_icon categories_content_icon"></span>__MSG__USED_IN__ ${item.content.usedin} {if item.content.usedin == 1} __MSG__PLACE__{else} __MSG__PLACES__{/if}</span>
                                    {if item.content.commentcount}<span class="categories_content_category_description"><span class="categories_content_comments_icon categories_content_icon"></span><a href="/content#p=${item.content["_path"]|safeURL}/${item.content["sakai:pooled-content-file-name"]|safeURL}" title="${item.content.commentcount} {if item.content.commentcount == 1} __MSG__COMMENT__{else} __MSG__COMMENTS__{/if}" class="s3d-bold s3d-regular-links">${item.content.commentcount} {if item.content.commentcount == 1} __MSG__COMMENT__{else} __MSG__COMMENTS__{/if}</a></span>{/if}
                                    {var tags = sakai.api.Util.formatTagsExcludeLocation(item.content["sakai:tags"].join(","))}
                                    {if tags.length}
                                        <span class="categories_content_tags">
                                            {for tag in tags}
                                                {if tag_index < 2}
                                                    <a href="/search#q=${tag|safeURL}" class="s3d-action">${tag|safeOutput}</a>{if tag_index < tags.length-1 && tag_index < 1}, {/if}
                                                {/if}
                                            {/for}
                                        </span>
                                    {/if}
                                {/if}
                            </div>
                            {if item_index != directory.length - 1}
                                <div class="categories_vertical_divider"></div>
                            {/if}
                        </li>
                     {/if}
                {/if}
            {/for}
        </ul>
    </div>
--></div>

<!-- JAVASCRIPT -->
<script type="text/javascript" src="/devwidgets/categories/javascript/categories.js"></script>
<commit_msg>SAKIII-4001 Fix malformed HTML in template<commit_after><!-- CSS -->
<link rel="stylesheet" type="text/css" href="/devwidgets/categories/css/categories.css" />

<div class="categories_widget">
    <div id="categories_items_container" class="jcarousel-skin-tango"><!----></div>
    <div id="categories_expand_contract">
        <div class="categories_contract" style="display:none;"><!----></div>
        <div class="categories_expand"><!----></div>
        <span class="s3d-bold">__MSG__CHOOSE_A_CATEGORY__</span>
    </div>
</div>

<div id="categories_items_template"><!--
    <div id="categories_items_scroll">
        <a href="/categories" title="__MSG__VIEW_ALL__" class="categories_view_all_link">
            <button class="s3d-button s3d-overlay-button s3d-header-smaller-button" id="categories_view_all">__MSG__VIEW_ALL__</button>
        </a>
        <div id="categories_view_next_raquo"></div>
        <div id="categories_items_scroll_buttons">
            {var count = 1}
            {for item in directory}
                {if item_index % 4 == 0}
                    {if count == 1}
                        <div class="categories_items_scroll_scrollbutton categories_items_scroll_selected" id="scroll_${count}"></div>
                    {else}
                        <div class="categories_items_scroll_deselected categories_items_scroll_scrollbutton" id="scroll_${count}"></div>
                    {/if}
                {/if}
                {var count = count + 1}
            {/for}
        </div>
    </div>
    <div id="categories_items_content">
        <ul>
            {for item in directory}
                {if item.spacer}
                    <li>
                        <div class="categories_item categories_spacer">
                            __MSG__IE_PLACEHOLDER__
                        </div>
                    </li>
                {else}
                    <li>
                        <div class="categories_item">
                            <a href="/category#l=${item.id}" class="s3d-regular-links categories_item_header_link">${item.title}</a>
                            <span class="categories_item_header_meta">${item.count} content items</span>
                            {if item.content}
                                {if item.content["sakai:pooled-content-file-name"]}
                                    <hr class="s3d-split-line fl-push">
                                    {var thumbnail = sakai.api.Content.getThumbnail(item.content)}
                                    {if thumbnail}
                                        <img src="${thumbnail}" class="categories_item_content_preview" alt="${item.content["sakai:pooled-content-file-name"]|safeOutput}"/>
                                    {else}
                                        <img src="${sakai.api.Content.getMimeTypeData(sakai.api.Content.getMimeType(item.content)).URL}" class="categories_item_content_preview"/>
                                    {/if}
                                    <a href="/content#p=${item.content["_path"]|safeURL}/${item.content["sakai:pooled-content-file-name"]|safeURL}" class="s3d-regular-links s3d-bold">${sakai.api.Util.applyThreeDots(item.content["sakai:pooled-content-file-name"], 70, null, "s3d-bold")}</a>
                                    <span style="display:none"><span class="categories_item_descriptive_text">__MSG__BY__</span> <a href="/~${item.content["sakai:pool-content-created-for"]}" class="s3d-regular-links s3d-bold">${item.content["sakai:pool-content-created-for"]}</a></span>
                                    {if item.content["sakai:description"]}
                                        {var size = 125}
                                        <span class="categories_content_description">${sakai.api.Util.applyThreeDots(item.content["sakai:description"], size)}</span>
                                    {/if}
                                    <span class="categories_content_category_description"><span class="categories_content_usedin_icon categories_content_icon"></span>__MSG__USED_IN__ ${item.content.usedin} {if item.content.usedin == 1} __MSG__PLACE__{else} __MSG__PLACES__{/if}</span>
                                    {if item.content.commentcount}<span class="categories_content_category_description"><span class="categories_content_comments_icon categories_content_icon"></span><a href="/content#p=${item.content["_path"]|safeURL}/${item.content["sakai:pooled-content-file-name"]|safeURL}" title="${item.content.commentcount} {if item.content.commentcount == 1} __MSG__COMMENT__{else} __MSG__COMMENTS__{/if}" class="s3d-bold s3d-regular-links">${item.content.commentcount} {if item.content.commentcount == 1} __MSG__COMMENT__{else} __MSG__COMMENTS__{/if}</a></span>{/if}
                                    {var tags = sakai.api.Util.formatTagsExcludeLocation(item.content["sakai:tags"].join(","))}
                                    {if tags.length}
                                        <span class="categories_content_tags">
                                            {for tag in tags}
                                                {if tag_index < 2}
                                                    <a href="/search#q=${tag|safeURL}" class="s3d-action">${tag|safeOutput}</a>{if tag_index < tags.length-1 && tag_index < 1}, {/if}
                                                {/if}
                                            {/for}
                                        </span>
                                    {/if}
                                {/if}
                            {/if}
                         </div>
                         {if item_index != directory.length - 1}
                             <div class="categories_vertical_divider"></div>
                         {/if}
                     </li>
                {/if}
            {/for}
        </ul>
    </div>
--></div>

<!-- JAVASCRIPT -->
<script type="text/javascript" src="/devwidgets/categories/javascript/categories.js"></script>

{'fraction_non_alphanumeric': 0.1374077452525085, 'fraction_numerical': 0.005473090637697985, 'mean_word_length': 1.6429980276134122, 'pattern_counts': {'":': 0, '<': 173, '<?xml version=': 0, '>': 167, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 72, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2632725', 'n_tokens_mistral': 3301, 'n_tokens_neox': 3173, 'n_words': 443}