<commit_before>class window.StaffPlan.Views.Users.Show extends Support.CompositeView
  templates:
    userInfo: '''
    <div class='user-profile'>
      <a href="/staffplans/{{user.id}}">
        <img alt="A69309561cecae0e0210ace5f6a9a585" class="gravatar" src="{{user.gravatar}}" />
        <span class='name'>
          <a href="/staffplans/{{user.id}}">{{user.full_name}}</a>
        </span>
      </a>
      <div class='user-email'>
        {{user.email}}
      </div>
      <div class='user-projects'>
        List of projects:
          <ul class='user-projects-list'>
          {{#projects}}
            <li class="user-projects-list-item">
              {{.}}
            </li>
          {{/projects}}
          </ul>
      </div>
    </div>
    '''
  
  initialize: ->
    @userInfoTemplate = Handlebars.compile(@templates.userInfo)
    userProjects = @model.get('projects').map (project) ->
      window.StaffPlan.projects.get(project.project_id).get('name')
    @$el.html @userInfoTemplate({user: @model.attributes, projects: userProjects})
      
    @render()
    
  render: ->
    @$el.appendTo('section.main .content')
<commit_msg>Fixes little issue with projects/assignments<commit_after>class window.StaffPlan.Views.Users.Show extends Support.CompositeView
  templates:
    userInfo: '''
    <div class='user-profile'>
      <a href="/staffplans/{{user.id}}">
        <img alt="A69309561cecae0e0210ace5f6a9a585" class="gravatar" src="{{user.gravatar}}" />
        <span class='name'>
          <a href="/staffplans/{{user.id}}">{{user.full_name}}</a>
        </span>
      </a>
      <div class='user-email'>
        {{user.email}}
      </div>
      <div class='user-projects'>
        List of projects:
          <ul class='user-projects-list'>
          {{#projects}}
            <li class="user-projects-list-item">
              {{.}}
            </li>
          {{/projects}}
          </ul>
      </div>
    </div>
    '''
  
  initialize: ->
    @userInfoTemplate = Handlebars.compile(@templates.userInfo)
    userProjects = @model.get('assignments').map (assignment) ->
      window.StaffPlan.projects.get(assignment.project_id).get('name')
    @$el.html @userInfoTemplate({user: @model.attributes, projects: userProjects})
      
    @render()
    
  render: ->
    @$el.appendTo('section.main .content')

{'fraction_non_alphanumeric': 0.17710120068610635, 'fraction_numerical': 0.016295025728987993, 'mean_word_length': 2.390988372093023, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 43, 'https://': 0, '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': '669024', 'n_tokens_mistral': 768, 'n_tokens_neox': 745, 'n_words': 114}