Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-10806

$docextralinks doesn't display number of comments or attachment (and probably annotation) in the flamingo "More Actions" menu

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 6.4-rc-1, 6.2.5
    • 6.1
    • Flamingo Skin
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Hello,

      On flamingo I wanted this submenu of "More actions" if my document have 2 comments,

      and this one if my document have any comment.

      then i start to modify /skins/flamingo/shortcuts.vm with this little piece of code

          #set ($CommentNumber = $doc.getObjects('XWiki.XWikiComments').size())
          #if ($CommentNumber != '0')
            #set ($discard = $docextralinks.add(['comments', "$services.localization.render('docextra.comments') ($CommentNumber)", $CommentNumber, 'comment']))
          #else
            #set ($discard = $docextralinks.add(['comments', $services.localization.render('docextra.comments'), $CommentNumber, 'comment']))
          #end
          ##set ($discard = $docextralinks.add(['comments', "$services.localization.render('docextra.comments')$CommentNumberLabel", $doc.getObjects('XWiki.XWikiComments').size(), 'comment']))
        #end
      

      but after a little thinking :-/ I think that docextralinks function doesn't work correctly (on colibri there aren't problem)
      what do you think?

      Pascal

      Attachments

        1. 0comment.png
          0comment.png
          15 kB
        2. 2comment.png
          2comment.png
          15 kB
        3. CommentAndAttachmentCountOnColibri.png
          CommentAndAttachmentCountOnColibri.png
          36 kB
        4. after.png
          after.png
          15 kB

        Activity

          People

            gdelhumeau Guillaume Delhumeau
            Pbas Pascal BASTIEN
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: