[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [BP][FIX] Show Files button for anonymous users on wiki pages

"Bruno Kambere \(@kambereBr\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68dd8c7ad2f6b_2cdee4057229@gitlab-sidekiq-low-urgency-cpu-bound-v2-6b76798687-n6xdj.mail>

Bruno Kambere pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
a3da605e by Yves Ngalamulume at 2025-10-01T23:11:41+03:00
[BP][FIX] Show Files button for anonymous users on wiki pages
---
* [BP][FIX] Show Files button for anonymous users on wiki pages
---
* [BP][FIX] Show Files button for anonymous users on wiki pages
---
* [FIX] Show Files button for anonymous users on wiki pages
---
* [FIX] Show Files button for anonymous users on wiki pages

See merge request tikiwiki/tiki!8656

See merge request tikiwiki/tiki!8695

See merge request tikiwiki/tiki!8696

See merge request tikiwiki/tiki!8697

- - - - -


1 changed file:

- templates/tiki-page_bar.tpl


Changes:

=====================================
templates/tiki-page_bar.tpl
=====================================
@@ -146,30 +146,19 @@
 
             {if isset($show_page) and $show_page eq 'y'}
                 {* don't show attachments button if feature disabled or no corresponding rights or no attached files and r/o*}
-
                 {if $prefs.feature_wiki_attachments == 'y'
                     && (
-                        $tiki_p_wiki_view_attachments == 'y'
-                        && (isset($atts_count) && $atts_count gt 0)
+                        ($tiki_p_wiki_view_attachments == 'y' && $atts_count|default:0 > 0)
                         || $tiki_p_wiki_attach_files == 'y'
                         || $tiki_p_wiki_admin_attachments == 'y')}
-
                     {capture assign=thistext}
                         {strip}
-                            {if (!isset($atts_count) or $atts_count == 0) || $tiki_p_wiki_attach_files == 'y'
-                                && $tiki_p_wiki_view_attachments == 'n' && $tiki_p_wiki_admin_attachments == 'n'}
-                                {tr}Files{/tr}
-                            {else}
-                                {tr}Files{/tr}
-                                &nbsp;<span class="atts_count badge bg-info">{$atts_count}</span>
-                            {/if}
+                            {tr}Files{/tr}
+                            <span class="atts_count badge bg-info">{$atts_count|default:0}</span>
                         {/strip}
                     {/capture}
-
-                    {if (isset($atts_count) and $atts_count gt 0) || $editable}
-                        {button href="#attachments" _flip_id="attzone{if isset($pagemd5)}{$pagemd5}{/if}" _type="secondary mb-2" _text=$thistext _flip_default_open=$prefs.w_displayed_default _flip_hide_text="n"}
-                    {/if}
-                {/if}{* attachments *}
+                    {button href="#attachments" _flip_id="attzone{if isset($pagemd5)}{$pagemd5}{/if}" _type="secondary mb-2" _text=$thistext _flip_default_open=$prefs.w_displayed_default _flip_hide_text="n"}
+                {/if} {* attachments *}
 
             {/if}
             {if $more_section|trim neq ''}



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a3da605e9b74bf3f379abe80b18e0841a2ddb0a7

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a3da605e9b74bf3f379abe80b18e0841a2ddb0a7
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.