[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [ENH][UX] Comments: improve empty state message when there are no comments
"Joseph Ushindi \(@iRosh243\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68f8f08ec575_2ce1b04176fc@gitlab-sidekiq-low-urgency-cpu-bound-v2-65cbf47f7b-6mnmd.mail> |
Joseph Ushindi pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
cbc0a604 by Joseph Ushindi at 2025-10-22T14:46:31+00:00
[ENH][UX] Comments: improve empty state message when there are no comments
---
* [ENH][UX] Comments: improve empty state message when there are no comments
---
* [ENH]Comments: improve empty state message in remarksbox
See merge request tikiwiki/tiki!8615
See merge request tikiwiki/tiki!8807
- - - - -
2 changed files:
- templates/comment/list.tpl
- templates/comments.tpl
Changes:
=====================================
templates/comment/list.tpl
=====================================
@@ -35,15 +35,49 @@
})
</script>
{else}
- {remarksbox type=info}
- {tr}There are no comments at this time.{/tr}
- {/remarksbox}
+ {if $allow_unlock}
+ {remarksbox type=warning}
+ {icon name=lock}
+ {if $section eq 'forums'}
+ {tr}Replies are locked for this topic.{/tr}
+ {else}
+ {tr}Comments are locked for this content.{/tr}
+ {/if}
+ {/remarksbox}
+ {elseif $allow_post}
+ {remarksbox type=info}
+ {if $section eq 'forums'}
+ {tr}No replies yet — Add your thoughts!{/tr}
+ {else}
+ {tr}No comments yet — Add your thoughts!{/tr}
+ {/if}
+ {/remarksbox}
+ {else}
+ {remarksbox type=info}
+ {if $section eq 'forums'}
+ {tr}No replies yet.{/tr}
+ {else}
+ {tr}No comments yet.{/tr}
+ {/if}
+ {' '}
+ <a href="tiki-login.php">{tr}Log in{/tr}</a>
+ {if $prefs.allowRegister eq 'y'}
+ {tr}or{/tr} <a href="tiki-register.php">{tr}register{/tr}</a>
+ {/if}
+ {' '}
+ {if $section eq 'forums'}
+ {tr}to reply!{/tr}
+ {else}
+ {tr}to add your thoughts!{/tr}
+ {/if}
+ {/remarksbox}
+ {/if}
{/if}
{if $allow_post and $prefs.comments_sort_mode neq 'commentDate_desc'}
<div class="submit">
<div class="buttons comment-form {if $prefs.wiki_comments_form_displayed_default eq 'y'}autoshow{/if}">
- <a class="btn btn-secondary custom-handling" href="{service controller=comment action=post type=$type objectId=$objectId}" role="button" data-target="#add-comment-zone-{$objectId|replace:' ':''|replace:',':''|escape:'attr'}">{tr}Post new comment{/tr}</a>
+ <a class="btn btn-secondary custom-handling" href="{service controller=comment action=post type=$type objectId=$objectId}" role="button" data-target="#add-comment-zone-{$objectId|replace:' ':''|replace:',':''|escape:'attr'}">{tr}Add a comment{/tr}</a>
</div>
</div>
<div id="add-comment-zone-{$objectId|replace:' ':''|replace:',':''|escape:'attr'}" class="add-comment-zone"></div>
=====================================
templates/comments.tpl
=====================================
@@ -163,9 +163,26 @@
{/if}
</div>
{else}
- {remarksbox type=info}
- {tr}There are no comments at this time.{/tr}
- {/remarksbox}
+ {if $thread_is_locked eq 'y'}
+ {remarksbox type=warning}
+ {icon name=lock} {tr}Replies are locked for this topic.{/tr}
+ {/remarksbox}
+ {elseif $tiki_p_forum_post eq 'y'}
+ {remarksbox type=info}
+ {tr}No replies yet — Add your thoughts!{/tr}
+ {/remarksbox}
+ {else}
+ {remarksbox type=info}
+ {tr}No replies yet.{/tr}
+ {' '}
+ <a href="tiki-login.php">{tr}Log in{/tr}</a>
+ {if $prefs.allowRegister eq 'y'}
+ {tr}or{/tr} <a href="tiki-register.php">{tr}register{/tr}</a>
+ {/if}
+ {' '}
+ {tr}to reply!{/tr}
+ {/remarksbox}
+ {/if}
{/if}
{/if} {* end read comment *}
{if $section eq 'forums'}<a id="comments"></a>{/if}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/cbc0a604eeed7c16c5b76ecd64f9329b3cded1b7
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/cbc0a604eeed7c16c5b76ecd64f9329b3cded1b7
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs