aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/ThreadItem.php3
-rw-r--r--view/tpl/conv_item.tpl8
-rw-r--r--view/tpl/conv_list.tpl8
3 files changed, 10 insertions, 9 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 960cc82a9..d1206c604 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -543,7 +543,8 @@ class ThreadItem {
'moderate_approve' => t('Approve'),
'moderate_delete' => t('Delete'),
'rtl' => in_array($item['lang'], rtl_languages()),
- 'reactions_allowed' => $reactions_allowed
+ 'reactions_allowed' => $reactions_allowed,
+ 'reaction_str' => [t('Add yours'), t('Remove yours')]
);
$arr = array('item' => $item, 'output' => $tmp_item);
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index 14ac86df7..1af6c34ba 100644
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -115,9 +115,9 @@
<h3 class="modal-title">{{$response.count}} {{$response.button.label}}</h3>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-hidden="true"></button>
</div>
- {{if $item.reactions_allowed && ($item.my_responses.$verb && $verb != 'announce')}} {{** undo announce is not yet supported **}}
+ {{if $item.reactions_allowed && !($verb === 'announce' && $item.my_responses.announce)}} {{** undo announce is not yet supported **}}
<div class="modal-header">
- <a href="#" class="text-reset" onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;">{{if $item.my_responses.like}}- Remove{{else}}+ Add{{/if}} yours</a>
+ <a href="#" class="text-reset" onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;">{{if $item.my_responses.$verb}}- {{$item.reaction_str.1}}{{else}}+ {{$item.reaction_str.0}}{{/if}}</a>
</div>
{{/if}}
<div class="modal-body response-list">
@@ -135,9 +135,9 @@
</div><!-- /.modal -->
{{else}}
<div class="dropdown-menu">
- {{if $item.reactions_allowed && ($item.my_responses.$verb && $verb != 'announce')}} {{** undo announce is not yet supported **}}
+ {{if $item.reactions_allowed && !($verb === 'announce' && $item.my_responses.announce)}} {{** undo announce is not yet supported **}}
<div class="dropdown-item">
- <a href="#" class="text-reset" onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;">{{if $item.my_responses.$verb}}- Remove{{else}}+ Add{{/if}} yours</a>
+ <a href="#" class="text-reset" onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;">{{if $item.my_responses.$verb}}- {{$item.reaction_str.1}}{{else}}+ {{$item.reaction_str.0}}{{/if}}</a>
</div>
<div class="dropdown-divider"></div>
{{/if}}
diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl
index bc1b386e3..991acff4d 100644
--- a/view/tpl/conv_list.tpl
+++ b/view/tpl/conv_list.tpl
@@ -128,9 +128,9 @@
<h3 class="modal-title">{{$response.count}} {{$response.button.label}}</h3>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-hidden="true"></button>
</div>
- {{if $item.reactions_allowed && ($item.my_responses.$verb && $verb != 'announce')}} {{** undo announce is not yet supported **}}
+ {{if $item.reactions_allowed && !($verb === 'announce' && $item.my_responses.announce)}} {{** undo announce is not yet supported **}}
<div class="modal-header">
- <a href="#" class="text-reset" onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;">{{if $item.my_responses.like}}- Remove{{else}}+ Add{{/if}} yours</a>
+ <a href="#" class="text-reset" onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;">{{if $item.my_responses.$verb}}- {{$item.reaction_str.1}}{{else}}+ {{$item.reaction_str.0}}{{/if}}</a>
</div>
{{/if}}
<div class="modal-body response-list">
@@ -148,9 +148,9 @@
</div><!-- /.modal -->
{{else}}
<div class="dropdown-menu">
- {{if $item.reactions_allowed && ($item.my_responses.$verb && $verb != 'announce')}} {{** undo announce is not yet supported **}}
+ {{if $item.reactions_allowed && !($verb === 'announce' && $item.my_responses.announce)}} {{** undo announce is not yet supported **}}
<div class="dropdown-item">
- <a href="#" class="text-reset" onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;">{{if $item.my_responses.$verb}}- Remove{{else}}+ Add{{/if}} yours</a>
+ <a href="#" class="text-reset" onclick="{{$response.button.onclick}}({{$item.id}},'{{$verb}}'); return false;">{{if $item.my_responses.$verb}}- {{$item.reaction_str.1}}{{else}}+ {{$item.reaction_str.0}}{{/if}}</a>
</div>
<div class="dropdown-divider"></div>
{{/if}}