[TikiWiki-commits] [Git][tikiwiki/tiki][28.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 <68dd8800ec771_2c4c115c3101@gitlab-sidekiq-low-urgency-cpu-bound-v2-6b76798687-w72mw.mail>

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


Commits:
38a82438 by Yves Ngalamulume at 2025-10-01T22:32:53+03:00
[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

- - - - -


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/38a82438c27c3f37fba56fd80fed193d112277ea

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/38a82438c27c3f37fba56fd80fed193d112277ea
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.