vextoly/gitman

Fork of patx/gitman.

% rebase("base.tpl", title="Edit " + file_path, user=user, error=error, notice=notice)

<section class="repo-header slim">
  <div>
    % include("repo_fork_eyebrow.tpl")
    % include("repo_title.tpl", repo=repo)

    % include("repo_nav.tpl", repo=repo, commit_count=commit_count, issue_counts=issue_counts, pr_counts=pr_counts, star_count=star_count, is_starred=is_starred, is_owner=is_owner, can_maintain=can_maintain)

    <p class="muted">Editing <code>{{file_path}}</code> on branch <code>{{branch}}</code></p>
  </div>
</section>

<section class="panel">
  <h2>Edit file</h2>
  % if error:
    <p class="alert">{{error}}</p>
  % end
  <form method="post">
    {{!csrf_field()}}
    <label>
      Commit message
      <input name="message" value="{{message_value}}" maxlength="200">
    </label>
    <label>
      File content
      <textarea class="edit-textarea" name="content" rows="22" spellcheck="false">{{content_value}}</textarea>
    </label>
    <div class="hero-actions">
      <button class="button" type="submit">Save changes</button>
      <a class="button-link" href="{{url_with_ref('/' + repo['owner_username'] + '/' + repo['name'] + '/src/' + quote_path(file_path), selected_ref)}}">Cancel</a>
    </div>
  </form>
</section>