Created
September 29, 2019 16:05
-
-
Save elyosemite/2c265ad52f8078620f5885b62e3d43da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <p><%= showMessageAdmin %></p> | |
| <div class="row"> | |
| <div class="col s5"> | |
| <a class="waves-effect waves-light btn" href="/admin"><i class="material-icons left">cloud</i>Sair</a> | |
| </div> | |
| </div> | |
| <hr> | |
| <table class="highlight responsive-table"> | |
| <thead> | |
| <tr> | |
| <th>ID</th> | |
| <th>Name</th> | |
| <th>Saldo</th> | |
| <th>CPF</th> | |
| <th>Senha</th> | |
| <th>Editar</th> | |
| <th>Excluir</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <% debugger %> | |
| <% @clients.each do |clt| %> | |
| <% if @clts.present? and @clts.id == clt.id %> | |
| <form action="/admin/<%= clt.id %>" method="post"> | |
| <div class="row"> | |
| <tr> | |
| <td><%= clt.id %></td> | |
| <td> | |
| <div class="input-field col s12"> | |
| <input placeholder="Your Name" value="<%= clt.name %>" type="text" name="name" class="validate" autofocus> | |
| </div> | |
| </td> | |
| <td><%= clt.saldo %></td> | |
| <td> | |
| <div class="input-field col s12"> | |
| <input placeholder="Your CPF" value="<%= clt.cpf %>" type="text" name="cpf" class="validate"> | |
| </div> | |
| </td> | |
| <td> | |
| <div class="input-field col s12"> | |
| <input placeholder="Your Password" value="<%= clt.password %>" id="login_id" type="text" name="password" class="validate"> | |
| </div> | |
| </td> | |
| <td> | |
| <div class="col s8"> | |
| <button class="waves-effect waves-light btn-small blue darken-4 validate" type="submit">Salvar | |
| <i class="material-icons right">save</i> | |
| </button> | |
| </div> | |
| </td> | |
| <td> | |
| <div class="col s8"> | |
| <a class="waves-effect waves-light btn-small red validate" href="/admin/show"><i class="material-icons right">cancel</i>Cancelar</a> | |
| </div> | |
| </td> | |
| </tr> | |
| </div> | |
| </form> | |
| <% else %> | |
| <tr> | |
| <td><%= clt.id %></td> | |
| <td><%= clt.name %></td> | |
| <td><%= clt.saldo %></td> | |
| <td><%= clt.cpf %></td> | |
| <td><%= clt.password %></td> | |
| <td> | |
| <div class="col s8"> | |
| <a class="waves-effect waves-light btn-small disabled"><i class="material-icons right">edit</i>Editar</a> | |
| </div> | |
| </td> | |
| <td> | |
| <div class="col s8"> | |
| <a class="waves-effect waves-light btn-small disabled"><i class="material-icons right">clear</i>Excluir</a> | |
| </div> | |
| </td> | |
| </tr> | |
| <% end %> | |
| <% end %> | |
| </tbody> | |
| </table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment