aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/widgets.php7
-rw-r--r--mod/pubsites.php8
-rw-r--r--view/pdl/mod_ratings.pdl1
3 files changed, 12 insertions, 4 deletions
diff --git a/include/widgets.php b/include/widgets.php
index d457db07d..fbbc74224 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -962,4 +962,11 @@ function widget_rating($arr) {
return $o;
+}
+
+// used by site ratings pages to provide a return link
+function widget_pubsites() {
+ if(get_app()->poi)
+ return;
+ return '<div class="widget"><ul class="nav nav-pills"><li><a href="pubsites">' . t('Public Hubs') . '</a></li></ul></div>';
} \ No newline at end of file
diff --git a/mod/pubsites.php b/mod/pubsites.php
index ddd7baf92..ff3854492 100644
--- a/mod/pubsites.php
+++ b/mod/pubsites.php
@@ -22,13 +22,13 @@ function pubsites_content(&$a) {
if($ret['success']) {
$j = json_decode($ret['body'],true);
if($j) {
- $rate_meta = ((local_channel()) ? '<td>' . t('Rate this hub') . '</td><td>' . t('View hub ratings') . '</td>' : '');
- $o .= '<table border="1"><tr><td>' . t('Site URL') . '</td><td>' . t('Access Type') . '</td><td>' . t('Registration Policy') . '</td><td>' . t('Location') . '</td>' . $rate_meta . '</tr>';
+ $rate_meta = ((local_channel()) ? '<td>' . t('Rate this hub') . '</td>' : '');
+ $o .= '<table border="1"><tr><td>' . t('Site URL') . '</td><td>' . t('Access Type') . '</td><td>' . t('Registration Policy') . '</td><td>' . t('Location') . '</td><td>' . t('View hub ratings') . '</td>' . $rate_meta . '</tr>';
if($j['sites']) {
foreach($j['sites'] as $jj) {
$host = strtolower(substr($jj['url'],strpos($jj['url'],'://')+3));
- $rate_links = ((local_channel()) ? '<td><a href="rate?f=&target=' . $host . '" class="btn-btn-default"><i class="icon-check"></i> ' . t('Rate') . '</a></td><td><a href="ratings/' . $host . '" class="btn-btn-default"><i class="icon-eye-open"></i> ' . t('View ratings') . '</a></td>' : '');
- $o .= '<tr><td>' . '<a href="'. (($jj['sellpage']) ? $jj['sellpage'] : $jj['url'] . '/register' ) . '" >' . $jj['url'] . '</a>' . '</td><td>' . $jj['access'] . '</td><td>' . $jj['register'] . '</td><td>' . $jj['location'] . '</td>' . $rate_links . '</tr>';
+ $rate_links = ((local_channel()) ? '<td><a href="rate?f=&target=' . $host . '" class="btn-btn-default"><i class="icon-check"></i> ' . t('Rate') . '</a></td>' : '');
+ $o .= '<tr><td>' . '<a href="'. (($jj['sellpage']) ? $jj['sellpage'] : $jj['url'] . '/register' ) . '" >' . $jj['url'] . '</a>' . '</td><td>' . $jj['access'] . '</td><td>' . $jj['register'] . '</td><td>' . $jj['location'] . '</td><td><a href="ratings/' . $host . '" class="btn-btn-default"><i class="icon-eye-open"></i> ' . t('View ratings') . '</a></td>' . $rate_links . '</tr>';
}
}
diff --git a/view/pdl/mod_ratings.pdl b/view/pdl/mod_ratings.pdl
index 0b6e32283..df1486c9b 100644
--- a/view/pdl/mod_ratings.pdl
+++ b/view/pdl/mod_ratings.pdl
@@ -1,4 +1,5 @@
[region=aside]
+[widget=pubsites][/widget]
[widget=vcard][/widget]
[widget=rating][/widget]
[widget=suggestions][/widget]