<% if submission.user.completed?(submission.exercise) %>

  <form accept-charset="UTF-8" action="/submissions/<%= submission.key %>/respond" method="POST">
    <%= erb :"submissions/small_comment" %>
    <button type="submit" name="nitpick" class="btn btn-primary">Comment</button>
  </form>

<% else %>

  <form accept-charset="UTF-8" action="/submissions/<%= submission.key %>/nitpick" method="POST">

  <% if current_user.owns?(submission) %>
    <%= erb :"submissions/encourage_submitter", locals: {version: submission.version, nit_count: submission.nit_count} %>
  <% else %>
    <%= erb :"submissions/encourage_nitpicker", locals: {language: submission.language} %>
  <% end %>

    <%= erb :"submissions/comment" %>
     <span>parsed with <a href="https://help.github.com/articles/github-flavored-markdown" target="_blank">GitHub Flavoured Markdown</a></span>
    <% if current_user.owns?(submission) %>
      <button type="submit" name="nitpick" class="pull-right btn btn-primary">Submit Comment</button>
    <% else %>
      <button type="submit" name="nitpick" class="pull-right btn btn-primary">Nitpick</button>
    <% end %>
  </form>

<% end %>


<% if submission.user.completed?(submission.exercise) %>

  <form accept-charset="UTF-8" action="/submissions/<%= submission.key %>/respond" method="POST">
    <%= erb :"submissions/small_comment" %>
    <button type="submit" name="nitpick" class="btn btn-primary">Comment</button>
  </form>

<% else %>

  <form accept-charset="UTF-8" action="/submissions/<%= submission.key %>/nitpick" method="POST">

    <% if current_user.owns?(submission) %>
      <%= erb :"submissions/encourage_submitter", locals: {version: submission.version, nit_count: submission.nit_count} %>
    <% else %>
      <%= erb :"submissions/encourage_nitpicker", locals: {language: submission.language} %>
    <% end %>

    <%= erb :"submissions/comment" %>
    <% if current_user.owns?(submission) %>
      <button type="submit" name="nitpick" class="pull-right btn btn-primary">Submit Comment</button>
    <% else %>
      <button type="submit" name="nitpick" class="pull-right btn btn-primary">Nitpick</button>
    <% end %>
    <span>Parsed with <a href="https://help.github.com/articles/github-flavored-markdown" target="_blank">GitHub Flavoured Markdown</a></span>
  </form>

<% end %>


Change source order so you can tab + enter to submit comment
Change source order so you can tab + enter to submit comment
