<commit_before>{% extends 'document_upload_base.html' %}
{% load static %}
{% load kala_tags %}
{% load pagination_tags %}

{% block projects_class %}active{% endblock %}

{% block content %}
    <div class="span12">
        <div class="breadcrumb">
            <li><a href="{% url 'home' %}">Home</a> <span class="divider">/</span></li>
            <li><a href="{% url 'projects' %}">Projects</a> <span class="divider">/</span></li>
            <li class="active">
                {{ project }}
            </li>
            {%  if user.is_admin %}
                <a id="edit-permissions" href="{% url 'permissions' project.pk %}">- Edit Permissions</a>
            {% endif %}
            <li>

            </li>
        </div>
    </div>

    <div class="span8">
        <div class="widget">
            <div id="documents" class="widget-header">
                <i class="icon-edit"></i>

                <h3>{{ project.name }}
                </h3>
            </div>
            <!-- /widget-header -->
            <div  class="widget-content">
                {% autopaginate documents %}
                <p>
                    {% paginate %}
                </p>
                {% for document in documents %}
                    <div style="clear: both;">
                        <div style="float: left">
                            <img
                                    {% if forloop.first %}
                                        id="document-image"
                                    {% endif %}
                                        src="{% static document.get_icon %}" alt="{{ document.get_alt }}"
                                        style="width: 64px; height: 64px;"/>
                        </div>

                        <div style="margin-left: 75px;">
                            <h3
                                    {% if forloop.first %}
                                        id="document-name"
                                    {% endif %}>
                                {{ document.name }}

                                {% if document.file %}
                                    <a
                                            {% if forloop.first %}
                                                id="document-download"
                                            {% endif %}
                                                href="{% url 'download_document' document.uuid %}">
                                        <i class="icon-download-alt" style="font-size: 16pt;"></i>
                                    </a>
                                {% else %}
                                    <a href="{% url 'basecamp_download_document' document.uuid %}"><i
                                            class="icon-cloud-download" style="font-size: 16pt;"></i></a>
                                    - <a href="{% url 'basecamp_download_document' document.uuid %}">Retrieve from
                                    Basecamp</a>
                                {% endif %}

                            </h3>

                            {% if document.description %}
                                <h4 {% if forloop.first %}
                                    id="document-description"
                                {% endif %}>
                                    {{ document.description }}
                                </h4>
                            {% endif %}

                            {% if forloop.first %}
                                <span id="document-owner"></span>
                            {% endif %}
                            by {{ document.person|pretty_user }}
                            {% if forloop.first %}
                                <span id="document-created"></span>
                            {% endif %}
                            on {{ document.date|date:"M j, Y" }} -
                            {% if document.file %}
                                {{ document.file.size|filesizeformat }}
                            {% endif %}
                            <a
                                    {% if forloop.first %}
                                        id="document-edit"
                                    {% endif %}
                                        href="{% url 'document' document.pk %}">Add Version</a>
                            <ul>
                                {% for version in document.list_versions %}
                                    <li>
                                        <a href="{% url 'download_document' version.uuid %}">{{ version }}</a>
                                    </li>
                                {% endfor %}
                            </ul>
                        </div>
                    </div>
                {% empty %}
                    There are no documents for this project. Use the form on this page to create a new document.
                {% endfor %}
                <p>
                    {% paginate %}
                </p>
            </div>
            <!-- /widget-content -->
        </div>
        <!-- /widget -->
    </div>
    <div class="span4">
        <div class="widget">
            <div class="widget-header">
                <h3 id="new-document">Upload New Document</h3>
            </div>
            <!-- /widget-header -->
            <div class="widget-content">
                {% include 'document_upload_form.html' %}
            </div>
        </div>
    </div>

    <div class="span4">
        <div class="widget">
            <div class="widget-header">
                <h3 id="new-document">Sort By</h3>
            </div>
            <!-- /widget-header -->
            <div class="widget-content">

                <form method="get" action="{% url 'project' project.pk %}">
                    <div id="description" class="control-group">
                        <div class="controls">
                            <div style="margin-left: 20px;">
                                {% for choice in sort_form.search %}
                                    {{ choice.choice_label }}: {{ choice.tag }}<br/>
                                {% endfor %}
                            </div>
                        </div>
                    </div>


                    <div id="description" class="control-group">
                        <div class="controls">
                            <div style="margin-left: 20px;">
                                <label class="control-label" for="id_category">Filter by Category:</label>
                                {{ categories_form.category }}
                            </div>
                        </div>
                    </div>

                    <div class="form-actions">
                        <button type="submit" class="button btn btn-primary btn-large">
                            Sort Documents
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    {% if request.user.is_admin %}
        <div class="span4">
            <div class="widget">
                <div class="widget-header">
                    <h3 id="new-document">Move Project</h3>
                </div>
                <!-- /widget-header -->
                <div class="widget-content">

                    <p>To move the project to another company you may use the form below.</p>

                    <form method="post" action="{% url 'project' project.pk %}">
                        {% csrf_token %}
                        <div id="description" class="control-group">
                            <div class="controls">
                                <div style="margin-left: 20px;">
                                    <label class="control-label" for="id_category">Company:</label>
                                    {{ company_form.company }}
                                </div>
                            </div>
                        </div>
                        <div class="form-actions">
                            <button type="submit" class="button btn btn-primary btn-large" name="move">Move
                                Project
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>

        <div class="span4">
            <div class="widget">
                <div class="widget-header">
                    <h3 id="new-document">Delete Project</h3>
                </div>
                <!-- /widget-header -->
                <div class="widget-content">

                    <p>To delete this project, click on the button below. You can retrieve the project by using
                        the "Project Retrieval" on the Projects page.</p>

                    <form method="post" action="{% url 'project' project.pk %}">
                        {% csrf_token %}
                        <div class="form-actions">
                            <button type="submit" class="button btn btn-danger btn-large" name="delete">Delete
                                Project
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    {% endif %}
{% endblock content %}

