Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
280 additions
and
63 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
<form method="post" action="{{ path('<?= $route_name ?>_delete', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');"> | ||
<form method="post" action="{{ path('<?= $route_name ?>_delete', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');" id="deleteForm"> | ||
<input type="hidden" name="_method" value="DELETE"> | ||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>) }}"> | ||
<button class="btn">Delete</button> | ||
</form> | ||
</form> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{{ form_start(form) }} | ||
{{ form_widget(form) }} | ||
{{ form_widget(form, { 'attr': {'class': 'form-horizontal'} }) }} | ||
<button class="btn">{{ button_label|default('Save') }}</button> | ||
{{ form_end(form) }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,52 @@ | ||
<?= $helper->getHeadPrintCode('Edit '.$entity_class_name) ?> | ||
{% extends '@MaterialDashboard/base.html.twig' %} | ||
|
||
{% block body %} | ||
<h1>Edit <?= $entity_class_name ?></h1> | ||
|
||
{{ include('<?= $route_name ?>/_form.html.twig', {'button_label': 'Update'}) }} | ||
|
||
<a href="{{ path('<?= $route_name ?>_index') }}">back to list</a> | ||
{% block title %}Edit <?= $entity_class_name ?>{% endblock %} | ||
|
||
{% block body %} | ||
<div class="content"> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-lg-12 col-md-12"> | ||
<div class="card "> | ||
<div class="card-header card-header-tabs card-header-primary"> | ||
<div class="nav-tabs-navigation"> | ||
<div class="nav-tabs-wrapper"> | ||
<span class="nav-tabs-title">Edit <?= $entity_class_name ?>:</span> | ||
<ul class="nav nav-tabs" data-tabs="tabs"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{{ path('<?= $route_name ?>_index') }}"> | ||
<i class="material-icons">reply</i> Back to list | ||
<div class="ripple-container"></div> | ||
<div class="ripple-container"></div> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#" id="deleteTrigger"> | ||
<i class="material-icons">delete_sweep</i> Delete | ||
<div class="ripple-container"></div> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="card-body "> | ||
{{ include('<?= $route_name ?>/_form.html.twig', {'button_label': 'Update'}) }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{ include('<?= $route_name ?>/_delete_form.html.twig') }} | ||
{% endblock %} | ||
{% block javascripts %} | ||
{{ parent() }} | ||
<script> | ||
$(document).ready(function() { | ||
$("#deleteTrigger").on('click', function() { | ||
$("#deleteForm").submit(); | ||
}); | ||
}); | ||
</script> | ||
{% endblock %} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,47 @@ | ||
<?= $helper->getHeadPrintCode($entity_class_name.' index'); ?> | ||
{% extends "@MaterialDashboard/base.html.twig" %} | ||
|
||
{% block body %} | ||
<h1><?= $entity_class_name ?> index</h1> | ||
{% block meta_title %}<?= $entity_class_name ?> index{% endblock %} | ||
|
||
<table class="table"> | ||
<thead> | ||
<tr> | ||
{% block body %} | ||
<div class="content"> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-lg-12 col-md-12"> | ||
<div class="card"> | ||
<div class="card-header card-header-warning"> | ||
<h4 class="card-title"><?= $entity_class_name ?> index <a href="{{ path('<?= $route_name ?>_new') }}" class="btn btn-primary pull-right">Create new</a></h4> | ||
</div> | ||
<div class="card-body table-responsive"> | ||
<table class="table table-hover"> | ||
<thead class="text-warning"> | ||
<tr> | ||
<?php foreach ($entity_fields as $field): ?> | ||
<th><?= ucfirst($field['fieldName']) ?></th> | ||
<th><?= ucfirst($field['fieldName']) ?></th> | ||
<?php endforeach; ?> | ||
<th>actions</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for <?= $entity_twig_var_singular ?> in <?= $entity_twig_var_plural ?> %} | ||
<tr> | ||
<th>Actions</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for <?= $entity_twig_var_singular ?> in <?= $entity_twig_var_plural ?> %} | ||
<tr> | ||
<?php foreach ($entity_fields as $field): ?> | ||
<td>{{ <?= $helper->getEntityFieldPrintCode($entity_twig_var_singular, $field) ?> }}</td> | ||
<td>{{ <?= $helper->getEntityFieldPrintCode($entity_twig_var_singular, $field) ?> }}</td> | ||
<?php endforeach; ?> | ||
<td> | ||
<a href="{{ path('<?= $route_name ?>_show', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}">show</a> | ||
<a href="{{ path('<?= $route_name ?>_edit', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}">edit</a> | ||
</td> | ||
</tr> | ||
{% else %} | ||
<tr> | ||
<td colspan="<?= (count($entity_fields) + 1) ?>">no records found</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
|
||
<a href="{{ path('<?= $route_name ?>_new') }}">Create new</a> | ||
<td> | ||
<a href="{{ path('<?= $route_name ?>_show', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}" class="btn btn-success">Show</a> | ||
<a href="{{ path('<?= $route_name ?>_edit', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}" class="btn btn-info">Edit</a> | ||
</td> | ||
</tr> | ||
{% else %} | ||
<tr> | ||
<td colspan="<?= (count($entity_fields) + 1) ?>">no records found</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,35 @@ | ||
<?= $helper->getHeadPrintCode('New '.$entity_class_name) ?> | ||
{% extends '@MaterialDashboard/base.html.twig' %} | ||
|
||
{% block body %} | ||
<h1>Create new <?= $entity_class_name ?></h1> | ||
|
||
{{ include('<?= $route_name ?>/_form.html.twig') }} | ||
{% block title %}New <?= $entity_class_name ?>{% endblock %} | ||
|
||
<a href="{{ path('<?= $route_name ?>_index') }}">back to list</a> | ||
{% endblock %} | ||
{% block body %} | ||
<div class="content"> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-lg-12 col-md-12"> | ||
<div class="card "> | ||
<div class="card-header card-header-tabs card-header-primary"> | ||
<div class="nav-tabs-navigation"> | ||
<div class="nav-tabs-wrapper"> | ||
<span class="nav-tabs-title">Create new <?= $entity_class_name ?>:</span> | ||
<ul class="nav nav-tabs" data-tabs="tabs"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{{ path('<?= $route_name ?>_index') }}"> | ||
<i class="material-icons">reply</i> Back to list | ||
<div class="ripple-container"></div> | ||
<div class="ripple-container"></div> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="card-body "> | ||
{{ include('<?= $route_name ?>/_form.html.twig') }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,66 @@ | ||
<?= $helper->getHeadPrintCode($entity_class_name) ?> | ||
{% extends "@MaterialDashboard/base.html.twig" %} | ||
|
||
{% block body %} | ||
<h1><?= $entity_class_name ?></h1> | ||
{% block meta_title %}Notification{% endblock %} | ||
|
||
<table class="table"> | ||
<tbody> | ||
{% block body %} | ||
<div class="content"> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-lg-12 col-md-12"> | ||
<div class="card"> | ||
<div class="card-header card-header-tabs card-header-primary"> | ||
<div class="nav-tabs-navigation"> | ||
<div class="nav-tabs-wrapper"> | ||
<span class="nav-tabs-title"><?= $entity_class_name ?>:</span> | ||
<ul class="nav nav-tabs" data-tabs="tabs"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{{ path('<?= $route_name ?>_index') }}"> | ||
<i class="material-icons">reply</i> Back to list | ||
<div class="ripple-container"></div> | ||
<div class="ripple-container"></div> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{{ path('<?= $route_name ?>_edit', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}"> | ||
<i class="material-icons">create</i> Edit | ||
<div class="ripple-container"></div> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#" id="deleteTrigger"> | ||
<i class="material-icons">delete_sweep</i> Delete | ||
<div class="ripple-container"></div> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="card-body table-responsive"> | ||
<table class="table"> | ||
<tbody> | ||
<?php foreach ($entity_fields as $field): ?> | ||
<tr> | ||
<th><?= ucfirst($field['fieldName']) ?></th> | ||
<td>{{ <?= $helper->getEntityFieldPrintCode($entity_twig_var_singular, $field) ?> }}</td> | ||
</tr> | ||
<tr> | ||
<th><?= ucfirst($field['fieldName']) ?></th> | ||
<td>{{ <?= $helper->getEntityFieldPrintCode($entity_twig_var_singular, $field) ?> }}</td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</tbody> | ||
</table> | ||
|
||
<a href="{{ path('<?= $route_name ?>_index') }}">back to list</a> | ||
|
||
<a href="{{ path('<?= $route_name ?>_edit', {'<?= $entity_identifier ?>': <?= $entity_twig_var_singular ?>.<?= $entity_identifier ?>}) }}">edit</a> | ||
|
||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{ include('<?= $route_name ?>/_delete_form.html.twig') }} | ||
{% endblock %} | ||
{% block javascripts %} | ||
{{ parent() }} | ||
<script> | ||
$(document).ready(function() { | ||
$("#deleteTrigger").on('click', function() { | ||
$("#deleteForm").submit(); | ||
}); | ||
}); | ||
</script> | ||
{% endblock %} |