aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeroenpraat <jeroenpraat@xs4all.nl>2016-02-21 19:31:11 +0100
committerjeroenpraat <jeroenpraat@xs4all.nl>2016-02-21 19:31:11 +0100
commit0c5a2925ad14022148060d1f07077bf485714665 (patch)
tree2bc0f27c11b4ff02982c8ddfd4d3a494eb2ab7d5
parent22f172d69730d3c9c6f078ec206f90b1e91eee69 (diff)
downloadvolse-hubzilla-0c5a2925ad14022148060d1f07077bf485714665.tar.gz
volse-hubzilla-0c5a2925ad14022148060d1f07077bf485714665.tar.bz2
volse-hubzilla-0c5a2925ad14022148060d1f07077bf485714665.zip
Pimped the pubsites page. I tried to get this into a .tpl-file, but it was to complicated for me. Pubsites page is now more narrow (fits on most devices) and location is not taking a complete column (location is almost never used). Also a fix on the auto-create-channel part on the register page.
-rw-r--r--mod/pubsites.php17
-rwxr-xr-xview/tpl/register.tpl7
2 files changed, 14 insertions, 10 deletions
diff --git a/mod/pubsites.php b/mod/pubsites.php
index ae8601366..51744eb1b 100644
--- a/mod/pubsites.php
+++ b/mod/pubsites.php
@@ -15,22 +15,29 @@ function pubsites_content(&$a) {
$o .= '<div class="generic-content-wrapper-styled">';
- $o .= '<h1>' . t('Public Sites') . '</h1>';
+ $o .= '<h2>' . t('Public Hubs') . '</h2>';
$o .= '<div class="descriptive-text">' .
- t('The listed sites allow public registration for the $Projectname network. All sites in the network are interlinked so membership on any of them conveys membership in the network as a whole. Some sites may require subscription or provide tiered service plans. The provider links <strong>may</strong> provide additional details.') . '</div>' . EOL;
+ t('The listed hubs allow public registration for the $Projectname network. All hubs in the network are interlinked so membership on any of them conveys membership in the network as a whole. Some sites may require subscription or provide tiered service plans. The hub <strong>may</strong> provide additional details.') . '</div>' . EOL;
$ret = z_fetch_url($url);
if($ret['success']) {
$j = json_decode($ret['body'],true);
if($j) {
- $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('Project') . '</td><td>' . t('View hub ratings') . '</td>' . $rate_meta . '</tr>';
+ $o .= '<table class="table table-striped table-hover"><tr><td>' . t('Hub URL') . '</td><td>' . t('Access Type') . ' / ' . '<br />' . t('Registration Policy') . '</td><td>' . t('Project') . '</td><td colspan="2">' . t('Ratings') . '</td></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>' : '');
- $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>' . $jj['project'] . '</td><td><a href="ratings/' . $host . '" class="btn-btn-default"><i class="icon-eye-open"></i> ' . t('View ratings') . '</a></td>' . $rate_links . '</tr>';
+ $location = '';
+ if(!empty($jj['location'])) {
+ $location = '<p title="' . t('Location') . '" style="margin: 5px 5px 0 0; text-align: right"><i class="icon-globe"></i> ' . $jj['location'] . '</p>';
+ }
+ else {
+ $location = '<br />&nbsp;';
+ }
+ $urltext = str_replace(array('https://'), '', $jj['url']);
+ $o .= '<tr><td><a href="'. (($jj['sellpage']) ? $jj['sellpage'] : $jj['url'] . '/register' ) . '" ><i class="icon-link"></i> ' . $urltext . '</a>' . $location . '</td><td>' . $jj['access'] . ' / ' . $jj['register'] . '</td><td>' . $jj['project'] . '</td><td><a href="ratings/' . $host . '" class="btn-btn-default"><i class="icon-eye-open"></i> ' . t('View') . '</a></td>' . $rate_links . '</tr>';
}
}
diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl
index 6c1bc87a4..997b4489a 100755
--- a/view/tpl/register.tpl
+++ b/view/tpl/register.tpl
@@ -32,7 +32,7 @@
<div id="newchannel-role-end" class="newchannel-field-end"></div>
{{/if}}
<label for="newchannel-name" id="label-newchannel-name" class="register-label" >{{$label_name}}</label>
- <input type="text" name="name" id="newchannel-name" class="register-input" value="{{$name}}" />
+ <input type="text" maxlength="72" size="32" name="name" id="newchannel-name" class="register-input" value="{{$name}}" />
<div id="name-spinner"></div>
<div id="newchannel-name-feedback" class="register-feedback"></div>
<div id="newchannel-name-end" class="register-field-end"></div>
@@ -41,9 +41,6 @@
{{/if}}
-
-
-
<label for="register-email" id="label-register-email" class="register-label" >{{$label_email}}</label>
<input type="text" maxlength="72" size="32" name="email" id="register-email" class="register-input" value="{{$email}}" />
<div id="register-email-feedback" class="register-feedback"></div>
@@ -61,7 +58,7 @@
{{if $auto_create}}
<label for="newchannel-nickname" id="label-newchannel-nickname" class="register-label" >{{$label_nick}}</label>
- <input type="text" name="nickname" id="newchannel-nickname" class="register-input" value="{{$nickname}}" />
+ <input type="text" maxlength="72" size="32" name="nickname" id="newchannel-nickname" class="register-input" value="{{$nickname}}" />
<div id="nick-spinner"></div>
<div id="newchannel-nick-desc" style="text-align: right;">{{$nick_hub}}</div>
<div id="newchannel-nickname-feedback" class="register-feedback"></div>