Permalink
Browse files

XWIKI-7540: Merge Annotations with Comments.

- Reverted the deleted annotations docextra shortcuts.
  • Loading branch information...
1 parent 13f9fff commit e6bb7e229f9e63a19b54d11b3af4e35ee3fdadae @Enygma2002 Enygma2002 committed Feb 21, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/shortcuts.vm
@@ -11,6 +11,15 @@
#if($viewer != 'comments' && $showcomments)
#set ($discard = $docextralinks.add(["comments", $msg.get("docextra.comments"), $doc.getObjects("XWiki.XWikiComments").size()]))
#end
+ #if($showannotations)
+ #if(!$annotationCount)
+ ## Annotation count is supposed to be defined in xwikivars.vm. If for a reason or another it is not
+ ## defined at this point, we tap into the standard annotation class, and do not load again the
+ ## config document. This however should not happen.
+ #set($annotationCount = $doc.getObjects('AnnotationCode.AnnotationClass').size())
+ #end
+ #set ($discard = $docextralinks.add(["annotations", $msg.get("docextra.annotations"), $annotationCount]))
+ #end
#if($viewer != 'attachments' && $showattachments)
#set ($discard = $docextralinks.add(["attachments", $msg.get("docextra.attachments"), $doc.getAttachmentList().size()]))
#end

0 comments on commit e6bb7e2

Please sign in to comment.