From 02d4a742abec9cbd9c11b5d7448f549bf3bdb62a Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 8 Nov 2011 21:22:45 -0800 Subject: [PATCH] more contact edit page stuff --- mod/contacts.php | 31 ++++++++++--------- view/contact_edit.tpl | 49 +++++++++++++++++-------------- view/theme/duepuntozero/style.css | 41 ++++---------------------- 3 files changed, 50 insertions(+), 71 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index 43d5613cce..981caa48e2 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -225,21 +225,23 @@ function contacts_content(&$a) { switch($r[0]['rel']) { case CONTACT_IS_FRIEND: $dir_icon = 'images/lrarrow.gif'; - $alt_text = t('Mutual Friendship'); + $relation_text = t('You are mutual friends with %s'); break; case CONTACT_IS_FOLLOWER; $dir_icon = 'images/larrow.gif'; - $alt_text = t('is a fan of yours'); + $relation_text = t('You are sharing with %s'); break; case CONTACT_IS_SHARING; $dir_icon = 'images/rarrow.gif'; - $alt_text = t('you are a fan of'); + $relation_text = t('%s is sharing with you'); break; default: break; } + $relation_text = t('Relationship:') . ' ' . sprintf($relation_text,$r[0]['name']); + if(($r[0]['network'] === 'dfrn') && ($r[0]['rel'])) { $url = "redir/{$r[0]['id']}"; $sparkle = ' class="sparkle" '; @@ -249,8 +251,7 @@ function contacts_content(&$a) { $sparkle = ''; } - $insecure = '

' . t('Privacy Unavailable') . ' ' - . t('Private communications are not available for this contact.') . '

'; + $insecure = t('Private communications are not available for this contact.'); $last_update = (($r[0]['last-update'] == '0000-00-00 00:00:00') ? t('Never') @@ -266,22 +267,24 @@ function contacts_content(&$a) { $nettype = sprintf( t('Network type: %s'),network_to_name($r[0]['network'])); $common = count_common_friends(local_user(),$r[0]['id']); - $common_text = (($common) ? sprintf( tt('%d contacts in common','%d contacts in common', $common),$common) : ''); - $common_view = t('View'); - $all_friends = t('View all contacts'); + $common_text = (($common) ? sprintf( tt('%d contact in common','%d contacts in common', $common),$common) : ''); + + $polling = (($r[0]['network'] === NETWORK_MAIL | $r[0]['network'] === NETWORK_FEED) ? 'polling' : ''); + + $x = count_all_friends(local_user(), $r[0]['id']); + $all_friends = (($x) ? t('View all contacts') : ''); + $o .= replace_macros($tpl,array( '$header' => t('Contact Editor'), '$submit' => t('Submit'), '$lbl_vis1' => t('Profile Visibility'), '$lbl_vis2' => sprintf( t('Please choose the profile you would like to display to %s when viewing your profile securely.'), $r[0]['name']), '$lbl_info1' => t('Contact Information / Notes'), - '$lbl_rep1' => t('Online Reputation'), - '$lbl_rep2' => t('Occasionally your friends may wish to inquire about this person\'s online legitimacy.'), - '$lbl_rep3' => t('You may help them choose whether or not to interact with this person by providing a reputation to guide them.'), - '$lbl_rep4' => t('Please take a moment to elaborate on this selection if you feel it could be helpful to others.'), + '$infedit' => t('Edit contact notes'), '$common_text' => $common_text, '$common_link' => $a->get_baseurl() . '/common/' . $r[0]['id'], '$all_friends' => $all_friends, + '$relation_text' => $relation_text, '$visit' => sprintf( t('Visit %s\'s profile [%s]'),$r[0]['name'],$r[0]['url']), '$blockunblock' => t('Block/Unblock contact'), '$ignorecont' => t('Ignore contact'), @@ -303,8 +306,8 @@ function contacts_content(&$a) { '$ignore_text' => (($r[0]['readonly']) ? t('Unignore this contact') : t('Ignore this contact') ), '$insecure' => (($r[0]['network'] !== NETWORK_DFRN && $r[0]['network'] !== NETWORK_MAIL && $r[0]['network'] !== NETWORK_FACEBOOK && $r[0]['network'] !== NETWORK_DIASPORA) ? $insecure : ''), '$info' => $r[0]['info'], - '$blocked' => (($r[0]['blocked']) ? '
' . t('Currently blocked') . '
' : ''), - '$ignored' => (($r[0]['readonly']) ? '
' . t('Currently ignored') . '
' : ''), + '$blocked' => (($r[0]['blocked']) ? t('Currently blocked') : ''), + '$ignored' => (($r[0]['readonly']) ? t('Currently ignored') : ''), '$photo' => $r[0]['photo'], '$name' => $r[0]['name'], '$dir_icon' => $dir_icon, diff --git a/view/contact_edit.tpl b/view/contact_edit.tpl index d1fa951f6d..768d03cad5 100644 --- a/view/contact_edit.tpl +++ b/view/contact_edit.tpl @@ -14,6 +14,27 @@
+ + + -
-{# $alt_text #} - {{ if $poll_enabled }} + {{ if $poll_enabled }}
$lastupdtext$last_update
-
$updpub
- $poll_interval - + $updpub $poll_interval $udnow
- {{ endif }} + {{ endif }}
-$insecure -$blocked -$ignored - -

$lbl_info1

- + +
-

$lbl_vis1

-

$lbl_vis2 -

+

$lbl_vis2

$profile_select
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index e0f0c6d2bf..049817537f 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -804,11 +804,6 @@ input#dfrn-url { clear: both; } -#contact-edit-end { - clear: both; - margin-bottom: 65px; -} - #fsuggest-desc, #fsuggest-submit-wrapper { margin-top: 15px; margin-bottom: 15px; @@ -1404,16 +1399,10 @@ input#dfrn-url { font-weight: bold; } -#contact-edit-nettype { - margin-top: 5px; - margin-left: 30px; -} - - #contact-edit-poll-wrapper { - margin-left: 50px; - margin-top: 30px; + margin-top: 15px; } + #contact-edit-poll-text { margin-top: 15px; margin-bottom: 5px; @@ -1436,23 +1425,10 @@ input#dfrn-url { margin-right: 20px; } -/* -#contact-edit-drop-link img { - margin-left: 20px; - border: none; -} -*/ - #contact-edit-nav-end { clear: both; } -#contact-edit-direction-icon { - float: left; - margin-top: 70px; - margin-right: 2px; -} - #contact-edit-photo { float: left; } @@ -1473,6 +1449,10 @@ input#dfrn-url { float: left; } +#contact-edit-info-links div { + margin-left: 30px; +} + #contact-edit-end { clear: both; } @@ -1517,12 +1497,7 @@ input#dfrn-url { #block-message, #ignore-message { - margin-top: 20px; color: #FF0000; - font-size: 1.1em; - border: 1px solid #FF8888; - background-color: #FFEEEE; - padding: 10px; } #profile-edit-insecure { @@ -1536,10 +1511,6 @@ input#dfrn-url { width: 587px; } -#block-message, #ignore-message { - width: 180px; -} - #profile-jot-text { height: 20px; color:#cccccc;