Haromonize Find People Widget.
In the right_aside on the /contacts page in the left aside there are almost identical widgets to search for contacts. Drop one and use common widget in both places.
This commit is contained in:
parent
666375fed1
commit
390983a331
|
@ -55,19 +55,24 @@ class Widget
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return replace_macros(get_markup_template('peoplefind.tpl'), array(
|
$nv = [];
|
||||||
'$findpeople' => L10n::t('Find People'),
|
$nv['findpeople'] = L10n::t('Find People');
|
||||||
'$desc' => L10n::t('Enter name or interest'),
|
$nv['desc'] = L10n::t('Enter name or interest');
|
||||||
'$label' => L10n::t('Connect/Follow'),
|
$nv['label'] = L10n::t('Connect/Follow');
|
||||||
'$hint' => L10n::t('Examples: Robert Morgenstein, Fishing'),
|
$nv['hint'] = L10n::t('Examples: Robert Morgenstein, Fishing');
|
||||||
'$findthem' => L10n::t('Find'),
|
$nv['findthem'] = L10n::t('Find');
|
||||||
'$suggest' => L10n::t('Friend Suggestions'),
|
$nv['suggest'] = L10n::t('Friend Suggestions');
|
||||||
'$similar' => L10n::t('Similar Interests'),
|
$nv['similar'] = L10n::t('Similar Interests');
|
||||||
'$random' => L10n::t('Random Profile'),
|
$nv['random'] = L10n::t('Random Profile');
|
||||||
'$inv' => L10n::t('Invite Friends'),
|
$nv['inv'] = L10n::t('Invite Friends');
|
||||||
'$directory' => L10n::t('View Global Directory'),
|
$nv['directory'] = L10n::t('Global Directory');
|
||||||
'$global_dir' => $global_dir
|
$nv['global_dir'] = $global_dir;
|
||||||
));
|
$nv['local_directory'] = L10n::t('Local Directory');
|
||||||
|
|
||||||
|
$aside = [];
|
||||||
|
$aside['$nv'] = $nv;
|
||||||
|
|
||||||
|
return replace_macros(get_markup_template('peoplefind.tpl'), $aside);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
|
|
||||||
<div id="peoplefind-sidebar" class="widget">
|
<div id="peoplefind-sidebar" class="widget">
|
||||||
<h3>{{$findpeople}}</h3>
|
<h3>{{$nv.findpeople}}</h3>
|
||||||
<div id="peoplefind-desc">{{$desc}}</div>
|
<div id="peoplefind-desc">{{$nv.desc}}</div>
|
||||||
<form action="dirfind" method="get" />
|
<form action="dirfind" method="get" />
|
||||||
<input id="side-peoplefind-url" type="text" name="search" size="24" title="{{$hint|escape:'html'}}" /><input id="side-peoplefind-submit" type="submit" name="submit" value="{{$findthem|escape:'html'}}" />
|
<input id="side-peoplefind-url" type="text" name="search" size="24" title="{{$nv.hint|escape:'html'}}" /><input id="side-peoplefind-submit" type="submit" name="submit" value="{{$nv.findthem|escape:'html'}}" />
|
||||||
</form>
|
</form>
|
||||||
<div class="side-link" id="side-match-link"><a href="match" >{{$similar}}</a></div>
|
<div class="side-link" id="side-match-link"><a href="match" >{{$nv.similar}}</a></div>
|
||||||
<div class="side-link" id="side-suggest-link"><a href="suggest" >{{$suggest}}</a></div>
|
<div class="side-link" id="side-suggest-link"><a href="suggest" >{{$nv.suggest}}</a></div>
|
||||||
<div class="side-link" id="side-directory-link"><a href="{{$global_dir}}" target="extlink" >{{$directory}}</a></div>
|
<div class="side-link" id="side-directory-link"><a href="directory" >{{$nv.local_directory}}</a></div>
|
||||||
<div class="side-link" id="side-random-profile-link" ><a href="randprof" target="extlink" >{{$random}}</a></div>
|
<div class="side-link" id="side-directory-link"><a href="{{$nv.global_dir}}" target="extlink" >{{$nv.directory}}</a></div>
|
||||||
{{if $inv}}
|
<div class="side-link" id="side-random-profile-link" ><a href="randprof" target="extlink" >{{$nv.random}}</a></div>
|
||||||
<div class="side-link" id="side-invite-link" ><a href="invite" >{{$inv}}</a></div>
|
{{if $nv.inv}}
|
||||||
|
<div class="side-link" id="side-invite-link" ><a href="invite" >{{$nv.inv}}</a></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
|
|
||||||
<div id="peoplefind-sidebar" class="widget">
|
<div id="peoplefind-sidebar" class="widget">
|
||||||
<h3>{{$findpeople}}</h3>
|
<h3>{{$nv.findpeople}}</h3>
|
||||||
|
|
||||||
<form action="dirfind" method="get">
|
<form action="dirfind" method="get">
|
||||||
{{* The search field *}}
|
{{* The search field *}}
|
||||||
<label for="side-peoplefind-url" id="peoplefind-desc">{{$desc}}</label>
|
<label for="side-peoplefind-url" id="peoplefind-desc">{{$nv.desc}}</label>
|
||||||
<div class="form-group form-group-search">
|
<div class="form-group form-group-search">
|
||||||
<input id="side-peoplefind-url" class="search-input form-control form-search" type="text" name="search" data-toggle="tooltip" title="{{$hint|escape:'html'}}" />
|
<input id="side-peoplefind-url" class="search-input form-control form-search" type="text" name="search" data-toggle="tooltip" title="{{$nv.hint|escape:'html'}}" />
|
||||||
<button id="side-peoplefind-submit" class="btn btn-default btn-sm form-button-search" type="submit">{{$findthem}}</button>
|
<button id="side-peoplefind-submit" class="btn btn-default btn-sm form-button-search" type="submit">{{$nv.findthem|escape: 'html'}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
{{* Directory links *}}
|
||||||
|
<div class="side-link" id="side-directory-link"><a href="directory" >{{$nv.local_directory}}</a></div>
|
||||||
|
<div class="side-link" id="side-directory-link"><a href="{{$nv.global_dir}}" target="extlink" >{{$nv.directory}}</a></div>
|
||||||
{{* Additional links *}}
|
{{* Additional links *}}
|
||||||
<div class="side-link" id="side-match-link"><a href="match" >{{$similar}}</a></div>
|
<div class="side-link" id="side-match-link"><a href="match" >{{$nv.similar}}</a></div>
|
||||||
<div class="side-link" id="side-suggest-link"><a href="suggest" >{{$suggest}}</a></div>
|
<div class="side-link" id="side-suggest-link"><a href="suggest" >{{$nv.suggest}}</a></div>
|
||||||
|
|
||||||
{{if $inv}}
|
{{if $nv.inv}}
|
||||||
<div class="side-link" id="side-invite-link" ><a href="invite" >{{$inv}}</a></div>
|
<div class="side-link" id="side-invite-link" ><a href="invite" >{{$nv.inv}}</a></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1153,9 +1153,9 @@ aside #profiles-menu {
|
||||||
left: 10px;
|
left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
aside #search-text, aside #side-follow-url, aside #side-peoplefind-url, right_aside input {
|
aside #search-text, aside #side-follow-url, aside #side-peoplefind-url, right_aside #side-peoplefind-url {
|
||||||
width: 140px;
|
width: 65%;
|
||||||
height: 17px;
|
float: left;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
/*border-top-left-radius: 15px;
|
/*border-top-left-radius: 15px;
|
||||||
border-top-right-radius: 15px;
|
border-top-right-radius: 15px;
|
||||||
|
@ -1167,6 +1167,15 @@ aside #search-text, aside #side-follow-url, aside #side-peoplefind-url, right_as
|
||||||
-moz-border-right-colors: #dbdbdb;*/
|
-moz-border-right-colors: #dbdbdb;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aside #side-peoplefind-submit, right_aside #side-peoplefind-submit {
|
||||||
|
width: 25%;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#side-match-link {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
aside h4, right_aside h4 {
|
aside h4, right_aside h4 {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
|
|
|
@ -39,17 +39,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $nv}}
|
{{if $nv}}
|
||||||
<div id="right_friends" class="widget">
|
{{include file='peoplefind.tpl' nv=$nv}}
|
||||||
<h3>{{$nv.title.1}}</h3>
|
|
||||||
<ul role="menu">
|
|
||||||
<li class="tool" role="menuitem"><a class="{{$nv.directory.2}}" href="{{$nv.directory.0}}" title="{{$nv.directory.3}}" >{{$nv.directory.1}}</a></li>
|
|
||||||
<li class="tool" role="menuitem"><a class="{{$nv.global_directory.2}}" href="{{$nv.global_directory.0}}" target="blank" title="{{$nv.global_directory.3}}" >{{$nv.global_directory.1}}</a></li>
|
|
||||||
<li class="tool" role="menuitem"><a class="{{$nv.match.2}}" href="{{$nv.match.0}}" title="{{$nv.match.3}}" >{{$nv.match.1}}</a></li>
|
|
||||||
<li class="tool" role="menuitem"><a class="{{$nv.suggest.2}}" href="{{$nv.suggest.0}}" title="{{$nv.suggest.3}}" >{{$nv.suggest.1}}</a></li>
|
|
||||||
<li class="tool" role="menuitem"><a class="{{$nv.invite.2}}" href="{{$nv.invite.0}}" title="{{$nv.invite.3}}" >{{$nv.invite.1}}</a></li>
|
|
||||||
</ul>
|
|
||||||
{{$nv.search}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $lastusers_title}}
|
{{if $lastusers_title}}
|
||||||
|
|
|
@ -196,19 +196,18 @@ function vier_community_info()
|
||||||
//right_aside FIND FRIENDS
|
//right_aside FIND FRIENDS
|
||||||
if ($show_friends && local_user()) {
|
if ($show_friends && local_user()) {
|
||||||
$nv = [];
|
$nv = [];
|
||||||
$nv['title'] = ["", L10n::t('Find Friends'), "", ""];
|
$nv['findpeople'] = L10n::t('Find People');
|
||||||
$nv['directory'] = ['directory', L10n::t('Local Directory'), "", ""];
|
$nv['desc'] = L10n::t('Enter name or interest');
|
||||||
$nv['global_directory'] = [get_server(), L10n::t('Global Directory'), "", ""];
|
$nv['label'] = L10n::t('Connect/Follow');
|
||||||
$nv['match'] = ['match', L10n::t('Similar Interests'), "", ""];
|
$nv['hint'] = L10n::t('Examples: Robert Morgenstein, Fishing');
|
||||||
$nv['suggest'] = ['suggest', L10n::t('Friend Suggestions'), "", ""];
|
$nv['findthem'] = L10n::t('Find');
|
||||||
$nv['invite'] = ['invite', L10n::t('Invite Friends'), "", ""];
|
$nv['suggest'] = L10n::t('Friend Suggestions');
|
||||||
|
$nv['similar'] = L10n::t('Similar Interests');
|
||||||
$nv['search'] = '<form name="simple_bar" method="get" action="dirfind">
|
$nv['random'] = L10n::t('Random Profile');
|
||||||
<span class="sbox_l"></span>
|
$nv['inv'] = L10n::t('Invite Friends');
|
||||||
<span class="sbox">
|
$nv['directory'] = L10n::t('Global Directory');
|
||||||
<input type="text" name="search" size="13" maxlength="50">
|
$nv['global_dir'] = get_server();
|
||||||
</span>
|
$nv['local_directory'] = L10n::t('Local Directory');
|
||||||
<span class="sbox_r" id="srch_clear"></span>';
|
|
||||||
|
|
||||||
$aside['$nv'] = $nv;
|
$aside['$nv'] = $nv;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue