aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Locs.php8
-rw-r--r--view/tpl/locmanage.tpl10
2 files changed, 9 insertions, 9 deletions
diff --git a/Zotlabs/Module/Locs.php b/Zotlabs/Module/Locs.php
index 59b872982..1ece47231 100644
--- a/Zotlabs/Module/Locs.php
+++ b/Zotlabs/Module/Locs.php
@@ -116,11 +116,6 @@ class Locs extends Controller {
return;
}
- for($x = 0; $x < count($r); $x ++) {
- $r[$x]['primary'] = (intval($r[$x]['hubloc_primary']) ? true : false);
- $r[$x]['deleted'] = (intval($r[$x]['hubloc_deleted']) ? true : false);
- }
-
$o = replace_macros(get_markup_template('locmanage.tpl'), array(
'$header' => t('Manage Channel Locations'),
'$loc' => t('Location'),
@@ -132,7 +127,8 @@ class Locs extends Controller {
'$sync_text' => t('Please wait several minutes between consecutive operations.'),
'$drop_text' => t('When possible, drop a location by logging into that website/hub and removing your channel.'),
'$last_resort' => t('Use this form to drop the location if the hub is no longer operating.'),
- '$hubs' => $r
+ '$hubs' => $r,
+ '$base_url' => z_root()
));
return $o;
diff --git a/view/tpl/locmanage.tpl b/view/tpl/locmanage.tpl
index 9b988c9c5..b4d986a1c 100644
--- a/view/tpl/locmanage.tpl
+++ b/view/tpl/locmanage.tpl
@@ -27,12 +27,16 @@
<th>{{$drop}}</th>
</tr>
{{foreach $hubs as $hub}}
- {{if ! $hub.deleted }}
+ {{if ! $hub.hubloc_deleted }}
<tr class="locs-index-row">
<td>{{$hub.hubloc_addr}}</td>
<td class="d-none d-md-table-cell">{{$hub.hubloc_url}}</td>
- <td>{{if $hub.primary}}<i class="fa fa-check-square-o"></i>{{else}}<i class="fa fa-square-o primehub" onclick="primehub({{$hub.hubloc_id}}); return false;"></i>{{/if}}</td>
- <td><i class="fa fa-trash-o drophub" onclick="drophub({{$hub.hubloc_id}}); return false;"></i></td>
+ <td>{{if $hub.hubloc_primary}}<i class="fa fa-check-square-o"></i>{{else}}<i class="fa fa-square-o primehub" onclick="primehub({{$hub.hubloc_id}}); return false;"></i>{{/if}}</td>
+ <td>
+ {{if $hub.hubloc_url != $base_url}}
+ <i class="fa fa-trash-o drophub" onclick="drophub({{$hub.hubloc_id}}); return false;"></i>
+ {{/if}}
+ </td>
</tr>
{{/if}}
{{/foreach}}