<commit_before>{% extends "idea/idea-base.html" %}

{% load comments %}
{% load mptt_tags %}

{% block "content" %}

        <div id="content" class="idea-single ic" role="main">
            <div class="row">
                <div class="logo span7 section project-title">
                    <a href="{% url 'idea:idea_list' %}">IdeaBox</a>
                </div><!-- /logo -->
            </div>
            <section id="main" class="main-content">
                <div class="idea-votes span">
                    <div class="count">{{voters|length}}</div>
                    <div class="phrase">Like{{voters|pluralize:",s"}}</div>
                    <div class="action">
                        {% load comments %}
                        {% if idea.state.name == 'Archive' %}
                            <span class="btn btn-archive">Archived</span>
                        {% elif support %}
                            <span class="btn btn-voted">Liked</span>
                        {% else %}
                            <form action="{% url 'idea:upvote_idea' %}" method=POST>
                                {% csrf_token %}
                                <input type="hidden" name="idea_id" value="{{idea.id}}"/>
                                <input type="hidden" name="next" value="{% url 'idea:idea_detail' idea.id %}"/>
                                <input type="submit" class="btn btn-vote" value="Like" id="vote_up"/>
                            </form>
                        {% endif %}
                    </div><!-- /bitton -->
                </div><!-- /idea-votes -->
                <article class="single-idea-entry span">
                    <div class="row span9">
                        <div class="idea-title-wrap">
                            <header class="idea-title">
                                <h1>{{idea.title}}</h1>
                            </header>
		            {% if idea.banner %}
                                <span class="idea-banner">
                                    Challenge:
                                    <a href="{% url "idea:banner_detail" idea.banner.id %}">{{idea.banner.title}}</a>
			        </span>
			    {% endif %}
                        </div><!-- /idea-title-wrap -->
                    </div><!-- /row -->
                    <div class="row body">
                        <div class="idea-entry-content span9">
                            <h4 class="summary">Summary</h4><p>{{idea.summary|urlize|linebreaksbr}}</p>
                            <h4 class="detail">Detail</h4><p>{{idea.text|urlize|linebreaksbr}}</p>
                            Posted by
                            {% if idea.get_creator_profile %}
                            <span class="author"><a href="{{idea.get_creator_profile.get_absolute_url}}">{{idea.creator.first_name}} {{idea.creator.last_name}}</a></span>
                            {% else %}
                            <span class="author">{{idea.creator.first_name}} {{idea.creator.last_name}} </span>
                            {% endif %}
                            on {{idea.time|date:"M d, Y "}}
                            {% if idea.creator == request.user %}
                                <span class="edit">
                                    <span class="edit-separator">|</span>
                                    <a href="{% url "idea:edit_idea" idea.id %}">Edit my Idea</a>
                                </span>
                            {% endif %}
                            {% get_comment_list for idea.idea idea.id as comment_list %}
                            <div id="comments" class="comments">                            
                            <div class="comment-total">
                                <h4>{{comment_list|length}} Comments</h4>
                            </div><!-- /comment-total -->
                            <div class="comments-wrap">
                                <div class="comment-form">
                                    {% get_comment_form for idea as comment_form %}
                                    <form action="{% comment_form_target %}" method="POST">
                                        <label class="comment-label" for="id_comment">Enter your Comments</label>
                                    {%csrf_token%}
                                    {{comment_form.comment}}
                                    {{comment_form.content_type}}
                                    {{comment_form.object_pk}}
                                    {{comment_form.timestamp}}
                                    {{comment_form.security_hash}}
                                        <input type="hidden" name="parent" id="parent_id" value="" />
                                        <input type="hidden" name = "next" value="{% url 'idea:idea_detail' idea.id %}" />
                                        <input type="submit" class="btn right" value="Submit" id="id_submit" />
                                    </form>
                                </div><!-- /comment-form -->
                                <ol class="comment-list">
                                    {% recursetree comment_list %}
                                    <li class="comment">
                                        <article>
                                            <footer class="comment-meta">
                                            {% if idea.get_creator_profile %}
                                                <p class="comment-author"><a href="{{node.user.get_profile.get_absolute_url}}">{{node.user_name}}</a><span class="comment-date"> on {{node.submit_date|date:"M d, Y g:i A"}}</span>
                                                {% comment %} use parent_id if present, forces max comment depth of 2 {% endcomment %}
                                                | <a href="#c{{ node.id }}" data-comment-id="{% if node.parent_id %}{{ node.parent_id }}{% else %}{{ node.id }}{% endif %}" class="comment_reply_link">Reply</a></p>
                                            {% else %}
                                                <p class="comment-author">{{node.user_name}}<span class="comment-date"> on {{node.submit_date|date:"M d, Y g:i A"}}</span>
                                                {% comment %} use parent_id if present, forces max comment depth of 2 {% endcomment %}
                                                | <a href="#c{{ node.id }}" data-comment-id="{% if node.parent_id %}{{ node.parent_id }}{% else %}{{ node.id }}{% endif %}" class="comment_reply_link">Reply</a></p>
                                            {% endif %}
                                            </footer><!-- /comment-meta -->
                                            <div class="comment-content">
                                                <p>{{node.comment}}</p>
                                            </div><!-- /comment-content -->
                                            {% if not node.is_leaf_node %}
                                                <ol class="comment-list">
                                                    {{ children }}
                                                </ol>
                                            {% endif %}
                                        </article>
                                    </li>
                                    {% endrecursetree %}
                                </ol><!-- /comments-list --><commit_msg>IN-619: Added hyperlinks and line breaks to commenting<commit_after>{% extends "idea/idea-base.html" %}

{% load comments %}
{% load mptt_tags %}

