<commit_before>{% extends "base.html" %}
{% load i18n %}
{% load comments %}

{% block title %}{% trans "View Proposal Set" %}{% endblock %}
{% block logo %}<a href="{{ get_place.get_absolute_url }}"><img src="{{ MEDIA_URL }}/{{ get_place.logo }}" /></a>{% endblock %}
{% block banner %}<img src="{{ MEDIA_URL }}/{{ get_place.banner }}" />{% endblock %}

{% block extrajs %}
    <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
    <script type="text/javascript">
        function upvote(proposal) {
            var request = $.ajax({
                type: "POST",
                url: "../../support/",
                data: { propid: proposal },
               success: function(data)
               {
               $("div.span1 button").attr('disabled', 'disabled');
               }

            });

            request.fail(function(jqXHR, textStatus) {
                $("#jsnotify").notify("create", {
                    title:"Couldn't vote the proposal",
                    text:"There has been an error." + textStatus,
                    icon:"alert.png"
                });
            })
        }
    </script>
{% endblock %}



{% block content %}

    <div class="row">
        <div class="span8">
            {% for p in proposalset %}
                <div id="proposal-wrapper">
                    {% if perms.proposals.add_proposal %}
                        <div id="tools">
                            <a href="{% url 'select_set' get_place.url %}"><img src="{{ STATIC_URL }}/assets/icons/add16.png" alt="{% trans 'Add proposal' %}" title="{% trans 'Add proposal' %}"/></a> 
                            {% if perms.proposals.change_proposal %}
                                <a href="{% url 'edit-proposal' get_place.url p.id %}"><img src="{{ STATIC_URL }}/assets/icons/edit16.png" alt="{% trans 'Edit' %}" title="{% trans 'Edit' %}"/></a> 
                            {% endif %}
                            {% if perms.proposals.delete_proposal %}
                                <a href="{% url 'delete-proposal' get_place.url p.id %}"><img src="{{ STATIC_URL }}/assets/icons/delete16.png" alt="{% trans 'Delete' %}" title="{% trans 'Delete' %}"/></a>
                            {% endif %}
                        </div>
                    {% endif %}

                    <div class="span1">
                        <p style="line-height:30px;font-size:30px;margin-left:5px;">{{ p.support_votes__count }}</p>
                        <button style="margin-left:-15px;" onclick="upvote({{ p.id }})" class="btn btn-small" {% if user in p.support_votes.all %}disabled="disabled"{% endif %}>{% trans "support" %}</button>
                    </div>

                    <!-- Here goes the voting button -->
                    <div id="proposal">
                        <div class="title"><a href="{{ p.get_absolute_url }}">{{ p.title }}</a></div>
                        <div class="message">{{ p.message|truncatewords:12 }}</div>
                        {% get_comment_count for p as comment_count %}
                        <div class="creator">{% trans "proposed by " %} <a href="{% url 'profile_public' p.author %}">{{ p.author }}</a> {% trans " at " %} {{ p.pub_date|date:"j/m/Y G:i" }} | <a href="{{ p.get_absolute_url }}">{{ comment_count }} {% trans "comments" %}</a></div>
                    </div>
                    {% comment %}
                        The following div is to make the wrapper to wrap everything.
                    {% endcomment %}
                    <div style="clear:left;"></div>
                </div>
            {% empty %}
                <p>{% trans "There is no proposals in this set" %}.</p>
            {% endfor %}
    
            <hr />
            <a href="{% url 'space-index' get_place.url %}" class="btn small">&laquo; {% trans "Go back" %}</a>
  
            {% if is_paginated %}
                <div class="pagination">
                    <span class="page-links">
                        {% if page_obj.has_previous %}<commit_msg>Ticket #25 Solved<commit_after>{% extends "base.html" %}
{% load i18n %}
{% load comments %}

{% block title %}{% trans "View Proposal Set" %}{% endblock %}
{% block logo %}<a href="{{ get_place.get_absolute_url }}"><img src="{{ MEDIA_URL }}/{{ get_place.logo }}" /></a>{% endblock %}
{% block banner %}<img src="{{ MEDIA_URL }}/{{ get_place.banner }}" />{% endblock %}

{% block extrajs %}
    <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
    <script type="text/javascript">
        function upvote(proposal) {
            var request = $.ajax({
                type: "POST",
                url: "../../support/",
                data: { propid: proposal },
               success: function(data)
               {
               $("div.span1 button").attr('disabled', 'disabled');
               }

            });

            request.fail(function(jqXHR, textStatus) {
                $("#jsnotify").notify("create", {
                    title:"Couldn't vote the proposal",
                    text:"There has been an error." + textStatus,
                    icon:"alert.png"
                });
            })
        }
    </script>
{% endblock %}



{% block content %}

    <div class="row">
        <div class="span8">
            {% for p in proposalset %}
                <div id="proposal-wrapper">
                    {% if perms.proposals.add_proposal %}
                        <div id="tools">
                            <a href="{% url 'select_set' get_place.url %}"><img src="{{ STATIC_URL }}/assets/icons/add16.png" alt="{% trans 'Add proposal' %}" title="{% trans 'Add proposal' %}"/></a> 
                            {% if perms.proposals.change_proposal %}
                                <a href="{% url 'edit-proposal' get_place.url p.id %}"><img src="{{ STATIC_URL }}/assets/icons/edit16.png" alt="{% trans 'Edit' %}" title="{% trans 'Edit' %}"/></a> 
                            {% endif %}
                            {% if perms.proposals.delete_proposal %}
                                <a href="{% url 'delete-proposal' get_place.url p.id %}"><img src="{{ STATIC_URL }}/assets/icons/delete16.png" alt="{% trans 'Delete' %}" title="{% trans 'Delete' %}"/></a>
                            {% endif %}
                        </div>
                    {% endif %}

                    <div class="span1">
                        <p style="line-height:30px;font-size:30px;margin-left:5px;">{{ p.support_votes.count }}</p>
                        <button style="margin-left:-15px;" onclick="upvote({{ p.id }})" class="btn btn-small" {% if user in p.support_votes.all %}disabled="disabled"{% endif %}>{% trans "support" %}</button>
                    </div>

                    <!-- Here goes the voting button -->
                    <div id="proposal">
                        <div class="title"><a href="{{ p.get_absolute_url }}">{{ p.title }}</a></div>
                        <div class="message">{{ p.message|truncatewords:12 }}</div>
                        {% get_comment_count for p as comment_count %}
                        <div class="creator">{% trans "proposed by " %} <a href="{% url 'profile_public' p.author %}">{{ p.author }}</a> {% trans " at " %} {{ p.pub_date|date:"j/m/Y G:i" }} | <a href="{{ p.get_absolute_url }}">{{ comment_count }} {% trans "comments" %}</a></div>
                    </div>
                    {% comment %}
                        The following div is to make the wrapper to wrap everything.
                    {% endcomment %}
                    <div style="clear:left;"></div>
                </div>
            {% empty %}
                <p>{% trans "There is no proposals in this set" %}.</p>
            {% endfor %}
    
            <hr />
            <a href="{% url 'space-index' get_place.url %}" class="btn small">&laquo; {% trans "Go back" %}</a>
  
            {% if is_paginated %}
                <div class="pagination">
                    <span class="page-links">
                        {% if page_obj.has_previous %}
{'fraction_non_alphanumeric': 0.18001733316825555, 'fraction_numerical': 0.005199950476662127, 'mean_word_length': 1.5693384223918576, 'pattern_counts': {'":': 0, '<': 109, '<?xml version=': 0, '>': 109, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6962926', 'n_tokens_mistral': 2487, 'n_tokens_neox': 2207, 'n_words': 528}