diff --git a/include/contact_selectors.php b/include/contact_selectors.php index ac1e38e4f..1303acf74 100644 --- a/include/contact_selectors.php +++ b/include/contact_selectors.php @@ -46,10 +46,11 @@ function contact_reputation($current) { } -function contact_poll_interval($current) { +function contact_poll_interval($current, $disabled = false) { + $dis = (($disabled) ? ' disabled="disabled" ' : ''); $o = ''; - $o .= '" . "\r\n"; $rep = array( 0 => t('Frequently'), @@ -67,3 +68,13 @@ function contact_poll_interval($current) { $o .= "\r\n"; return $o; } + + +function network_to_name($s) { + + call_hooks('network_to_name', $s); + + return str_replace(array(NETWORK_DFRN,NETWORK_OSTATUS,NETWORK_FEED,NETWORK_MAIL,NETWORK_DIASPORA,NETWORK_FACEBOOK,NETWORK_ZOT), + array(t('Friendika'),t('OStatus'),t('RSS/Atom'),t('Email'),t('Diaspora'),t('Facebook'),t('Zot!')),$s); + +} diff --git a/mod/contacts.php b/mod/contacts.php index 8f851e9e0..5d72cff88 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -292,6 +292,9 @@ function contacts_content(&$a) { $lblsuggest = (($r[0]['network'] === NETWORK_DFRN) ? '
' . t('Suggest friends') . '
' : ''); + $poll_enabled = (($r[0]['network'] !== NETWORK_DIASPORA) ? true : false); + + $nettype = '
' . sprintf( t('Network type: %s'),network_to_name($r[0]['network'])) . '
'; $o .= replace_macros($tpl,array( '$header' => t('Contact Editor'), @@ -312,7 +315,9 @@ function contacts_content(&$a) { '$lblsuggest' => $lblsuggest, '$grps' => $grps, '$delete' => t('Delete contact'), - '$poll_interval' => contact_poll_interval($r[0]['priority']), + '$nettype' => $nettype, + '$poll_interval' => contact_poll_interval($r[0]['priority'],(! $poll_enabled)), + '$poll_enabled' => $poll_enabled, '$lastupdtext' => t('Last updated: '), '$updpub' => t('Update public posts: '), '$last_update' => $last_update, diff --git a/view/contact_edit.tpl b/view/contact_edit.tpl index 66479210f..0ee88d372 100644 --- a/view/contact_edit.tpl +++ b/view/contact_edit.tpl @@ -3,6 +3,8 @@
$name
+$nettype +
@@ -28,13 +30,14 @@
- + {{ if $poll_enabled }}
$lastupdtext$last_update
$updpub
$poll_interval - +
+ {{ endif }}
diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css index aa8d82bbb..78efb57ff 100644 --- a/view/theme/dispy/style.css +++ b/view/theme/dispy/style.css @@ -723,7 +723,7 @@ div[id$="wrapper"] br { clear: left; } #contact-edit-last-update-text { margin-bottom: 15px; } #contact-edit-last-updated { font-weight: bold; } #contact-edit-poll-text { display: inline; } -#contact-edit-end { clear: both; } +#contact-edit-end { clear: both; margin-bottom: 65px;} .contact-photo-menu-button { position: absolute; diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 6ac28cb95..f47af934c 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -788,6 +788,7 @@ input#dfrn-url { #contact-edit-end { clear: both; + margin-bottom: 65px; } #fsuggest-desc, #fsuggest-submit-wrapper { @@ -1378,6 +1379,12 @@ input#dfrn-url { margin-left: 30px; } +#contact-edit-nettype { + margin-top: 5px; + margin-left: 30px; +} + + #contact-edit-poll-wrapper { margin-left: 50px; margin-top: 30px; diff --git a/view/theme/loozah/style.css b/view/theme/loozah/style.css index 74d9058f7..781526eae 100644 --- a/view/theme/loozah/style.css +++ b/view/theme/loozah/style.css @@ -886,6 +886,7 @@ input#dfrn-url { #contact-edit-end { clear: both; + margin-bottom: 65px; } .contact-photo-menu-button { @@ -1451,6 +1452,11 @@ padding: 5px 10px 0px; font-weight: bold; margin-left: 30px; } +#contact-edit-nettype { + margin-top: 5px; + margin-left: 30px; +} + #contact-edit-poll-wrapper { margin-left: 50px;