{{"{{ define \"content\" }}"}}

<div class="container">

  <nav aria-label="breadcrumb">
  {{"{{if .Options.Get \"update\"}}"}}
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="/{{.Models}}?{{"{{query \"tpl_layout\" \"base\" \"tpl_content\" "}}"{{.Models}}"}}">{{.Model}}</a></li>
    <li class="breadcrumb-item active"><a href="#">Aggiorna {{.Model}}</a></li>
  </ol>
  </nav>
  
  {{"{{else}}"}}
  <ol class="breadcrumb">
    <li><a href="/{{.Models}}?{{"{{query \"tpl_layout\" \"base\" \"tpl_content\" "}}"{{.Models}}"}}">{{.Model}}</a></li>
    <li class="active"><a href="#">Aggiungi</a></li>
  </ol>
  {{"{{end}}"}}

 {{"{{if .Options.Get \"update\"}}"}}
  <div class="karmen-info-header">
    <div class="row">
      <div class="col-md-8">
	<h1>Aggiorna {{.Model}}</h1>
      </div>
    </div>
  </div>
  
  {{"{{else}}"}}
  <h1 class="karmen-info-header">Crea nuovo {{.Model}}</h1>
  {{"{{end}}"}}

  {{"{{if .Options.Get \"update\"}}"}}
  <form id="form_{{.Models}}_add_update" action="/{{.Models}}/{{"{{.Data.ID}}"}}/update" method="POST" role="form" data-toggle="validator">
  {{"{{else}}"}}
  <form id="form_{{.Models}}_add_update" action="/{{.Models}}/add/" method="POST" role="form" data-toggle="validator">
  {{"{{end}}"}}

    <div class="form-group has-feedback">
      <label class="control-label" for="{{.Model}}_name">Nome</label>
      <input type="text" name="Name" class="form-control" id="{{.Model}}_name" placeholder="Nome" {{"{{if .Options.Get \"update\"}}"}} value="{{"{{.Data.Name}}"}}" {{"{{end}}"}} required>
    </div>
        
    <div class="form-group">
      <button type="submit" class="btn btn-primary">Salva</button>
      {{"{{if .Options.Get \"update\"}}"}}
      <a href="/{{.Models}}/{{"{{.Data.ID}}"}}?{{"{{query \"tpl_layout\" \"base\" \"tpl_content\" "}}"{{.Models}}{{"_show\"}}"}}" class="btn btn-default">Annulla</a>
      {{"{{else}}"}}
      <a href="/{{.Models}}?{{"{{query \"tpl_layout\" \"base\" \"tpl_content\" "}}"{{.Models}}"{{"}}"}}" class="btn btn-default">Annulla</a>
      {{"{{end}}"}}
    </div>
    
  </form>

</div>

{{"{{ end }}"}}
