github.com/bitcubate/cryptojournal@v1.2.5-0.20171102134152-f578b3d788ab/src/comments/views/comment.html.got (about)

     1  <tr>
     2  
     3  {{ $owner := (.comment.OwnedBy .currentUser.ID) }}
     4  <td class="mdl-data-table__cell--non-numeric" id="comment{{.comment.ID}}" class="comment level{{ .comment.Level }} minus{{ .comment.NegativePoints }}">
     5      <div class="metadata">
     6      {{ if not $owner }}
     7      <a href="/comments/{{.comment.ID}}/upvote" method="post" class="vote {{if not .currentUser.CanUpvote }}disabled{{ end }}" rel=nofollow>▲</a>
     8      {{ end }}
     9      
    10      {{ if or .currentUser.Admin $owner }}
    11        <span class="points">{{ .comment.Points }}</span> points
    12      {{ end }}
    13      
    14      {{ if not .story }}
    15      comment posted on <a href="/stories/{{.comment.StoryID}}">{{.comment.StoryName}}</a> by 
    16      {{ end}}
    17      
    18      <a href="/users/{{.comment.UserID}}">{{.comment.UserName}}</a> 
    19      <a href="/comments/{{.comment.ID}}">{{timeago .comment.CreatedAt}}</a>
    20    
    21      {{ if not $owner }}
    22      <a href="/comments/{{.comment.ID}}/downvote" method="post" class="vote {{if not .currentUser.CanDownvote }}disabled{{ end }}" rel=nofollow>▼</a>
    23      {{ end }}
    24      </div>
    25      </td>
    26              <td class="mdl-data-table__cell--non-numeric">
    27  
    28      
    29      <div class="content">
    30      {{ markup .comment.Text }}
    31      </div>
    32      
    33      
    34      {{ if .currentUser.CanComment }}
    35      <div class="actions">
    36      {{ if and .story (not $owner) }}
    37        <a href="#" class="show button small grey reply" data-show="#comment{{.comment.ID}} .reply-form">reply</a>
    38      {{ end }}
    39      
    40      {{ if (.currentUser.Admin) }}
    41          <a href="/comments/{{.comment.ID}}/flag" method="post" class="button small grey reply">flag</a>
    42      {{ end }}
    43      
    44      {{ if and .comment.Editable $owner }}
    45          <a href="/comments/{{.comment.ID}}/update"  class="button small grey reply">edit</a>
    46      {{ end }}
    47      </div>
    48      {{ end }}
    49      
    50      {{ if and .story (not $owner) }}
    51        <div class="reply-form hidden">
    52        {{ template "comments/views/form_embed.html.got" . }}
    53         </div>
    54      {{ end }}
    55      
    56      {{ $0 := . }}
    57      {{ range .comment.Children }}
    58         {{ set $0 "comment" . }}
    59         {{ template "comments/views/comment.html.got" $0 }}
    60      {{ end }}
    61      
    62   </td>
    63   </tr>