diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-03 06:26:17 -0400 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-03 06:26:17 -0400 |
| commit | 424de7561dcd1476c64f42f86af2a42fa2c39814 (patch) | |
| tree | 08d90c8e61385430c1b3b5ac79b22bb7c32a7167 /templates/mod/config-editor-php.html | |
| parent | eb3fc990f5f743d02e6474ca35405aebcab6c0e2 (diff) | |
Web config editor: board configs
Diffstat (limited to 'templates/mod/config-editor-php.html')
| -rw-r--r-- | templates/mod/config-editor-php.html | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/templates/mod/config-editor-php.html b/templates/mod/config-editor-php.html index 54c398e4..4f76b5dd 100644 --- a/templates/mod/config-editor-php.html +++ b/templates/mod/config-editor-php.html @@ -1,17 +1,35 @@ -{% if readonly %} - <p style="text-align:center;max-width:800px;margin:20px auto">Tinyboard does not have the required permissions to edit <strong>inc/instance-config.php</strong>. To make changes, you will need to change the file's permissions first or manually edit the code.</p> -{% endif %} - - -{% if not readonly %}<form method="post" action="">{% endif %} - <textarea name="code" id="code" style="display:block; margin:auto;width:100%;max-width:800px;height:500px{% if readonly %};background:#eee" readonly{% else %}"{% endif %}> - {{ php }} - </textarea> +<div style="max-width:800px;margin:auto"> + <p> + Any changes you make here will simply be appended to <code>{{ file }}</code>. If you wish to make the most of Tinyboard's customizability, you can instead edit the file directly. This page is intended for making quick changes and for those who don't have a basic understanding of PHP code. + </p> + {% if boards|count %} + <ul> + {% if board %} + <li><a href="?/config">Edit site-wide config</a></li> + {% endif %} + {% for _board in boards if _board.uri != board %} + <li> + <a href="?/config/{{ _board.uri }}">Edit config for {{ config.board_abbreviation|sprintf(_board.uri) }}</a> + </li> + {% endfor %} + </ul> + {% endif %} + + {% if readonly %} + <p>Tinyboard does not have the required permissions to edit <code>{{ file }}</code>. To make changes, you will need to change the file's permissions first or manually edit the code.</p> + {% endif %} + - <ul style="padding:0;text-align:center;list-style:none"> - <li><input name="save" type="submit" value="{% trans 'Save changes' %}"{% if readonly %} disabled{% endif %}></li> - </ul> -{% if not readonly %}</form>{% endif %} + {% if not readonly %}<form method="post" action="">{% endif %} + <textarea name="code" id="code" style="margin:auto;width:100%;height:500px{% if readonly %};background:#eee" readonly{% else %}"{% endif %}> + {{ php }} + </textarea> + + <ul style="padding:0;text-align:center;list-style:none"> + <li><input name="save" type="submit" value="{% trans 'Save changes' %}"{% if readonly %} disabled{% endif %}></li> + </ul> + {% if not readonly %}</form>{% endif %} +</div> <script type="text/javascript"> var observe; |
