aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-09-29 16:40:15 +0100
committerThomas Willingham <founder@kakste.com>2013-09-29 16:40:15 +0100
commit9212fd0ecc4f740704279ea896a0105e48dc70fa (patch)
tree8c06246a412eac9c64a17aa85e74f6c75fd9cb2b
parent4f83a1c15205ef132df0ef3dc2cc670e58428e06 (diff)
downloadvolse-hubzilla-9212fd0ecc4f740704279ea896a0105e48dc70fa.tar.gz
volse-hubzilla-9212fd0ecc4f740704279ea896a0105e48dc70fa.tar.bz2
volse-hubzilla-9212fd0ecc4f740704279ea896a0105e48dc70fa.zip
Issue #117
-rwxr-xr-xinclude/text.php21
-rw-r--r--view/tpl/design_tools.tpl7
2 files changed, 18 insertions, 10 deletions
diff --git a/include/text.php b/include/text.php
index be5e2338d..afd46f396 100755
--- a/include/text.php
+++ b/include/text.php
@@ -1835,16 +1835,17 @@ function json_decode_plus($s) {
function design_tools() {
-// FIXME - this should be a template
-
- $o = '<div class="widget design-tools">';
- $o .= '<h3>' . t('Design') . '</h3>';
- $o .= '<a href="blocks">' . t('Blocks') . '</a>' . EOL;
- $o .= '<a href="menu">' . t('Menus') . '</a>' . EOL;
- $o .= '<a href="layout">' . t('Layouts') . '</a>' . EOL;
- $o .= '<a href="webpages">' . t('Pages') . '</a>' . EOL;
- $o .= '</div>';
- return $o;
+$channel = $channel = get_app()->get_channel();
+$who = $channel['channel_address'];
+
+return replace_macros(get_markup_template('design_tools.tpl'), array(
+ '$title' => t('Design'),
+ '$who' => $who,
+ '$blocks' => t('Blocks'),
+ '$menus' => t('Menus'),
+ '$layout' => t('Layouts'),
+ '$pages' => t('Pages')
+ ));
}
diff --git a/view/tpl/design_tools.tpl b/view/tpl/design_tools.tpl
new file mode 100644
index 000000000..eb082dc37
--- /dev/null
+++ b/view/tpl/design_tools.tpl
@@ -0,0 +1,7 @@
+<div id="design-tools" class="widget design-tools">
+<h3>{{$title}}</h3>
+<li><a href="blocks/{{$who}}">{{$blocks}}</a></li>
+<li><a href="menu">{{$menus}}</a></li>
+<li><a href="layouts/{{$who}}">{{$layout}}</a></li>
+<li><a href="webpages/{{$who}}">{{$pages}}</a></li>
+</div>