diff options
author | Friendika <info@friendika.com> | 2011-11-09 03:46:36 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-11-09 03:46:36 -0800 |
commit | 2825c4957315fab90445bfec5a47bdb64f712355 (patch) | |
tree | b1d964cf4441948ddbbd6f6ac3e7062164a98835 | |
parent | 02d4a742abec9cbd9c11b5d7448f549bf3bdb62a (diff) | |
download | volse-hubzilla-2825c4957315fab90445bfec5a47bdb64f712355.tar.gz volse-hubzilla-2825c4957315fab90445bfec5a47bdb64f712355.tar.bz2 volse-hubzilla-2825c4957315fab90445bfec5a47bdb64f712355.zip |
more work on new contact edit page - plus first port to testbubble
-rw-r--r-- | mod/contacts.php | 26 | ||||
-rw-r--r-- | view/contact_edit.tpl | 53 | ||||
-rw-r--r-- | view/theme/duepuntozero/style.css | 36 | ||||
-rw-r--r-- | view/theme/testbubble/contact_edit.tpl | 67 | ||||
-rw-r--r-- | view/theme/testbubble/style.css | 65 |
5 files changed, 69 insertions, 178 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index 981caa48e..627c99d07 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -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') : ''), diff --git a/view/contact_edit.tpl b/view/contact_edit.tpl index 768d03cad..44eb850ac 100644 --- a/view/contact_edit.tpl +++ b/view/contact_edit.tpl @@ -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,32 +10,31 @@ <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" > + <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> </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> + <li><a href="fsuggest/$contact_id" id="contact-edit-suggest">$lblsuggest</a></li> {{ endif }} <li><a href="contacts/$contact_id/block" id="contact-edit-block-link" title="$block_text">$block_text</a></li> <li><a href="contacts/$contact_id/ignore" id="contact-edit-ignore-link" title="$ignore_text">$ignore_text</a></li> @@ -55,7 +50,7 @@ {{ 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-last-update-text">$lastupdtext <span id="contact-edit-last-updated">$last_update</span></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 }} diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 049817537..3235daaa4 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -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; diff --git a/view/theme/testbubble/contact_edit.tpl b/view/theme/testbubble/contact_edit.tpl deleted file mode 100644 index 9191a36b0..000000000 --- a/view/theme/testbubble/contact_edit.tpl +++ /dev/null @@ -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> diff --git a/view/theme/testbubble/style.css b/view/theme/testbubble/style.css index 4b66d16c5..e8679179c 100644 --- a/view/theme/testbubble/style.css +++ b/view/theme/testbubble/style.css @@ -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 = */ |