mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-06-25 16:04:37 -05:00
Location Editing Part 2
Bulk uploading has been added and some inconsistencies in the templates have been addressed. Still needs work but it's starting to feel like a cohesive experience. With the base data entry funcationality in place, now really polishing can begin as well as establishing what roles can do what. Smoothing out entry editing will be addressed as well.
This commit is contained in:
@ -17,18 +17,27 @@
|
||||
{% if mode == "add" %}
|
||||
<h2>Add New Location</h2>
|
||||
{{ include("forms/add-location.twig") }}
|
||||
{% elseif mode =='bulk-add' %}
|
||||
<h2>Add Multiple Locations</h2>
|
||||
{{ include("forms/bulk-add-location.twig") }}
|
||||
{% elseif mode == "edit" %}
|
||||
<h2>Editing
|
||||
{{ location.name }}</h2>
|
||||
{{ include("forms/edit-location.twig") }}
|
||||
{% else %}
|
||||
<h2>Take care. These are bad places.</h2>
|
||||
{% for location in list.locations %}
|
||||
<a href="/den/locations/edit/{{ location.uuid }}">
|
||||
<a href="/den/locations/add">Add Location</a>
|
||||
|
|
||||
<a href="/den/locations/bulk-add">Add Multiple Locations</a>
|
||||
<br>
|
||||
<h3>Bad Spaces</h3>
|
||||
{% for location in list.locations %}
|
||||
<sup>ID:{{ location.id }}</sup>
|
||||
{{ location.name }}</a><br/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<a href="/den/locations/edit/{{ location.uuid }}">
|
||||
|
||||
</section>
|
||||
{% endblock %}
|
||||
{{ location.name }}</a><br/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
8
templates/forms/bulk-add-location.twig
Normal file
8
templates/forms/bulk-add-location.twig
Normal file
@ -0,0 +1,8 @@
|
||||
<form action="{{ path('location-bulk-add') }}" method="post" enctype="multipart/form-data">
|
||||
<label for="myfile">Upload CSV</label>
|
||||
<br>
|
||||
<input type="file" name="myfile" id="myfile"></div>
|
||||
<br/>
|
||||
<input type="hidden" name="token" value="{{ csrf_token('upload') }}"/>
|
||||
<button type="submit">Upload Locations</button>
|
||||
</form>
|
@ -21,7 +21,16 @@
|
||||
<option value="silence">Silence</option>
|
||||
<option value="defederate" selected>Defederate</option>
|
||||
{% endif %}
|
||||
|
||||
</select><br/>
|
||||
<label>Include in search results</label><br/>
|
||||
<select name="active">
|
||||
{% if location.active %}
|
||||
<option value="false">No</option>
|
||||
<option value="true" selected>Yes</option>
|
||||
{% else %}
|
||||
<option value="false" selected>No</option>
|
||||
<option value="true">Yes</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
<br/>
|
||||
<label>Images</label><br/>
|
||||
|
Reference in New Issue
Block a user