more contact edit page stuff

This commit is contained in:
Friendika 2011-11-08 21:22:45 -08:00
parent 05cabf24a9
commit 02d4a742ab
3 changed files with 50 additions and 71 deletions

View File

@ -225,21 +225,23 @@ function contacts_content(&$a) {
switch($r[0]['rel']) { switch($r[0]['rel']) {
case CONTACT_IS_FRIEND: case CONTACT_IS_FRIEND:
$dir_icon = 'images/lrarrow.gif'; $dir_icon = 'images/lrarrow.gif';
$alt_text = t('Mutual Friendship'); $relation_text = t('You are mutual friends with %s');
break; break;
case CONTACT_IS_FOLLOWER; case CONTACT_IS_FOLLOWER;
$dir_icon = 'images/larrow.gif'; $dir_icon = 'images/larrow.gif';
$alt_text = t('is a fan of yours'); $relation_text = t('You are sharing with %s');
break; break;
case CONTACT_IS_SHARING; case CONTACT_IS_SHARING;
$dir_icon = 'images/rarrow.gif'; $dir_icon = 'images/rarrow.gif';
$alt_text = t('you are a fan of'); $relation_text = t('%s is sharing with you');
break; break;
default: default:
break; break;
} }
$relation_text = t('Relationship:') . ' ' . sprintf($relation_text,$r[0]['name']);
if(($r[0]['network'] === 'dfrn') && ($r[0]['rel'])) { if(($r[0]['network'] === 'dfrn') && ($r[0]['rel'])) {
$url = "redir/{$r[0]['id']}"; $url = "redir/{$r[0]['id']}";
$sparkle = ' class="sparkle" '; $sparkle = ' class="sparkle" ';
@ -249,8 +251,7 @@ function contacts_content(&$a) {
$sparkle = ''; $sparkle = '';
} }
$insecure = '<div id="profile-edit-insecure"><p><img src="images/unlock_icon.gif" alt="' . t('Privacy Unavailable') . '" />&nbsp;' $insecure = t('Private communications are not available for this contact.');
. t('Private communications are not available for this contact.') . '</p></div>';
$last_update = (($r[0]['last-update'] == '0000-00-00 00:00:00') $last_update = (($r[0]['last-update'] == '0000-00-00 00:00:00')
? t('Never') ? t('Never')
@ -266,22 +267,24 @@ function contacts_content(&$a) {
$nettype = sprintf( t('Network type: %s'),network_to_name($r[0]['network'])); $nettype = sprintf( t('Network type: %s'),network_to_name($r[0]['network']));
$common = count_common_friends(local_user(),$r[0]['id']); $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_text = (($common) ? sprintf( tt('%d contact in common','%d contacts in common', $common),$common) : '');
$common_view = t('View');
$all_friends = t('View all contacts'); $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( $o .= replace_macros($tpl,array(
'$header' => t('Contact Editor'), '$header' => t('Contact Editor'),
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$lbl_vis1' => t('Profile Visibility'), '$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_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_info1' => t('Contact Information / Notes'),
'$lbl_rep1' => t('Online Reputation'), '$infedit' => t('Edit contact notes'),
'$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 <em>reputation</em> to guide them.'),
'$lbl_rep4' => t('Please take a moment to elaborate on this selection if you feel it could be helpful to others.'),
'$common_text' => $common_text, '$common_text' => $common_text,
'$common_link' => $a->get_baseurl() . '/common/' . $r[0]['id'], '$common_link' => $a->get_baseurl() . '/common/' . $r[0]['id'],
'$all_friends' => $all_friends, '$all_friends' => $all_friends,
'$relation_text' => $relation_text,
'$visit' => sprintf( t('Visit %s\'s profile [%s]'),$r[0]['name'],$r[0]['url']), '$visit' => sprintf( t('Visit %s\'s profile [%s]'),$r[0]['name'],$r[0]['url']),
'$blockunblock' => t('Block/Unblock contact'), '$blockunblock' => t('Block/Unblock contact'),
'$ignorecont' => t('Ignore 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') ), '$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 : ''), '$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'], '$info' => $r[0]['info'],
'$blocked' => (($r[0]['blocked']) ? '<div id="block-message">' . t('Currently blocked') . '</div>' : ''), '$blocked' => (($r[0]['blocked']) ? t('Currently blocked') : ''),
'$ignored' => (($r[0]['readonly']) ? '<div id="ignore-message">' . t('Currently ignored') . '</div>' : ''), '$ignored' => (($r[0]['readonly']) ? t('Currently ignored') : ''),
'$photo' => $r[0]['photo'], '$photo' => $r[0]['photo'],
'$name' => $r[0]['name'], '$name' => $r[0]['name'],
'$dir_icon' => $dir_icon, '$dir_icon' => $dir_icon,

View File

@ -14,6 +14,27 @@
<div id="contact-edit-drop-link-end"></div> <div id="contact-edit-drop-link-end"></div>
<div id="contact-edit-nav-wrapper" > <div id="contact-edit-nav-wrapper" >
<div id="contact-edit-info-links">
<div id="contact-edit-nettype">$nettype</div>
<div id="contact-edit-rel">$relation_text</div>
{{ if $insecure }}
<div id="insecure message"><span class="icon unlock"></span> $insecure</div>
{{ endif }}
{{ if $blocked }}
<div id="block-message">$blocked</div>
{{ endif }}
{{ if $ignored }}
<div id="ignore-message">$ignored</div>
{{ endif }}
{{ if $common_text }}
<div id="contact-edit-common"><a href="common/$contact_id">$common_text</a></div>
{{ endif }}
{{ if $all_friends }}
<div id="contact-edit-allfriends"><a href="allfriends/$contact_id">$all_friends</a></div>
{{ endif }}
</div>
<div id="contact-edit-links" > <div id="contact-edit-links" >
<ul> <ul>
<li><a href="network/?cid=$contact_id" id="contact-view-recent">$lblrecent</a></li> <li><a href="network/?cid=$contact_id" id="contact-view-recent">$lblrecent</a></li>
@ -25,50 +46,34 @@
<li><a href="crepair/$contact_id" id="contact-edit-repair" title="$lblcrepair">$lblcrepair</a></li> <li><a href="crepair/$contact_id" id="contact-edit-repair" title="$lblcrepair">$lblcrepair</a></li>
</ul> </ul>
</div> </div>
<div id="contact-edit-info-links">
<div id="contact-edit-nettype">$nettype</div>
{{ if $common_text }}
<div id="contact-edit-common"><a href="common/$contact_id">$common_text</a></div>
{{ endif }}
<div id="contact-edit-allfriends"><a href="allfriends/$contact_id">$all_friends</a></div>
</div>
</div> </div>
<div id="contact-edit-nav-end"></div> <div id="contact-edit-nav-end"></div>
<form action="contacts/$contact_id" method="post" > <form action="contacts/$contact_id" method="post" >
<input type="hidden" name="contact_id" value="$contact_id"> <input type="hidden" name="contact_id" value="$contact_id">
{# <img id="contact-edit-direction-icon" src="$dir_icon" alt="$alt_text" title="$alt_text" /> #}
{{ if $poll_enabled }} {{ if $poll_enabled }}
<div id="contact-edit-poll-wrapper"> <div id="contact-edit-poll-wrapper">
<div id="contact-edit-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span></div> <div id="contact-edit-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span></div>
<div id="contact-edit-poll-text">$updpub</div> <span id="contact-edit-poll-text">$updpub</span> $poll_interval <span id="contact-edit-update-now" class="button"><a href="contacts/$contact_id/update" >$udnow</a></span>
$poll_interval
<div id="contact-edit-update-now" class="button"><a href="contacts/$contact_id/update" >$udnow</a></div>
</div> </div>
{{ endif }} {{ endif }}
<div id="contact-edit-end" ></div> <div id="contact-edit-end" ></div>
$insecure
$blocked
$ignored
<div id="contact-edit-info-wrapper"> <div id="contact-edit-info-wrapper">
<h4>$lbl_info1</h4> <h4>$lbl_info1</h4>
<textarea id="contact-edit-info" rows="10" cols="72" name="info" >$info</textarea> <textarea id="contact-edit-info" rows=8 cols=72 name="info" >$info</textarea>
<input class="contact-edit-submit" type="submit" name="submit" value="$submit" />
</div> </div>
<div id="contact-edit-info-end"></div> <div id="contact-edit-info-end"></div>
<input class="contact-edit-submit" type="submit" name="submit" value="$submit" />
<div id="contact-edit-profile-select-text"> <div id="contact-edit-profile-select-text">
<h4>$lbl_vis1</h4> <h4>$lbl_vis1</h4>
<p>$lbl_vis2 <p>$lbl_vis2</p>
</p>
</div> </div>
$profile_select $profile_select
<div id="contact-edit-profile-select-end"></div> <div id="contact-edit-profile-select-end"></div>

View File

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