new feature filter network by name
This commit is contained in:
parent
7c98aea524
commit
468af29e3e
@ -154,6 +154,20 @@ class Activity_filter {
|
||||
];
|
||||
}
|
||||
|
||||
$name = [];
|
||||
if(feature_enabled(local_channel(),'name_tab')) {
|
||||
if(x($_GET,'cid') && ! x($_GET,'pf')) {
|
||||
$filter_active = 'name';
|
||||
}
|
||||
$name = [
|
||||
'label' => x($_GET,'name') ? $_GET['name'] : t('Filter by name'),
|
||||
'icon' => 'filter',
|
||||
'url'=> z_root() . '/' . $cmd . '/',
|
||||
'sel'=> $filter_active == 'name' ? 'is-valid' : '',
|
||||
'title' => ''
|
||||
];
|
||||
}
|
||||
|
||||
$reset = [];
|
||||
if($filter_active) {
|
||||
$reset = [
|
||||
@ -179,7 +193,8 @@ class Activity_filter {
|
||||
$o .= replace_macros(get_markup_template('activity_filter_widget.tpl'), [
|
||||
'$title' => t('Activity Filters'),
|
||||
'$reset' => $reset,
|
||||
'$content' => $content
|
||||
'$content' => $content,
|
||||
'$name' => $name
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -394,6 +394,15 @@ function get_features($filtered = true, $level = (-1)) {
|
||||
feature_level('order_tab',2),
|
||||
],
|
||||
|
||||
[
|
||||
'name_tab',
|
||||
t('Contact Filter'),
|
||||
t('Ability to display only posts of a selected contact'),
|
||||
false,
|
||||
get_config('feature_lock','name_tab'),
|
||||
feature_level('name_tab',1),
|
||||
],
|
||||
|
||||
[
|
||||
'forums_tab',
|
||||
t('Forum Filter'),
|
||||
@ -406,7 +415,7 @@ function get_features($filtered = true, $level = (-1)) {
|
||||
[
|
||||
'personal_tab',
|
||||
t('Personal Posts Filter'),
|
||||
t('Ability to display only Network posts that you\'ve interacted on'),
|
||||
t('Ability to display only posts that you\'ve interacted on'),
|
||||
false,
|
||||
get_config('feature_lock','personal_tab'),
|
||||
feature_level('personal_tab',1),
|
||||
|
@ -182,6 +182,7 @@ a.wikilist {
|
||||
|
||||
.notifications-textinput {
|
||||
padding: .75rem 0.85rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.notifications-textinput input {
|
||||
|
@ -1,4 +1,7 @@
|
||||
$(document).ready(function() {
|
||||
$("#search-text").contact_autocomplete(baseurl + '/search_ac','',true);
|
||||
$("#cid-filter").name_autocomplete(baseurl + '/acl', 'a', true, function(data) {
|
||||
$("#cid").val(data.id);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -8,4 +8,14 @@
|
||||
{{/if}}
|
||||
</h3>
|
||||
{{$content}}
|
||||
{{if $name}}
|
||||
<div class="notifications-textinput">
|
||||
<form method="get" action="{{$name.url}}" role="search">
|
||||
<div class="text-muted notifications-textinput-filter"><i class="fa fa-fw fa-filter"></i></div>
|
||||
<input id="cid" type="hidden" value="" name="cid" />
|
||||
<input id="cid-filter" class="form-control form-control-sm{{if $name.sel}} {{$name.sel}}{{/if}}" type="text" value="" placeholder="{{$name.label}}" name="name" title="" />
|
||||
</form>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user