Browse Source

more contact edit page stuff

pull/3/head
Friendika 10 years ago
parent
commit
02d4a742ab
  1. 31
      mod/contacts.php
  2. 49
      view/contact_edit.tpl
  3. 41
      view/theme/duepuntozero/style.css

31
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 = '<div id="profile-edit-insecure"><p><img src="images/unlock_icon.gif" alt="' . t('Privacy Unavailable') . '" />&nbsp;'
. t('Private communications are not available for this contact.') . '</p></div>';
$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 <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.'),
'$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']) ? '<div id="block-message">' . t('Currently blocked') . '</div>' : ''),
'$ignored' => (($r[0]['readonly']) ? '<div id="ignore-message">' . t('Currently ignored') . '</div>' : ''),
'$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,

49
view/contact_edit.tpl

@ -14,6 +14,27 @@
<div id="contact-edit-drop-link-end"></div>
<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" >
<ul>
<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>
</ul>
</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 id="contact-edit-nav-end"></div>
<form action="contacts/$contact_id" method="post" >
<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-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span></div>
<div id="contact-edit-poll-text">$updpub</div>
$poll_interval
<div id="contact-edit-update-now" class="button"><a href="contacts/$contact_id/update" >$udnow</a></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>
</div>
{{ endif }}
{{ endif }}
<div id="contact-edit-end" ></div>
$insecure
$blocked
$ignored
<div id="contact-edit-info-wrapper">
<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 id="contact-edit-info-end"></div>
<input class="contact-edit-submit" type="submit" name="submit" value="$submit" />
<div id="contact-edit-profile-select-text">
<h4>$lbl_vis1</h4>
<p>$lbl_vis2
</p>
<p>$lbl_vis2</p>
</div>
$profile_select
<div id="contact-edit-profile-select-end"></div>

41
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;

Loading…
Cancel
Save