<commit_before>{% extends "layouts/admin.twig" %}
{% block content %}
    <div class="module">
        <nav class="pull-right">
            <ul class="nav nav-action">
                <li><a href="#" id="talk-upvote-{{ talk.id }}" class="js-talk-rating" data-id="{{ talk.id }}" data-rating="1"><i class="fa fa-thumbs-up admin-icon{% if talk_meta.rating == 1 %} admin-icon--selected{% endif %}"></i></a></li>
                <li><a href="#" id="talk-downvote-{{ talk.id }}" class="js-talk-rating" data-id="{{ talk.id }}" data-rating="-1"><i class="fa fa-thumbs-down admin-icon{% if talk_meta.rating == -1 %} admin-icon--selected{% endif %}"></i></a></li>
                <li><a href="#" id="talk-select-{{ talk.id }}" class="js-talk-select" data-id="{{ talk.id }}"><i class="fa fa-check-square admin-icon{% if talk.selected == 1 %} admin-icon--selected{% endif %}"></i></a></li>
            </ul>
        </nav>
        <div class="module__body">
            <h2 class="headline">{{ talk.title }}</h2>
            <p>
                {% if talk.level is defined %}<span class="label label-primary">{{ talk.level }}</span>{% endif %}
                {% if talk.category is defined %}<span class="label label-warning">{{ talk.category }}</span>{% endif %}
            </p>
            <h5><strong>Submitted by:</strong> <a href="{{ url('admin_speaker_view', { id: talk.user_id }) }}">{{ speaker.first_name }} {{ speaker.last_name }}</a></h5>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#abstract" aria-controls="abstract" role="tab" data-toggle="tab">Abstract</a></li>
                <li role="presentation"><a href="#additional-info" aria-controls="profile" role="tab" data-toggle="tab">Additional Information</a></li>
                <li role="presentation"><a href="#other-talks" aria-controls="messages" role="tab" data-toggle="tab">Other Talks</a></li>
            </ul>

            <div class="tab-content">
                <div role="tabpanel" class="tab-pane active" id="abstract">
                    <p>{{ talk.description|striptags|markdown }}</p>
                    {% if talk.other is defined %}
                        <p><strong>Other Info:</strong> {{ talk.other|striptags|markdown }}</p>
                    {% endif %}
                </div>
                <div role="tabpanel" class="tab-pane" id="additional-info">
                    <p>
                        <strong>Slides:</strong> {% if talk.slides is defined %}{{ talk.slides }}{% endif %}<br />
                        <strong>Type:</strong> {{ talk.type }}<br />
                        <strong>Level:</strong> {% if talk.level is defined %}{{ talk.level }}{% endif %}<br />
                        <strong>Category:</strong> {% if talk.category is defined %}{{ talk.category }}{% endif %}<br />
                        <strong>Desired:</strong> {% if talk.desired is defined %}{{ talk.desired ? 'Yes' : 'No' }}{% endif %}<br />
                        <strong>Sponsor:</strong> {% if talk.sponsor is defined %}{{ talk.sponsor ? 'Yes' : 'No' }}{% endif %}<br />
                    </p>
                </div>
                <div role="tabpanel" class="tab-pane" id="other-talks">
                    {% if otherTalks | length > 0 %}
                        {% for talk in otherTalks %}
                            <a href="{{ url('admin_talk_view', { id: talk.id }) }}">{{ talk.title }}</a><br>
                        {% endfor %}
                    {% endif %}
                </div>
            </div>

            {% if talk.get('comments')|length > 0 %}
                <ul class="comment-list">
                {% for comment in talk.comments %}

                        <li>
                            <img src="/uploads/{{ comment.user.photo_path }}" class="comment-photo" alt="{{ comment.user.first_name }} {{ comment.user.last_name }}">
                            <p>{{ comment.message }}</p>
                            <span class="comment-list__meta">{{ comment.created|date("F jS \\a\\t g:ia") }}</span>

                        </li>
                {% endfor %}
                </ul>
            {% endif %}

            <form role="form" action="{{ url('admin_talk_comment_create', { id: talk.id }) }}" method="post">
                <div class="comment-box">
                    <div class="comment-box__body">
                        <textarea name="comment" class="form-control" id="talk-comment" rows="3" placeholder="Enter Comment..."></textarea>
                    </div>
                    <div class="comment-box__action">
                        <button type="submit" class="btn btn-success">Submit Comment</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
{% endblock %}
{% block scripts %}
    {{ parent() }}
    <script src="/assets/js/admin/talk.js"></script>
{% endblock %}<commit_msg>Show dummy photo avatar in comments if admin user hasn't uploaded an image yet<commit_after>{% extends "layouts/admin.twig" %}
{% block content %}
    <div class="module">
        <nav class="pull-right">
            <ul class="nav nav-action">
                <li><a href="#" id="talk-upvote-{{ talk.id }}" class="js-talk-rating" data-id="{{ talk.id }}" data-rating="1"><i class="fa fa-thumbs-up admin-icon{% if talk_meta.rating == 1 %} admin-icon--selected{% endif %}"></i></a></li>
                <li><a href="#" id="talk-downvote-{{ talk.id }}" class="js-talk-rating" data-id="{{ talk.id }}" data-rating="-1"><i class="fa fa-thumbs-down admin-icon{% if talk_meta.rating == -1 %} admin-icon--selected{% endif %}"></i></a></li>
                <li><a href="#" id="talk-select-{{ talk.id }}" class="js-talk-select" data-id="{{ talk.id }}"><i class="fa fa-check-square admin-icon{% if talk.selected == 1 %} admin-icon--selected{% endif %}"></i></a></li>
            </ul>
        </nav>
        <div class="module__body">
            <h2 class="headline">{{ talk.title }}</h2>
            <p>
                {% if talk.level is defined %}<span class="label label-primary">{{ talk.level }}</span>{% endif %}
                {% if talk.category is defined %}<span class="label label-warning">{{ talk.category }}</span>{% endif %}
            </p>
            <h5><strong>Submitted by:</strong> <a href="{{ url('admin_speaker_view', { id: talk.user_id }) }}">{{ speaker.first_name }} {{ speaker.last_name }}</a></h5>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#abstract" aria-controls="abstract" role="tab" data-toggle="tab">Abstract</a></li>
                <li role="presentation"><a href="#additional-info" aria-controls="profile" role="tab" data-toggle="tab">Additional Information</a></li>
                <li role="presentation"><a href="#other-talks" aria-controls="messages" role="tab" data-toggle="tab">Other Talks</a></li>
            </ul>

            <div class="tab-content">
                <div role="tabpanel" class="tab-pane active" id="abstract">
                    <p>{{ talk.description|striptags|markdown }}</p>
                    {% if talk.other is defined %}
                        <p><strong>Other Info:</strong> {{ talk.other|striptags|markdown }}</p>
                    {% endif %}
                </div>
                <div role="tabpanel" class="tab-pane" id="additional-info">
                    <p>
                        <strong>Slides:</strong> {% if talk.slides is defined %}{{ talk.slides }}{% endif %}<br />
                        <strong>Type:</strong> {{ talk.type }}<br />
                        <strong>Level:</strong> {% if talk.level is defined %}{{ talk.level }}{% endif %}<br />
                        <strong>Category:</strong> {% if talk.category is defined %}{{ talk.category }}{% endif %}<br />
                        <strong>Desired:</strong> {% if talk.desired is defined %}{{ talk.desired ? 'Yes' : 'No' }}{% endif %}<br />
                        <strong>Sponsor:</strong> {% if talk.sponsor is defined %}{{ talk.sponsor ? 'Yes' : 'No' }}{% endif %}<br />
                    </p>
                </div>
                <div role="tabpanel" class="tab-pane" id="other-talks">
                    {% if otherTalks | length > 0 %}
                        {% for talk in otherTalks %}
                            <a href="{{ url('admin_talk_view', { id: talk.id }) }}">{{ talk.title }}</a><br>
                        {% endfor %}
                    {% endif %}
                </div>
            </div>

            {% if talk.get('comments')|length > 0 %}
                <ul class="comment-list">
                {% for comment in talk.comments %}
                    <li>
                        <img src="{{ comment.user.photo_path ? '/uploads/' ~ comment.user.photo_path : '/assets/img/dummyphoto.jpg' }}" class="comment-photo" alt="{{ comment.user.first_name }} {{ comment.user.last_name }}">
                        <p>{{ comment.message }}</p>
                        <span class="comment-list__meta">{{ comment.created|date("F jS \\a\\t g:ia") }}</span>

                    </li>
                {% endfor %}
                </ul>
            {% endif %}

            <form role="form" action="{{ url('admin_talk_comment_create', { id: talk.id }) }}" method="post">
                <div class="comment-box">
                    <div class="comment-box__body">
                        <textarea name="comment" class="form-control" id="talk-comment" rows="3" placeholder="Enter Comment..."></textarea>
                    </div>
                    <div class="comment-box__action">
                        <button type="submit" class="btn btn-success">Submit Comment</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
{% endblock %}
{% block scripts %}
    {{ parent() }}
    <script src="/assets/js/admin/talk.js"></script>
{% endblock %}

{'fraction_non_alphanumeric': 0.19556714471968709, 'fraction_numerical': 0.002406980242703841, 'mean_word_length': 1.8377916903813318, 'pattern_counts': {'":': 0, '<': 231, '<?xml version=': 0, '>': 235, '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': '4017570', 'n_tokens_mistral': 3050, 'n_tokens_neox': 2764, 'n_words': 606}