<commit_before>{% extends 'base.html' %}

{% load i18n %}
{% load django_bootstrap_breadcrumbs %}
{% load tags %}
{% load astrobin_apps_premium_tags %}
{% load staticfiles %}

{% block title %}{% trans "Upload" %}{% endblock %}

{% block breadcrumbs %}
    {{ block.super }}
    {% breadcrumb 'Upload' None %}
{% endblock %}

{% block content %}
    {% if READONLY_MODE %}
        {% include 'readonly_mode.html' %}
    {% else %}
        <div class="page-header text-center">
            <h1>{% trans "Image upload" %}</h1>
        </div>

        {% if premium_has_inactive_subscription %}
            <div class="row">
                <div class="span10 offset1">
                    <div class="alert alert-warning">
                        <h4 class="alert-header">
                            <i class="icon-warning-sign"></i>
                            {% trans "Warning!" %}
                        </h4>
                        {% trans "Your Lite or Premium subscription is not active, or it has expired. If you have just subscribed, please wait for a few minutes. Thanks for your patience!" %}
                    </div>
                </div>
            </div>
        {% endif %}

        <div class="row section">
            <div class="span10 offset1">
                {% if premium_used_percent > -1 %}
                    <div class="progress {{ premium_progress_class }}">
                        <div class="bar" style="width:{{ premium_used_percent }}%"></div>
                    </div>
                {% endif %}

                <p class="text-center">
                    {% if user|is_free %}
                        {% blocktrans trimmed with premium_counter=user.userprofile.premium_counter max_allowed=PREMIUM_MAX_IMAGES_FREE_2020 %}
                            You have used <strong>{{ premium_counter }}</strong> images of your allowed
                            <strong>{{ max_allowed }}</strong>.{% endblocktrans %}
                    {% elif user|is_lite %}
                        {% blocktrans trimmed with premium_counter=user.userprofile.premium_counter max_allowed=PREMIUM_MAX_IMAGES_LITE %}
                            You have used <strong>{{ premium_counter }}</strong> images of your allowed
                            <strong>{{ max_allowed }}</strong>.{% endblocktrans %}
                    {% elif user|is_lite_2020 %}
                        {% blocktrans trimmed with premium_counter=user.userprofile.premium_counter max_allowed=PREMIUM_MAX_IMAGES_LITE_2020 %}
                            You have used <strong>{{ premium_counter }}</strong> images of your allowed
                            <strong>{{ max_allowed }}</strong>.{% endblocktrans %}
                    {% endif %}

                    {% if user|is_premium or user|is_premium_2020 or user|is_ultimate_2020 %}
                        {% blocktrans %}Thank you for being a premium member! Enjoy your unlimited images.
                        {% endblocktrans %}
                    {% endif %}


                    {% if not user|is_any_ultimate %}
                        <a href="{% url 'subscription_list' %}">
                            {% trans "Would you like to upgrade to a higher plan?" %}
                        </a>
                    {% endif %}
                </p>
            </div>
        </div>

        {% if upload_form %}
            <div class="row section">
                <div class="span10 offset1">

                    {% if request.user|is_any_ultimate %}
                        <div class="alert alert-info">
                            {% blocktrans trimmed with url="https://app.astrobin.com/uploader" %}
                                Try the <a href="{{ url }}">new beta uploader</a>: robust, with real progress bar, and 4 GB file size limit!
                            {% endblocktrans %}
                        </div>
                    {% endif %}

                    <div class="upload-forms">
                        <div class="upload-form wip-form-box">
                            <div class="upload-form-inner">
                                <h3>{% trans "Upload as a work in progress" %}</h3>
                                <div class="loading"><img src="{% static 'astrobin/images/ajax-loader.gif' %}" alt="" />
                                </div>
                                <form action="{% url 'image_upload_process' %}" method="post"
                                      enctype="multipart/form-data"> {% csrf_token %}
                                    <input type="file" name="image_file" class="file" id="id_file" />
                                    <input class="btn btn-primary" type="submit" value="{% trans "Upload" %}" />
                                    <input type="hidden" name="wip" value="" />
                                </form>
                                <div class="progressbar"><img src="{% static 'astrobin/images/loading-bar.gif' %}"
                                                              alt="{% trans "Uploading..." %}" /></div>
                                <p>
                                    {% blocktrans %}Use this button to upload an image to the
                                        <strong>Staging Area</strong>. It's perfect for works in progress that you want
                                        to share on Internet forums. Read more in the
                                        <a href="https://welcome.astrobin.com/faq">FAQ</a>.{% endblocktrans %}
                                </p>
                            </div> <!-- upload-form-inner -->
                        </div> <!-- wip-form-box --><commit_msg>(uploader) Let Premium subscribers (pre 2020) in on the new uploader<commit_after>{% extends 'base.html' %}

{% load i18n %}
{% load django_bootstrap_breadcrumbs %}
{% load tags %}
{% load astrobin_apps_premium_tags %}
{% load staticfiles %}

