diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-01-22 13:45:34 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-01-22 13:45:34 +0100 |
commit | 951376852c1d39ece5f4e93bb38d2a6de08b66cb (patch) | |
tree | 762403049e9fcb21ae8ec9e2b3c1bd4c6ff4a470 | |
parent | 9e509aa25b334fc6a7145262dfdf6cb192337acc (diff) | |
download | volse-hubzilla-951376852c1d39ece5f4e93bb38d2a6de08b66cb.tar.gz volse-hubzilla-951376852c1d39ece5f4e93bb38d2a6de08b66cb.tar.bz2 volse-hubzilla-951376852c1d39ece5f4e93bb38d2a6de08b66cb.zip |
some work on app_bin - just to get it going
-rw-r--r-- | include/nav.php | 29 | ||||
-rwxr-xr-x | view/tpl/nav.tpl | 43 | ||||
-rw-r--r-- | view/tpl/navapps.tpl | 5 |
3 files changed, 60 insertions, 17 deletions
diff --git a/include/nav.php b/include/nav.php index b7203b996..6ad43c909 100644 --- a/include/nav.php +++ b/include/nav.php @@ -1,5 +1,7 @@ <?php /** @file */ +use \Zotlabs\Lib as Zlib; + function nav() { /** @@ -238,6 +240,30 @@ EOT; // $powered_by = '<strong>red<img class="smiley" src="' . z_root() . '/images/rm-16.png" alt="r#" />matrix</strong>'; + + //app bin + $navapps = ''; + if(get_config('system','experimental_app_bin')) { + if(local_channel()) { + //Zlib\Apps::import_system_apps(); + $syslist = array(); + $list = Zlib\Apps::app_list(local_channel(), false, $_GET['cat']); + if($list) { + foreach($list as $li) { + $syslist[] = Zlib\Apps::app_encode($li); + } + } + Zlib\Apps::translate_system_apps($syslist); + } + else { + $syslist = Zlib\Apps::get_system_apps(true); + } + + $navapps = replace_macros(get_markup_template('navapps.tpl'), array( + '$apps' => $syslist + )); + } + $tpl = get_markup_template('nav.tpl'); App::$page['nav'] .= replace_macros($tpl, array( @@ -252,7 +278,8 @@ EOT; '$sel' => App::$nav_sel, '$powered_by' => $powered_by, '$help' => t('@name, #tag, ?doc, content'), - '$pleasewait' => t('Please wait...') + '$pleasewait' => t('Please wait...'), + '$navapps' => $navapps )); if(x($_SESSION, 'reload_avatar') && $observer) { diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl index c56bade94..4d8ce9317 100755 --- a/view/tpl/nav.tpl +++ b/view/tpl/nav.tpl @@ -1,21 +1,23 @@ <div class="container-fluid"> <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <button id="expand-tabs" type="button" class="navbar-toggle" data-toggle="collapse" data-target="#tabs-collapse-1"> - <i class="fa fa-arrow-circle-down" id="expand-tabs-icon"></i> - </button> - <button id="expand-aside" type="button" class="navbar-toggle" data-toggle="offcanvas" data-target="#region_1"> - <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> - </button> - {{if $nav.help.6}} - <button id="context-help-btn" class="navbar-toggle" type="button" onclick="contextualHelp(); return false;"> - <i class="fa fa-question-circle"></i> - </button> - {{/if}} + <div> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <button id="expand-tabs" type="button" class="navbar-toggle" data-toggle="collapse" data-target="#tabs-collapse-1"> + <i class="fa fa-arrow-circle-down" id="expand-tabs-icon"></i> + </button> + <button id="expand-aside" type="button" class="navbar-toggle" data-toggle="offcanvas" data-target="#region_1"> + <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> + </button> + {{if $nav.help.6}} + <button id="context-help-btn" class="navbar-toggle" type="button" onclick="contextualHelp(); return false;"> + <i class="fa fa-question-circle"></i> + </button> + {{/if}} + </div> {{if $userinfo}} <div class="usermenu-head dropdown-toggle fakelink" data-toggle="dropdown"> <img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}"> @@ -206,7 +208,16 @@ <a class="{{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}"{{if $nav.help.6}} onclick="contextualHelp(); return false;"{{/if}}>{{if $nav.help.6}}<i class="fa fa-question-circle"></i>{{else}}<i class="fa fa-question"></i>{{/if}}</a> </li> {{/if}} + + {{if $navapps}} + <li class="dropdown-toggle" data-toggle="dropdown"> + <a href="#"><i class="fa fa-bars"></i></a> + </li> + {{$navapps}} + {{/if}} + </ul> + </div> </div> {{if $nav.help.6}} diff --git a/view/tpl/navapps.tpl b/view/tpl/navapps.tpl new file mode 100644 index 000000000..fe6549139 --- /dev/null +++ b/view/tpl/navapps.tpl @@ -0,0 +1,5 @@ +<ul class="dropdown-menu"> + {{foreach $apps as $app}} + <li><a href="{{$app.url}}">{{$app.name}}</a></li> + {{/foreach}} +</ul> |