Merge branch 'dev' of /home/macgirvin/./streams into dev

This commit is contained in:
nobody 2022-01-23 11:49:08 -08:00
commit 12f047026d
25 changed files with 6234 additions and 6141 deletions

View file

@ -228,7 +228,7 @@ class Permissions
// If a default permcat exists, use that
$pc = ((feature_enabled($channel_id, 'permcats')) ? get_pconfig($channel_id, 'system', 'default_permcat') : 'default');
$pc = ((Zlib\Apps::system_app_installed($channel_id, 'Roles')) ? get_pconfig($channel_id, 'system', 'default_permcat') : 'default');
if (! in_array($pc, [ '','default' ])) {
$pcp = new Zlib\Permcat($channel_id);
$permcat = $pcp->fetch($pc);

View file

@ -395,6 +395,7 @@ class Apps
'Random Channel' => t('Random Channel'),
'Remote Diagnostics' => t('Remote Diagnostics'),
'Report Bug' => t('Report Bug'),
'Roles' => t('Roles'),
'Search' => t('Search'),
'Secrets' => t('Secrets'),
'Settings' => t('Settings'),

View file

@ -52,7 +52,7 @@ class Permcat
// if no role perms it may be a custom role, see if there any autoperms
if (! $perms) {
$perms = Permissions::FilledAutoPerms($channel_id);
$perms = Permissions::FilledAutoperms($channel_id);
}
// if no autoperms it may be a custom role with manual perms
@ -60,7 +60,7 @@ class Permcat
if (! $perms) {
$c = channelx_by_n($channel_id);
if ($c) {
$perms = Permissions::FilledPerms(get_abconfig($channel_id, $c['channel_hash'], 'system', 'my_perms', EMPTY_STR));
$perms = Permissions::FilledPerms(explode(',',get_abconfig($channel_id, $c['channel_hash'], 'system', 'my_perms', EMPTY_STR)));
}
}
@ -148,7 +148,7 @@ class Permcat
);
if ($x) {
foreach ($x as $xv) {
$value = ((preg_match('|^a:[0-9]+:{.*}$|s', $xv['v'])) ? unserialize($xv['v']) : $xv['v']);
$value = unserialise($xv['v']);
$permcats[] = [ $xv['k'], $xv['k'], $value, 0 ];
}
}

View file

@ -405,31 +405,34 @@ class Queue
do_delivery($piled_up, true);
}
}
} else {
if ($result['return_code'] >= 300) {
}
elseif ($result['return_code'] >= 400 && $result['return_code'] < 500) {
q(
"update dreport set dreport_result = '%s', dreport_time = '%s' where dreport_queue = '%s'",
dbesc('delivery rejected' . ' ' . $result['return_code']),
dbesc(datetime_convert()),
dbesc($outq['outq_hash'])
);
self::remove($outq['outq_hash']);
}
else {
$dr = q(
"select * from dreport where dreport_queue = '%s'",
dbesc($outq['outq_hash'])
);
if ($dr) {
// update every queue entry going to this site with the most recent communication error
q(
"update dreport set dreport_result = '%s', dreport_time = '%s' where dreport_queue = '%s'",
dbesc('delivery rejected' . ' ' . $result['return_code']),
dbesc(datetime_convert()),
dbesc($outq['outq_hash'])
"update dreport set dreport_log = '%s' where dreport_site = '%s'",
dbesc(z_curl_error($result)),
dbesc($dr[0]['dreport_site'])
);
} else {
$dr = q(
"select * from dreport where dreport_queue = '%s'",
dbesc($outq['outq_hash'])
);
if ($dr) {
// update every queue entry going to this site with the most recent communication error
q(
"update dreport set dreport_log = '%s' where dreport_site = '%s'",
dbesc(z_curl_error($result)),
dbesc($dr[0]['dreport_site'])
);
}
}
logger('deliver: queue post returned ' . $result['return_code'] . ' from ' . $outq['outq_posturl'], LOGGER_DEBUG);
self::update($outq['outq_hash'], 10);
}
logger('deliver: queue post returned ' . $result['return_code'] . ' from ' . $outq['outq_posturl'], LOGGER_DEBUG);
return;
}

