Skip to content

Commit 8767683

Browse files
committed
Changed fruitsalad theme to hide annoucements box if there are no announcements
1 parent 61b1d57 commit 8767683

File tree

1 file changed

+10
-3
lines changed
  • esp/esp/themes/theme_data/fruitsalad/templates

1 file changed

+10
-3
lines changed

esp/esp/themes/theme_data/fruitsalad/templates/main.html

+10-3
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,6 @@
143143
<div class="corners"><div class="ul"></div><div class="ur"></div></div>
144144
{% if request.path|equal:"/teach/index.html" or request.path|equal:"/learn/index.html" %}
145145

146-
{# announcements #}
147-
<div id="divannouncements">
148-
<ul>
149146
{% load preview %}
150147

151148
{% if request.path|equal:"/teach/index.html" %}
@@ -154,6 +151,13 @@
154151
{% miniblog_for_user AnonymousUser as announcements learn 3 %}
155152
{% endif %}
156153

154+
{% if not announcements.announcementList|length_is:0 %}
155+
156+
{# announcements #}
157+
<div id="divannouncements">
158+
<ul>
159+
160+
157161
{% for announce in announcements.announcementList %}
158162
<li>
159163
{% with announceUrl=announce.get_absolute_url %}
@@ -175,6 +179,9 @@ <h1>{{ announce.category|default:"" }}</h1>
175179
<a href="/myesp/home/">more announcements...</a></div>
176180
{% endif %}
177181
{% else %}
182+
<!-- Default blank if there's no announcements -->
183+
{% endif %}
184+
{% else %}
178185
<h1 class="title">{% block content_title %}&nbsp;{% endblock %}</h1>
179186
{% endif %}
180187
</div>

0 commit comments

Comments
 (0)