/
home
/
obinna
/
html
/
restaurants
/
templates
/
Stock
/
Upload File
HOME
{% extends 'base1.html.twig' %} {% block content %} <div class="content"> <div class="row"> <div class="col-sm-6"> <div class="card"> <div class="card-body"> <table class="table table-default"> <thead> <tr> <th>Name</th> <th>Action</th> </tr> </thead> <tbody> {% for item in groups %} <tr> <td>{{ item.name }}</td> <td><a class="btn btn-primary" href="{{ path('group', {'id': item.id }) }}">Edit</a></td> </tr> {% endfor %} </tbody> </table> </div> </div> </div> <div class="col-sm-6"> <div class="card"> <div class="card-header"> <h3>{% if group %}Edit{% else %}Add{% endif %} Category</h3> </div> <div class="card-body"> <form action="{{ path('group') }}" method="POST" name="edit"> {% if group %}<input type="hidden" name="edit" value="{{ group.id }}">{% endif %} <div class="form-group"> <input type="text" name="name" class="form-control" placeholder="Group Name" value="{{ group.name|default('') }}"> </div> <input type="submit" name="submit" value="Save" class="btn-primary"> </form> </div> </div> </div> </div> </div> {% endblock %}