{{$actions := load_actions "show"}}
{{if $actions}}
  <div class="qor-page__header">
    {{$actions}}
  </div>
{{end}}

<div class="qor-page__body qor-page__show" data-toggle="qor.inlineEdit"
      data-button-save="{{t "qor_admin.showpage.inlineedit.button.save" "save"}}"
      data-button-cancel="{{t "qor_admin.showpage.inlineedit.button.cancel_edit" "cancel edit"}}">
  {{render "shared/flashes"}}
  {{render "shared/errors"}}

  <div class="qor-form-container">
    {{if has_update_permission .Resource}}
      <a href="{{join_url (url_for .Result .Resource) "edit"}}" class="mdl-button mdl-button--fab mdl-button--primary mdl-js-button mdl-js-ripple-effect qor-button--edit" data-url="{{join_url (url_for .Result .Resource) "edit"}}">
        <i class="material-icons">edit</i>
      </a>
    {{end}}

    <form class="qor-form" action="{{url_for .Result .Resource}}" method="POST" enctype="multipart/form-data">
      <input name="_method" value="PUT" type="hidden">

      {{render_form .Result show_sections}}

      {{if has_update_permission .Resource}}
        <div class="qor-form__actions qor-field__edit">
          <button class="mdl-button mdl-button--colored mdl-button--raised mdl-js-button mdl-js-ripple-effect qor-button--save" type="submit">{{t "qor_admin.form.save_changes" "Save Changes"}}</button>
          <a class="mdl-button mdl-button--primary mdl-js-button mdl-js-ripple-effect qor-button--cancel" href="javascript:history.back();">{{t "qor_admin.form.cancel_edit" "Cancel Edit"}}</a>
        </div>
      {{end}}
    </form>
  </div>
</div>
