aboutsummaryrefslogtreecommitdiffstats
path: root/mod/sharedwithme.php
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2015-01-28 17:40:39 -0800
committerHabeas Codice <habeascodice@federated.social>2015-01-28 17:40:39 -0800
commitd59bd31a682a58e0d34a66e06ce8f504189f98d5 (patch)
tree3a34b706f63f8f41bb76c5a049f3bc356d8c265f /mod/sharedwithme.php
parent1a537888333afb052e9eb4954091fd163f5b78d1 (diff)
parent54fd8b21db2d8f3841cf590f88611a1d4f44ce48 (diff)
downloadvolse-hubzilla-d59bd31a682a58e0d34a66e06ce8f504189f98d5.tar.gz
volse-hubzilla-d59bd31a682a58e0d34a66e06ce8f504189f98d5.tar.bz2
volse-hubzilla-d59bd31a682a58e0d34a66e06ce8f504189f98d5.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'mod/sharedwithme.php')
-rw-r--r--mod/sharedwithme.php38
1 files changed, 24 insertions, 14 deletions
diff --git a/mod/sharedwithme.php b/mod/sharedwithme.php
index 8b7d2661c..56cbc35ec 100644
--- a/mod/sharedwithme.php
+++ b/mod/sharedwithme.php
@@ -73,27 +73,37 @@ function sharedwithme_content(&$a) {
dbesc($channel['channel_hash'])
);
- $o = profile_tabs($a, $is_owner, $channel['channel_address']);
-
- $o .= '<div class="section-title-wrapper">';
-
- $o .= '<a href="/sharedwithme/dropall" onclick="return confirmDelete();" class="btn btn-xs btn-default pull-right"><i class="icon-trash"></i>&nbsp;' . t('Remove all entries') . '</a>';
-
- $o .= '<h2>' . t('Files shared with me') . '</h2>';
-
- $o .= '</div>';
-
- $o .= '<div class="section-content-wrapper">';
+ $items =array();
if($r) {
foreach($r as $rr) {
$object = json_decode($rr['object'],true);
- $url = rawurldecode(get_rel_link($object['link'],'alternate'));
- $o .= '<a href="' . $url . '?f=&zid=' . $channel['xchan_addr'] . '">' . $url . '</a>&nbsp;<a href="/sharedwithme/' . $rr['id'] . '/drop" onclick="return confirmDelete();"><i class="icon-trash drop-icons"></i></a><br><br>';
+
+ $item = array();
+ $item['id'] = $rr['id'];
+ $item['objfiletype'] = $object['filetype'];
+ $item['objfiletypeclass'] = getIconFromType($object['filetype']);
+ $item['objurl'] = rawurldecode(get_rel_link($object['link'],'alternate')) . '?f=&zid=' . $channel['xchan_addr'];
+ $item['objfilename'] = $object['filename'];
+ $item['objfilesize'] = userReadableSize($object['filesize']);
+ $item['objedited'] = $object['edited'];
+
+ $items[] = $item;
+
}
}
- $o .= '</div>';
+ $o = profile_tabs($a, $is_owner, $channel['channel_address']);
+
+ $o .= replace_macros(get_markup_template('sharedwithme.tpl'), array(
+ '$header' => t('Files: shared with me'),
+ '$name' => t('Name'),
+ '$size' => t('Size'),
+ '$lastmod' => t('Last Modified'),
+ '$dropall' => t('Remove all files'),
+ '$drop' => t('Remove this file'),
+ '$items' => $items
+ ));
return $o;