Nuestro burocrata preferido: Sam Lowry https://lowry.sindominio.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
lowry/tmpl/collective.html

76 lines
2.4 KiB

{{template "header.html"}}
{{template "header_close.html"}}
{{template "navbar.html" .}}
{{$isAdmin := .IsAdmin }}
{{with .Data}}
<br />
<div class="row justify-content-center">
<dl>
<dt>Nombre del colectivo</dt><dd>{{.Name}}</dd>
<dt>Descripcion</dt><dd>{{.Description}}</dd>
<dt>Cuentas</dt><dd>
<ul>
{{$name := .Name}}
{{range .Members}}
<li>
<form class="inline-form" action="/collective/{{$name}}/del/" method="post" onsubmit="return confirm('¿segura que quieres quitar a {{.}} del colectivo {{$name}}?');">
{{if $isAdmin}}
<a href="/users/{{.}}">{{.}}</a>
{{else}}
{{.}}
{{end}}
<input type="hidden" class="form-control" id="user" name="user" value="{{.}}">
<button type="submit" class="btn btn-danger btn-sm">X</button>
</form>
</li>
{{end}}
</ul>
</dd>
</dl>
</div>
<br />
<div class="row justify-content-center">
<form action="/collective/{{.Name}}/add/" method="post">
<div class="row">
<div class="col">
<label for="user">Añade usuaria:</label>
</div>
<div class="col">
<input type="text" class="form-control" id="user" name="user" placeholder="Cuenta">
</div>
<div class="col">
<button type="submit" class="btn btn-primary">Añadir</button>
</div>
</div>
</form>
</div>
<br />
<div class="row justify-content-center">
<form action="/collective/{{.Name}}/description/" method="post">
<div class="row">
<div class="col">
<label for="user">Cambia la descripción:</label>
</div>
<div class="col">
<textarea class="form-control" id="description" name="description">{{.Description}}</textarea>
</div>
<div class="col">
<button type="submit" class="btn btn-primary">Actualizar</button>
</div>
</div>
</form>
</div>
<br />
<div class="row justify-content-center">
<form action="/collectives/del/" method="post" onsubmit="return confirm('¿de verdad quieres borrar la colectivo {{.Name}}?');">
<input type="hidden" class="form-control" id="collective" name="collective" value="{{.Name}}">
<div class="row">
<button type="submit" class="btn btn-block btn-danger">Elimina el colectivo {{.Name}}</button>
</div>
</form>
</div>
{{end}}
{{template "footer.html"}}