diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-05-20 20:20:50 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-05-20 20:20:50 +1000 |
| commit | d3739c48c2c2deec83e6abf74ed8e03470581750 (patch) | |
| tree | 9bd4eca38f796338d1c89429a5771f427bcd951c /templates | |
| parent | 0f041170372b9dfcba7645d8b05066867c0d3f75 (diff) | |
Config editort
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/mod/config-editor.html | 56 | ||||
| -rw-r--r-- | templates/mod/view_ip.html | 8 |
2 files changed, 61 insertions, 3 deletions
diff --git a/templates/mod/config-editor.html b/templates/mod/config-editor.html new file mode 100644 index 00000000..ec7213bb --- /dev/null +++ b/templates/mod/config-editor.html @@ -0,0 +1,56 @@ +<form method="post" action=""> + <table class="mod config-editor"> + <tr> + <th class="minimal">Name</th> + <th>Value</th> + <th class="minimal">Type</th> + <th>Description</th> + </tr> + {% for var in conf if var.type != 'array' %} + {% if var.name|count == 1 %} + {% set name = 'cf_' ~ var.name %} + {% else %} + {% set name = 'cf_' ~ var.name|join('/') %} + {% endif %} + + <tr> + <th class="minimal"> + {% if var.name|count == 1 %} + {{ var.name }} + {% else %} + {{ var.name|join(' → ') }} + {% endif %} + </th> + + <td> + {% if var.type == 'string' %} + <input name="{{ name }}" type="text" value="{{ var.value|e }}"> + {% elseif var.type == 'integer' %} + <input name="{{ name }}" type="number" value="{{ var.value|e }}"> + {% elseif var.type == 'boolean' %} + <input name="{{ name }}" type="checkbox" {% if var.value %}checked{% endif %}> + {% else %} + ? + {% endif %} + + {% if var.type == 'integer' or var.type == 'boolean' %} + <small>Default: <code>{{ var.default }}</code></small> + {% endif %} + </td> + + <td class="minimal"> + {{ var.type|e }} + </td> + + <td> + {{ var.comment|join('<br>') }} + </td> + </tr> + {% endfor %} + </table> + + <ul style="padding:0;text-align:center;list-style:none"> + <li><input name="save" type="submit" value="{% trans 'Save changes' %}"></li> + </ul> +</form> + diff --git a/templates/mod/view_ip.html b/templates/mod/view_ip.html index e69301fd..c49880ae 100644 --- a/templates/mod/view_ip.html +++ b/templates/mod/view_ip.html @@ -1,9 +1,11 @@ {% for board_posts in posts %} <fieldset> <legend> - <a href="?/{{ config.board_path|sprintf(board_posts.board.uri) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(board_posts.board.uri) }}</a> - - - {{ board_posts.board.title|e }} + <a href="?/{{ config.board_path|sprintf(board_posts.board.uri) }}{{ config.file_index }}"> + {{ config.board_abbreviation|sprintf(board_posts.board.uri) }} + - + {{ board_posts.board.title|e }} + </a> </legend> {{ board_posts.posts|join('<hr>') }} </fieldset> |
