<commit_before>{% load templatetag_handlebars %}
{% tplhandlebars "textbook_card" %}

<div class="card"  data-name="TextbookCard" data-type="card">
    <div class="fade-in">
        <h3>Textbooks</h3>
        {{#unless has_errors}}
        <ul class="unstyled-list textbooks-list">
            {{#each sections }}
                <li class="textbooks-list-item">
                    <div class="c{{color_id}} simplesquare todo"></div>
                    <span class="textbooks-course-title">{{ course_id }}:</span>
                    <span class="textbooks-course-books">
                    {{#if no_course_books }}
                        No books
                    {{else}}
                        {{ total }} {{ pluralize total 'book' 'books' }}
                        </span>
                        <span class="textbooks-course-required">
                             ({{#if required}}{{required}}{{else}}not{{/if}} required)
                        </span>
                        </li>
                {{/if }}
            {{/each }}
        </ul>
        {{else}}
        <p>Has Error</p>
        {{/unless}}

        {{#unless no_book_assigned}}
            <div class="destination-arrow">
                <a class="show_textbooks" id="show_term_textbooks" href="/textbooks/{{year}},{{quarter}}{{#if summer_term}},{{toLowerCase summer_term}}{{/if}}" title="View textbooks" aria-label="View textbook details for this quarter" ><i role="presentation" class="fa fa-chevron-right"></i></a>
            </div>
        {{/unless}}
    </div>
</div>

{% endtplhandlebars %}<commit_msg>Add Text book card error message<commit_after>{% load templatetag_handlebars %}
{% tplhandlebars "textbook_card" %}

<div class="card"  data-name="TextbookCard" data-type="card">
    <div class="fade-in">
        <h3>Textbooks</h3>
        {{#unless has_errors}}
        <ul class="unstyled-list textbooks-list">
            {{#each sections }}
                <li class="textbooks-list-item">
                    <div class="c{{color_id}} simplesquare todo"></div>
                    <span class="textbooks-course-title">{{ course_id }}:</span>
                    <span class="textbooks-course-books">
                    {{#if no_course_books }}
                        No books
                    {{else}}
                        {{ total }} {{ pluralize total 'book' 'books' }}
                        </span>
                        <span class="textbooks-course-required">
                             ({{#if required}}{{required}}{{else}}not{{/if}} required)
                        </span>
                        </li>
                {{/if }}
            {{/each }}
        </ul>
        {{else}}
        <p class="text-danger" style="margin-top:1em;"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> An error occurred and MyUW are cannot load textbook information right now. Please try again later.</p>
        {{/unless}}

        {{#unless no_book_assigned}}
            <div class="destination-arrow">
                <a class="show_textbooks" id="show_term_textbooks" href="/textbooks/{{year}},{{quarter}}{{#if summer_term}},{{toLowerCase summer_term}}{{/if}}" title="View textbooks" aria-label="View textbook details for this quarter" ><i role="presentation" class="fa fa-chevron-right"></i></a>
            </div>
        {{/unless}}
    </div>
</div>

{% endtplhandlebars %}
{'fraction_non_alphanumeric': 0.16519694297472076, 'fraction_numerical': 0.0014697236919459142, 'mean_word_length': 1.8217247097844114, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, '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': '4929490', 'n_tokens_mistral': 991, 'n_tokens_neox': 928, 'n_words': 192}