 React             = require 'react/addons'
 ArticleStore      = require '../../stores/article_store'
+
+userLink = (wiki_id) ->
+  <a key={wiki_id} href="https://en.wikiedia.org/wiki/User:#{wiki_id}">{wiki_id}</a>
 
 Assignment = React.createClass(
   displayName: 'Assignment'

    ratingMobileClass = ratingClass + ' tablet-only'
    languagePrefix = if article.language then "#{article.language}:" else ''
    formattedTitle = "#{languagePrefix}#{article.title}"
    assignees = []
    reviewers = []
    for assignment in _.sortBy @props.assign_group, 'user_wiki_id'
      if assignment.role == 0
        assignees.push assignment.user_wiki_id
      else if assignment.role == 1
        reviewers.push assignment.user_wiki_id

    <tr className={className}>
      <td className='popover-trigger desktop-only-tc'>

      <td>
        <div className={ratingMobileClass}><p>{article.pretty_rating}</p></div>
        <p className="title">
          {articleLink}
        </p>
      </td>
      <td className='desktop-only-tc'>{assignees}</td>
      <td className='desktop-only-tc'>{reviewers}</td>
      <td></td>
    </tr>
)