{% block title %}{% trans "Upload" %}{% endblock %}

{% block breadcrumbs %}
    {{ block.super }}
    {% breadcrumb 'Upload' None %}
{% endblock %}

{% block content %}
    {% if READONLY_MODE %}
        {% include 'readonly_mode.html' %}
    {% else %}
        <div class="page-header text-center">
            <h1>{% trans "Image upload" %}</h1>
        </div>

        {% if premium_has_inactive_subscription %}
            <div class="row">
                <div class="span10 offset1">
                    <div class="alert alert-warning">
                        <h4 class="alert-header">
                            <i class="icon-warning-sign"></i>
                            {% trans "Warning!" %}
                        </h4>
                        {% trans "Your Lite or Premium subscription is not active, or it has expired. If you have just subscribed, please wait for a few minutes. Thanks for your patience!" %}
                    </div>
                </div>
            </div>
        {% endif %}

        <div class="row section">
            <div class="span10 offset1">
                {% if premium_used_percent > -1 %}
                    <div class="progress {{ premium_progress_class }}">
                        <div class="bar" style="width:{{ premium_used_percent }}%"></div>
                    </div>
                {% endif %}

                <p class="text-center">
                    {% if user|is_free %}
                        {% blocktrans trimmed with premium_counter=user.userprofile.premium_counter max_allowed=PREMIUM_MAX_IMAGES_FREE_2020 %}
                            You have used <strong>{{ premium_counter }}</strong> images of your allowed
                            <strong>{{ max_allowed }}</strong>.{% endblocktrans %}
                    {% elif user|is_lite %}
                        {% blocktrans trimmed with premium_counter=user.userprofile.premium_counter max_allowed=PREMIUM_MAX_IMAGES_LITE %}
                            You have used <strong>{{ premium_counter }}</strong> images of your allowed
                            <strong>{{ max_allowed }}</strong>.{% endblocktrans %}
                    {% elif user|is_lite_2020 %}
                        {% blocktrans trimmed with premium_counter=user.userprofile.premium_counter max_allowed=PREMIUM_MAX_IMAGES_LITE_2020 %}
                            You have used <strong>{{ premium_counter }}</strong> images of your allowed
                            <strong>{{ max_allowed }}</strong>.{% endblocktrans %}
                    {% endif %}

                    {% if user|is_premium or user|is_premium_2020 or user|is_ultimate_2020 %}
                        {% blocktrans %}Thank you for being a premium member! Enjoy your unlimited images.
                        {% endblocktrans %}
                    {% endif %}


                    {% if not user|is_any_ultimate %}
                        <a href="{% url 'subscription_list' %}">
                            {% trans "Would you like to upgrade to a higher plan?" %}
                        </a>
                    {% endif %}
                </p>
            </div>
        </div>

        {% if upload_form %}
            <div class="row section">
                <div class="span10 offset1">

                    {% if request.user|is_any_ultimate or request.user|is_premium %}
                        <div class="alert alert-info">
                            {% blocktrans trimmed with url="https://app.astrobin.com/uploader" %}
                                Try the <a href="{{ url }}">new beta uploader</a>: robust, with real progress bar, and 4 GB file size limit!
                            {% endblocktrans %}
                        </div>
                    {% endif %}

                    <div class="upload-forms">
                        <div class="upload-form wip-form-box">
                            <div class="upload-form-inner">
                                <h3>{% trans "Upload as a work in progress" %}</h3>
                                <div class="loading"><img src="{% static 'astrobin/images/ajax-loader.gif' %}" alt="" />
                                </div>
                                <form action="{% url 'image_upload_process' %}" method="post"
                                      enctype="multipart/form-data"> {% csrf_token %}
                                    <input type="file" name="image_file" class="file" id="id_file" />
                                    <input class="btn btn-primary" type="submit" value="{% trans "Upload" %}" />
                                    <input type="hidden" name="wip" value="" />
                                </form>
                                <div class="progressbar"><img src="{% static 'astrobin/images/loading-bar.gif' %}"
                                                              alt="{% trans "Uploading..." %}" /></div>
                                <p>
                                    {% blocktrans %}Use this button to upload an image to the
                                        <strong>Staging Area</strong>. It's perfect for works in progress that you want
                                        to share on Internet forums. Read more in the
                                        <a href="https://welcome.astrobin.com/faq">FAQ</a>.{% endblocktrans %}
                                </p>
                            </div> <!-- upload-form-inner -->
                        </div> <!-- wip-form-box -->
{'fraction_non_alphanumeric': 0.1218274111675127, 'fraction_numerical': 0.007176614738316121, 'mean_word_length': 1.2681619690353314, 'pattern_counts': {'":': 0, '<': 143, '<?xml version=': 0, '>': 145, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 32, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1439462', 'n_tokens_mistral': 3049, 'n_tokens_neox': 2634, 'n_words': 714}