edit button
This commit is contained in:
parent
fd976735d6
commit
e852a28105
|
@ -142,3 +142,13 @@ ul.clearing-thumbs li {
|
|||
.pagination button:hover {
|
||||
background: #1779ba !important; }
|
||||
|
||||
.admin-menu {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 65px;
|
||||
}
|
||||
|
||||
.admin-menu a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
6
content/templates/edit.html
Normal file
6
content/templates/edit.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% if request.user.is_staff %}
|
||||
<div class="admin-menu">
|
||||
<a href="{% url 'admin:content_content_change' content.id %}">Edit</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
{% include "edit.html" with content=events %}
|
||||
|
||||
<div class="large-8 medium-8 columns special-column">
|
||||
{% if events.image %}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
{% include "edit.html" with content=projects %}
|
||||
|
||||
<div class="large-8 medium-8 columns special-column">
|
||||
{% if projects.image %}
|
||||
|
|
|
@ -125,7 +125,7 @@ def page(request, shortname):
|
|||
|
||||
def search(request):
|
||||
q = request.GET.get('q')
|
||||
results = Content.objects.filter(Q(body__icontains=q) | Q(title__icontains=q)).distinct()
|
||||
results = Content.objects.filter(Q(body__icontains=q) | Q(title__icontains=q) | Q(header__icontains=q)).distinct()
|
||||
results = results.filter(published=True)
|
||||
results = results.order_by('-datestart')
|
||||
page = request.GET.get('page', 1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user