diff options
-rw-r--r-- | addon/calc/calc.php | 2 | ||||
-rw-r--r-- | addon/convert/convert.php | 2 | ||||
-rw-r--r-- | addon/sniper/sniper.php | 2 | ||||
-rw-r--r-- | addon/tictac/tictac.php | 2 | ||||
-rw-r--r-- | boot.php | 2 | ||||
-rw-r--r-- | mod/apps.php | 19 | ||||
-rw-r--r-- | view/apps.tpl | 7 |
7 files changed, 23 insertions, 13 deletions
diff --git a/addon/calc/calc.php b/addon/calc/calc.php index 8c079dc7a..47fb22d33 100644 --- a/addon/calc/calc.php +++ b/addon/calc/calc.php @@ -17,7 +17,7 @@ function calc_uninstall() { }
function calc_app_menu($a,&$b) {
- $b['app_menu'] .= '<div class="app-title"><a href="calc">Calculator</a></div>';
+ $b['app_menu'][] = Array('url'=>'calc', 'name'=>'Calculator');
}
diff --git a/addon/convert/convert.php b/addon/convert/convert.php index 7a4c90a53..aaa56a43e 100644 --- a/addon/convert/convert.php +++ b/addon/convert/convert.php @@ -15,7 +15,7 @@ function convert_uninstall() { }
function convert_app_menu($a,&$b) {
- $b['app_menu'] .= '<div class="app-title"><a href="convert">Units Conversion</a></div>';
+ $b['app_menu'][] = Array('url'=>'convert', 'name'=>'Units Conversion');
}
diff --git a/addon/sniper/sniper.php b/addon/sniper/sniper.php index d431a2466..c7d29cfdf 100644 --- a/addon/sniper/sniper.php +++ b/addon/sniper/sniper.php @@ -22,7 +22,7 @@ function sniper_uninstall() { } function sniper_app_menu($a,&$b) { - $b['app_menu'] .= '<div class="app-title"><a href="sniper">Hot Shot Sniper</a></div>'; + $b['app_menu'][] = Array('url'=>'sniper', 'name'=>'Hot Shot Sniper'); } diff --git a/addon/tictac/tictac.php b/addon/tictac/tictac.php index d6cec08a0..cc2701f8b 100644 --- a/addon/tictac/tictac.php +++ b/addon/tictac/tictac.php @@ -17,7 +17,7 @@ function tictac_uninstall() { } function tictac_app_menu($a,&$b) { - $b['app_menu'] .= '<div class="app-title"><a href="tictac">' . t('Three Dimensional Tic-Tac-Toe') . '</a></div>'; + $b['app_menu'][] = Array('url'=>'tictac', 'name'=>'Three Dimensional Tic-Tac-Toe'); } @@ -246,7 +246,7 @@ class App { public $timezone; public $interactive = true; public $plugins; - public $apps; + public $apps = Array(); public $identities; private $scheme; diff --git a/mod/apps.php b/mod/apps.php index 7a0a3f59e..8049b45fb 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -1,15 +1,18 @@ <?php - function apps_content(&$a) { + $title = t('Applications'); - $o .= '<h3>' . t('Applications') . '</h3>'; - - if($a->apps) - $o .= $a->apps; - else + if(count($a->apps)==0) notice( t('No installed applications.') . EOL); - return $o; -}
\ No newline at end of file + $tpl = get_markup_template("apps.tpl"); + return replace_macros($tpl, array( + '$title' => $title, + '$apps' => $a->apps, + )); + + + +} diff --git a/view/apps.tpl b/view/apps.tpl new file mode 100644 index 000000000..61ea9ee5f --- /dev/null +++ b/view/apps.tpl @@ -0,0 +1,7 @@ +<h3>$title</h3> + +<ul> + {{ for $apps as $ap }} + <li><a href="$ap.url">$ap.name</a></li> + {{ endfor }} +</ul> |