PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/tpl/admin/_admin_widget_std.tpl

https://code.google.com/p/zotonic/
Smarty Template | 42 lines | 31 code | 11 blank | 0 comment | 4 complexity | 2e0842a73d194448320c6f1305908e26 MD5 | raw file
 1{% extends "admin_edit_widget_std.tpl" %}
 2
 3{# 
 4    Example of standard and simple widget for /admin/edit/N page.
 5    Similar skeleton also used for basis of sidebar widgets.
 6#}
 7
 8
 9{# Title data for widget headline. #}
10{% block widget_title %}{_ Edit title _}{% endblock %}
11
12
13{# Widget may be displayed to user as minimized by default
14   NOTE: content precense in this block is mandatory #}
15{% block widget_show_minimized %}true{% endblock %}
16
17
18{# Some tags, that will be rendered before widget contained.
19   Do NOT include other widgets here, because dtl compiler will throw recursion error #}
20{% block widget_before %}{% endblock %}
21
22
23{# The content. The body of widget. #}
24{% block widget_content %}
25    {% with m.rsc[id] as r %}
26	<fieldset class="admin-form">
27	    <div class="form-item clearfix">
28		<label for="title">{_ Title _}</label>
29		<input id="title" type="text" name="title" value="{{ r.title }}" />
30	    </div>
31	</fieldset>
32    {% endwith %}
33{% endblock %}
34
35
36{# Some optional tags, that will be rendered immediately after widget container. 
37   For example, some javascript: #}
38{% block widget_after %}
39    <script type="text/javascript">
40	alert("Hello World!");
41    </script>
42{% endblock %}