mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
* added faq management - add/edit/move/hide/delete from website
* moved install pages to twig * load monsters and spells on installation of the AAC
This commit is contained in:
26
system/templates/faq.form.html.twig
Normal file
26
system/templates/faq.form.html.twig
Normal file
@@ -0,0 +1,26 @@
|
||||
<form method="post" action="{{ link }}">
|
||||
{% if action == 'edit' %}
|
||||
<input type="hidden" name="id" value="{{ id }}" />
|
||||
{% endif %}
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
||||
<tr>
|
||||
<td bgcolor="{{ config.vdarkborder }}" class="white"><b>{% if action == 'edit' %}Edit{% else %}Add{% endif %} FAQ</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="{{ config.darkborder }}">
|
||||
<table border="0" cellpadding="1">
|
||||
<tr>
|
||||
<td>Question:</td>
|
||||
<td><input name="question" value="{% if question is not null %}{{ question }}{% endif %}" size="29" maxlength="29"/></td>
|
||||
<tr>
|
||||
<td>Answer:</td>
|
||||
<td><textarea name="answer" maxlength="300" cols="50" rows="5">{% if answer is not null %}{{ answer }}{% endif %}</textarea></td>
|
||||
<tr/>
|
||||
<tr>
|
||||
<td colspan="2" align="center"><input type="submit" value="Submit"/>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
@@ -1,11 +1,16 @@
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||
<tr bgcolor="{{ config.vdarkborder }}">
|
||||
<td class="white">
|
||||
<tr class="white" bgcolor="{{ config.vdarkborder }}">
|
||||
<td>
|
||||
<b>FAQ</b>
|
||||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onclick="toggleAll(); return false;">Toggle all</a>
|
||||
</td>
|
||||
{% if canEdit %}
|
||||
<td style="width: 300px">
|
||||
Options
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% set i = 0 %}
|
||||
{% for faq in faqs %}
|
||||
@@ -13,8 +18,32 @@
|
||||
<tr bgcolor="{{ getStyle(i) }}">
|
||||
<td colspan="2" style="cursor: pointer;" onclick="toggleVisibility('faq_{{ i }}'); return false;">
|
||||
<b>{{ faq.question }}</b>
|
||||
|
||||
<div id="faq_{{ i }}" style="display: none;">{{ faq.answer }}</div>
|
||||
</td>
|
||||
{% if canEdit %}
|
||||
<td>
|
||||
<a href="?subtopic=faq&action=edit&id={{ faq.id }}" title="Edit">
|
||||
<img src="images/edit.png"/>Edit
|
||||
</a>
|
||||
<a id="delete" href="?subtopic=faq&action=delete&id={{ faq.id }}" onclick="return confirm('Are you sure?');" title="Delete">
|
||||
<img src="images/del.png"/>Delete
|
||||
</a>
|
||||
<a href="?subtopic=faq&action=hide&id={{ faq.id }}" title="{% if faq.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
<img src="images/{% if faq.hidden != 1 %}success{% else %}error{% endif %}.png"/>{% if faq.hidden != 1 %}Hide{% else %}Show{% endif %}
|
||||
</a>
|
||||
{% if i != 1 %}
|
||||
<a href="?subtopic=faq&action=moveup&id={{ faq.id }}" title="Move up">
|
||||
<img src="images/icons/arrow_up.gif"/>Move up
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if i != last %}
|
||||
<a href="?subtopic=faq&action=movedown&id={{ faq.id }}" title="Move down">
|
||||
<img src="images/icons/arrow_down.gif"/>Move down
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
27
system/templates/install.admin.html.twig
Normal file
27
system/templates/install.admin.html.twig
Normal file
@@ -0,0 +1,27 @@
|
||||
<form action="{{ constant('BASE_URL') }}install/" method="post" autocomplete="off">
|
||||
<input type="hidden" name="step" id="step" value="finish" />
|
||||
<table>
|
||||
{% if constant('USE_ACCOUNT_NAME') %}
|
||||
{% set type = 'account' %}
|
||||
{% else %}
|
||||
{% set type = 'account_id' %}
|
||||
{% endif %}
|
||||
|
||||
{% for value in [type, 'password'] %}
|
||||
<tr>
|
||||
<td>
|
||||
<label for="vars_{{ value }}">
|
||||
<span>{{ locale['step_admin_' ~ value] }}</span>
|
||||
</label>
|
||||
<br/>
|
||||
<input type="text" name="vars[{{ value }}]" id="vars_{{ value }}"{% if session['var_' ~ value] is not null %} value="{{ session['var_' ~ value] }}"{% endif %}/>
|
||||
</td>
|
||||
<td>
|
||||
<em>{{ locale['step_admin_' ~ value ~ '_desc']|raw }}</em>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{{ buttons|raw }}
|
||||
</form>
|
37
system/templates/install.config.html.twig
Normal file
37
system/templates/install.config.html.twig
Normal file
@@ -0,0 +1,37 @@
|
||||
<form action="{{ constant('BASE_URL') }}install/" method="post" autocomplete="off">
|
||||
<input type="hidden" name="step" id="step" value="database" />
|
||||
<table>
|
||||
{% for value in ['server_path', 'mail_admin', 'mail_address'] %}
|
||||
<tr>
|
||||
<td>
|
||||
<label for="vars_{{ value }}">
|
||||
<span>{{ locale['step_config_' ~ value] }}</span>
|
||||
</label>
|
||||
<br>
|
||||
<input type="text" name="vars[{{ value }}]" id="vars_{{ value }}"{% if session['var_' ~ value] is not null %} value="{{ session['var_' ~ value] }}"{% endif %}/>
|
||||
</td>
|
||||
<td>
|
||||
<em>{{ locale['step_config_' ~ value ~ '_desc'] }}</em>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td>
|
||||
<label for="vars_client">
|
||||
<span>{{ locale.step_config_client }}</span>
|
||||
</label>
|
||||
<br>
|
||||
<select name="vars[client]" id="vars_client">
|
||||
{% for id, version in clients %}
|
||||
<option value="{{ id }}">{{ version }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<em>{{ locale.step_config_client_desc }}</em>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{{ buttons|raw }}
|
||||
</form>
|
6
system/templates/install.license.html.twig
Normal file
6
system/templates/install.license.html.twig
Normal file
@@ -0,0 +1,6 @@
|
||||
<form action="{{ constant('BASE_URL') }}install/" method="post">
|
||||
<input type="hidden" name="step" id="step" value="requirements" />
|
||||
<textarea rows="10" cols="80" readonly="1">{{ license }}</textarea>
|
||||
|
||||
{{ buttons|raw }}
|
||||
</form>
|
12
system/templates/install.welcome.html.twig
Normal file
12
system/templates/install.welcome.html.twig
Normal file
@@ -0,0 +1,12 @@
|
||||
<form action="{{ constant('BASE_URL') }}install/" method="post">
|
||||
<input type="hidden" name="step" id="step" value="license" />
|
||||
<div class="input"><p>{{ locale.step_welcome_desc }}</p>
|
||||
<select name="lang">
|
||||
{% for locale_ in locales %}
|
||||
<option value="{{ locale_.id }}">{{ locale_.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{ buttons|raw }}
|
||||
</form>
|
Reference in New Issue
Block a user