{% block "content" %}

        <div id="content" class="idea-single ic" role="main">
            <div class="row">
                <div class="logo span7 section project-title">
                    <a href="{% url 'idea:idea_list' %}">IdeaBox</a>
                </div><!-- /logo -->
            </div>
            <section id="main" class="main-content">
                <div class="idea-votes span">
                    <div class="count">{{voters|length}}</div>
                    <div class="phrase">Like{{voters|pluralize:",s"}}</div>
                    <div class="action">
                        {% load comments %}
                        {% if idea.state.name == 'Archive' %}
                            <span class="btn btn-archive">Archived</span>
                        {% elif support %}
                            <span class="btn btn-voted">Liked</span>
                        {% else %}
                            <form action="{% url 'idea:upvote_idea' %}" method=POST>
                                {% csrf_token %}
                                <input type="hidden" name="idea_id" value="{{idea.id}}"/>
                                <input type="hidden" name="next" value="{% url 'idea:idea_detail' idea.id %}"/>
                                <input type="submit" class="btn btn-vote" value="Like" id="vote_up"/>
                            </form>
                        {% endif %}
                    </div><!-- /bitton -->
                </div><!-- /idea-votes -->
                <article class="single-idea-entry span">
                    <div class="row span9">
                        <div class="idea-title-wrap">
                            <header class="idea-title">
                                <h1>{{idea.title}}</h1>
                            </header>
		            {% if idea.banner %}
                                <span class="idea-banner">
                                    Challenge:
                                    <a href="{% url "idea:banner_detail" idea.banner.id %}">{{idea.banner.title}}</a>
			        </span>
			    {% endif %}
                        </div><!-- /idea-title-wrap -->
                    </div><!-- /row -->
                    <div class="row body">
                        <div class="idea-entry-content span9">
                            <h4 class="summary">Summary</h4><p>{{idea.summary|urlize|linebreaksbr}}</p>
                            <h4 class="detail">Detail</h4><p>{{idea.text|urlize|linebreaksbr}}</p>
                            Posted by
                            {% if idea.get_creator_profile %}
                            <span class="author"><a href="{{idea.get_creator_profile.get_absolute_url}}">{{idea.creator.first_name}} {{idea.creator.last_name}}</a></span>
                            {% else %}
                            <span class="author">{{idea.creator.first_name}} {{idea.creator.last_name}} </span>
                            {% endif %}
                            on {{idea.time|date:"M d, Y "}}
                            {% if idea.creator == request.user %}
                                <span class="edit">
                                    <span class="edit-separator">|</span>
                                    <a href="{% url "idea:edit_idea" idea.id %}">Edit my Idea</a>
                                </span>
                            {% endif %}
                            {% get_comment_list for idea.idea idea.id as comment_list %}
                            <div id="comments" class="comments">                            
                            <div class="comment-total">
                                <h4>{{comment_list|length}} Comments</h4>
                            </div><!-- /comment-total -->
                            <div class="comments-wrap">
                                <div class="comment-form">
                                    {% get_comment_form for idea as comment_form %}
                                    <form action="{% comment_form_target %}" method="POST">
                                        <label class="comment-label" for="id_comment">Enter your Comments</label>
                                    {%csrf_token%}
                                    {{comment_form.comment}}
                                    {{comment_form.content_type}}
                                    {{comment_form.object_pk}}
                                    {{comment_form.timestamp}}
                                    {{comment_form.security_hash}}
                                        <input type="hidden" name="parent" id="parent_id" value="" />
                                        <input type="hidden" name = "next" value="{% url 'idea:idea_detail' idea.id %}" />
                                        <input type="submit" class="btn right" value="Submit" id="id_submit" />
                                    </form>
                                </div><!-- /comment-form -->
                                <ol class="comment-list">
                                    {% recursetree comment_list %}
                                    <li class="comment">
                                        <article>
                                            <footer class="comment-meta">
                                            {% if idea.get_creator_profile %}
                                                <p class="comment-author"><a href="{{node.user.get_profile.get_absolute_url}}">{{node.user_name}}</a><span class="comment-date"> on {{node.submit_date|date:"M d, Y g:i A"}}</span>
                                                {% comment %} use parent_id if present, forces max comment depth of 2 {% endcomment %}
                                                | <a href="#c{{ node.id }}" data-comment-id="{% if node.parent_id %}{{ node.parent_id }}{% else %}{{ node.id }}{% endif %}" class="comment_reply_link">Reply</a></p>
                                            {% else %}
                                                <p class="comment-author">{{node.user_name}}<span class="comment-date"> on {{node.submit_date|date:"M d, Y g:i A"}}</span>
                                                {% comment %} use parent_id if present, forces max comment depth of 2 {% endcomment %}
                                                | <a href="#c{{ node.id }}" data-comment-id="{% if node.parent_id %}{{ node.parent_id }}{% else %}{{ node.id }}{% endif %}" class="comment_reply_link">Reply</a></p>
                                            {% endif %}
                                            </footer><!-- /comment-meta -->
                                            <div class="comment-content">
                                                <p>{{node.comment|urlize|linebreaksbr}}</p>
                                            </div><!-- /comment-content -->
                                            {% if not node.is_leaf_node %}
                                                <ol class="comment-list">
                                                    {{ children }}
                                                </ol>
                                            {% endif %}
                                        </article>
                                    </li>
                                    {% endrecursetree %}
                                </ol><!-- /comments-list -->
{'fraction_non_alphanumeric': 0.1374379344587885, 'fraction_numerical': 0.0019198940748096657, 'mean_word_length': 0.9285075960679178, 'pattern_counts': {'":': 0, '<': 229, '<?xml version=': 0, '>': 229, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 126, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7040871', 'n_tokens_mistral': 3586, 'n_tokens_neox': 3260, 'n_words': 641}