HaaseIT/HCSF

View on GitHub
src/views/admin/adminhome.twig

Summary

Maintainability
Test Coverage
<h2>{{ HT('adminhome_title') }}</h2>
<p>{{ HT('adminhome_teaser') }}</p>
<h4>{{ HT('adminhome_phpextensions') }}</h4>

<p>{{ HT('adminhome_phpextensions_filter') }} {{ customdata.filter_enabled ? '<span style="color:green">'~HT('adminhome_enabled') :  '<span style="color:red">'~HT('adminhome_disabled') }}</span>{{ HT('fullstop') }}</p>

<h4>{{ HT('adminhome_directories') }}</h4>

<p>{{ HT('adminhome_templatecache') }} {{ customdata.path_templatecache }} {{ HT('adminhome_directory_2') }}
    {% if customdata.path_templatecache_exists %}
        <span style="color:green">{{ HT('adminhome_yes') }}</span>{{ HT('adminhome_directory_3') }}
        {{ customdata.path_templatecache_writable ? '<span style="color:green">' : '<span style="color:red">'~HT('adminhome_not')~' ' }}{{ HT('adminhome_writable') }}</span>{{ HT('fullstop') }}
    {% else %}
        <span style="color:red">{{ HT('adminhome_no') }}</span>{{ HT('fullstop') }}
    {% endif %}
</p>

<p>{{ HT('adminhome_htmlpurifier') }} {{ customdata.path_purifiercache }} {{ HT('adminhome_directory_2') }}
    {% if customdata.path_purifiercache_exists %}
        <span style="color:green">{{ HT('adminhome_yes') }}</span>{{ HT('adminhome_directory_3') }}
        {{ customdata.path_purifiercache_writable ? '<span style="color:green">' : '<span style="color:red">'~HT('adminhome_not')~' ' }}{{ HT('adminhome_writable') }}</span>{{ HT('fullstop') }}
    {% else %}
        <span style="color:red">{{ HT('adminhome_no') }}</span>{{ HT('fullstop') }}
    {% endif %}
</p>

{% if customdata.enable_module_shop %}
<p>{{ HT('adminhome_log') }} {{ customdata.path_logs }} {{ HT('adminhome_directory_2') }}
    {% if customdata.path_logs_exists %}
    <span style="color:green">{{ HT('adminhome_yes') }}</span>{{ HT('adminhome_directory_3') }}
    {{ customdata.path_logs_writable ? '<span style="color:green">' : '<span style="color:red">'~HT('adminhome_not')~' ' }}{{ HT('adminhome_writable') }}</span>{{ HT('fullstop') }}
    {% else %}
        <span style="color:red">{{ HT('adminhome_no') }}</span>{{ HT('fullstop') }}
    {% endif %}
</p>
{% endif %}

{% if customdata.check_mod_rewrite %}
    <h4>{{ HT('adminhome_apache') }}</h4>
    <p>{{ HT('adminhome_apache_modrewrite') }} {{ customdata.mod_rewrite_available ? '<span style="color:green">' : '<span style="color:red">'~HT('adminhome_not')~' ' }}{{ HT('adminhome_enabled') }}</span>{{ HT('fullstop') }}</p>
{% endif %}

<hr>
<form action="{{ requesturi }}" method="POST" class="pure-form">
    <fieldset>
        <legend>{{ HT('adminhome_encryptiontool') }}</legend>
    <label for="string">{{ HT('adminhome_encryptiontool_label') }}</label><br>
    <input type="text" id="string" name="string" class="col-6" value="{{ gFF("string") }}" autocomplete="off">
        <button type="submit" class="pure-button pure-button-primary col-6">{{ HT('adminhome_encryptiontool_submit') }}</button>
    </fieldset>
</form>

{% if customdata.encrypted_string %}
<p>
    {{ HT('adminhome_encryptiontool_result_1') }} <em>{{ gFF("string") }}</em> {{ HT('adminhome_encryptiontool_result_2') }}<br>
    <form class="pure-form"><input type="text" readonly value="{{ customdata.encrypted_string }}" class="col-6"></form>
</p>
{% endif %}

{{content}}