View file

@ -7,7 +7,7 @@ use Zotlabs\Web\HTTPSig;
class Zotfinger
{
public static function exec($resource, $channel = null, $verify = true)
public static function exec($resource, $channel = null, $verify = true, $recurse = true)
{
if (!$resource) {
@ -42,6 +42,30 @@ class Zotfinger
$redirects = 0;
$x = z_post_url($resource, $data, $redirects, ['headers' => $h]);
if (in_array(intval($x['return_code']), [ 404, 410 ]) && $recurse) {
// The resource has been deleted or doesn't exist at this location.
// Try to find another nomadic resource for this channel and return that.
// First, see if there's a hubloc for this site. Fetch that record to
// obtain the nomadic identity hash. Then use that to find any additional
// nomadic locations.
$h = Activity::get_actor_hublocs($resource, 'zot6');
if ($h) {
// mark this location deleted
hubloc_delete($h[0]);
$hubs = Activity::get_actor_hublocs($h[0]['hubloc_hash']);
if ($hubs) {
foreach ($hubs as $hub) {
if ($hub['hubloc_id_url'] !== $resource and !$hub['hubloc_deleted']) {
return $self::exec($hub['hubloc_id_url'],$channel,$verify);
}
}
}
}
}
if ($x['success']) {
if ($verify) {
$result['signature'] = HTTPSig::verify($x, EMPTY_STR, 'zot6');

View file

@ -768,7 +768,7 @@ class Connedit extends Controller
$thisperm = "1";
}
$perms[] = array('perms_' . $k, $v, ((array_key_exists($k, $their_perms)) ? intval($their_perms[$k]) : ''), $thisperm, 1, (($checkinherited & PERMS_SPECIFIC) ? '' : '1'), '', $checkinherited);
$perms[] = array('perms_' . $k, $v, ((array_key_exists($k, $their_perms)) ? intval($their_perms[$k]) : ''), $thisperm, $yes_no, (($checkinherited & PERMS_SPECIFIC) ? '' : '1'), '', $checkinherited);
}
$pcat = new Permcat(local_channel());
@ -806,7 +806,7 @@ class Connedit extends Controller
'$autoperms' => array('autoperms', t('Apply these permissions automatically'), ((get_pconfig(local_channel(), 'system', 'autoperms')) ? 1 : 0), t('Connection requests will be approved without your interaction'), $yes_no),
'$permcat' => ['permcat', t('Permission role'), '', '<span class="loading invisible">' . t('Loading') . '<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span></span>', $permcats],
'$permcat_new' => t('Add permission role'),
'$permcat_enable' => feature_enabled(local_channel(), 'permcats'),
'$permcat_enable' => Apps::system_app_installed(local_channel(),'Roles'),
'$addr' => unpunify($contact['xchan_addr']),
'$primeurl' => unpunify($contact['xchan_url']),
'$block_announce' => ['block_announce', t('Ignore shares and repeats this connection posts'), get_abconfig(local_channel(), $contact['xchan_hash'], 'system', 'block_announce', false), t('Note: This is not recommended for Groups.'), [t('No'), t('Yes')]],
@ -840,7 +840,7 @@ class Connedit extends Controller
'$pending_label' => t('Connection Pending Approval'),
'$is_pending' => (intval($contact['abook_pending']) ? 1 : ''),
'$unapproved' => $unapproved,
'$inherited' => t('inherited'),
'$inherited' => '', // t('inherited'),
'$submit' => t('Submit'),
'$lbl_vis2' => sprintf(t('Please choose the profile you would like to display to %s when viewing your profile securely.'), $contact['xchan_name']),
'$close' => (($contact['abook_closeness']) ? $contact['abook_closeness'] : 80),
@ -848,8 +848,8 @@ class Connedit extends Controller
'$me' => t('My Settings'),
'$perms' => $perms,
'$permlbl' => t('Individual Permissions'),
'$permnote' => t('Some permissions may be inherited from your channel\'s <a href="settings"><strong>privacy settings</strong></a>, which have higher priority than individual settings. You can <strong>not</strong> change those settings here.'),
'$permnote_self' => t('Some permissions may be inherited from your channel\'s <a href="settings"><strong>privacy settings</strong></a>, which have higher priority than individual settings. You can change those settings here but they wont have any impact unless the inherited setting changes.'),
'$permnote' => t('Some individual permissions may have been preset or locked based on your channel type and privacy settings.'),
'$permnote_self' => t('Some individual permissions may have been preset or locked based on your channel type and privacy settings.'),
'$lastupdtext' => t('Last update:'),
'$last_update' => relative_date($contact['abook_connected']),
'$profile_select' => contact_profile_assign($contact['abook_profile']),

View file

@ -5,6 +5,7 @@ namespace Zotlabs\Module;
use App;
use Zotlabs\Lib\Permcat;
use Zotlabs\Lib\Libsync;
use Zotlabs\Lib\Apps;
use Zotlabs\Web\Controller;
use Zotlabs\Access\Permissions;
use Zotlabs\Access\PermissionLimits;
@ -248,7 +249,7 @@ class Defperms extends Controller
'$autoperms' => array('autoperms', t('Apply these permissions automatically'), ((get_pconfig(local_channel(), 'system', 'autoperms')) ? 1 : 0), t('If enabled, connection requests will be approved without your interaction'), $yes_no),
'$permcat' => ['permcat', t('Permission role'), '', '<span class="loading invisible">' . t('Loading') . '<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span></span>', $permcats],
'$permcat_new' => t('Add permission role'),
'$permcat_enable' => feature_enabled(local_channel(), 'permcats'),
'$permcat_enable' => Apps::system_app_installed($channel_id, 'Roles'),
'$section' => $section,
'$sections' => $sections,
'$autolbl' => t('The permissions indicated on this page will be applied to all new connections.'),

View file

@ -117,27 +117,27 @@ class Dreport extends Controller
$r[$x]['dreport_result'] = t('site dead');
break;
case 'site deferred':
$r[$x]['gravity'] = 3;
$r[$x]['gravity'] = 4;
$r[$x]['dreport_result'] = t('site might be dead - deferred');
break;
case 'posted':
$r[$x]['gravity'] = 3;
$r[$x]['gravity'] = 5;
$r[$x]['dreport_result'] = t('posted');
break;
case 'accepted for delivery':
$r[$x]['gravity'] = 4;
$r[$x]['gravity'] = 6;
$r[$x]['dreport_result'] = t('accepted for delivery');
break;
case 'updated':
$r[$x]['gravity'] = 5;
$r[$x]['gravity'] = 7;
$r[$x]['dreport_result'] = t('updated');
case 'update ignored':
$r[$x]['gravity'] = 6;
$r[$x]['gravity'] = 8;
$r[$x]['dreport_result'] = t('update ignored');
break;
case 'permission denied':
$r[$x]['dreport_result'] = t('permission denied');
$r[$x]['gravity'] = 6;
$r[$x]['gravity'] = 9;
break;
case 'recipient not found':
$r[$x]['dreport_result'] = t('recipient not found');

View file

@ -3,6 +3,7 @@
namespace Zotlabs\Module\Settings;
use App;
use Zotlabs\Lib\Apps;
use Zotlabs\Lib\Libsync;
use Zotlabs\Lib\AccessList;
use Zotlabs\Access\Permissions;
@ -670,7 +671,7 @@ class Channel
'$permissions_role' => $permissions_role,
'$role' => array('permissions_role', t('Channel type and privacy'), $permissions_role, '', $perm_roles, ' onchange="update_role_text(); return false;"'),
'$defpermcat' => ['defpermcat', t('Default Permissions Group'), $default_permcat, '', $permcats],
'$permcat_enable' => feature_enabled(local_channel(), 'permcats'),
'$permcat_enable' => Apps::system_app_installed(local_channel(), 'Roles'),
'$profile_in_dir' => $profile_in_dir,
'$hide_friends' => $hide_friends,
'$hide_wall' => $hide_wall,

View file

@ -13,7 +13,8 @@ class Permcats
public function post()
{
//logger('$_REQUEST: ' . print_r($_REQUEST,true));
if (!local_channel()) {
return;
}
@ -46,7 +47,7 @@ class Permcats
Libsync::build_sync_packet();
info(t('Permission category saved.') . EOL);
info(t('Permission role saved.') . EOL);
return;
}
@ -91,24 +92,39 @@ class Permcats
}
}
$hidden_perms = [];
$global_perms = Permissions::Perms();
foreach ($global_perms as $k => $v) {
$thisperm = Permcat::find_permcat($existing, $k);
$checkinherited = PermissionLimits::Get(local_channel(), $k);
if ($existing[$k]) {
$thisperm = "1";
$inherited = (($checkinherited & PERMS_SPECIFIC) ? false : true);
$thisperm = 0;
if ($existing) {
foreach ($existing as $ex) {
if ($ex['name'] === $k) {
$thisperm = $ex['value'];
break;
}
}
}
$perms[] = [ 'perms_' . $k, $v, $inherited ? 1 : intval($thisperm), '', [ t('No'), t('Yes') ], (($inherited) ? ' disabled="disabled" ' : '' )];
if ($inherited) {
$hidden_perms[] = ['perms_' . $k, 1 ];
}
$perms[] = array('perms_' . $k, $v, '', $thisperm, 1, (($checkinherited & PERMS_SPECIFIC) ? '' : '1'), '', $checkinherited);
}
$tpl = get_markup_template("settings_permcats.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_permcats"),
'$title' => t('Permission Categories'),
'$title' => t('Permission Roles'),
'$desc' => $desc,
'$desc2' => $desc2,
'$tokens' => $t,
@ -116,14 +132,15 @@ class Permcats
'$atoken' => $atoken,
'$url1' => z_root() . '/channel/' . $channel['channel_address'],
'$url2' => z_root() . '/photos/' . $channel['channel_address'],
'$name' => array('name', t('Permission Name') . ' <span class="required">*</span>', (($name) ? $name : ''), ''),
'$name' => array('name', t('Role name') . ' <span class="required">*</span>', (($name) ? $name : ''), ''),
'$me' => t('My Settings'),
'$perms' => $perms,
'$hidden_perms' => $hidden_perms,
'$inherited' => t('inherited'),
'$notself' => 0,
'$self' => 1,
'$permlbl' => t('Individual Permissions'),
'$permnote' => t('Some permissions may be inherited from your channel\'s <a href="settings"><strong>privacy settings</strong></a>, which have higher priority than individual settings. You can <strong>not</strong> change those settings here.'),
'$permnote' => t('Some individual permissions may have been preset or locked based on your channel type and privacy settings.'),
'$submit' => t('Submit')
));
return $o;

