aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/help.tpl8
-rw-r--r--view/tpl/widget.tpl10
2 files changed, 14 insertions, 4 deletions
diff --git a/view/tpl/help.tpl b/view/tpl/help.tpl
index 5022e7b1b..ba61a43ce 100644
--- a/view/tpl/help.tpl
+++ b/view/tpl/help.tpl
@@ -13,19 +13,19 @@
</div>
</div>
</div>
- <h2>{{$title}}: {{$heading}}</h2>
+ <h2>{{$module->get_page_title()}}</h2>
</div>
<div class="section-content-wrapper" id="doco-content">
<h3 id="doco-top-toc-heading">
<span class="fakelink" onclick="docoTocToggle(); return false;">
<i class="fa fa-fw fa-caret-right fakelink" id="doco-toc-toggle"></i>
- {{$tocHeading}}
+ {{$module->get_toc_heading()}}
</span>
</h3>
<ul id="doco-top-toc" style="margin-bottom: 1.5em; display: none;"></ul>
- {{$content}}
+ {{$module->render_content()}}
</div>
</div>
<script>
- var help_language = '{{$language}}'
+ var help_language = '{{$module->lang["language"]}}'
</script>
diff --git a/view/tpl/widget.tpl b/view/tpl/widget.tpl
new file mode 100644
index 000000000..3fb3b1200
--- /dev/null
+++ b/view/tpl/widget.tpl
@@ -0,0 +1,10 @@
+{{* Generic template for widgets.
+ *
+ * To use this template, pass the `$this` object reference of the widget,
+ * and implement the `title()` and `contents()` functions as public methods
+ * on the widget class.
+ *}}
+<div class="widget">
+ <h3>{{$widget->title()}}</h3>
+ {{$widget->contents()}}
+</div>