-
-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrated admin export page to controller (#3257)
- Loading branch information
Showing
15 changed files
with
167 additions
and
160 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 was deleted.
Oops, something went wrong.
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
152 changes: 78 additions & 74 deletions
152
phpmyfaq/assets/templates/admin/import-export/export.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 |
---|---|---|
@@ -1,93 +1,97 @@ | ||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> | ||
<h1 class="h2"> | ||
<i aria-hidden="true" class="bi bi-book bi-fw"></i> | ||
{{ adminHeaderExport }} | ||
</h1> | ||
</div> | ||
{% extends '@admin/index.twig' %} | ||
|
||
<div class="row"> | ||
<div class="col-12"> | ||
<div class="card shadow"> | ||
<div class="card-body"> | ||
{% block content %} | ||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom"> | ||
<h1 class="h2"> | ||
<i aria-hidden="true" class="bi bi-book bi-fw"></i> | ||
{{ adminHeaderExport }} | ||
</h1> | ||
</div> | ||
|
||
{% if hasNoFaqs %} | ||
<div class="alert alert-warning" role="alert"> | ||
{{ errorMessageNoFaqs }} | ||
</div> | ||
{% endif %} | ||
<div class="row"> | ||
<div class="col-12"> | ||
<div class="card shadow"> | ||
<div class="card-body"> | ||
|
||
{% if hasCategories %} | ||
<form action="./api/export/file" method="post" accept-charset="utf-8"> | ||
<h5>{{ headerCategories }}</h5> | ||
<div class="row mb-2"> | ||
<label class="col-lg-2 col-form-label" for="categoryId"> | ||
{{ msgCategory }} | ||
</label> | ||
<div class="col-lg-4"> | ||
<select name="categoryId" id="categoryId" class="form-select"> | ||
<option value="0">{{ msgAllCategories }}</option> | ||
{{ categoryOptions | raw }} | ||
</select> | ||
</div> | ||
</div> | ||
<div class="row mb-2"> | ||
<div class="offset-lg-2 col-lg-4"> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="checkbox" value="1" id="downwards" name="downwards" checked> | ||
<label class="form-check-label" for="downwards">{{ msgWithSubCategories }}</label> | ||
</div> | ||
</div> | ||
{% if hasNoFaqs %} | ||
<div class="alert alert-warning" role="alert"> | ||
{{ errorMessageNoFaqs }} | ||
</div> | ||
{% endif %} | ||
|
||
<h5>{{ headerExportType }}</h5> | ||
<div class="row mb-2"> | ||
<div class="offset-lg-2 col-lg-8"> | ||
<p>{{ msgChooseExportType }}</p> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="radio" name="export-type" id="json" value="json" checked> | ||
<label class="form-check-label" for="json">JSON</label> | ||
{% if hasCategories %} | ||
<form action="./api/export/file" method="post" accept-charset="utf-8"> | ||
<h5>{{ headerCategories }}</h5> | ||
<div class="row mb-2"> | ||
<label class="col-lg-2 col-form-label" for="categoryId"> | ||
{{ msgCategory }} | ||
</label> | ||
<div class="col-lg-4"> | ||
<select name="categoryId" id="categoryId" class="form-select"> | ||
<option value="0">{{ msgAllCategories }}</option> | ||
{{ categoryOptions | raw }} | ||
</select> | ||
</div> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="radio" name="export-type" id="pdf" value="pdf"> | ||
<label class="form-check-label" for="pdf">PDF</label> | ||
</div> | ||
<div class="row mb-2"> | ||
<div class="offset-lg-2 col-lg-4"> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="checkbox" value="1" id="downwards" name="downwards" checked> | ||
<label class="form-check-label" for="downwards">{{ msgWithSubCategories }}</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row mb-2"> | ||
<div class="offset-lg-2 col-lg-4"> | ||
<p>{{ msgViewType }}</p> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="radio" name="disposition" id="{{ msgDownloadType }}" | ||
value="{{ msgDownloadType }}" checked> | ||
<label class="form-check-label" for="{{ msgDownloadType }}">{{ msgDownload }}</label> | ||
<h5>{{ headerExportType }}</h5> | ||
<div class="row mb-2"> | ||
<div class="offset-lg-2 col-lg-8"> | ||
<p>{{ msgChooseExportType }}</p> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="radio" name="export-type" id="json" value="json" checked> | ||
<label class="form-check-label" for="json">JSON</label> | ||
</div> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="radio" name="export-type" id="pdf" value="pdf"> | ||
<label class="form-check-label" for="pdf">PDF</label> | ||
</div> | ||
</div> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="radio" name="disposition" | ||
id="{{ msgInlineType }}" value="{{ msgInlineType }}"> | ||
<label class="form-check-label" for="{{ msgInlineType }}"> | ||
{{ msgInline }} | ||
</label> | ||
</div> | ||
|
||
<div class="row mb-2"> | ||
<div class="offset-lg-2 col-lg-4"> | ||
<p>{{ msgViewType }}</p> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="radio" name="disposition" id="{{ msgDownloadType }}" | ||
value="{{ msgDownloadType }}" checked> | ||
<label class="form-check-label" for="{{ msgDownloadType }}">{{ msgDownload }}</label> | ||
</div> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="radio" name="disposition" | ||
id="{{ msgInlineType }}" value="{{ msgInlineType }}"> | ||
<label class="form-check-label" for="{{ msgInlineType }}"> | ||
{{ msgInline }} | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row mb-2"> | ||
<div class="offset-lg-2 col-lg-4"> | ||
<button class="btn btn-secondary" type="reset" name="resetExport"> | ||
{{ buttonReset }} | ||
</button> | ||
<button class="btn btn-primary" type="submit" name="submitExport" formtarget="_blank"> | ||
{{ buttonExport }} | ||
</button> | ||
<div class="row mb-2"> | ||
<div class="offset-lg-2 col-lg-4"> | ||
<button class="btn btn-secondary" type="reset" name="resetExport"> | ||
{{ buttonReset }} | ||
</button> | ||
<button class="btn btn-primary" type="submit" name="submitExport" formtarget="_blank"> | ||
{{ buttonExport }} | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</form> | ||
{% endif %} | ||
</form> | ||
{% endif %} | ||
|
||
</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
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
Oops, something went wrong.