View file

@ -105,13 +105,13 @@ class Settings_menu
// );
// }
// if(feature_enabled(local_channel(),'permcats')) {
// $tabs[] = array(
// 'label' => t('Permission Categories'),
// 'url' => z_root() . '/settings/permcats',
// 'selected' => ((argv(1) === 'permcats') ? 'active' : ''),
// );
// }
if(Apps::system_app_installed(local_channel(),'Roles')) {
$tabs[] = array(
'label' => t('Permission Roles'),
'url' => z_root() . '/settings/permcats',
'selected' => ((argv(1) === 'permcats') ? 'active' : ''),
);
}
// if($role === false || $role === 'custom') {

6
app/roles.apd Normal file
View file

@ -0,0 +1,6 @@
version: 1
url: $baseurl/settings/permcats
requires: local_channel
name: Roles
photo: icon:users
categories: Networking

View file

@ -123,6 +123,10 @@ Available if the 'qrator' addon has been installed. This provides a page to gene
Available if the 'rainbowtag' addon has been installed on the site. Also requires the Tagadelic app. This converts the tag clouds provided by Tagadelic from monochrome into color.
### Roles
This app lets you create named permission settings for different classes/types of connections. This could be something like friends or followers or moderators, and you can choose precisely which permissions to associate with these names.
### Search
One click interface to the search page.

View file

@ -388,32 +388,21 @@ function remove_all_xchan_resources($xchan, $channel_id = 0)
dbesc($xchan)
);
if ($dirmode === false || $dirmode == DIRECTORY_MODE_NORMAL) {
$r = q(
"delete from xchan where xchan_hash = '%s'",
dbesc($xchan)
);
$r = q(
"delete from hubloc where hubloc_hash = '%s'",
dbesc($xchan)
);
$r = q(
"delete from xprof where xprof_hash = '%s'",
dbesc($xchan)
);
} else {
// directory servers need to keep the record around for sync purposes - mark it deleted
$r = q(
"update hubloc set hubloc_deleted = 1 where hubloc_hash = '%s'",
dbesc($xchan)
);
$r = q(
"update hubloc set hubloc_deleted = 1 where hubloc_hash = '%s'",
dbesc($xchan)
);
$r = q(
"update xchan set xchan_deleted = 1 where xchan_hash = '%s'",
dbesc($xchan)
);
$r = q(
"delete from xprof where xprof_hash = '%s'",
dbesc($xchan)
);
$r = q(
"update xchan set xchan_deleted = 1 where xchan_hash = '%s'",
dbesc($xchan)
);
}
}
}

View file

@ -247,14 +247,14 @@ function get_features($filtered = true, $level = (-1))
// ],
// [
// 'permcats',
// t('Permission Categories'),
// t('Create custom connection permission limits'),
// false,
// get_config('feature_lock','permcats'),
// feature_level('permcats',2),
// ],
[
'permcats',
t('Permission Categories'),
t('Create custom connection permission limits'),
true,
get_config('feature_lock','permcats'),
feature_level('permcats',2),
],
// [
// 'oauth_clients',