{% block tour %}
    <ol id="joyRideContent" style="display: none">
        <li data-id="documents">
            <p>If there are documents available for this project they will be listed below.</p>
        </li>

        <li data-id="document-image">
            <p>This image represents the type of file that has been uploaded, ie. word, powerpoint, etc...</p>
        </li>
        <li data-id="document-name">
            <p>This is the name of the document as it will appear on your computer.</p>
        </li>
        <li data-id="document-download">
            <p>To download the document, you can click on this link.</p>
        </li>
        <li data-id="document-description">
            <p>This is the textual description of the changes/purpose of this document.</p>
        </li>
        <li data-id="document-owner">
            <p>This is the name of the person that uploaded this document.</p>
        </li>
        <li data-id="document-created">
            <p>This is the date that this version of the document was uploaded.</p>
        </li>
        <li data-id="document-edit">
            <p>You can use this link to upload a new version of this document.</p>
        </li>

        {% if request.user.is_admin %}
            <li data-id="edit-permissions">
                <p>If you want to add or remove people from the project, you can do so by clicking on the edit
                    permissions.</p>
            </li>
        {% endif %}
        <li data-id="new-document">
            <p>To create a new document, you can use the form below.</p>
        </li>
        <li data-id="id_file">
            <p>Select the file that you wish to upload by clicking on the browse button. This will bring up a file
                picker dialog, which you can use to select the document from your computer.</p>
        </li>
        <li data-id="id_description">
            <p>The description of a new document should either describe the original intents of a document, or the
                changes that you have made to an existing document.</p>
        </li>
        <li data-id="upload">
            <p>When you are ready to create a new document, click the Create Document button and the document will be
                created. You will come back to this page once the document has been created.</p>
        </li>
    </ol>
{% endblock tour %}
<commit_msg>- Remove pagination stuff.<commit_after>{% extends 'document_upload_base.html' %}
{% load static %}
{% load kala_tags %}

{% block projects_class %}active{% endblock %}

{% block content %}
    <div class="span12">
        <div class="breadcrumb">
            <li><a href="{% url 'home' %}">Home</a> <span class="divider">/</span></li>
            <li><a href="{% url 'projects' %}">Projects</a> <span class="divider">/</span></li>
            <li class="active">
                {{ project }}
            </li>
            {%  if user.is_admin %}
                <a id="edit-permissions" href="{% url 'permissions' project.pk %}">- Edit Permissions</a>
            {% endif %}
            <li>

            </li>
        </div>
    </div>

    <div class="span8">
        <div class="widget">
            <div id="documents" class="widget-header">
                <i class="icon-edit"></i>

                <h3>{{ project.name }}
                </h3>
            </div>
            <!-- /widget-header -->
            <div  class="widget-content">
                {% for document in documents %}
                    <div style="clear: both;">
                        <div style="float: left">
                            <img
                                    {% if forloop.first %}
                                        id="document-image"
                                    {% endif %}
                                        src="{% static document.get_icon %}" alt="{{ document.get_alt }}"
                                        style="width: 64px; height: 64px;"/>
                        </div>

                        <div style="margin-left: 75px;">
                            <h3
                                    {% if forloop.first %}
                                        id="document-name"
                                    {% endif %}>
                                {{ document.name }}

                                {% if document.file %}
                                    <a
                                            {% if forloop.first %}
                                                id="document-download"
                                            {% endif %}
                                                href="{% url 'download_document' document.uuid %}">
                                        <i class="icon-download-alt" style="font-size: 16pt;"></i>
                                    </a>
                                {% else %}
                                    <a href="{% url 'basecamp_download_document' document.uuid %}"><i
                                            class="icon-cloud-download" style="font-size: 16pt;"></i></a>
                                    - <a href="{% url 'basecamp_download_document' document.uuid %}">Retrieve from
                                    Basecamp</a>
                                {% endif %}

                            </h3>

                            {% if document.description %}
                                <h4 {% if forloop.first %}
                                    id="document-description"
                                {% endif %}>
                                    {{ document.description }}
                                </h4>
                            {% endif %}

                            {% if forloop.first %}
                                <span id="document-owner"></span>
                            {% endif %}
                            by {{ document.person|pretty_user }}
                            {% if forloop.first %}
                                <span id="document-created"></span>
                            {% endif %}
                            on {{ document.date|date:"M j, Y" }} -
                            {% if document.file %}
                                {{ document.file.size|filesizeformat }}
                            {% endif %}
                            <a
                                    {% if forloop.first %}
                                        id="document-edit"
                                    {% endif %}
                                        href="{% url 'document' document.pk %}">Add Version</a>
                            <ul>
                                {% for version in document.list_versions %}
                                    <li>
                                        <a href="{% url 'download_document' version.uuid %}">{{ version }}</a>
                                    </li>
                                {% endfor %}
                            </ul>
                        </div>
                    </div>
                {% empty %}
                    There are no documents for this project. Use the form on this page to create a new document.
                {% endfor %}

            </div>
            <!-- /widget-content -->
        </div>
        <!-- /widget -->
    </div>
    <div class="span4">
        <div class="widget">
            <div class="widget-header">
                <h3 id="new-document">Upload New Document</h3>
            </div>
            <!-- /widget-header -->
            <div class="widget-content">
                {% include 'document_upload_form.html' %}
            </div>
        </div>
    </div>

    <div class="span4">
        <div class="widget">
            <div class="widget-header">
                <h3 id="new-document">Sort By</h3>
            </div>
            <!-- /widget-header -->
            <div class="widget-content">

                <form method="get" action="{% url 'project' project.pk %}">
                    <div id="description" class="control-group">
                        <div class="controls">
                            <div style="margin-left: 20px;">
                                {% for choice in sort_form.search %}
                                    {{ choice.choice_label }}: {{ choice.tag }}<br/>
                                {% endfor %}
                            </div>
                        </div>
                    </div>


                    <div id="description" class="control-group">
                        <div class="controls">
                            <div style="margin-left: 20px;">
                                <label class="control-label" for="id_category">Filter by Category:</label>
                                {{ categories_form.category }}
                            </div>
                        </div>
                    </div>

                    <div class="form-actions">
                        <button type="submit" class="button btn btn-primary btn-large">
                            Sort Documents
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    {% if request.user.is_admin %}
        <div class="span4">
            <div class="widget">
                <div class="widget-header">
                    <h3 id="new-document">Move Project</h3>
                </div>
                <!-- /widget-header -->
                <div class="widget-content">

                    <p>To move the project to another company you may use the form below.</p>

                    <form method="post" action="{% url 'project' project.pk %}">
                        {% csrf_token %}
                        <div id="description" class="control-group">
                            <div class="controls">
                                <div style="margin-left: 20px;">
                                    <label class="control-label" for="id_category">Company:</label>
                                    {{ company_form.company }}
                                </div>
                            </div>
                        </div>
                        <div class="form-actions">
                            <button type="submit" class="button btn btn-primary btn-large" name="move">Move
                                Project
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>

        <div class="span4">
            <div class="widget">
                <div class="widget-header">
                    <h3 id="new-document">Delete Project</h3>
                </div>
                <!-- /widget-header -->
                <div class="widget-content">

                    <p>To delete this project, click on the button below. You can retrieve the project by using
                        the "Project Retrieval" on the Projects page.</p>

                    <form method="post" action="{% url 'project' project.pk %}">
                        {% csrf_token %}
                        <div class="form-actions">
                            <button type="submit" class="button btn btn-danger btn-large" name="delete">Delete
                                Project
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    {% endif %}
{% endblock content %}

{% block tour %}
    <ol id="joyRideContent" style="display: none">
        <li data-id="documents">
            <p>If there are documents available for this project they will be listed below.</p>
        </li>

        <li data-id="document-image">
            <p>This image represents the type of file that has been uploaded, ie. word, powerpoint, etc...</p>
        </li>
        <li data-id="document-name">
            <p>This is the name of the document as it will appear on your computer.</p>
        </li>
        <li data-id="document-download">
            <p>To download the document, you can click on this link.</p>
        </li>
        <li data-id="document-description">
            <p>This is the textual description of the changes/purpose of this document.</p>
        </li>
        <li data-id="document-owner">
            <p>This is the name of the person that uploaded this document.</p>
        </li>
        <li data-id="document-created">
            <p>This is the date that this version of the document was uploaded.</p>
        </li>
        <li data-id="document-edit">
            <p>You can use this link to upload a new version of this document.</p>
        </li>

        {% if request.user.is_admin %}
            <li data-id="edit-permissions">
                <p>If you want to add or remove people from the project, you can do so by clicking on the edit
                    permissions.</p>
            </li>
        {% endif %}
        <li data-id="new-document">
            <p>To create a new document, you can use the form below.</p>
        </li>
        <li data-id="id_file">
            <p>Select the file that you wish to upload by clicking on the browse button. This will bring up a file
                picker dialog, which you can use to select the document from your computer.</p>
        </li>
        <li data-id="id_description">
            <p>The description of a new document should either describe the original intents of a document, or the
                changes that you have made to an existing document.</p>
        </li>
        <li data-id="upload">
            <p>When you are ready to create a new document, click the Create Document button and the document will be
                created. You will come back to this page once the document has been created.</p>
        </li>
    </ol>
{% endblock tour %}

{'fraction_non_alphanumeric': 0.12071342409098743, 'fraction_numerical': 0.003188006203687748, 'mean_word_length': 0.9567563011042738, 'pattern_counts': {'":': 0, '<': 433, '<?xml version=': 0, '>': 433, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 120, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '948469', 'n_tokens_mistral': 5700, 'n_tokens_neox': 5124, 'n_words': 1437}