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

{% load i18n %}
{% load cache %}
{% load comments %}
{% load markup %}
{% load humanize %}
{% load tagging_tags %}
{% load pubmantags %}
{% load thumbnail %}

{% block scripts %}

<link rel="stylesheet" type="text/css" media="screen" href="{{MEDIA_URL}}pubman/js/share/share.css" />
<script src="{{MEDIA_URL}}pubman/js/share/share.js" type="text/javascript"></script>
<script type="text/javascript">iBeginShare.base_url = '{{MEDIA_URL}}pubman/js/share/';</script>

{% if print_this %}
    <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}pubman/css/printreadypage.css" />
{% endif %}


{% endblock %}


{% block title %}
{% cache settings.CACHE_PERIOD article_title_cache request.LANGUAGE_CODE %}
{{ settings.SITE_NAME }} - {{ object.title }}
{% endcache %}
{% endblock %}

{% block content %}

{% with object as article %}

    {% if messages and not print_this %}
        <div class="messages">
            <ul>
                {% for message in messages %}
                    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|safe }}</li>
                {% endfor %}
            </ul>
        </div>
    {% endif %}


    {% if user_can_edit and not print_this %}
        <a href="{% url admin:pubman_article_change article.id %}">{% trans "Edit" %}</a>
    {% endif %}

    {% cache settings.CACHE_PERIOD article_content_cache article.id article_lang page_obj.number %}
    <div class="article">

        {% if available_languages|length > 1 %}
        <div id="available-languages">

            <ul>
            {% trans "You may also read this article in" %}:
            {% for lang in available_languages %}

                {# Very strange, but unless I do it like this, the reverse url call fails #}
                {% url translated_article article.slug lang.0 as the_url %}

                {% ifnotequal lang.0 article_lang %}
                <li>
                    {% if article.language == lang.0 %}
                        <a href="{% url pubman.views.article_detail article.slug %}">
                    {% else %}
                        <a href="{{ the_url }}">
                    {% endif %}
                    {{lang.1}}
                    </a>
                </li>
                {% endifnotequal %}

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

        <h1>{{ article.title }}</h1>

        {% if article.subtitle %}
            <h2>{{ article.subtitle }}</h2>
        {% endif %}

        {% ifequal page_obj.number 1 %}

            <p class="byline">
            {% with article.full_author_list as authorlist %}
                {% if authorlist %}
                    {% trans "By" %} {{article.full_author_list }}
                {% endif %}
            {% endwith %}
            </p>
            <p class="dateline">
            {% trans "Published" %}: {{article.date_published}},
            {% trans "Last updated" %}: {{article.date_last_edited}}
            </p>
            {% if translated %}
            <p class="translation">
                {% trans "Translated" %}
                {% if translator_list %}
                     {% trans "by" %} {{translator_list}}
                {% endif %}
                {% trans "on" %} {{translation_date}}
            </p>
            {% endif %}
            <div class="blurb">
            {% format_content article.blurb article.text_format %}
            </div>

            <div id="primary-image">
              {% if article.image %}
              
                  {% thumbnail article.image "300x300" crop="center" as im %}
                    <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" title="{{article.caption}}">
                  {% endthumbnail %}              
                  {% if article.caption %}
                    <div class="caption">
                      {{article.caption|safe}}
                    </div>
                  {% endif %}
              {% else %}
                    {% display_media article.primary_media_object 300 300 "" 1 1 article_lang %}
              {% endif %}
            </div>

        {% else %}

            <p class="page_no">{% trans "Page" %} {{page_obj.number}} {% trans "of" %} {{paginator.num_pages}}

        {% endifequal %}

        {% if article.primary_pullout_quote %}
            <div id="primary-pullquote">
                <blockquote class="pullquote"}>{{article.primary_pullout_quote}}</blockquote>
            </div>
        {% endif %}

        <div id="article-text">

        {% format_content page_obj.object_list.0.article_text article.text_format %}

        </div>

        {% ifnotequal paginator.num_pages 1 %}

            <p class="pager">

            {% if page_obj.has_previous %}
                <a href="{{article.get_absolute_url}}?page={{page_obj.previous_page_number}}{% if story %}&story={{story.slug}}{% endif %}">&laquo;{% trans "Previous" %}</a>
            {% endif %}

            {% for page in paginator.page_range %}

                {% ifequal page page_obj.number %}
                    {{page}}
                {% else %}
                    <a href="{{article.get_absolute_url}}?page={{page}}{% if story %}&story={{story.slug}}{% endif %}">{{page}}</a>
                {% endifequal %}

            {% endfor %}

            {% if page_obj.has_next %}
                <a href="{{article.get_absolute_url}}?page={{page_obj.next_page_number}}{% if story %}&story={{story.slug}}{% endif %}">{% trans "Next" %}&raquo;</a>
            {% endif %}

            </p>

        {% endifnotequal %}

        {% if not print_this %}

            <div id="tag_comment_line">
                {% include "pubman/tag_lineup_snippet.html" %}

                <span id="sharing">

                {% if settings.ISHARE %}
                    <span id="share-tool">
                    <script type="text/javascript">
                        iBeginShare.attachLink('share-tool', {
                            link: '{{request.build_absolute_uri}}',
                            title: '{{article.title}}',
                            link_style: 'button'
                        });
                    </script>
                    </span>
                {% endif %}

                {% if print_this_button %}
                    <a href="?print=true">
                    <img src="{{MEDIA_URL}}pubman/js/share/images/icons/print.gif"
                        title="Layout this article for a printer" height="16"/>
                    </a>
                {% endif %}

                </span><commit_msg>Replaced iShare with addtoany.<commit_after>{% extends "base.html" %}

