archive_me1Add my vote for this tag create new tag
, view all tags
This topic is now closed

Smaller usability enhancements on the file attachment table

follow up of BetterAttachmentTableForCairoRelease

Feature progress table:

Feature Spec Impl Scheduled
Language independent captions 100% 100% DakarRelease
Make first link in header consistent 100% 100% DakarRelease
Column for file icons 100% 100% CairoRelease
Add file size to 'update attachment' table 100% 100% DakarRelease
Hide 'existing attachments' table when no attachments 100% 100% DakarRelease
-- ArthurClemens - 19 Jul 2004


Make the wordings of captions and link labels language independent

For instance in a german or french installation this should be changed easily.

Make first link in header consistent with the other header links

One thing I accidentily noticed is that the first link in the header row links to a topic. When you click that link to sort the table on attachment name, you loose the topic and a new topic is loaded. This is inconsistent with the other header links. And if people are wondering about attachments or need help, its not likely that they will find that link.

I would suggest to remove the topic link, and to use the link for sorting only.

This is hardcoded in the TablePlugin.

  • This is in attachtables.tmpl. Updated in SVN r4001. -- ArthurClemens - 13 Apr 2005

-- ArthurClemens - 02 Aug 2004

Put file icons in separate column

Create a new first column for the file icons, so they don't mess up the attachment name layout, and you can use the column header to sort on file type.

This is now really easy to implement by modifying attachtable.tmpl. Implemented in PatternSkin. Any interest to adopt this for the classic skin as well?

-- ArthurClemens - 02 Aug 2004

Add file size to 'update attachment' table

When looking at the table of all previous versions of an attachment, it would be handy to also see the file sizes - this can give additional useful information of a particular version.

-- ArthurClemens - 08 Aug 2004

This was absolutely a nobrainer, thanks to the flexible setup of attachtables.tmpl. Now in SVN (3982).

-- ArthurClemens - 09 Apr 2005

Hide 'existing attachments' table if there are no attachments

Even when a topic has no attachments, a header 'Exististing attachments' is shown with an empty table (with only a header row). This is visual clutter and serves no purpose.

  • with_title_and_hide_no_attachments.diff for Attach.pm hides the attachment table when the topic has no attachments. It also adds a title parameter that is used in the template when the topic does have attachments; this leads to the old layout.
  • pass_title_to_existing_attachments.diff updates attach.pattern.tmpl to pass a title parameter instead of just writing a h2 title.
    Any need to update the classic template as well?

-- ArthurClemens - 10 Apr 2005

Development discussion

I can't figure out why I cannot sort the first (icon) column (on file type). When looking with classic skin (and modified attachtables.tmpl) I see the header gets the sort diamond, but it won't actually perform the sort.

-- ArthurClemens - 09 Apr 2005

After digging I found two problems and two solutions:

  • There was a bug (mine) in TablePlugin, that caused the first column to get the class (twikiSortedDescendingCol and twikiSortedAscendingCol) assigned wrong. Patch in TablePluginDev.
  • The icon column actually has nothing to sort on, because it contains no text. To solution is twofold:
    1. Write the attachment extension in the template attachtables.pattern.tmpl (leave classic skin as is)
    2. Hide the text from the user with css, and only show the icon

A logical syntax for the attachment extension would be %A_EXT%. This can be retrieved with a small change to Attach.pm (see attachment_extension_var.diff).

The basic row definition, first column would then be:

%A_ICON%<span class="twikiHidden">%A_EXT%</span>

-- ArthurClemens - 09 Apr 2005

checked Arthur's changes into DevelopBranch r3995 (with some small code tweaks)

-- WillNorris - 12 Apr 2005

Of this topic only the Language independent captions is still open. Bumped to EdinburghRelease.

-- ArthurClemens - 13 Apr 2005

Table headers are translatable as of TWiki 4.0. Table captions is now a parameter to TablePlugin.

-- ArthurClemens - 30 Jun 2006

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdiff attachment_extension_var.diff r1 manage 0.5 K 2005-04-09 - 20:25 ArthurClemens Adds support for %A_EXT% variable in attachment template; Attach.pm diffed against SVN 3982
Unknown file formatdiff pass_title_to_existing_attachments.diff r1 manage 0.9 K 2005-04-10 - 12:59 ArthurClemens Passes the new title parameter to the existing attachment table; attach.pattern.tmpl diffed against SVN 3982
Unknown file formatdiff with_title_and_hide_no_attachments.diff r1 manage 0.3 K 2005-04-10 - 12:54 ArthurClemens Adds support for title param and hides attachment table if empty; Attach.pm diffed against SVN 3982
Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2006-06-30 - ArthurClemens
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.