Skip to content

Commit

Permalink
Merge pull request #3787 from inception-project/bugfix/3786-Annotatio…
Browse files Browse the repository at this point in the history
…n-sidebar-does-not-show-annotations-from-other-users-in-curation-mode

#3786 - Annotation sidebar does not show annotations from other users in curation mode
  • Loading branch information
reckart authored Feb 5, 2023
2 parents cf08dc6 + 19f91a0 commit 710d4e2
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static de.tudarmstadt.ukp.clarin.webanno.curation.casdiff.CasDiff.doDiffSingle;
import static de.tudarmstadt.ukp.clarin.webanno.curation.casdiff.CasDiff.getDiffAdapters;
import static de.tudarmstadt.ukp.clarin.webanno.curation.casdiff.LinkCompareBehavior.LINK_ROLE_AS_LABEL;
import static de.tudarmstadt.ukp.clarin.webanno.model.Mode.ANNOTATION;
import static java.util.function.Function.identity;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;
Expand Down Expand Up @@ -50,7 +51,6 @@
import de.tudarmstadt.ukp.clarin.webanno.curation.casdiff.internal.AID;
import de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature;
import de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer;
import de.tudarmstadt.ukp.clarin.webanno.model.Mode;
import de.tudarmstadt.ukp.clarin.webanno.security.UserDao;
import de.tudarmstadt.ukp.clarin.webanno.security.model.User;
import de.tudarmstadt.ukp.inception.rendering.Renderer;
Expand Down Expand Up @@ -106,14 +106,20 @@ public String getId()
}

@Override
public boolean accepts(RenderRequest aContext)
public boolean accepts(RenderRequest aRequest)
{
AnnotatorState state = aContext.getState();
if (state == null) {
AnnotatorState state = aRequest.getState();

// do not show predictions on the decicated curation page
if (state != null && state.getMode() != ANNOTATION) {
return false;
}

if (aRequest.getCas() == null) {
return false;
}

return state.getMode() == Mode.ANNOTATION;
return true;
}

@Override
Expand Down

0 comments on commit 710d4e2

Please sign in to comment.