View file

@ -17,7 +17,8 @@ use Zotlabs\Daemon\Run;
*/
function hubloc_store_lowlevel($arr)
{
$update = array_key_exists('hubloc_id',$arr) && $arr['hubloc_id'] ? 'hubloc_id = ' . intval($arr['hubloc_id']) : false;
$store = [
'hubloc_guid' => ((array_key_exists('hubloc_guid', $arr)) ? $arr['hubloc_guid'] : ''),
'hubloc_guid_sig' => ((array_key_exists('hubloc_guid_sig', $arr)) ? $arr['hubloc_guid_sig'] : ''),
@ -41,8 +42,8 @@ function hubloc_store_lowlevel($arr)
'hubloc_error' => ((array_key_exists('hubloc_error', $arr)) ? $arr['hubloc_error'] : 0),
'hubloc_deleted' => ((array_key_exists('hubloc_deleted', $arr)) ? $arr['hubloc_deleted'] : 0)
];
return create_table_from_array('hubloc', $store);
return $update ? update_table_from_array('hubloc', $store, $update) : create_table_from_array('hubloc', $store);
}
function site_store_lowlevel($arr)
@ -292,7 +293,14 @@ function hubloc_mark_as_down($posturl)
);
}
function hubloc_delete($hubloc) {
if (is_array($hubloc) && array_key_exists('hubloc_id',$hubloc)) {
q("update hubloc set hubloc_deleted = 1 where hubloc_id = %d",
intval($hubloc['hubloc_id'])
);
}
}
/**
* @brief return comma separated string of non-dead clone locations (net addresses) for a given netid
*
@ -316,18 +324,17 @@ function locations_by_netid($netid)
function ping_site($url)
{
$ret = [ 'success' => false ];
$ret = array('success' => false);
$r = Zotlabs\Lib\Zotfinger::exec($url);
$r = Zotlabs\Lib\Zotfinger::exec($url);
if (! $r['data']) {
$ret['message'] = 'no answer from ' . $url;
return $ret;
}
$ret['success'] = true;
return $ret;
$ret['success'] = true;
return $ret;
}

View file

@ -304,6 +304,7 @@ function nav($template = 'default')
'$is_owner' => $is_owner,
'$sel' => App::$nav_sel,
'$powered_by' => $powered_by,
'$asidetitle' => t('Side Panel'),
'$help' => t('@name, #tag, ?doc, content'),
'$pleasewait' => t('Please wait...'),
'$nav_apps' => ((isset($nav_apps)) ? $nav_apps : []),
@ -312,9 +313,11 @@ function nav($template = 'default')
'$channel_thumb' => ((App::$profile) ? App::$profile['thumb'] : ''),
'$channel_apps' => ((isset($channel_apps)) ? $channel_apps : []),
'$manageapps' => t('Installed Apps'),
'$appstitle' => t('Apps'),
'$addapps' => t('Available Apps'),
'$orderapps' => t('Arrange Apps'),
'$sysapps_toggle' => t('Toggle System Apps'),
'$notificationstitle' => t('Notifications'),
'$url' => ((isset($url) && $url) ? $url : App::$cmd)
));

View file

@ -3743,6 +3743,44 @@ function create_table_from_array($table, $arr, $binary_fields = [])
return $r;
}
function update_table_from_array($table, $arr, $where, $binary_fields = [])
{
if (! ($arr && $table)) {
return false;
}
$columns = db_columns($table);
$clean = [];
foreach ($arr as $k => $v) {
if (! in_array($k, $columns)) {
continue;
}
$matches = false;
if (preg_match('/([^a-zA-Z0-9\-\_\.])/', $k, $matches)) {
return false;
}
if (in_array($k, $binary_fields)) {
$clean[$k] = dbescbin($v);
} else {
$clean[$k] = dbesc($v);
}
}
$sql = "UPDATE " . TQUOT . $table . TQUOT . " SET ";
foreach ($clean as $k => $v) {
$sql .= TQUOT . $k . TQUOT . ' = "' . $v . '",';
}
$sql = rtrim($sql,',');
$r = dbq($sql . " WHERE " . $where);
return $r;
}
function share_shield($m)
{
return str_replace($m[1], '!=+=+=!' . base64url_encode($m[1]) . '=+!=+!=', $m[0]);

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,2 @@
<?php
define ( 'STD_VERSION', '22.01.19' );
define ( 'STD_VERSION', '22.01.21' );

View file

@ -238,7 +238,7 @@
{{include file="field_select.tpl" field=$permcat}}
{{/if}}
<table id="perms-tool-table" class=form-group>
<table id="perms-tool-table" class="form-group">
<tr>
<td></td>
{{if $notself}}

View file

@ -38,8 +38,8 @@
<a class="dropdown-item{{if $app.active}} active{{/if}}" href="{{$app.url}}">{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}</a>
{{/if}}
{{if $order}}
<a href="{{$hosturl}}appman/{{$app.guid}}/moveup{{if $mode == 'nav-order-pinned'}}/nav_pinned_app{{else}}/nav_featured_app{{/if}}" class="btn btn-outline-secondary btn-sm" style="margin-bottom: 5px;"><i class="generic-icons-nav fa fa-fw fa-arrow-up"></i></a>
<a href="{{$hosturl}}appman/{{$app.guid}}/movedown{{if $mode == 'nav-order-pinned'}}/nav_pinned_app{{else}}/nav_featured_app{{/if}}" class="btn btn-outline-secondary btn-sm" style="margin-bottom: 5px;"><i class="generic-icons-nav fa fa-fw fa-arrow-down"></i></a>
<a href="{{$hosturl}}appman/{{$app.guid}}/moveup{{if $mode == 'nav-order-pinned'}}/nav_pinned_app{{else}}/nav_featured_app{{/if}}" class="btn btn-outline-secondary btn-sm" style="margin-bottom: 5px;"><i class="generic-icons-nav fa fa-fw fa-arrow-up" style="margin: auto;"></i></a>
<a href="{{$hosturl}}appman/{{$app.guid}}/movedown{{if $mode == 'nav-order-pinned'}}/nav_pinned_app{{else}}/nav_featured_app{{/if}}" class="btn btn-outline-secondary btn-sm" style="margin-bottom: 5px;"><i class="generic-icons-nav fa fa-fw fa-arrow-down" style="margin: auto;"></i></a>
{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}<br>
{{/if}}

View file

@ -1,21 +1,29 @@
<tr class="highlight">
<tr class="highlight" style="line-height: 2";>
<td>
<label class="mainlabel" for='me_id_{{$field.0}}'>{{$field.1}}</label><br>
<span class='field_abook_help'>{{$field.6}}</span>
</td>
{{if $notself}}
<td class="abook-them">
{{if $field.2 === 1}}<i class="fa fa-check-square-o"></i>{{/if}}
{{if $field.2 === 0}}<i class="fa fa-square-o"></i>{{/if}}
<td class="abook-them form-group checkbox">
<div>
<input type="checkbox" name='them-id-{{$field.0}}' id='id_{{$field.0}}' value="1" {{if $field.2}}checked="checked"{{/if}} disabled="disabled" /><label class="switchlabel" for='id_{{$field.0}}'> <span class="onoffswitch-inner" data-on='{{if $field.4}}{{$field.4.1}}{{/if}}' data-off='{{if $field.4}}{{$field.4.0}}{{/if}}'></span><span class="onoffswitch-switch"></span>
</div>
</td>
{{/if}}
<td class="abook-me">
<td class="abook-me form-group checkbox" >
{{if $self || !$field.5 }}
<input type="checkbox" name='{{$field.0}}' class='abook-edit-me' id='me_id_{{$field.0}}' value="{{$field.4}}" {{if $field.3}}checked="checked"{{/if}} />
<div>
<input type="checkbox" class="abook-edit-me" name='{{$field.0}}' id='me_id_{{$field.0}}' value="1" {{if $field.2}}checked="checked"{{/if}} {{if $field.5}}disabled="disabled"{{/if}} /><label class="switchlabel" for='id_{{$field.0}}'> <span class="onoffswitch-inner" data-on='{{if $field.4}}{{$field.4.1}}{{/if}}' data-off='{{if $field.4}}{{$field.4.0}}{{/if}}'></span><span class="onoffswitch-switch"></span></label>
<!--input type="checkbox" name='{{$field.0}}' class='abook-edit-me' id='me_id_{{$field.0}}' value="{{$field.4}}" {{if $field.3}}checked="checked"{{/if}} /-->
</div>
{{/if}}
{{if $notself && $field.5}}
<div>
<input type="hidden" name='{{$field.0}}' value="{{if $field.7}}1{{else}}0{{/if}}" />
{{if $field.3}}<i class="fa fa-check-square-o"></i>{{else}}<i class="fa fa-square-o"></i>{{/if}}
<input type="checkbox" name='{{$field.0}}' id='me_id_{{$field.0}}' value="{{if $field.7}}1{{else}}0{{/if}}" {{if $field.2}}checked="checked"{{/if}} {{if $field.5}}disabled="disabled"{{/if}} /><label class="switchlabel" for='id_{{$field.0}}'> <span class="onoffswitch-inner" data-on='{{if $field.4}}{{$field.4.1}}{{/if}}' data-off='{{if $field.4}}{{$field.4.0}}{{/if}}'></span><span class="onoffswitch-switch"></span></label>
</div>
{{*if $field.3}}<i class="fa fa-check-square-o" style="color:#800;"></i>{{else}}<i class="fa fa-square-o"></i>{{/if*}}
{{/if}}
</td>
<td>

View file

@ -84,15 +84,15 @@
<i class="fa fa-question-circle"></i>
</button>
{{/if}}
<button id="expand-aside" type="button" class="d-lg-none navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1">
<button id="expand-aside" type="button" class="d-lg-none navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1" title="{{$asidetitle}}">
<i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i>
</button>
{{if $localuser || $nav.pubs}}
<button id="notifications-btn-1" type="button" class="navbar-toggler border-0 notifications-btn">
<button id="notifications-btn-1" type="button" class="navbar-toggler border-0 notifications-btn" title="{{$notificationstitle}}">
<i id="notifications-btn-icon-1" class="fa fa-exclamation-circle notifications-btn-icon"></i>
</button>
{{/if}}
<button id="menu-btn" class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navbar-collapse-2">
<button id="menu-btn" class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navbar-collapse-2" title="{{$appstitle}}">
<i class="fa fa-bars"></i>
</button>
</div>
@ -144,7 +144,7 @@
{{/if}}
{{if $localuser || $nav.pubs}}
<li id="notifications-btn" class="nav-item d-xl-none">
<a class="nav-link text-white notifications-btn" href="#"><i id="notifications-btn-icon" class="fa fa-exclamation-circle notifications-btn-icon"></i></a>
<a class="nav-link text-white notifications-btn" href="#" title="{{$notificationstitle}}"><i id="notifications-btn-icon" class="fa fa-exclamation-circle notifications-btn-icon"></i></a>
</li>
{{/if}}
{{if $channel_menu && $channel_apps.0}}
@ -165,7 +165,7 @@
{{/foreach}}
{{/if}}
<li class="nav-item dropdown" id="app-menu">
<a class="nav-link" href="#" data-toggle="dropdown"><i class="fa fa-fw fa-bars"></i></a>
<a class="nav-link" href="#" data-toggle="dropdown" title="{{$appstitle}}"><i class="fa fa-fw fa-bars"></i></a>
<div id="dropdown-menu" class="dropdown-menu dropdown-menu-right">
{{if $channel_apps.0 && ! $channel_menu}}
{{foreach $channel_apps as $channel_app}}

View file

@ -20,25 +20,29 @@
<div class="panel">
<div class="section-subtitle-wrapper" role="tab" id="perms-tool">
<h3>
<a data-toggle="collapse" data-parent="#contact-edit-tools" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse">
<a data-toggle="collapse" data-target="#perms-tool-collapse" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse">
{{$permlbl}}
</a>
</h3>
</div>
<div id="perms-tool-collapse" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="perms-tool">
<div id="perms-tool-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="perms-tool" style="display:block;">
<div class="section-content-tools-wrapper">
<div class="section-content-warning-wrapper">
{{$permnote}}
</div>
<table id="perms-tool-table" class=form-group>
<tr>
<td></td><td colspan="2" class="abook-me">{{$me}}</td>
</tr>
{{foreach $perms as $prm}}
{{include file="field_acheckbox.tpl" field=$prm}}
{{/foreach}}
</table>
<div class="defperms-edit">
{{foreach $perms as $prm}}
{{include file="field_checkbox.tpl" field=$prm}}
{{/foreach}}
</div>
{{if $hidden_perms}}
{{foreach $hidden_perms as $prm}}
<input type="hidden" name="{{$prm.0}}" value="{{$prm.1}}" >
{{/foreach}}
{{/if}}
<div class="settings-submit-wrapper" >
<button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button>