mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:15:14 +00:00
mark connections where we do not have post_comments permissions with an no entry sign.
This commit is contained in:
parent
f6d024cb3f
commit
c618bfc607
10 changed files with 51 additions and 6 deletions
|
@ -245,6 +245,11 @@ class Connections extends \Zotlabs\Web\Controller {
|
||||||
((intval($rr['abook_blocked'])) ? t('Blocked') : ''),
|
((intval($rr['abook_blocked'])) ? t('Blocked') : ''),
|
||||||
((intval($rr['abook_not_here'])) ? t('Not connected at this location') : '')
|
((intval($rr['abook_not_here'])) ? t('Not connected at this location') : '')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$oneway = false;
|
||||||
|
if(! intval(get_abconfig(local_channel(),$rr['xchan_hash'],'their_perms','post_comments'))) {
|
||||||
|
$oneway = true;
|
||||||
|
}
|
||||||
|
|
||||||
foreach($status as $str) {
|
foreach($status as $str) {
|
||||||
if(!$str)
|
if(!$str)
|
||||||
|
@ -283,7 +288,8 @@ class Connections extends \Zotlabs\Web\Controller {
|
||||||
'ignore_hover' => t('Ignore connection'),
|
'ignore_hover' => t('Ignore connection'),
|
||||||
'ignore' => ((! $rr['abook_ignored']) ? t('Ignore') : false),
|
'ignore' => ((! $rr['abook_ignored']) ? t('Ignore') : false),
|
||||||
'recent_label' => t('Recent activity'),
|
'recent_label' => t('Recent activity'),
|
||||||
'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id'])
|
'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id']),
|
||||||
|
'oneway' => $oneway
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,13 @@ class Viewconnections extends \Zotlabs\Web\Controller {
|
||||||
$contacts = array();
|
$contacts = array();
|
||||||
|
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
|
|
||||||
|
$oneway = false;
|
||||||
|
if(! intval(get_abconfig(\App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_comments'))) {
|
||||||
|
$oneway = true;
|
||||||
|
}
|
||||||
|
|
||||||
$url = chanlink_hash($rr['xchan_hash']);
|
$url = chanlink_hash($rr['xchan_hash']);
|
||||||
if($url) {
|
if($url) {
|
||||||
$contacts[] = array(
|
$contacts[] = array(
|
||||||
'id' => $rr['abook_id'],
|
'id' => $rr['abook_id'],
|
||||||
|
@ -83,6 +88,7 @@ class Viewconnections extends \Zotlabs\Web\Controller {
|
||||||
'sparkle' => '',
|
'sparkle' => '',
|
||||||
'itemurl' => $rr['url'],
|
'itemurl' => $rr['url'],
|
||||||
'network' => '',
|
'network' => '',
|
||||||
|
'oneway' => $oneway
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -979,7 +979,7 @@ function contact_block() {
|
||||||
// than wishful thinking; even though soapbox channels and feeds will disable it.
|
// than wishful thinking; even though soapbox channels and feeds will disable it.
|
||||||
|
|
||||||
if(! intval(get_abconfig(App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_comments'))) {
|
if(! intval(get_abconfig(App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_comments'))) {
|
||||||
$rr['archived'] = true;
|
$rr['oneway'] = true;
|
||||||
}
|
}
|
||||||
$micropro[] = micropro($rr,true,'mpfriend');
|
$micropro[] = micropro($rr,true,'mpfriend');
|
||||||
}
|
}
|
||||||
|
@ -1033,6 +1033,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
|
||||||
return replace_macros(get_markup_template(($textmode)?'micropro_txt.tpl':'micropro_img.tpl'),array(
|
return replace_macros(get_markup_template(($textmode)?'micropro_txt.tpl':'micropro_img.tpl'),array(
|
||||||
'$click' => (($contact['click']) ? $contact['click'] : ''),
|
'$click' => (($contact['click']) ? $contact['click'] : ''),
|
||||||
'$class' => $class . (($contact['archived']) ? ' archived' : ''),
|
'$class' => $class . (($contact['archived']) ? ' archived' : ''),
|
||||||
|
'$oneway' => (($contact['oneway']) ? true : false),
|
||||||
'$url' => $url,
|
'$url' => $url,
|
||||||
'$photo' => $contact['xchan_photo_s'],
|
'$photo' => $contact['xchan_photo_s'],
|
||||||
'$name' => $contact['xchan_name'],
|
'$name' => $contact['xchan_name'],
|
||||||
|
|
|
@ -36,4 +36,10 @@
|
||||||
|
|
||||||
.connphone {
|
.connphone {
|
||||||
color: green;
|
color: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contact-photo-wrapper .oneway-overlay {
|
||||||
|
margin-top: -25px;
|
||||||
|
margin-left: 53px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
|
@ -31,3 +31,9 @@
|
||||||
.contact-entry-end {
|
.contact-entry-end {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contact-entry-photo-wrapper .oneway-overlay {
|
||||||
|
margin-top: 25px;
|
||||||
|
margin-left: -25px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
|
@ -216,3 +216,10 @@ a.wikilist {
|
||||||
#notifications {
|
#notifications {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* contact block */
|
||||||
|
.contact-block-div .oneway-overlay {
|
||||||
|
font-size: 20px;
|
||||||
|
margin-left: -25px;
|
||||||
|
margin-top: 25px;
|
||||||
|
}
|
||||||
|
|
|
@ -1800,3 +1800,8 @@ dl.bb-dl > dd > li {
|
||||||
.caption-visible {
|
.caption-visible {
|
||||||
max-height: 75%;
|
max-height: 75%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.oneway-overlay {
|
||||||
|
position: absolute;
|
||||||
|
text-shadow: -2px 0 1px #fff, 0 2px 1px#fff, 2px 0 1px #fff, 0 -2px 1px #fff;
|
||||||
|
}
|
||||||
|
|
|
@ -18,7 +18,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="section-content-tools-wrapper">
|
<div class="section-content-tools-wrapper">
|
||||||
<div class="contact-photo-wrapper" >
|
<div class="contact-photo-wrapper" >
|
||||||
<a href="{{$contact.url}}" title="{{$contact.img_hover}}" ><img class="directory-photo-img {{if $contact.classes}}{{$contact.classes}}{{/if}}" src="{{$contact.thumb}}" alt="{{$contact.name}}" /></a>
|
<a href="{{$contact.url}}" title="{{$contact.img_hover}}" >
|
||||||
|
<img class="directory-photo-img {{if $contact.classes}}{{$contact.classes}}{{/if}}" src="{{$contact.thumb}}" alt="{{$contact.name}}" />
|
||||||
|
</a>
|
||||||
|
{{if $contact.oneway}}
|
||||||
|
<i class="fa fa-fw fa-minus-circle oneway-overlay text-danger"></i>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="contact-info">
|
<div class="contact-info">
|
||||||
{{if $contact.status}}
|
{{if $contact.status}}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<div class="contact-entry-wrapper" id="contact-entry-wrapper-{{$contact.id}}" >
|
<div class="contact-entry-wrapper" id="contact-entry-wrapper-{{$contact.id}}" >
|
||||||
<div class="contact-entry-photo-wrapper" >
|
<div class="contact-entry-photo-wrapper" >
|
||||||
<a href="{{$contact.link}}" title="{{$contact.img_hover}}" ><img class="contact-block-img" src="{{$contact.thumb}}" alt="{{$contact.name}}" /></a>
|
<a href="{{$contact.link}}" title="{{$contact.img_hover}}" ><img class="contact-block-img" src="{{$contact.thumb}}" alt="{{$contact.name}}" /></a>
|
||||||
|
{{if $contact.oneway}}
|
||||||
|
<i class="fa fa-fw fa-minus-circle oneway-overlay text-danger"></i>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="contact-entry-photo-end" ></div>
|
<div class="contact-entry-photo-end" ></div>
|
||||||
<div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
|
<div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<div class="contact-block-div{{if $class}} {{$class}}{{/if}}"><a class="contact-block-link{{if $class}} {{$class}}{{/if}}{{if $click}} fakelink{{/if}}" href="{{if $click}}#{{else}}{{$url}}{{/if}}" {{if $click}}onclick="{{$click}}"{{/if}}><img class="contact-block-img{{if $class}} {{$class}}{{/if}}" src="{{$photo}}" title="{{$title}}" alt="" /></a></div>
|
<div class="contact-block-div{{if $class}} {{$class}}{{/if}}"><a class="contact-block-link{{if $class}} {{$class}}{{/if}}{{if $click}} fakelink{{/if}}" href="{{if $click}}#{{else}}{{$url}}{{/if}}" {{if $click}}onclick="{{$click}}"{{/if}}><img class="contact-block-img{{if $class}} {{$class}}{{/if}}" src="{{$photo}}" title="{{$title}}" alt="" />{{if $oneway}}<i class="fa fa-fw fa-minus-circle oneway-overlay text-danger"></i>{{/if}}</a></div>
|
||||||
|
|
Loading…
Reference in a new issue