{% load i18n %}
{% load cache %}
{% load comments %}
{% load markup %}
{% load humanize %}
{% load tagging_tags %}
{% load pubmantags %}
{% load thumbnail %}

{% block scripts %}

<link rel="stylesheet" type="text/css" media="screen" href="{{MEDIA_URL}}pubman/js/share/share.css" />
<script src="{{MEDIA_URL}}pubman/js/share/share.js" type="text/javascript"></script>
<script type="text/javascript">iBeginShare.base_url = '{{MEDIA_URL}}pubman/js/share/';</script>

{% if print_this %}
    <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}pubman/css/printreadypage.css" />
{% endif %}


{% endblock %}


{% block title %}
{% cache settings.CACHE_PERIOD article_title_cache request.LANGUAGE_CODE %}
{{ settings.SITE_NAME }} - {{ object.title }}
{% endcache %}
{% endblock %}

{% block content %}

{% with object as article %}

    {% if messages and not print_this %}
        <div class="messages">
            <ul>
                {% for message in messages %}
                    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|safe }}</li>
                {% endfor %}
            </ul>
        </div>
    {% endif %}


    {% if user_can_edit and not print_this %}
        <a href="{% url admin:pubman_article_change article.id %}">{% trans "Edit" %}</a>
    {% endif %}

    {% cache settings.CACHE_PERIOD article_content_cache article.id article_lang page_obj.number %}
    <div class="article">

        {% if available_languages|length > 1 %}
        <div id="available-languages">

            <ul>
            {% trans "You may also read this article in" %}:
            {% for lang in available_languages %}

                {# Very strange, but unless I do it like this, the reverse url call fails #}
                {% url translated_article article.slug lang.0 as the_url %}

                {% ifnotequal lang.0 article_lang %}
                <li>
                    {% if article.language == lang.0 %}
                        <a href="{% url pubman.views.article_detail article.slug %}">
                    {% else %}
                        <a href="{{ the_url }}">
                    {% endif %}
                    {{lang.1}}
                    </a>
                </li>
                {% endifnotequal %}

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

        <h1>{{ article.title }}</h1>

        {% if article.subtitle %}
            <h2>{{ article.subtitle }}</h2>
        {% endif %}

        {% ifequal page_obj.number 1 %}

            <p class="byline">
            {% with article.full_author_list as authorlist %}
                {% if authorlist %}
                    {% trans "By" %} {{article.full_author_list }}
                {% endif %}
            {% endwith %}
            </p>
            <p class="dateline">
            {% trans "Published" %}: {{article.date_published}},
            {% trans "Last updated" %}: {{article.date_last_edited}}
            </p>
            {% if translated %}
            <p class="translation">
                {% trans "Translated" %}
                {% if translator_list %}
                     {% trans "by" %} {{translator_list}}
                {% endif %}
                {% trans "on" %} {{translation_date}}
            </p>
            {% endif %}
            <div class="blurb">
            {% format_content article.blurb article.text_format %}
            </div>

            <div id="primary-image">
              {% if article.image %}
              
                  {% thumbnail article.image "300x300" crop="center" as im %}
                    <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" title="{{article.caption}}">
                  {% endthumbnail %}              
                  {% if article.caption %}
                    <div class="caption">
                      {{article.caption|safe}}
                    </div>
                  {% endif %}
              {% else %}
                    {% display_media article.primary_media_object 300 300 "" 1 1 article_lang %}
              {% endif %}
            </div>

        {% else %}

            <p class="page_no">{% trans "Page" %} {{page_obj.number}} {% trans "of" %} {{paginator.num_pages}}

        {% endifequal %}

        {% if article.primary_pullout_quote %}
            <div id="primary-pullquote">
                <blockquote class="pullquote"}>{{article.primary_pullout_quote}}</blockquote>
            </div>
        {% endif %}

        <div id="article-text">

        {% format_content page_obj.object_list.0.article_text article.text_format %}

        </div>

        {% ifnotequal paginator.num_pages 1 %}

            <p class="pager">

            {% if page_obj.has_previous %}
                <a href="{{article.get_absolute_url}}?page={{page_obj.previous_page_number}}{% if story %}&story={{story.slug}}{% endif %}">&laquo;{% trans "Previous" %}</a>
            {% endif %}

            {% for page in paginator.page_range %}

                {% ifequal page page_obj.number %}
                    {{page}}
                {% else %}
                    <a href="{{article.get_absolute_url}}?page={{page}}{% if story %}&story={{story.slug}}{% endif %}">{{page}}</a>
                {% endifequal %}

            {% endfor %}

            {% if page_obj.has_next %}
                <a href="{{article.get_absolute_url}}?page={{page_obj.next_page_number}}{% if story %}&story={{story.slug}}{% endif %}">{% trans "Next" %}&raquo;</a>
            {% endif %}

            </p>

        {% endifnotequal %}

        {% if not print_this %}

            <div id="tag_comment_line">
                {% include "pubman/tag_lineup_snippet.html" %}

                <span id="sharing">

                {% if print_this_button %}
                    <a href="?print=true">
                    <img src="{{MEDIA_URL}}pubman/js/share/images/icons/print.gif"
                        title="Layout this article for a printer" height="16"/>
                    </a>
                {% endif %}


                {% if settings.ISHARE %}
                    <!-- Lockerz Share BEGIN -->
                    <div class="a2a_kit a2a_default_style">
                        <a class="a2a_dd" href="http://www.addtoany.com/share_save">Share</a>
                        <span class="a2a_divider"></span>
                        <a class="a2a_button_facebook"></a>
                        <a class="a2a_button_twitter"></a>
                        <a class="a2a_button_email"></a>
                    </div>
                    <script type="text/javascript" src="http://static.addtoany.com/menu/page.js"></script>
                    <!-- Lockerz Share END -->
                {% endif %}

                </span>
{'fraction_non_alphanumeric': 0.15836364986264756, 'fraction_numerical': 0.004974385626252877, 'mean_word_length': 1.5564623268172328, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 0, '>': 149, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '6530092', 'n_tokens_mistral': 4220, 'n_tokens_neox': 3567, 'n_words': 763}