more work on new contact edit page - plus first port to testbubble

This commit is contained in:
Friendika 2011-11-09 03:46:36 -08:00
parent 02d4a742ab
commit 2825c49573
5 changed files with 69 additions and 178 deletions

View file

@ -8,6 +8,7 @@ function contacts_init(&$a) {
return;
$contact_id = 0;
if(($a->argc == 2) && intval($a->argv[1])) {
$contact_id = intval($a->argv[1]);
$r = q("SELECT * FROM `contact` WHERE `uid` = %d and `id` = %d LIMIT 1",
@ -25,7 +26,15 @@ function contacts_init(&$a) {
if(! x($a->page,'aside'))
$a->page['aside'] = '';
$a->page['aside'] .= follow_widget();
if($contact_id) {
$a->data['contact'] = $r[0];
$o .= '<div class="vcard">';
$o .= '<div class="fn">' . $a->data['contact']['name'] . '</div>';
$o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->data['contact']['photo'] . '" alt="' . $a->data['contact']['name'] . '" /></div>';
$o .= '</div>';
$a->page['aside'] .= $o;
}
$a->page['aside'] .= group_side('contacts','group',false,0,$contact_id);
@ -240,7 +249,7 @@ function contacts_content(&$a) {
break;
}
$relation_text = t('Relationship:') . ' ' . sprintf($relation_text,$r[0]['name']);
$relation_text = sprintf($relation_text,$r[0]['name']);
if(($r[0]['network'] === 'dfrn') && ($r[0]['rel'])) {
$url = "redir/{$r[0]['id']}";
@ -288,22 +297,21 @@ function contacts_content(&$a) {
'$visit' => sprintf( t('Visit %s\'s profile [%s]'),$r[0]['name'],$r[0]['url']),
'$blockunblock' => t('Block/Unblock contact'),
'$ignorecont' => t('Ignore contact'),
'$altcrepair' => t('Repair contact URL settings'),
'$lblcrepair' => t("Repair contact URL settings"),
'$lblcrepair' => t("Repair URL settings"),
'$lblrecent' => t('View conversations'),
'$lblsuggest' => $lblsuggest,
'$delete' => t('Delete contact'),
'$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: '),
'$lastupdtext' => t('Last update:'),
'$updpub' => t('Update public posts'),
'$last_update' => $last_update,
'$udnow' => t('Update now'),
'$profile_select' => contact_profile_assign($r[0]['profile-id'],(($r[0]['network'] !== 'dfrn') ? true : false)),
'$profile_select' => contact_profile_assign($r[0]['profile-id'],(($r[0]['network'] !== NETWORK_DFRN) ? true : false)),
'$contact_id' => $r[0]['id'],
'$block_text' => (($r[0]['blocked']) ? t('Unblock this contact') : t('Block this contact') ),
'$ignore_text' => (($r[0]['readonly']) ? t('Unignore this contact') : t('Ignore this contact') ),
'$block_text' => (($r[0]['blocked']) ? t('Unblock') : t('Block') ),
'$ignore_text' => (($r[0]['readonly']) ? t('Unignore') : t('Ignore') ),
'$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') : ''),

View file

@ -2,10 +2,6 @@
<h2>$header</h2>
<div id="contact-edit-wrapper" >
<div id="contact-edit-banner-name">$name</div>
<div id="contact-edit-photo" >
<a href="$url" title="$visit" /><img src="$photo" $sparkle alt="$name" /></a>
</div>
<div id="contact-edit-drop-link" >
<a href="contacts/$contact_id/drop" class="icon drophide" id="contact-edit-drop-link" onclick="return confirmDelete();" title="$delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>
@ -14,30 +10,29 @@
<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>
<li><div id="contact-edit-rel">$relation_text</div></li>
<li><div id="contact-edit-nettype">$nettype</div></li>
{{ if $insecure }}
<li><div id="insecure-message">$insecure</div></li>
{{ endif }}
{{ if $blocked }}
<li><div id="block-message">$blocked</div></li>
{{ endif }}
{{ if $ignored }}
<li><div id="ignore-message">$ignored</div></li>
{{ endif }}
{{ if $common_text }}
<li><div id="contact-edit-common"><a href="common/$contact_id">$common_text</a></div></li>
{{ endif }}
{{ if $all_friends }}
<li><div id="contact-edit-allfriends"><a href="allfriends/$contact_id">$all_friends</a></div></li>
{{ endif }}
<li>&nbsp;</li>
<li><a href="network/?cid=$contact_id" id="contact-edit-view-recent">$lblrecent</a></li>
{{ if $lblsuggest }}
<li><a href="fsuggest/$contact_id" id="contact-edit-suggest">$lblsuggest</a></li>
{{ endif }}

View file

@ -1412,14 +1412,17 @@ input#dfrn-url {
margin-top: 15px;
}
#contact-edit-photo-wrapper {
margin-bottom: 20px;
}
#contact-edit-links{
clear: both;
}
#contact-edit-links ul {
list-style: none;
}
#contact-edit-links li {
margin-top: 5px;
}
#contact-edit-drop-link {
float: right;
margin-right: 20px;
@ -1429,29 +1432,9 @@ input#dfrn-url {
clear: both;
}
#contact-edit-photo {
float: left;
}
#contact-edit-photo-end {
clear: both;
}
#contact-edit-photo-wrapper {
float: left;
}
#contact-edit-wrapper {
width: 100%;
}
#contact-edit-nav-wrapper {
/* width: 450px; */
float: left;
}
#contact-edit-info-links div {
margin-left: 30px;
}
#contact-edit-end {
clear: both;
@ -1464,7 +1447,6 @@ input#dfrn-url {
.contact-edit-submit {
margin-top: 20px;
/*margin-left: 50px;*/
}
@ -2475,10 +2457,6 @@ a.mail-list-link {
width: 300px;
}
#contact-edit-links .icon, #contact-drop-links .icon {
margin: 0px 3px 0px 3px;
}
#netsearch-box {
margin-top: 20px;

View file

@ -1,67 +0,0 @@
<h2>$header</h2>
<div id="contact-edit-banner-name">$name</div>
$nettype
<form action="contacts/$contact_id" method="post" >
<input type="hidden" name="contact_id" value="$contact_id">
<div id="contact-edit-wrapper" >
<div id="contact-edit-photo-wrapper" >
<img id="contact-edit-direction-icon" src="$dir_icon" alt="$alt_text" title="$alt_text" />
<div id="contact-edit-photo" class="lframe">
<a href="$url" title="$visit" /><img src="$photo" $sparkle alt="$name" /></a>
</div>
<div id="contact-edit-photo-end" ></div>
</div>
<div id="contact-edit-nav-wrapper" >
<div id="contact-edit-links" >
<a href="contacts/$contact_id/block" class="icon block" id="contact-edit-block-link" title="$block_text"></a>
<a href="contacts/$contact_id/ignore" class="icon no" id="contact-edit-ignore-link" title="$ignore_text"></a>
<a href="crepair/$contact_id" class="icon tools" id="contact-edit-repair" title="$lblcrepair"></a>
<a href="contacts/$contact_id/drop" class="icon drophide" id="contact-edit-drop-link" onclick="return confirmDelete();" title="$delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>
</div>
<div id="contact-edit-nav-end"></div>
{{ 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>
</div>
{{ endif }}
</div>
<div id="contact-edit-end" ></div>
$insecure
$blocked
$ignored
<div id="view-recent-wrapper"><a href="network/?cid=$contact_id" id="contact-view-recent" class="button">$lblrecent</a></div>
$lblsuggest
<div id="contact-edit-info-wrapper">
<h4>$lbl_info1</h4>
<textarea id="contact-edit-info" rows="10" cols="72" name="info" >$info</textarea>
</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>
</div>
$profile_select
<div id="contact-edit-profile-select-end"></div>
<input class="contact-edit-submit" type="submit" name="submit" value="$submit" />
</form>
</div>

View file

@ -1830,41 +1830,30 @@ margin-left: 0px;
}
#contact-edit-banner-name { font-size: 1.5em; margin-left: 30px; font-variant: small-caps; }
#contact-edit-photo-wrapper {position: relative; float: left; padding: 20px;}
#contact-edit-direction-icon { position: absolute; top: 60px; left:0px;}
#contact-edit-nav-wrapper { margin-left: 210px; }
#contact-edit-links { float: left; margin-top: 23px; }
#contact-edit-nav-wrapper .icon {
border: 1px solid #babdb6;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
#contact-edit-nettype {
font-size: 1em;
font-variant: small-caps;
margin-left: 30px;
margin-bottom: 0px;
padding-bottom: 0px;
}
#contact-edit-poll-wrapper { margin-left: 50px; width: 300px;}
#contact-edit-last-update-text { margin-bottom: 15px; padding-top: 20px; padding-left: 10px; font-size: 0.9em; max-width: 300px; }
#contact-edit-last-updated { font-weight: bold; }
#contact-edit-poll-text { display: inline; font-size: 0.9em; padding-left: 10px; }
#contact-edit-end { clear: both; margin-bottom: 65px;}
#contact-edit-update-now {
width: 80px;
padding: 5px 10px 5px 10px;
margin-left: 125px;
margin-top: 10px;
font-style: bold;
padding:7px;
width: 165px;
margin: auto;
margin-left: 40px;
-moz-box-shadow:inset 0px 1px 0px 0px #cfcfcf;
-webkit-box-shadow:inset 0px 1px 0px 0px #cfcfcf;
box-shadow:inset 0px 1px 0px 0px #cfcfcf;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #bdbdbd), color-stop(1, #a2a2a2) );
background:-moz-linear-gradient( center top, #bdbdbd 5%, #a2a2a2 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bdbdbd', endColorstr='#a2a2a2');
background-color:#bdbdbd;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
display:inline-block;
color:#efefef;
text-decoration:none;
text-align: center;
}
#contact-edit-update-now:hover {
color: #efefef;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b20202), color-stop(1, #d60808) );
background:-moz-linear-gradient( center top, #b20202 5%, #d60808 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b20202', endColorstr='#d60808');
@ -1872,20 +1861,18 @@ margin-left: 0px;
}
#contact-edit-update-now:active {
background-color: #b20202;
position:relative;
top:1px;
}
#contact-edit-update-now a {
color: #efefef;
font-size: 14px;
text-align: center;
margin: auto;
}
#contact-edit-profile-select-text > p {
font-size: 1em;
}
.contact-photo-menu-button {
position: absolute;
background-image: url("photo-menu.jpg");
@ -2094,13 +2081,6 @@ margin-left: 0px;
font-variant: normal;
}
#contact-view-recent {
float: left;
width: 150px;
padding: 5px;
margin-bottom: 20px;
}
#contact-suggest {
float: left;
margin-left: 10px;
@ -2141,9 +2121,6 @@ margin-left: 0px;
color: #efefef;
}
#contact-edit-info-wrapper {
clear: both;
}
/* ===================================== */
/* = Register, Settings, Profile Forms = */