mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Add search function and ui refactor
This commit is contained in:
20
ram/portal/templates/includes/footer.html
Normal file
20
ram/portal/templates/includes/footer.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% load markdown %}
|
||||
|
||||
<footer class="text-muted py-4">
|
||||
<div class="container">
|
||||
<p class="float-end mb-1">
|
||||
<a href="#">Back to top</a>
|
||||
</p>
|
||||
<div id="footer" class="mb-1">
|
||||
<p>© {% now "Y" %}</p> {{ site_conf.footer | markdown | safe }}
|
||||
</div>
|
||||
<div id="footer_extended" class="mb-0">
|
||||
{{ site_conf.footer_extended | markdown | safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% if site_conf.show_version %}
|
||||
<div class="container">
|
||||
<p class="small text-muted">Version: {{ site_conf.version }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</footer>
|
20
ram/portal/templates/includes/login.html
Normal file
20
ram/portal/templates/includes/login.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{% if request.user.is_staff %}
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-sm btn-outline-light dropdown-toggle" type="button" id="dropdownMenu2" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Welcome back, <strong>{{ request.user }}</strong>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenu2">
|
||||
<li><a class="dropdown-item" href="{% url 'admin:roster_rollingstock_changelist' %}">Rolling stock</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'admin:consist_consist_changelist' %}">Consists</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'admin:app_list' 'metadata' %}">Metadata</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="{% url 'admin:index' %}">Admin</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'admin:portal_siteconfiguration_changelist' %}">Site configuration</a></li>
|
||||
<li><a class="dropdown-item" href="{% url 'admin:driver_driverconfiguration_changelist' %}">DCC configuration</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item text-danger" href="{% url 'admin:logout' %}?next={{ request.path }}">Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<a class="btn btn-sm btn-outline-light" href="{% url 'admin:login' %}?next={{ request.path }}">Log in</a>
|
||||
{% endif %}
|
5
ram/portal/templates/includes/search.html
Normal file
5
ram/portal/templates/includes/search.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<form class="d-flex" action="/portal/search" method="POST">
|
||||
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" value="{{ search }}" name="search">
|
||||
<button class="btn btn-outline-success" type="submit">Search</button>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user