@Master['admin/admin-layout']

@Section['Content']
  <form action="/page/@Model.Page.Id/edit" method="post">
    @AntiForgeryToken
    <div class="row">
      <div class="col-sm-9">
        <a href="/pages" class="btn btn-default">
          <i class="fa fa-list-ul"></i> @Translate.BackToPageList
        </a>
        <div class="form-group">
          <label class="control-label" for="Title">@Translate.Title</label>
          <input type="text" name="Title" id="Title" class="form-control" value="@Model.Form.Title" />
        </div>
        <div class="form-group">
          <label class="control-label" for="Permalink">@Translate.Permalink</label>
          <input type="text" name="Permalink" id="Permalink" class="form-control" value="@Model.Form.Permalink" />
          <p class="form-hint"><em>@Translate.startingWith</em> //@Model.WebLog.UrlBase/</p>
        </div>
        <!-- // TODO: Markdown / HTML choice -->
        <input type="hidden" name="Source" value="html" />
        <div class="form-group">
          <textarea name="Text" id="Text" rows="15" class="form-control">@Model.Form.Text</textarea>
        </div>
      </div>
      <div class="col-sm-3">
        <div class="panel panel-default">
          <div class="panel-heading">@Translate.PageDetails</div>
          <div class="panel-body">
            @IfNot.isNew
              <div class="form-group">
                <label class="control-label">@Translate.PublishedDate</label>
                <p class="static-control">@Model.PublishedDate<br />@Model.PublishedTime</p>
              </div>
              <div class="form-group">
                <label class="control-label">@Translate.LastUpdatedDate</label>
                <p class="static-control">@Model.LastUpdatedDate<br />@Model.LastUpdatedTime</p>
              </div>
            @EndIf
            <div class="form-group">
              <input type="checkbox" name="ShowInPageList" id="ShowInPageList" value="true" @Model.PageListChecked />
              &nbsp; <label for="ShowInPageList">@Translate.ShowInPageList</label>
            </div>
          </div>
        </div>
        <div class="text-center">
          <p><button class="btn btn-primary" type="submit"><i class="fa fa-floppy-o"></i> @Translate.Save</button></p>
        </div>
      </div>
    </div>
  </form>
@EndSection

@Section['Scripts']
  <script type="text/javascript" src="/admin/content/tinymce-init.js"></script>
  <script type="text/javascript">
    /* <![CDATA[ */
    $(document).ready(function () { $("#Title").focus() })
    /* ]]> */
  </script>
@EndSection
