-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added Custom forms bulk delete actions
- Loading branch information
1 parent
6652e67
commit 25dd271
Showing
9 changed files
with
163 additions
and
108 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
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
39 changes: 39 additions & 0 deletions
39
lib/Rozier/src/Resources/views/custom-forms/bulk_base.html.twig
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{% extends '@RoadizRozier/admin/base.html.twig' %} | ||
|
||
{% block title %}{{ block('bulk_title') }} | {{ parent() }}{% endblock %} | ||
{% block content_title %}{% block bulk_title %}{% endblock %}{% endblock %} | ||
|
||
{% block content_count_filters %} | ||
{% include '@RoadizRozier/widgets/countFiltersBar.html.twig' %} | ||
{% endblock %} | ||
|
||
{% block content_header_nav %} | ||
<a class="content-header-nav-back uk-navbar-content" | ||
href="{{ path('customFormsHomePage') }}" | ||
title="{% trans %}back_to.customForms{% endtrans %}" | ||
data-uk-tooltip="{animation:true}"><i class="uk-icon-rz-back-parent"></i></a> | ||
{% endblock %} | ||
|
||
{% block content_body %} | ||
<article class="content content-no-action-menu"> | ||
<div class="content-table-cont"> | ||
<table class="items content-table uk-table"> | ||
<thead> | ||
<tr> | ||
{% include '@RoadizRozier/custom-forms/customform_row_header.html.twig' with { no_sort: true } %} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for item in items %} | ||
<tr> | ||
{% include '@RoadizRozier/custom-forms/customform_row.html.twig' %} | ||
</tr> | ||
{% else %} | ||
<tr><td colspan="5">{% trans %}no_custom_forms{% endtrans %}</td></tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
{% block bulk_form %}{% endblock %} | ||
</article> | ||
{% endblock %} |
20 changes: 20 additions & 0 deletions
20
lib/Rozier/src/Resources/views/custom-forms/bulk_delete.html.twig
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% extends '@RoadizRozier/custom-forms/bulk_base.html.twig' %} | ||
{% block bulk_title %}{% trans %}custom_forms.bulk_delete.title{% endtrans %}{% endblock %} | ||
{% block bulk_form %} | ||
{% if form %} | ||
<article class="content content-delete content-no-action-menu"> | ||
{% form_theme form '@RoadizRozier/forms.html.twig' %} | ||
{{ form_start(form, { | ||
'attr': { | ||
'class': 'uk-form uk-form-stacked' | ||
} | ||
}) }}{{ form_widget(form) }} | ||
<fieldset data-uk-margin> | ||
<legend class="uk-alert uk-alert-danger"><i class="uk-icon uk-icon-warning"></i> {% trans %}are_you_sure.bulk_delete.custom_forms{% endtrans %}</legend> | ||
<a href="{{ path('customFormsHomePage') }}" class="uk-button"><i class="uk-icon-rz-back-parent"></i> {% trans %}cancel{% endtrans %}</a> | ||
<button class="uk-button uk-button-danger" type="submit"><i class="uk-icon-rz-trash-mini-o"></i> {% trans %}delete{% endtrans %}</button> | ||
</fieldset> | ||
{{ form_end(form) }} | ||
</article> | ||
{% endif %} | ||
{% endblock %} |
53 changes: 53 additions & 0 deletions
53
lib/Rozier/src/Resources/views/custom-forms/customform_row.html.twig
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<td class="name"> | ||
<a href="{{ path('customFormsEditPage', { id: item.getId }) }}"><span class="color" style="background-color:{{ item.getColor }};"></span>{{ item.displayName }}</a> | ||
</td> | ||
<td class="mobile-hidden">{{ item.createdAt|format_datetime('medium', 'short', locale=app.request.locale) }}</td> | ||
<td class="mobile-hidden">{{ item.closeDate|format_datetime('medium', 'short', locale=app.request.locale) }}</td> | ||
<td class="mobile-hidden"><div class="uk-badge uk-badge-table">{% transchoice item.getFields|length %}{0} no.customFormField|{1} 1.customFormField|]1,Inf] %count%.customFormFields{% endtranschoice %}</div></td> | ||
<td class="table-actions-row table-actions-row-6"> | ||
{% apply spaceless %} | ||
{% if hasBulkActions %} | ||
<div class="bulk-selection"> | ||
<input class="checkbox" type="checkbox" name="bulk-selection[]" value="{{ item.id }}" /> | ||
</div> | ||
{% endif %} | ||
<a class="uk-button uk-button-content uk-button-small" | ||
href="{{ path('customFormsEditPage', { id: item.getId }) }}" | ||
title="{% trans %}edit{% endtrans %}" | ||
data-uk-tooltip="{animation:true}"><i class="uk-icon-rz-pencil"></i></a> | ||
|
||
<a class="uk-button uk-button-content uk-button-small" | ||
href="{{ path('customFormFieldsListPage', { customFormId: item.getId }) }}" | ||
title="{% trans %}manage.customFormFields{% endtrans %}" | ||
data-uk-tooltip="{animation:true}"><i class="uk-icon-rz-custom-form-fields"></i></a> | ||
|
||
<a class="uk-button uk-button-content uk-button-small" | ||
href="{{ path('customFormAnswersHomePage', { customFormId: item.getId }) }}" | ||
title="{% trans %}customForm.answers{% endtrans %}" | ||
data-uk-tooltip="{animation:true}"><i class="uk-icon-rz-custom-form-answers"></i></a> | ||
|
||
<a class="uk-button uk-button-content uk-button-small" | ||
href="{{ path('customFormSendAction', { customFormId: item.getId }) }}" | ||
title="{% trans %}customForm.show{% endtrans %}" | ||
data-uk-tooltip="{animation:true}" target="_blank"><i class="uk-icon-rz-visibility"></i></a> | ||
|
||
<a class="uk-button uk-button-content uk-button-small rz-no-ajax-link" | ||
href="{{ path('customFormsDuplicatePage', { id: item.getId }) }}" | ||
title="{% trans %}customForm.duplicate{% endtrans %}" | ||
data-uk-tooltip="{animation:true}"><i class="uk-icon-rz-duplicate"></i></a> | ||
|
||
<a class="uk-button uk-button-content uk-button-small uk-button-success rz-no-ajax-link" | ||
href="{{ path('customFormsExportPage', { id: item.getId }) }}" | ||
title="{% trans %}export{% endtrans %}" | ||
data-uk-tooltip="{animation:true}"> | ||
<i class="uk-icon-rz-download"></i> | ||
</a> | ||
|
||
<a class="uk-button uk-button-content uk-button-small uk-button-danger uk-button-table-delete" | ||
href="{{ path('customFormsDeletePage', { id: item.getId }) }}" | ||
title="{% trans %}delete{% endtrans %}" | ||
data-uk-tooltip="{animation:true}"> | ||
<i class="uk-icon-rz-trash-o"></i> | ||
</a> | ||
{% endapply %} | ||
</td> |
30 changes: 30 additions & 0 deletions
30
lib/Rozier/src/Resources/views/custom-forms/customform_row_header.html.twig
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<th> | ||
{% trans %}customForm.displayName{% endtrans %} | ||
{% include '@RoadizRozier/includes/column_ordering.html.twig' with { | ||
'field': 'displayName', | ||
'filters': filters, | ||
} only %} | ||
</th> | ||
<th class="mobile-hidden"> | ||
{% trans %}createdAt{% endtrans %} | ||
{% include '@RoadizRozier/includes/column_ordering.html.twig' with { | ||
'field': 'createdAt', | ||
'filters': filters, | ||
} only %} | ||
</th> | ||
<th class="mobile-hidden"> | ||
{% trans %}customForm.closeDate{% endtrans %} | ||
{% include '@RoadizRozier/includes/column_ordering.html.twig' with { | ||
'field': 'closeDate', | ||
'filters': filters, | ||
} only %} | ||
</th> | ||
<th class="mobile-hidden"></th> | ||
<th class="table-actions-row table-actions-row-6"> | ||
{% if hasBulkActions %} | ||
<div class="bulk-selection"> | ||
<input class="checkbox" type="checkbox" name="bulk-selection-all" /> | ||
</div> | ||
{% endif %} | ||
{% trans %}actions{% endtrans %} | ||
</th> |
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