Commit e77c2629 authored by Simon Daron's avatar Simon Daron

Debug searche for empty results

parent cd288cf7
......@@ -380,7 +380,7 @@ class News(TemplateView):
def get_context_data(self, **kwargs):
context = super(News, self).get_context_data(**kwargs)
context['sectionName'] = "News"
context['newsImaged'] = list(NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-datetime')[:3])
context['newsImaged'] = list(NewsItem.objects.all().exclude(image__isnull=True).exclude(image__exact='').order_by('-datetime')[:12])
context['news'] = list(NewsItem.objects.all().order_by('-datetime')[:60])
context['categories'] = list(NewsCategory.objects.all())
return context
......
......@@ -133,14 +133,13 @@ body{
#Main{
color:#333;
background-color: white;
}
#Main >.wrapper{
padding-bottom:2em;
}
#Home #Main{
min-height:0;
}
#All{
padding-bottom:3em;
}
/* GLOBAL SITE NAV */
#userLog{
z-index:2000;
......@@ -610,9 +609,6 @@ background-color:#ff6633; border-color:#fff;}
/****************************************************/
/**** News ****/
.list.news li {
display:block;
border-style:solid;
border-width:1px 0;
}
.news a .content{padding:1em;}
.news a.block:hover{text-decoration:none;}
......@@ -630,12 +626,6 @@ background-color:#ff6633; border-color:#fff;}
.list.news .logo{
max-width:50%;
}
.list.news .num-1 .logo{
max-width:100% !important;
float:none;
border-width:2px 0 2px 0 !important;
margin: 0 0 1em 0 !important;
}
.list.news .num-1 .title{
}
}
......@@ -668,10 +658,6 @@ background-color:#ff6633; border-color:#fff;}
.list.news .special.content{
padding : 1em;
}
.list.news .num-4{
border-width:1px 0 1px 0;
clear:both;
}
}
.news.detail .description{
margin-top:1em;
......
......@@ -67,7 +67,7 @@
</ul>
</nav>
</div>
-->
{% endif %}
-->
{% endif %}
</div>
{% extends "home.html" %}
{% extends "news.html" %}
{% load thumbnails %}
{% load paniktags %}
{% block bodyID %}News{% endblock %}
{% block nav %}
{% news_nav %}
{% endblock %}
......
{% extends "base.html"%}
{% load paniktags %}
{% block bodyID %}News{% endblock %}
{% block title %}News{% endblock %}
{% block main %}
<div class="news">
<div class="wrapper">
<ul class="custom list news cf">
<ul class="custom columns list news cf">
{% for NewsItem in newsImaged %}
<li class="item num-{{forloop.counter}}">
{% if NewsItem.slug == newsImaged.0.slug %}
{% news_inline content=NewsItem klass="special" logo="large" %}
{% elif NewsItem.slug == newsImaged.1.slug or NewsItem.slug == newsImaged.2.slug%}
{% news_inline content=NewsItem klass="special" logo="medium"%}
{% else %}
{% news_inline with content=NewsItem%}
{% endif %}
<li class="item">
{% news_inline content=NewsItem klass="special inBlock padded" logo="medium"%}
</li>
{% endfor %}
</ul>
</div>
<hr />
</div>
{% endblock %}
{% block links %}
......
......@@ -54,10 +54,8 @@
{% block main %}
{% if query %}
<div class="wrapper">
{% if not query %}
{% else %}
<div class="padded">
{% if not page.object_list %}
<div class="big error padded center">Sorry, no result with your query!</div>
......@@ -72,9 +70,11 @@
{% for result in page.object_list %}
{% if result.object.title %}
<li class="ellipsis">
{% search_result_template result %}
{% search_result_template result %}
</li>
{% endif %}
{% endfor %}
......@@ -85,6 +85,6 @@
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment