mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-06-25 16:04:37 -05:00
Added support of fedifence CSV and pagination
Populated the DB with entries from a fedifence export provided by @Oliphant (https://codeberg.org/oliphant/blocklists). As such also updated the appropriate templates with pagination to be able to peruse through the location directory. Also added an edit link on the location template front end to make finding and updating instance info easy.
This commit is contained in:
@ -30,13 +30,20 @@
|
||||
<a href="/den/locations/bulk-add">Add Multiple Locations</a>
|
||||
<br>
|
||||
<h3>Bad Spaces</h3>
|
||||
{% for location in options.list.locations %}
|
||||
<sup>ID:{{ location.id }}</sup>
|
||||
<a href="/den/locations/modify/edit/{{ location.uuid }}">
|
||||
Page
|
||||
{{ options.curentPage }}
|
||||
of
|
||||
{{ options.list.total }}<br>
|
||||
{% for location in options.list.locations %}
|
||||
<sup>ID:{{ location.id }}</sup>
|
||||
<a href="/den/locations/modify/edit/{{ location.uuid }}">
|
||||
{{ location.name }}</a><br/>
|
||||
{% endfor %}
|
||||
<a href="/den/locations/page/{{ options.prevPage }}">Previous</a>
|
||||
<a href="/den/locations/page/{{ options.nextPage }}">Next</a>
|
||||
{% endif %}
|
||||
|
||||
{{ location.name }}</a><br/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
@ -3,6 +3,14 @@
|
||||
<br>
|
||||
<input type="file" name="myfile" id="myfile"></div>
|
||||
<br/>
|
||||
<label>Input Type</label><br/>
|
||||
<select name="input_type">
|
||||
<option value="" disabled selected>Choose Upload Type
|
||||
</option>
|
||||
<option value="tbs">The Bad Space Custom</option>
|
||||
<option value="fedifence">Fedifence</option>
|
||||
</select>
|
||||
<br/>
|
||||
<input type="hidden" name="token" value="{{ csrf_token('upload') }}"/>
|
||||
<button type="submit">Upload Locations</button>
|
||||
</form>
|
||||
|
@ -7,12 +7,17 @@
|
||||
<section role="listings">
|
||||
<h1>The Bad Space Listings</h1>
|
||||
<h2>Page
|
||||
{{ options.page }}</h2>
|
||||
{{ options.currentPage }}
|
||||
of
|
||||
{{ options.list.total }}</h2>
|
||||
{% for location in options.list.locations %}
|
||||
<sup>ID:{{ location.id }}</sup>
|
||||
<a href="/location/{{ location.uuid }}">
|
||||
|
||||
{{ location.name }}</a><br/>
|
||||
<a href="/location/{{ location.uuid }}">
|
||||
<label>{{ location.id }}</label>
|
||||
{{ location.name }}</a>
|
||||
<br/>
|
||||
{% endfor %}
|
||||
<a href="/listings/page/{{ options.prevPage }}">Previous</a>
|
||||
<a href="/listings/page/{{ options.nextPage }}">Next</a>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
@ -17,5 +17,10 @@
|
||||
<br/>
|
||||
<strong>TAGS:</strong>
|
||||
{{ options.location.tags }}
|
||||
<br/>
|
||||
{% if loggedIn %}
|
||||
<a href="/den/locations/modify/edit/{{ options.location.uuid }}">EDIT
|
||||
{{ options.location.name }}</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user