<commit_before>{% extends '::ojsbase.html.twig' %}
{% set hideleft = true %}
{% block title %}{{ 'stats'|trans }} {{ parent() }}{% endblock %}

{% block breadcrumb %}
    {% set list = [
            {'link': path('dashboard'), 'title': 'dashboard'|trans},
            {'title': 'stats'|trans}
    ] %}
    {{ breadcrumb(list) }}
{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    <link rel="stylesheet" href="{{ asset('vendor/c3/c3.min.css') }}"/>
{% endblock %}

{% block body %}
    {% include '::flashbag.html.twig' %}
    <h1>{{ "dashboard.general_stats"|trans }}</h1>
    <ul class="nav nav-tabs" role="tablist">
        <li role="presentation" class="active"><a href="#journal" aria-controls="home" role="tab" data-toggle="tab">{{ "title.journals"|trans }}</a></li>
        <li role="presentation"><a href="#article" aria-controls="home" role="tab" data-toggle="tab">{{ "title.articles"|trans }}</a></li>
        <li role="presentation"><a href="#articleFile" aria-controls="profile" role="tab" data-toggle="tab">{{ "title.article_files"|trans }}</a></li>
        <li role="presentation"><a href="#issueFile" aria-controls="messages" role="tab" data-toggle="tab">{{ "title.issue_files"|trans }}</a></li>
        <li role="presentation"><a href="#applications" aria-controls="messages" role="tab" data-toggle="tab">{{ "title.journal_application"|trans }}</a></li>
        <li role="presentation"><a href="#other" aria-controls="messages" role="tab" data-toggle="tab">{{ "other.statistics"|trans }}</a></li>
        {{ twigEventDispatch({'event_name': 'OJS_ADMIN_STATS_DOI_TABS'})|raw }}
        {{ twigEventDispatch({'event_name': 'OJS_ADMIN_STATS_EXTRA_TABS'})|raw }}
    </ul>

    <div id="statistics" class="tab-content">
        <div role="tabpanel" class="tab-pane fade in active" id="journal">
            <div id="journals"></div>
            <h3>{{ "stats.most_viewed_journals"|trans }}</h3>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#journalMonthly" aria-controls="home" role="tab" data-toggle="tab">{{ "stats.this_month"|trans }}</a></li>
                <li role="presentation"><a href="#journalAllTime" aria-controls="profile" role="tab" data-toggle="tab">{{ "stats.all_time"|trans }}</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active" id="journalMonthly">
                    <table class="table">
                        <thead>
                        <tr>
                            <th>{{ "journal.title"|trans }}</th>
                            <th>{{ "stats.views"|trans }}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for journal in journalsMonthly %}
                            <tr>
                                <td><a href="{{ path('ojs_journal_index',{slug:journal.slug}) }}">{{ journal.title }}</a></td>
                                <td>{{ journal.view }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="journalAllTime">
                    <table class="table">
                        <thead>
                        <tr>
                            <th>{{ "journal.title"|trans }}</th>
                            <th>{{ "stats.views"|trans }}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for journal in journals %}
                            <tr>
                                <td><a href="{{ path('ojs_journal_index',{slug:journal.slug}) }}">{{ journal.title }}</a></td>
                                <td>{{ journal.view }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade in" id="article">
            <div id="articles"></div>
            <h3>{{ "stats.most_viewed_articles"|trans }}</h3>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#articleMonthly" aria-controls="home" role="tab" data-toggle="tab">{{ "stats.this_month"|trans }}</a></li>
                <li role="presentation"><a href="#articleAllTime" aria-controls="profile" role="tab" data-toggle="tab">{{ "stats.all_time"|trans }}</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active" id="articleMonthly">
                    <table class="table">
                        <thead>
                        <tr>
                            <th>{{ "article.title"|trans }}</th>
                            <th>{{ "stats.views"|trans }}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for article in articlesMonthly %}
                            <tr>
                                <td>{{ article.title }}</td>
                                <td>{{ article.view }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="articleAllTime">
                    <table class="table">
                        <thead>
                        <tr>
                            <th>{{ "article.title"|trans }}</th>
                            <th>{{ "stats.views"|trans }}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for article in articles %}
                            <tr>
                                <td>{{ article.title }}</td>
                                <td>{{ article.view }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade" id="articleFile">
            <div id="articleFiles"></div>
            <h3>{{ "stats.most_downloaded_article_files"|trans }}</h3>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#articleFileMonthly" aria-controls="home" role="tab" data-toggle="tab">{{ "stats.this_month"|trans }}</a></li>
                <li role="presentation"><a href="#articleFileAllTime" aria-controls="profile" role="tab" data-toggle="tab">{{ "stats.all_time"|trans }}</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active" id="articleFileMonthly">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.downloads"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for articleFile in articleFilesMonthly %}
                            <tr>
                                <td><a href="{{ path('ojs_site_download_article', {articleFile: articleFile.id}) }}">{{ articleFile.title }}</a></td>
                                <td>{{ articleFile.download }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="articleFileAllTime">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.downloads"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for articleFile in articleFiles %}
                            <tr>
                                <td><a href="{{ path('ojs_site_download_article', {articleFile: articleFile.id}) }}">{{ articleFile.title }}</a></td>
                                <td>{{ articleFile.download }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade" id="issueFile">
            <div id="issueFiles"></div>
            <h3>{{ "stats.most_downloaded_issue_files"|trans }}</h3>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#issueFileMonthly" aria-controls="home" role="tab" data-toggle="tab">{{ "stats.this_month"|trans }}</a></li>
                <li role="presentation"><a href="#issueFileAllTime" aria-controls="profile" role="tab" data-toggle="tab">{{ "stats.all_time"|trans }}</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active" id="issueFileMonthly">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.downloads"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for issueFile in issueFilesMonthly %}
                            <tr>
                                <td><a href="{{ path('ojs_site_download_issue',{issueFile: issueFile.id}) }}"></a>{{ issueFile.title }}</td>
                                <td>{{ issueFile.download }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="issueFileAllTime">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.downloads"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for issueFile in issueFiles %}
                            <tr>
                                <td><a href="{{ path('ojs_site_download_issue',{issueFile: issueFile.id}) }}"></a>{{ issueFile.title }}</td>
                                <td>{{ issueFile.download }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade" id="applications">
            <div id="application"></div>
            <h3>{{ "title.journal_application"|trans }}</h3>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#applicationMonthly" aria-controls="home" role="tab" data-toggle="tab">{{ "monthly"|trans }}</a></li>
                <li role="presentation"><a href="#applicationYearly" aria-controls="profile" role="tab" data-toggle="tab">{{ "yearly"|trans }}</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active" id="applicationMonthly">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.application"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for application in applicationMonthly %}
                            <tr>
                                <td>{{ application.month|slice(0,7) }}</td>
                                <td>{{ application.result_count }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="applicationYearly">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.application"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for application in applicationYearly %}
                            <tr>
                                <td>{{ application.year|slice(0,4) }}</td>
                                <td>{{ application.result_count }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade" id="other">
            <h3>{{ "other.statistics"|trans }}</h3>
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>{{ "status.exited.count"|trans }}</td>
                                <td>{{ exitedJournal.count }}</td>
                            </tr>

                            {% for issue in issuePublish %}
                                <tr>
                                    <td>{{ "journal.count.which.publish.issue.annually"|trans }} ({{ issue.year|slice(0,4) }})</td>
                                    <td>{{ issue.count }}</td>
                                </tr>
                            {% endfor %}
                        </tbody>
                    </table>
        </div>
        {{ twigEventDispatch({
            'event_name': 'OJS_ADMIN_STATS_DOI_CONTENT',
            'doi_article_monthly': (doiArticleMonthly ? doiArticleMonthly : null) ,
            'doi_article_yearly': (doiArticleYearly ? doiArticleYearly : null)
        })|raw }}

        {{ twigEventDispatch({
            'event_name': 'OJS_ADMIN_STATS_EXTRA_CONTENT',
            'doi_journal_monthly':(doiJournalMonthly ? doiJournalMonthly : null),
            'doi_journal_yearly':(doiJournalYearly ? doiJournalYearly : null)
        })|raw }}
    </div>
{% endblock %}

{% block javascripts -%}
    {{ parent() }}

    <script src="{{ asset('vendor/d3/d3.min.js') }}"></script>
    <script src="{{ asset('vendor/c3/c3.min.js') }}"></script>
    <script type="text/javascript">
        var data = {{ stats|raw }};
        analytics.createChart('#journals', data['journalViews']);
        analytics.createChart('#articles', data['articleViews']);
        analytics.createChart('#articleFiles', data['articleFileDownloads']);
        analytics.createChart('#issueFiles', data['issueFileDownloads']);
        analytics.createApplicationChart('#application', data['application']);

        {{ twigEventDispatch({'event_name': 'OJS_ADMIN_STATS_DOI_SCRIPT'})|raw }}
        {{ twigEventDispatch({'event_name': 'OJS_ADMIN_STATS_EXTRA_SCRIPT'})|raw }}
    </script>
{% endblock %}<commit_msg>if doi statistics defined can be shown<commit_after>{% extends '::ojsbase.html.twig' %}
{% set hideleft = true %}
{% block title %}{{ 'stats'|trans }} {{ parent() }}{% endblock %}

{% block breadcrumb %}
    {% set list = [
            {'link': path('dashboard'), 'title': 'dashboard'|trans},
            {'title': 'stats'|trans}
    ] %}
    {{ breadcrumb(list) }}
{% endblock %}

{% block stylesheets %}
    {{ parent() }}
    <link rel="stylesheet" href="{{ asset('vendor/c3/c3.min.css') }}"/>
{% endblock %}

{% block body %}
    {% include '::flashbag.html.twig' %}
    <h1>{{ "dashboard.general_stats"|trans }}</h1>
    <ul class="nav nav-tabs" role="tablist">
        <li role="presentation" class="active"><a href="#journal" aria-controls="home" role="tab" data-toggle="tab">{{ "title.journals"|trans }}</a></li>
        <li role="presentation"><a href="#article" aria-controls="home" role="tab" data-toggle="tab">{{ "title.articles"|trans }}</a></li>
        <li role="presentation"><a href="#articleFile" aria-controls="profile" role="tab" data-toggle="tab">{{ "title.article_files"|trans }}</a></li>
        <li role="presentation"><a href="#issueFile" aria-controls="messages" role="tab" data-toggle="tab">{{ "title.issue_files"|trans }}</a></li>
        <li role="presentation"><a href="#applications" aria-controls="messages" role="tab" data-toggle="tab">{{ "title.journal_application"|trans }}</a></li>
        <li role="presentation"><a href="#other" aria-controls="messages" role="tab" data-toggle="tab">{{ "other.statistics"|trans }}</a></li>
        {{ twigEventDispatch({'event_name': 'OJS_ADMIN_STATS_DOI_TABS'})|raw }}
        {{ twigEventDispatch({'event_name': 'OJS_ADMIN_STATS_EXTRA_TABS'})|raw }}
    </ul>

    <div id="statistics" class="tab-content">
        <div role="tabpanel" class="tab-pane fade in active" id="journal">
            <div id="journals"></div>
            <h3>{{ "stats.most_viewed_journals"|trans }}</h3>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#journalMonthly" aria-controls="home" role="tab" data-toggle="tab">{{ "stats.this_month"|trans }}</a></li>
                <li role="presentation"><a href="#journalAllTime" aria-controls="profile" role="tab" data-toggle="tab">{{ "stats.all_time"|trans }}</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active" id="journalMonthly">
                    <table class="table">
                        <thead>
                        <tr>
                            <th>{{ "journal.title"|trans }}</th>
                            <th>{{ "stats.views"|trans }}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for journal in journalsMonthly %}
                            <tr>
                                <td><a href="{{ path('ojs_journal_index',{slug:journal.slug}) }}">{{ journal.title }}</a></td>
                                <td>{{ journal.view }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="journalAllTime">
                    <table class="table">
                        <thead>
                        <tr>
                            <th>{{ "journal.title"|trans }}</th>
                            <th>{{ "stats.views"|trans }}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for journal in journals %}
                            <tr>
                                <td><a href="{{ path('ojs_journal_index',{slug:journal.slug}) }}">{{ journal.title }}</a></td>
                                <td>{{ journal.view }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade in" id="article">
            <div id="articles"></div>
            <h3>{{ "stats.most_viewed_articles"|trans }}</h3>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#articleMonthly" aria-controls="home" role="tab" data-toggle="tab">{{ "stats.this_month"|trans }}</a></li>
                <li role="presentation"><a href="#articleAllTime" aria-controls="profile" role="tab" data-toggle="tab">{{ "stats.all_time"|trans }}</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active" id="articleMonthly">
                    <table class="table">
                        <thead>
                        <tr>
                            <th>{{ "article.title"|trans }}</th>
                            <th>{{ "stats.views"|trans }}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for article in articlesMonthly %}
                            <tr>
                                <td>{{ article.title }}</td>
                                <td>{{ article.view }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="articleAllTime">
                    <table class="table">
                        <thead>
                        <tr>
                            <th>{{ "article.title"|trans }}</th>
                            <th>{{ "stats.views"|trans }}</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for article in articles %}
                            <tr>
                                <td>{{ article.title }}</td>
                                <td>{{ article.view }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade" id="articleFile">
            <div id="articleFiles"></div>
            <h3>{{ "stats.most_downloaded_article_files"|trans }}</h3>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#articleFileMonthly" aria-controls="home" role="tab" data-toggle="tab">{{ "stats.this_month"|trans }}</a></li>
                <li role="presentation"><a href="#articleFileAllTime" aria-controls="profile" role="tab" data-toggle="tab">{{ "stats.all_time"|trans }}</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active" id="articleFileMonthly">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.downloads"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for articleFile in articleFilesMonthly %}
                            <tr>
                                <td><a href="{{ path('ojs_site_download_article', {articleFile: articleFile.id}) }}">{{ articleFile.title }}</a></td>
                                <td>{{ articleFile.download }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="articleFileAllTime">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.downloads"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for articleFile in articleFiles %}
                            <tr>
                                <td><a href="{{ path('ojs_site_download_article', {articleFile: articleFile.id}) }}">{{ articleFile.title }}</a></td>
                                <td>{{ articleFile.download }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade" id="issueFile">
            <div id="issueFiles"></div>
            <h3>{{ "stats.most_downloaded_issue_files"|trans }}</h3>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#issueFileMonthly" aria-controls="home" role="tab" data-toggle="tab">{{ "stats.this_month"|trans }}</a></li>
                <li role="presentation"><a href="#issueFileAllTime" aria-controls="profile" role="tab" data-toggle="tab">{{ "stats.all_time"|trans }}</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active" id="issueFileMonthly">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.downloads"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for issueFile in issueFilesMonthly %}
                            <tr>
                                <td><a href="{{ path('ojs_site_download_issue',{issueFile: issueFile.id}) }}"></a>{{ issueFile.title }}</td>
                                <td>{{ issueFile.download }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="issueFileAllTime">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.downloads"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for issueFile in issueFiles %}
                            <tr>
                                <td><a href="{{ path('ojs_site_download_issue',{issueFile: issueFile.id}) }}"></a>{{ issueFile.title }}</td>
                                <td>{{ issueFile.download }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade" id="applications">
            <div id="application"></div>
            <h3>{{ "title.journal_application"|trans }}</h3>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#applicationMonthly" aria-controls="home" role="tab" data-toggle="tab">{{ "monthly"|trans }}</a></li>
                <li role="presentation"><a href="#applicationYearly" aria-controls="profile" role="tab" data-toggle="tab">{{ "yearly"|trans }}</a></li>
            </ul>
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active" id="applicationMonthly">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.application"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for application in applicationMonthly %}
                            <tr>
                                <td>{{ application.month|slice(0,7) }}</td>
                                <td>{{ application.result_count }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane fade" id="applicationYearly">
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats.application"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for application in applicationYearly %}
                            <tr>
                                <td>{{ application.year|slice(0,4) }}</td>
                                <td>{{ application.result_count }}</td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade" id="other">
            <h3>{{ "other.statistics"|trans }}</h3>
                    <table class="table">
                        <thead>
                        <tr>
                            <td></td>
                            <td>{{ "stats"|trans }}</td>
                        </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>{{ "status.exited.count"|trans }}</td>
                                <td>{{ exitedJournal.count }}</td>
                            </tr>

                            {% for issue in issuePublish %}
                                <tr>
                                    <td>{{ "journal.count.which.publish.issue.annually"|trans }} ({{ issue.year|slice(0,4) }})</td>
                                    <td>{{ issue.count }}</td>
                                </tr>
                            {% endfor %}
                        </tbody>
                    </table>
        </div>
        {{ twigEventDispatch({
            'event_name': 'OJS_ADMIN_STATS_DOI_CONTENT',
            'doi_article_monthly': doiArticleMonthly is defined ? doiArticleMonthly : null ,
            'doi_article_yearly':  doiArticleYearly is defined ? doiArticleYearly : null
        })|raw }}

        {{ twigEventDispatch({
            'event_name': 'OJS_ADMIN_STATS_EXTRA_CONTENT',
            'doi_journal_monthly':  doiJournalMonthly is defined ? doiJournalMonthly : null,
            'doi_journal_yearly':  doiJournalYearly is defined ? doiJournalYearly : null
        })|raw }}
    </div>
{% endblock %}

{% block javascripts -%}
    {{ parent() }}

    <script src="{{ asset('vendor/d3/d3.min.js') }}"></script>
    <script src="{{ asset('vendor/c3/c3.min.js') }}"></script>
    <script type="text/javascript">
        var data = {{ stats|raw }};
        analytics.createChart('#journals', data['journalViews']);
        analytics.createChart('#articles', data['articleViews']);
        analytics.createChart('#articleFiles', data['articleFileDownloads']);
        analytics.createChart('#issueFiles', data['issueFileDownloads']);
        analytics.createApplicationChart('#application', data['application']);

        {{ twigEventDispatch({'event_name': 'OJS_ADMIN_STATS_DOI_SCRIPT'})|raw }}
        {{ twigEventDispatch({'event_name': 'OJS_ADMIN_STATS_EXTRA_SCRIPT'})|raw }}
    </script>
{% endblock %}
{'fraction_non_alphanumeric': 0.15902004454342986, 'fraction_numerical': 0.0016544702513522113, 'mean_word_length': 1.2103375527426161, 'pattern_counts': {'":': 0, '<': 737, '<?xml version=': 0, '>': 737, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 38, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4667126', 'n_tokens_mistral': 8588, 'n_tokens_neox': 7840, 'n_words': 1496}