<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Emberoverflow</title>
  <link rel="stylesheet" href="css/normalize.css">
  <link rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
</head>
<body>
  <script type="text/x-handlebars">
    <nav class="navbar navbar-default" role="navigation">
      <div class="navbar-header">
        {{#link-to "index" classNames="navbar-brand"}}
          Emberoverflow
        {{/link-to}}
      </div>

      <ul class="nav navbar-nav">
        {{#if userSignedIn}}
          <li>
            {{#link-to "ask-question"}}
              Ask Question
            {{/link-to}}
          </li>
        {{/if}}

        <li>
          {{#link-to "about"}}
            About site
          {{/link-to}}
        </li>
      </ul>

      <ul class="nav navbar-nav">
        {{#if userSignedIn}}
          <li>
            <a href="#" {{action "signOut"}}>
              Welcome, {{signedInUser.fullname}} — Sign out
            </a>
          </li>
        {{else}}
          <li>
            {{#link-to "sign-in"}}Sign in{{/link-to}}
          </li>
        {{/if}}
      </ul>
    </nav>

    {{outlet}}
  </script>

  <script type="text/x-handlebars" id="index">
    <div class="row">
      <div class="col-md-8">
        <h2>{{siteTitle}}</h2>

        <p>It is {{currentTime}}</p>

        <h3> Latest questions</h3>

        <ul>
          {{#each}}
            {{question-preview question=this}}
          {{/each}}
        </ul>
      </div>
    </div>
  </script>

  <script type="text/x-handlebars" id="question">
    <div class="row">
      <div class="col-md-8">
        <h2>{{title}}</h2>

        <p>
          {{question}}
        </p>

        <p>
          Asked by {{author.fullname}}
        </p>
      </div>
    </div>

    <hr>

    {{partial "answers"}}

    <hr>

    {{#view App.AnswerFormView}}
    <div class="row">
      <div class="col-md-8">
        <h4>Submit your answer:</h4>

        <form {{action "answerQuestion" on="submit"}}>
          <div class="form-group">
            {{textarea id="answer" value=answer classNames="form-control"}}
          </div>

          <button class="btn btn-primary" type="submit">
            Submit
          </button>
        </form>
      </div>
    </div>
    {{/view}}
  </script><commit_msg>Chapter 11: Calling for view object in question template<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Emberoverflow</title>
  <link rel="stylesheet" href="css/normalize.css">
  <link rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
</head>
<body>
  <script type="text/x-handlebars">
    <nav class="navbar navbar-default" role="navigation">
      <div class="navbar-header">
        {{#link-to "index" classNames="navbar-brand"}}
          Emberoverflow
        {{/link-to}}
      </div>

      <ul class="nav navbar-nav">
        {{#if userSignedIn}}
          <li>
            {{#link-to "ask-question"}}
              Ask Question
            {{/link-to}}
          </li>
        {{/if}}

        <li>
          {{#link-to "about"}}
            About site
          {{/link-to}}
        </li>
      </ul>

      <ul class="nav navbar-nav">
        {{#if userSignedIn}}
          <li>
            <a href="#" {{action "signOut"}}>
              Welcome, {{signedInUser.fullname}} — Sign out
            </a>
          </li>
        {{else}}
          <li>
            {{#link-to "sign-in"}}Sign in{{/link-to}}
          </li>
        {{/if}}
      </ul>
    </nav>

    {{outlet}}
  </script>

  <script type="text/x-handlebars" id="index">
    <div class="row">
      <div class="col-md-8">
        <h2>{{siteTitle}}</h2>

        <p>It is {{currentTime}}</p>

        <h3> Latest questions</h3>

        <ul>
          {{#each}}
            {{question-preview question=this}}
          {{/each}}
        </ul>
      </div>
    </div>
  </script>

  <script type="text/x-handlebars" id="question">
    <div class="row">
      <div class="col-md-8">
        <h2>{{title}}</h2>

        <p>
          {{question}}
        </p>

        <p>
          Asked by {{author.fullname}}
        </p>
      </div>
    </div>

    <hr>

    {{partial "answers"}}

    <hr>

    {{view App.AnswerFormView}}
  </script>
{'fraction_non_alphanumeric': 0.19617547806524185, 'fraction_numerical': 0.006524184476940383, 'mean_word_length': 1.7027355623100304, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 133, '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': '163282', 'n_tokens_mistral': 1553, 'n_tokens_neox': 1485, 'n_words': 293}