aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-02-15 10:15:57 +0000
committerMario <mario@mariovavti.com>2021-02-15 10:15:57 +0000
commitd72a096fa55e1b0c9d78a0fc0fa5a0b72988c69d (patch)
treee16495d2f64d2c5d5e01394178d810a060895643
parented993920015cfae7f0e939b1733ab125c85e1dda (diff)
downloadvolse-hubzilla-d72a096fa55e1b0c9d78a0fc0fa5a0b72988c69d.tar.gz
volse-hubzilla-d72a096fa55e1b0c9d78a0fc0fa5a0b72988c69d.tar.bz2
volse-hubzilla-d72a096fa55e1b0c9d78a0fc0fa5a0b72988c69d.zip
fix preview generating duplicate IDs
-rw-r--r--include/conversation.php2
-rw-r--r--view/tpl/conv_item.tpl2
-rw-r--r--view/tpl/threaded_conversation.tpl4
3 files changed, 6 insertions, 2 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 08d16a413..1b0db52e3 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -923,7 +923,6 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
// logger('nouveau: ' . print_r($threads,true));
-
$o .= replace_macros($page_template, array(
'$baseurl' => z_root(),
'$photo_item' => $content_html,
@@ -935,6 +934,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
'$wait' => t('Loading...'),
'$conversation_tools' => t('Conversation Tools'),
'$dropping' => ($page_dropping?t('Delete Selected Items'):False),
+ '$preview' => $preview
));
return $o;
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
index b021509d3..361392796 100644
--- a/view/tpl/conv_item.tpl
+++ b/view/tpl/conv_item.tpl
@@ -141,7 +141,7 @@
</a>
<a class="dropdown-item" href="#" title="{{$item.conlabels.1}}" onclick="dolike({{$item.id}},'disagree'); return false;">
<i class="item-act-list fa fa-times{{if $item.my_responses.disagree}} ivoted{{/if}}" ></i> {{$item.conlabels.1}}
- </a>
+ </a>
<a class="dropdown-item" href="#" title="{{$item.conlabels.2}}" onclick="dolike({{$item.id}},'abstain'); return false;">
<i class="item-act-list fa fa-question{{if $item.my_responses.abstain}} ivoted{{/if}}" ></i> {{$item.conlabels.2}}
</a>
diff --git a/view/tpl/threaded_conversation.tpl b/view/tpl/threaded_conversation.tpl
index 5bc7d8386..6e773088e 100644
--- a/view/tpl/threaded_conversation.tpl
+++ b/view/tpl/threaded_conversation.tpl
@@ -1,9 +1,13 @@
+{{if !$preview }}
<div id="threads-begin"></div>
+{{/if}}
{{if $photo_item}}
{{$photo_item}}
{{/if}}
{{foreach $threads as $thread_item}}
{{include file="{{$thread_item.template}}" item=$thread_item}}
{{/foreach}}
+{{if !$preview }}
<div id="threads-end"></div>
<div id="conversation-end"></div>
+{{/if}}