Attach template shows table row when there are no attachments
When a topic has no attachments, in the attach template there is still a table row rendered under the caption "Existing attachments".
it appears that in sub
renderMetaData, the line
if( $showAll || $rows ne "" ) always turns out true.
Test case
Go to any topic that has no attachments, like the current topic. At the top you see the table "Existing attachments"
--
ArthurClemens - 26 Jul 2004
Follow up
I can't reproduce this. Could you elaborate?
--
PeterThoeny - 08 Aug 2004
Go to the attach page (any skin) of this current topic and see the table under "Existing attachments for
AttachTableRowWhenNoAttachments". It has a table header row, but there are no attachments. Previously this table was not generated. There is a check for no attachments in the code, but this check does not work.
Deferred to Dakar, because it is a visual bug.
--
ArthurClemens - 08 Aug 2004
Just checked, the table in the attachment screen was always there. Just the table header row is shown if there are no attachments. This is for the current release and it was for
TWikiRelease01Feb2003.
I do not really consider this a bug, a visual clue that there are no attachments should be there, and the table header does that. We could go fancy and show a "There are currently no files attached to this topic" instead of the empty table row.
The code you are referring to is probably for the attachment table in the topic page. The table header gets suppressed if there are no attachments or if all attachments are hidden.
I am changing this from a bug report to an enhancement request.
--
PeterThoeny - 06 Sep 2004