mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:00:15 +00:00
some minor work on contact edit page
This commit is contained in:
parent
21c03fb522
commit
99ea045723
6 changed files with 38 additions and 6 deletions
|
@ -46,10 +46,11 @@ function contact_reputation($current) {
|
|||
}
|
||||
|
||||
|
||||
function contact_poll_interval($current) {
|
||||
function contact_poll_interval($current, $disabled = false) {
|
||||
|
||||
$dis = (($disabled) ? ' disabled="disabled" ' : '');
|
||||
$o = '';
|
||||
$o .= '<select id="contact-poll-interval" name="poll" />' . "\r\n";
|
||||
$o .= "<select id=\"contact-poll-interval\" name=\"poll\" $dis />" . "\r\n";
|
||||
|
||||
$rep = array(
|
||||
0 => t('Frequently'),
|
||||
|
@ -67,3 +68,13 @@ function contact_poll_interval($current) {
|
|||
$o .= "</select>\r\n";
|
||||
return $o;
|
||||
}
|
||||
|
||||
|
||||
function network_to_name($s) {
|
||||
|
||||
call_hooks('network_to_name', $s);
|
||||
|
||||
return str_replace(array(NETWORK_DFRN,NETWORK_OSTATUS,NETWORK_FEED,NETWORK_MAIL,NETWORK_DIASPORA,NETWORK_FACEBOOK,NETWORK_ZOT),
|
||||
array(t('Friendika'),t('OStatus'),t('RSS/Atom'),t('Email'),t('Diaspora'),t('Facebook'),t('Zot!')),$s);
|
||||
|
||||
}
|
||||
|
|
|
@ -292,6 +292,9 @@ function contacts_content(&$a) {
|
|||
$lblsuggest = (($r[0]['network'] === NETWORK_DFRN)
|
||||
? '<div id="contact-suggest-wrapper"><a href="fsuggest/' . $r[0]['id'] . '" id="contact-suggest">' . t('Suggest friends') . '</a></div>' : '');
|
||||
|
||||
$poll_enabled = (($r[0]['network'] !== NETWORK_DIASPORA) ? true : false);
|
||||
|
||||
$nettype = '<div id="contact-edit-nettype">' . sprintf( t('Network type: %s'),network_to_name($r[0]['network'])) . '</div>';
|
||||
|
||||
$o .= replace_macros($tpl,array(
|
||||
'$header' => t('Contact Editor'),
|
||||
|
@ -312,7 +315,9 @@ function contacts_content(&$a) {
|
|||
'$lblsuggest' => $lblsuggest,
|
||||
'$grps' => $grps,
|
||||
'$delete' => t('Delete contact'),
|
||||
'$poll_interval' => contact_poll_interval($r[0]['priority']),
|
||||
'$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: '),
|
||||
'$last_update' => $last_update,
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
<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">
|
||||
|
||||
|
@ -28,13 +30,14 @@
|
|||
</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"><a href="contacts/$contact_id/update">$udnow</a></div>
|
||||
<div id="contact-edit-update-now"><a href="contacts/$contact_id/update" >$udnow</a></div>
|
||||
</div>
|
||||
{{ endif }}
|
||||
</div>
|
||||
<div id="contact-edit-end" ></div>
|
||||
|
||||
|
|
|
@ -723,7 +723,7 @@ div[id$="wrapper"] br { clear: left; }
|
|||
#contact-edit-last-update-text { margin-bottom: 15px; }
|
||||
#contact-edit-last-updated { font-weight: bold; }
|
||||
#contact-edit-poll-text { display: inline; }
|
||||
#contact-edit-end { clear: both; }
|
||||
#contact-edit-end { clear: both; margin-bottom: 65px;}
|
||||
|
||||
.contact-photo-menu-button {
|
||||
position: absolute;
|
||||
|
|
|
@ -788,6 +788,7 @@ input#dfrn-url {
|
|||
|
||||
#contact-edit-end {
|
||||
clear: both;
|
||||
margin-bottom: 65px;
|
||||
}
|
||||
|
||||
#fsuggest-desc, #fsuggest-submit-wrapper {
|
||||
|
@ -1378,6 +1379,12 @@ input#dfrn-url {
|
|||
margin-left: 30px;
|
||||
}
|
||||
|
||||
#contact-edit-nettype {
|
||||
margin-top: 5px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
|
||||
#contact-edit-poll-wrapper {
|
||||
margin-left: 50px;
|
||||
margin-top: 30px;
|
||||
|
|
|
@ -886,6 +886,7 @@ input#dfrn-url {
|
|||
|
||||
#contact-edit-end {
|
||||
clear: both;
|
||||
margin-bottom: 65px;
|
||||
}
|
||||
|
||||
.contact-photo-menu-button {
|
||||
|
@ -1451,6 +1452,11 @@ padding: 5px 10px 0px;
|
|||
font-weight: bold;
|
||||
margin-left: 30px;
|
||||
}
|
||||
#contact-edit-nettype {
|
||||
margin-top: 5px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
|
||||
#contact-edit-poll-wrapper {
|
||||
margin-left: 50px;
|
||||
|
|
Loading…
Reference in a new issue