From 6eb84a3d9a9e09a12a7c30cf45844af809e8a9a3 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 21 Aug 2021 08:25:15 +0000 Subject: restructure apps to make space for app descritions --- Zotlabs/Module/Bookmarks.php | 56 +++++++++++++++++++-------------------- app/hq.apd | 3 ++- view/css/mod_apps.css | 13 +++++++++ view/tpl/app.tpl | 63 +++++++++++++++++++++++++++----------------- view/tpl/myapps.tpl | 2 +- 5 files changed, 83 insertions(+), 54 deletions(-) diff --git a/Zotlabs/Module/Bookmarks.php b/Zotlabs/Module/Bookmarks.php index 822b18308..000e2893f 100644 --- a/Zotlabs/Module/Bookmarks.php +++ b/Zotlabs/Module/Bookmarks.php @@ -18,31 +18,31 @@ class Bookmarks extends \Zotlabs\Web\Controller { $item_id = (isset($_REQUEST['item']) ? $_REQUEST['item'] : false); $burl = (isset($_REQUEST['burl']) ? trim($_REQUEST['burl']) : ''); - + if(! $item_id) return; - + $u = \App::get_channel(); - + $item_normal = item_normal(); - + $i = q("select * from item where id = %d and uid = %d $item_normal limit 1", intval($item_id), intval(local_channel()) ); - + if(! $i) return; - + $i = fetch_post_tags($i); - + $item = $i[0]; - + $terms = (x($item, 'term') ? get_terms_oftype($item['term'],TERM_BOOKMARK) : false); - + if($terms) { require_once('include/bookmarks.php'); - + $s = q("select * from xchan where xchan_hash = '%s' limit 1", dbesc($item['author_xchan']) ); @@ -58,13 +58,13 @@ class Bookmarks extends \Zotlabs\Web\Controller { } else bookmark_add($u,$s[0],$t,$item['item_private']); - + info( t('Bookmark added') . EOL); } } killme(); } - + function get() { if(! local_channel()) { notice( t('Permission denied.') . EOL); @@ -79,44 +79,44 @@ class Bookmarks extends \Zotlabs\Web\Controller { $o .= t('Bookmark links from posts and manage them'); return $o; } - + require_once('include/menu.php'); require_once('include/conversation.php'); - + $channel = \App::get_channel(); - + $o = ''; - + $o .= '
'; - + $o .= '

' . t('My Bookmarks') . '

'; - + $x = menu_list(local_channel(),'',MENU_BOOKMARK); - + if($x) { foreach($x as $xx) { $y = menu_fetch($xx['menu_name'],local_channel(),get_observer_hash()); $o .= menu_render($y,'',true); } } - + $o .= '

' . t('My Connections Bookmarks') . '

'; - - + + $x = menu_list(local_channel(),'',MENU_SYSTEM|MENU_BOOKMARK); - + if($x) { foreach($x as $xx) { $y = menu_fetch($xx['menu_name'],local_channel(),get_observer_hash()); $o .= menu_render($y,'',true); } } - + $o .= '
'; - + return $o; - + } - - + + } diff --git a/app/hq.apd b/app/hq.apd index b9e9f806f..07f82653f 100644 --- a/app/hq.apd +++ b/app/hq.apd @@ -1,6 +1,7 @@ -version: 1 +version: 2 url: $baseurl/hq requires: local_channel name: HQ photo: icon:user-circle-o categories: nav_pinned_app +desc: The default landing page after login. It provides a quick overview over recent posts and direct messages. diff --git a/view/css/mod_apps.css b/view/css/mod_apps.css index 62777bb39..ddf6d5c6b 100644 --- a/view/css/mod_apps.css +++ b/view/css/mod_apps.css @@ -10,3 +10,16 @@ text-overflow: ellipsis; margin: 10px 0px; } + +.app-icon { + display: table-cell; + table-layout: fixed; + vertical-align: top; +} + +.app-info { + display: table-cell; + table-layout: fixed; + vertical-align: top; + padding-left: 10px; +} diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl index b5957a373..5809a3edb 100644 --- a/view/tpl/app.tpl +++ b/view/tpl/app.tpl @@ -1,32 +1,47 @@ {{if ! ($navapps || $order)}} -
- - {{if $app.type !== 'system'}} - {{if $purchase}} -
- + +
+
+ {{if $app.type !== 'system'}} + {{if $purchase}} +
+ +
+ {{/if}} + {{if $action_label || $update || $delete || $feature}} +
+
+ + {{if $action_label}}{{/if}} + {{if $edit}}{{/if}} + {{if $delete}}{{/if}} + {{if $settings_url}}{{/if}} + {{if $feature}}{{/if}} + {{if $pin}}{{/if}} +
+
+ {{/if}} + {{/if}}
- {{/if}} - {{if $action_label || $update || $delete || $feature}} -
-
- - {{if $action_label}}{{/if}} - {{if $edit}}{{/if}} - {{if $delete}}{{/if}} - {{if $feature}}{{/if}} - {{if $pin}}{{/if}} - {{if $settings_url}}{{/if}} -
+

{{$app.name}}{{if $app.price}} ({{$app.price}}){{/if}}

+ +
+
+
+ + {{if $icon}} + + {{else}} + + {{/if}} + +
+ {{if $app.desc}}{{$app.desc}}{{/if}} +
- {{/if}} - {{/if}}
{{/if}} + {{if $navapps}} {{if $icon}}{{else}}{{/if}}{{$app.name}} {{/if}} diff --git a/view/tpl/myapps.tpl b/view/tpl/myapps.tpl index 0b74c7b27..404ab73d3 100644 --- a/view/tpl/myapps.tpl +++ b/view/tpl/myapps.tpl @@ -9,7 +9,7 @@ {{/if}}

{{$title}}{{if $cat.0}} - {{$cat.0}}{{/if}}

-
+
{{foreach $apps as $ap}} {{$ap}} {{/foreach}} -- cgit v1.2.3