<commit_before>template(name="activities")
  .activities.js-sidebar-activities
    //- We should use Template.dynamic here but there is a bug with
    //- blaze-components: https://github.com/peerlibrary/meteor-blaze-components/issues/30
    if $eq mode "board"
      +boardActivities
    else
      +cardActivities

template(name="boardActivities")
  each currentBoard.activities
    .activity
      +userAvatar(userId=user._id)
      p.activity-desc
        +memberName(user=user)

        if($eq activityType 'addAttachment')
          | {{{_ 'activity-attached' attachmentLink cardLink}}}.

        if($eq activityType 'addBoardMember')
          | {{{_ 'activity-added' memberLink boardLabel}}}.

        if($eq activityType 'addComment')
          | {{{_ 'activity-on' cardLink}}}
          a.activity-comment(href="{{ card.absoluteUrl }}")
            +viewer
              = comment.text

        if($eq activityType 'archivedCard')
          | {{{_ 'activity-archived' cardLink}}}.

        if($eq activityType 'archivedList')
          | {{_ 'activity-archived' list.title}}.

        if($eq activityType 'createBoard')
          | {{_ 'activity-created' boardLabel}}.

        if($eq activityType 'createCard')
          | {{{_ 'activity-added' cardLink boardLabel}}}.

        if($eq activityType 'createList')
          | {{_ 'activity-added' list.title boardLabel}}.

        if($eq activityType 'importBoard')
          | {{{_ 'activity-imported-board' boardLabel sourceLink}}}.

        if($eq activityType 'importCard')
          | {{{_ 'activity-imported' cardLink boardLabel sourceLink}}}.

        if($eq activityType 'importList')
          | {{{_ 'activity-imported' listLabel boardLabel sourceLink}}}.

        if($eq activityType 'joinMember')
          if($eq user._id member._id)
            | {{{_ 'activity-joined' cardLink}}}.
          else
            | {{{_ 'activity-added' memberLink cardLink}}}.

        if($eq activityType 'moveCard')
          | {{{_ 'activity-moved' cardLink oldList.title list.title}}}.

        if($eq activityType 'removeBoardMember')
          | {{{_ 'activity-excluded' memberLink boardLabel}}}.

        if($eq activityType 'restoredCard')
          | {{{_ 'activity-sent' cardLink boardLabel}}}.

        if($eq activityType 'unjoinMember')
          if($eq user._id member._id)
            | {{{_ 'activity-unjoined' cardLink}}}.
          else
            | {{{_ 'activity-removed' memberLink cardLink}}}.

        span.activity-meta {{ moment createdAt }}

template(name="cardActivities")
  each currentCard.activities
    .activity
      +userAvatar(userId=user._id)
      p.activity-desc
        +memberName(user=user)
        if($eq activityType 'createCard')
          | {{_ 'activity-added' cardLabel list.title}}.
        if($eq activityType 'importCard')
          | {{{_ 'activity-imported' cardLabel list.title sourceLink}}}.
        if($eq activityType 'joinMember')
          if($eq user._id member._id)
            | {{_ 'activity-joined' cardLabel}}.
          else
            | {{{_ 'activity-added' memberLink cardLabel}}}.
        if($eq activityType 'unjoinMember')
          if($eq user._id member._id)
            | {{_ 'activity-unjoined' cardLabel}}.
          else
            | {{{_ 'activity-removed' cardLabel memberLink}}}.
        if($eq activityType 'archivedCard')
          | {{_ 'activity-archived' cardLabel}}.
        if($eq activityType 'restoredCard')
          | {{_ 'activity-sent' cardLabel boardLabel}}.
        if($eq activityType 'moveCard')
          | {{_ 'activity-moved' cardLabel oldList.title list.title}}.
        if($eq activityType 'addAttachment')
          | {{{_ 'activity-attached' attachmentLink cardLabel}}}.
          if attachment.isImage
            img.attachment-image-preview(src=attachment.url)

        if($eq activityType 'addComment')
          +inlinedForm(classNames='js-edit-comment')
            +editor(autofocus=true)
              = comment.text
            .edit-controls
              button.primary(type="submit") {{_ 'edit'}}
          else
            .activity-comment
              +viewer
                = comment.text
            span.activity-meta {{ moment createdAt }}
              if ($eq currentUser._id comment.userId)
                = ' - '
                a.js-open-inlined-form {{_ "edit"}}
                = ' - '
                a.js-delete-comment {{_ "delete"}}

        else
          span.activity-meta {{ moment createdAt }}
<commit_msg>added exact time as tooltip to activity time (saying only something like 'x days ago')<commit_after>template(name="activities")
  .activities.js-sidebar-activities
    //- We should use Template.dynamic here but there is a bug with
    //- blaze-components: https://github.com/peerlibrary/meteor-blaze-components/issues/30
    if $eq mode "board"
      +boardActivities
    else
      +cardActivities

template(name="boardActivities")
  each currentBoard.activities
    .activity
      +userAvatar(userId=user._id)
      p.activity-desc
        +memberName(user=user)

        if($eq activityType 'addAttachment')
          | {{{_ 'activity-attached' attachmentLink cardLink}}}.

        if($eq activityType 'addBoardMember')
          | {{{_ 'activity-added' memberLink boardLabel}}}.

        if($eq activityType 'addComment')
          | {{{_ 'activity-on' cardLink}}}
          a.activity-comment(href="{{ card.absoluteUrl }}")
            +viewer
              = comment.text

        if($eq activityType 'archivedCard')
          | {{{_ 'activity-archived' cardLink}}}.

        if($eq activityType 'archivedList')
          | {{_ 'activity-archived' list.title}}.

        if($eq activityType 'createBoard')
          | {{_ 'activity-created' boardLabel}}.

        if($eq activityType 'createCard')
          | {{{_ 'activity-added' cardLink boardLabel}}}.

        if($eq activityType 'createList')
          | {{_ 'activity-added' list.title boardLabel}}.

        if($eq activityType 'importBoard')
          | {{{_ 'activity-imported-board' boardLabel sourceLink}}}.

        if($eq activityType 'importCard')
          | {{{_ 'activity-imported' cardLink boardLabel sourceLink}}}.

        if($eq activityType 'importList')
          | {{{_ 'activity-imported' listLabel boardLabel sourceLink}}}.

        if($eq activityType 'joinMember')
          if($eq user._id member._id)
            | {{{_ 'activity-joined' cardLink}}}.
          else
            | {{{_ 'activity-added' memberLink cardLink}}}.

        if($eq activityType 'moveCard')
          | {{{_ 'activity-moved' cardLink oldList.title list.title}}}.

        if($eq activityType 'removeBoardMember')
          | {{{_ 'activity-excluded' memberLink boardLabel}}}.

        if($eq activityType 'restoredCard')
          | {{{_ 'activity-sent' cardLink boardLabel}}}.

        if($eq activityType 'unjoinMember')
          if($eq user._id member._id)
            | {{{_ 'activity-unjoined' cardLink}}}.
          else
            | {{{_ 'activity-removed' memberLink cardLink}}}.

        span(title=createdAt).activity-meta {{ moment createdAt }}

template(name="cardActivities")
  each currentCard.activities
    .activity
      +userAvatar(userId=user._id)
      p.activity-desc
        +memberName(user=user)
        if($eq activityType 'createCard')
          | {{_ 'activity-added' cardLabel list.title}}.
        if($eq activityType 'importCard')
          | {{{_ 'activity-imported' cardLabel list.title sourceLink}}}.
        if($eq activityType 'joinMember')
          if($eq user._id member._id)
            | {{_ 'activity-joined' cardLabel}}.
          else
            | {{{_ 'activity-added' memberLink cardLabel}}}.
        if($eq activityType 'unjoinMember')
          if($eq user._id member._id)
            | {{_ 'activity-unjoined' cardLabel}}.
          else
            | {{{_ 'activity-removed' cardLabel memberLink}}}.
        if($eq activityType 'archivedCard')
          | {{_ 'activity-archived' cardLabel}}.
        if($eq activityType 'restoredCard')
          | {{_ 'activity-sent' cardLabel boardLabel}}.
        if($eq activityType 'moveCard')
          | {{_ 'activity-moved' cardLabel oldList.title list.title}}.
        if($eq activityType 'addAttachment')
          | {{{_ 'activity-attached' attachmentLink cardLabel}}}.
          if attachment.isImage
            img.attachment-image-preview(src=attachment.url)

        if($eq activityType 'addComment')
          +inlinedForm(classNames='js-edit-comment')
            +editor(autofocus=true)
              = comment.text
            .edit-controls
              button.primary(type="submit") {{_ 'edit'}}
          else
            .activity-comment
              +viewer
                = comment.text
            span(title=createdAt).activity-meta {{ moment createdAt }}
              if ($eq currentUser._id comment.userId)
                = ' - '
                a.js-open-inlined-form {{_ "edit"}}
                = ' - '
                a.js-delete-comment {{_ "delete"}}

        else
          span(title=createdAt).activity-meta {{ moment createdAt }}

{'fraction_non_alphanumeric': 0.1373987300197066, 'fraction_numerical': 0.0004379242391066346, 'mean_word_length': 2.1862574119288456, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3860356', 'n_tokens_mistral': 2599, 'n_tokens_neox': 2542, 'n_words': 498}