aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-08-21 08:25:15 +0000
committerMario <mario@mariovavti.com>2021-08-21 08:25:15 +0000
commit6eb84a3d9a9e09a12a7c30cf45844af809e8a9a3 (patch)
tree5aaff90944b1a359478a3dfa2e11fa04b681047d
parent69d909596a0011ae902f834bd79251136f5d5bba (diff)
downloadvolse-hubzilla-6eb84a3d9a9e09a12a7c30cf45844af809e8a9a3.tar.gz
volse-hubzilla-6eb84a3d9a9e09a12a7c30cf45844af809e8a9a3.tar.bz2
volse-hubzilla-6eb84a3d9a9e09a12a7c30cf45844af809e8a9a3.zip
restructure apps to make space for app descritions
-rw-r--r--Zotlabs/Module/Bookmarks.php56
-rw-r--r--app/hq.apd3
-rw-r--r--view/css/mod_apps.css13
-rw-r--r--view/tpl/app.tpl63
-rw-r--r--view/tpl/myapps.tpl2
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 .= '<div class="generic-content-wrapper-styled">';
-
+
$o .= '<h3>' . t('My Bookmarks') . '</h3>';
-
+
$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 .= '<h3>' . t('My Connections Bookmarks') . '</h3>';
-
-
+
+
$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 .= '</div>';
-
+
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)}}
-<div class="app-container">
- <div class="app-detail{{if $deleted}} app-deleted{{/if}}">
- <a class="app-link" href="{{$app.url}}"{{if $app.target}} target="{{$app.target}}"{{/if}}{{if $app.desc}} title="{{$app.desc}}{{if $app.price}} ({{$app.price}}){{/if}}"{{else}}title="{{$app.name}}"{{/if}}{{if $installed}} data-papp="{{$app.papp}}" data-icon="{{$icon}}" data-url="{{$app.url}}" data-name="{{$app.name}}"{{/if}}>{{if $icon}}<i class="app-icon fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="80" height="80" />{{/if}}
- <div class="app-name" style="text-align:center;">{{$app.name}}</div>
- </a>
- </div>
- {{if $app.type !== 'system'}}
- {{if $purchase}}
- <div class="app-purchase">
- <a href="{{$app.page}}" class="btn btn-outline-secondary" title="{{$purchase}}" ><i class="fa fa-external"></i></a>
+
+<div class="section-subtitle-wrapper clearfix">
+ <div class="float-end">
+ {{if $app.type !== 'system'}}
+ {{if $purchase}}
+ <div class="app-purchase">
+ <a href="{{$app.page}}" class="btn btn-outline-secondary" title="{{$purchase}}" ><i class="fa fa-external"></i></a>
+ </div>
+ {{/if}}
+ {{if $action_label || $update || $delete || $feature}}
+ <div class="app-tools">
+ <form action="{{$hosturl}}appman" method="post">
+ <input type="hidden" name="papp" value="{{$app.papp}}" />
+ {{if $action_label}}<button type="submit" name="install" value="{{$action_label}}" class="btn btn-outline-{{if $installed}}secondary{{else}}success{{/if}} btn-sm" title="{{$action_label}}" ><i class="fa fa-fw {{if $installed}}fa-refresh{{else}}fa-arrow-circle-o-down{{/if}}" ></i> {{$action_label}}</button>{{/if}}
+ {{if $edit}}<input type="hidden" name="appid" value="{{$app.guid}}" /><button type="submit" name="edit" value="{{$edit}}" class="btn btn-outline-secondary btn-sm" title="{{$edit}}" ><i class="fa fa-fw fa-pencil" ></i></button>{{/if}}
+ {{if $delete}}<button type="submit" name="delete" value="{{if $deleted}}{{$undelete}}{{else}}{{$delete}}{{/if}}" class="btn btn-outline-secondary btn-sm" title="{{if $deleted}}{{$undelete}}{{else}}{{$delete}}{{/if}}" ><i class="fa fa-fw fa-trash-o drop-icons"></i></button>{{/if}}
+ {{if $settings_url}}<a href="{{$settings_url}}/?f=&rpath={{$rpath}}" class="btn btn-outline-secondary btn-sm"><i class="fa fa-fw fa-cog"></i></a>{{/if}}
+ {{if $feature}}<button type="submit" name="feature" value="nav_featured_app" class="btn btn-outline-secondary btn-sm" title="{{if $featured}}{{$remove}}{{else}}{{$add}}{{/if}}"><i class="fa fa-fw fa-star{{if $featured}} text-warning{{/if}}"></i></button>{{/if}}
+ {{if $pin}}<button type="submit" name="pin" value="nav_pinned_app" class="btn btn-outline-secondary btn-sm" title="{{if $pinned}}{{$remove_nav}}{{else}}{{$add_nav}}{{/if}}"><i class="fa fa-fw fa-thumb-tack{{if $pinned}} text-success{{/if}}"></i></button>{{/if}}
+ </form>
+ </div>
+ {{/if}}
+ {{/if}}
</div>
- {{/if}}
- {{if $action_label || $update || $delete || $feature}}
- <div class="text-center app-tools">
- <form action="{{$hosturl}}appman" method="post">
- <input type="hidden" name="papp" value="{{$app.papp}}" />
- {{if $action_label}}<button type="submit" name="install" value="{{$action_label}}" class="btn btn-outline-{{if $installed}}secondary{{else}}success{{/if}} btn-sm" title="{{$action_label}}" ><i class="fa fa-fw {{if $installed}}fa-refresh{{else}}fa-arrow-circle-o-down{{/if}}" ></i> {{$action_label}}</button>{{/if}}
- {{if $edit}}<input type="hidden" name="appid" value="{{$app.guid}}" /><button type="submit" name="edit" value="{{$edit}}" class="btn btn-outline-secondary btn-sm" title="{{$edit}}" ><i class="fa fa-fw fa-pencil" ></i></button>{{/if}}
- {{if $delete}}<button type="submit" name="delete" value="{{if $deleted}}{{$undelete}}{{else}}{{$delete}}{{/if}}" class="btn btn-outline-secondary btn-sm" title="{{if $deleted}}{{$undelete}}{{else}}{{$delete}}{{/if}}" ><i class="fa fa-fw fa-trash-o drop-icons"></i></button>{{/if}}
- {{if $feature}}<button type="submit" name="feature" value="nav_featured_app" class="btn btn-outline-secondary btn-sm" title="{{if $featured}}{{$remove}}{{else}}{{$add}}{{/if}}"><i class="fa fa-fw fa-star{{if $featured}} text-warning{{/if}}"></i></button>{{/if}}
- {{if $pin}}<button type="submit" name="pin" value="nav_pinned_app" class="btn btn-outline-secondary btn-sm" title="{{if $pinned}}{{$remove_nav}}{{else}}{{$add_nav}}{{/if}}"><i class="fa fa-fw fa-thumb-tack{{if $pinned}} text-success{{/if}}"></i></button>{{/if}}
- {{if $settings_url}}<a href="{{$settings_url}}/?f=&rpath={{$rpath}}" class="btn btn-outline-secondary btn-sm"><i class="fa fa-fw fa-cog"></i></a>{{/if}}
- </form>
+ <h3>{{$app.name}}{{if $app.price}} ({{$app.price}}){{/if}}</h3>
+
+</div>
+<div class="section-content-tools-wrapper container">
+ <div class="{{if $deleted}} app-deleted{{/if}}">
+ <a class="app-icon app-link" href="{{$app.url}}"{{if $app.target}} target="{{$app.target}}"{{/if}}{{if $installed}} data-papp="{{$app.papp}}" data-icon="{{$icon}}" data-url="{{$app.url}}" data-name="{{$app.name}}"{{/if}}>
+ {{if $icon}}
+ <i class="app-icon fa fa-fw fa-{{$icon}}"></i>
+ {{else}}
+ <img src="{{$app.photo}}" width="80" height="80" />
+ {{/if}}
+ </a>
+ <div class="app-info">
+ {{if $app.desc}}{{$app.desc}}{{/if}}
+ </div>
</div>
- {{/if}}
- {{/if}}
</div>
{{/if}}
+
{{if $navapps}}
<a class="dropdown-item{{if $app.active}} active{{/if}}" href="{{$app.url}}">{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}</a>
{{/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}}
<h2>{{$title}}{{if $cat.0}} - {{$cat.0}}{{/if}}</h2>
</div>
- <div class="clearfix section-content-wrapper">
+ <div class="clearfix section-content-wrapper-np">
{{foreach $apps as $ap}}
{{$ap}}
{{/foreach}}