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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.1
    • Fix Version/s: 6.4-rc-1, 6.2.5
    • Component/s: Flamingo Skin
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: