preparing for re-design using new template-engine for future 0.11.x releases

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-02-15 11:18:19 +01:00
parent 1d7d32130a
commit 56a9a71248
39 changed files with 1685 additions and 1397 deletions

View File

@@ -0,0 +1,12 @@
@charset "UTF-8";
footer {
color: #888;
font-size: 0.75rem !important;
}
footer a,
footer a:active,
footer a:visited {
color: #888;
}

View File

@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html>
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="noindex, nofollow, noarchive"/>
<meta
name="GOOGLEBOT" content="nosnippet"/>
<!-- Bootstrap CSS -->
<link
rel="stylesheet" href="{{ basehref|default("") }}vendor/twbs/bootstrap/dist/css/bootstrap.min.css">
<!-- FontAwesome CSS -->
<link
rel="stylesheet" href="{{ basehref|default("") }}vendor/components/font-awesome/css/all.min.css">
<!-- our css -->
<link href="{{ basehref|default("") }}templates/Froxlor/assets/css/main.css" rel="stylesheet">
{{ theme_css|raw }}
{% block custom_css %}{% endblock %}
<!-- Bootstrap and necessary plugins -->
<script src="{{ basehref|default("") }}vendor/components/jquery/jquery.min.js"></script>
<script src="{{ basehref|default("") }}vendor/twbs/bootstrap/dist/js/bootstrap.min.js"></script>
{{ theme_js|raw }}
{% block custom_js %}{% endblock %}
<title>Froxlor
{% if page_title %}
|
{{ page_title }}
{% endif %}
</title>
</head>
<body>
<div class="container-fluid"> {% block navigation %}{% endblock %}
{{ global_errors|raw }}
{% block body %}{% endblock %}
<footer class="pt-5 pb-5 text-center">
<span><img src="{{ basehref|default("") }}templates/Froxlor/assets/img/logo_grey.png" alt="Froxlor"/>
{% if install_mode is not defined %}
{% if (get_setting('admin.show_version_login') ==
'1' and module == 'Login') or (module != 'Login'
and get_setting('admin.show_version_footer') == '1') %}{% endif %}
{{ call_static('\\Froxlor\\Froxlor', 'getFullVersion') }}
{% endif %}
&copy; 2009-{{ "now"|date("Y") }}
by
<a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a><br/>
{% if install_mode is not defined %}
{% if (get_setting('panel.imprint_url') != '') %}
<a href="{{ get_setting('panel.imprint_url') }}" target="_blank" class="footer-link">{{ lng('imprint') }}</a>
{% endif %}
{% if (get_setting('panel.terms_url') != '') %}
<a href="{{ get_setting('panel.terms_url') }}" target="_blank" class="footer-link">{{ lng('terms') }}</a>
{% endif %}
{% if (get_setting('panel.privacy_url') != '') %}
<a href="{{ get_setting('panel.privacy_url') }}" target="_blank" class="footer-link">{{ lng('privacy') }}</a>
{% endif %}
{% endif %}
</span>
{% if lng('translator') %}
<br/>
<span>{{ lng('panel.translator') }}:
{{ lng('translator') }}
{% endif %}
</footer>
</div>
</body>
</body>
</html>

View File

@@ -0,0 +1,88 @@
<!-- language select -->
<form action="{{ pagecontent.form.formaction }}" method="get">
<div class="row mb-3">
<label for="language" class="col-sm-4 col-form-label">{{ lng('install.language') }}</label>
<div class="col-sm-8">
<select class="form-select" id="language" name="language">
{% for lngfile,lngname in pagecontent.form.languages %}
<option value="{{ lngfile }}" {% if lngfile == pagecontent.form.activelang %} selected="selected" {% endif %}>{{ lngname }}</option>
{% endfor %}
</select>
</div>
</div>
<aside class="text-end">
<input type="hidden" name="check" value="1"/>
<button class="btn btn-sm btn-primary" type="submit" name="chooselang">{{ lng('install.lngbtn_go') }}</button>
</aside>
</form>
<!-- main install form -->
<div class="alert alert-primary mt-md-3" role="alert">{{ lng('install.welcometext')|raw }}</div>
{% if pagecontent.form.result is not empty %}
<div class="alert alert-warning" role="alert">
{% for emsg in pagecontent.form.result %}
<p>{{ emsg }}</p>
{% endfor %}
</div>
{% endif %}
<form action="{{ pagecontent.form.formaction }}" method="post">
{% for fdata in pagecontent.form.data %}
<fieldset>
<legend>{{ fdata.title }}</legend>
{% for field in fdata.fields %}
{% if field is iterable %}
{% if field.type is defined %}
{% if field.type == 'text' or field.type == 'password' %}
<div class="row mb-3">
<label for="{{ field.id }}" class="col-sm-4 col-form-label">{{ field.label|raw }}</label>
<div class="col-sm-8">
<input type="{{ field.type }}" class="form-control {% if field.style == 'red' %}is-invalid{% endif %}" id="{{ field.id }}" name="{{ field.name }}" value="{{ field.value }}" {% if field.required %} required {% endif %}/>
</div>
</div>
{% elseif field.type == 'select' %}
<div class="row mb-3">
<label for="{{ field.id }}" class="col-sm-4 col-form-label">{{ field.label|raw }}</label>
<div class="col-sm-8">
<select class="form-select {% if field.style == 'red' %}is-invalid{% endif %}" id="{{ field.id }}" name="{{ field.name }}" {% if field.required %} required {% endif %}>
{% for opts in field.options %}
<option value="{{ opts.value }}" {% if opts.selected %} selected="selected" {% endif %}>{{ opts.label }}</option>
{% endfor %}
</select>
</div>
</div>
{% elseif field.type == 'checkbox' %}
<div class="row mb-3">
<label for="{{ field.id }}" class="col-sm-4 col-form-label">{{ field.label|raw }}</label>
<div class="col-sm-8">
<div class="form-check form-switch">
<input class="form-check-input {% if field.style == 'red' %}is-invalid{% endif %}" type="checkbox" value="{{ field.value }}" id="{{ field.id }}" name="{{ field.name }}" {% if field.checked %} checked="checked" {% endif %}>
</div>
</div>
</div>
{% endif %}
{% else %}
<div class="row mb-3">
<label class="col-sm-4 col-form-label">{{ field.label|raw }}</label>
<div class="col-sm-8">
{% for radios in field.fields %}
<div class="form-check">
<input class="form-check-input {% if field.style == 'red' %}is-invalid{% endif %}" type="radio" name="{{ radios.name }}" id="{{ radios.id }}" value="{{ radios.value }}" {% if radios.checked %}checked="checked"{% endif %}>
<label class="form-check-label" for="{{ radios.id }}">
{{ radios.label }}
</label>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</fieldset>
{% endfor %}
<aside class="text-end mt-3">
<input type="hidden" name="check" value="1"/>
<input type="hidden" name="language" value="{{ pagecontent.form.activelang }}"/>
<input type="hidden" name="installstep" value="1"/>
<button class="btn btn-lg btn-success" type="submit" name="submitbutton">{{ lng('click_here_to_continue') }}
&raquo;</button>
</aside>
</form>

View File

@@ -0,0 +1,53 @@
{% extends "Froxlor/base.html.twig" %}
{% block body %}
<div class="container p-3 bg-light border border-top-0">
<img src="{{ basehref|default('') }}templates/Froxlor/assets/img/logo.png" alt="Froxlor Server Management Panel"/>
<section class="mt-4">
<h3 class="text-center mb-3">{{ pagetitle }}</h3>
{% if pagecontent.checks is defined or pagecontent.installprocess is defined %}
<table class="table table-borderless table-sm">
{% if pagecontent.checks is defined %}
{% set checks = pagecontent.checks %}
{% else %}
{% set checks = pagecontent.installprocess %}
{% endif %}
{% for check in checks %}
<tr class="{% if check.result == 1 %}table-danger{% elseif check.result == 2 %}table-warning{% endif %}">
<td class="w-75" scope="row">{{ check.title }}</td>
<td class="col-auto text-end{% if check.result == 0 %} text-success{% endif %}">
<span class="d-none d-md-inline">{{ check.result_txt }}</span>
{% if check.result == 0 %}&nbsp;&check;{% elseif check.result == 2 %}<span class="d-md-none">&nbsp;???</span>{% elseif check.result == 1 %}<span class="d-md-none">&nbsp;!!!</span>
{% endif %}
</td>
</tr>
{% if check.result_desc is not empty %}
<tr>
<td colspan="2" class="text-end">
<small>{{ check.result_desc|raw }}</span>
</td>
</tr>
</small>
</td>
</tr>
{% endif %}
{% endfor %}
</table>
{% elseif pagecontent.form is defined %}
{% include "Froxlor/install/form.html.twig" %}
{% else %}
<div class="alert alert-warning" role="alert">
{{ pagecontent }}
</div>
{% endif %}
{% if pagenavigation is not empty %}
<div class="row pt-md-3">
<div class="col-12 col-md-8 d-flex align-items-center">
<h4 class="p-0 m-0 text-{% if pagenavigation.bad %}danger{% else %}success{% endif %}">{{ pagenavigation.message }}</h4>
</div>
<div class="col-12 col-md-4 text-end mt-4 mt-md-0">
<a class="btn btn-lg btn-block btn-{% if pagenavigation.bad %}warning{% else %}success{% endif %}" href="{{ pagenavigation.link}}">{{ pagenavigation.linktext }}
&raquo;</a>
</div>
</div>
{% endif %}</section></div>{% endblock %}

View File

@@ -0,0 +1,23 @@
{% extends "Froxlor/base.html.twig" %}
{% block body %}
<div class="alert alert-{{ type }} fade show" role="alert">
<h4 class="alert-heading">
{{ heading }}
</h4>
<p>
{{ alert_msg|raw }}
</p>
{% if alert_info %}
<hr>
<p class="mb-0">
<pre>{{ alert_info|raw }}</pre>
</p>
{% endif %}
{% if redirect_link %}
<p class="mt-1 text-center">
<a href="{{ redirect_link }}" class="btn btn-{{ type }}">{% if type == 'danger' %}{{ lng('panel.back') }}{% else %}{{ lng('success.clickheretocontinue') }}{% endif %}</a>
</p>
{% endif %}
</div>
{% endblock %}

View File

@@ -0,0 +1,17 @@
{% extends "Froxlor/base.html.twig" %}
{% block body %}
<div class="container my-auto">
<div class="alert alert-primary fade show" role="alert">
<h4 class="alert-heading">
Welcome to froxlor
</h4>
<p>It seems that Froxlor has not been installed yet.</p>
<p>Click on the link below to start the installation.</p>
<hr>
<p class="mt-1 text-center">
<a href="./install/install.php" class="btn btn-primary" title="Click to start the install process">Start install</a>
</p>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,20 @@
{% extends "Froxlor/base.html.twig" %}
{% block body %}
<div class="container my-auto">
<div class="alert alert-warning fade show" role="alert">
<h4 class="alert-heading">
Whoops!
</h4>
<p>The configuration file <b>lib/userdata.inc.php</b> cannot be read from the webserver.</p>
<p>This mostly happens due to wrong ownership.<br />Try the following command to correct the ownership:</p>
<p class="mb-0">
<pre>chown -R {{ user }}:{{ group }} {{ installdir }}</pre>
</p>
<hr>
<p class="mt-1 text-center">
<a href="./install/install.php" class="btn btn-primary" title="Click to start the install process">Start install</a>
</p>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="noindex, nofollow, noarchive" />
<meta name="GOOGLEBOT" content="nosnippet" />
<!-- Bootstrap CSS (external) -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<title>Froxlor - Error</title>
</head>
<body>
<div class="container-fluid">
<div class="container my-auto">
<div class="alert alert-danger fade show" role="alert">
<h4 class="alert-heading">
Whoops!
</h4>
<p>It seems you are using an older version of PHP</p>
<p>Froxlor requires at least PHP version <FROXLOR_PHPMIN><br />The installed version is:
<CURRENT_VERSION>
</p>
<hr>
<p class="mt-1 text-center">
<a href="index.php" class="btn btn-primary" title="Click to refresh">Refresh</a>
</p>
</div>
</div>
<footer class="pt-5 pb-5 text-center">
<span><img src="templates/Froxlor/assets/img/logo_grey.png" alt="Froxlor" />
&copy; 2009-<CURRENT_YEAR> by <a href="http://www.froxlor.org/" rel="external">the Froxlor
Team</a><br />
</span>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js"
integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF"
crossorigin="anonymous"></script>
</body>
</html>

View File

@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="robots" content="noindex, nofollow, noarchive" />
<meta name="GOOGLEBOT" content="nosnippet" />
<!-- Bootstrap CSS (external) -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<title>Froxlor - Error</title>
</head>
<body>
<div class="container-fluid">
<div class="container my-auto">
<div class="alert alert-danger fade show" role="alert">
<h4 class="alert-heading">
Whoops!
</h4>
<p>It seems you are missing some required files.</p>
<p>Froxlor uses composer for its external requirements. Try the following command to install them:</p>
<p class="mb-0">
cd <FROXLOR_INSTALL_DIR> && composer install --no-dev</pre>
</p>
<hr>
<p class="mt-1 text-center">
<a href="index.php" class="btn btn-primary" title="Click to refresh">Refresh</a>
</p>
</div>
</div>
<footer class="pt-5 pb-5 text-center">
<span><img src="templates/Froxlor/assets/img/logo_grey.png" alt="Froxlor" />
&copy; 2009-<CURRENT_YEAR> by <a href="http://www.froxlor.org/" rel="external">the Froxlor
Team</a><br />
</span>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js"
integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF"
crossorigin="anonymous"></script>
</body>
</html>