Skip to content

Commit 61b4675

Browse files
committed
Merge pull request #1705 from learning-unlimited/hide-announcements
Changed fruitsalad theme to hide announcements box if there are no announcements
2 parents acdfeda + c7bdacf commit 61b4675

File tree

1 file changed

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

1 file changed

+10
-5
lines changed

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

+10-5
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,10 @@
141141
{% block content_header %}
142142
<div id="content_header">
143143
<div class="corners"><div class="ul"></div><div class="ur"></div></div>
144+
145+
<h1 class="title">{% block content_title %}&nbsp;{% endblock %}</h1>
144146
{% if request.path|equal:"/teach/index.html" or request.path|equal:"/learn/index.html" %}
145147

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

151150
{% if request.path|equal:"/teach/index.html" %}
@@ -154,6 +153,13 @@
154153
{% miniblog_for_user AnonymousUser as announcements learn 3 %}
155154
{% endif %}
156155

156+
{% if not announcements.announcementList|length_is:0 %}
157+
158+
{# announcements #}
159+
<div id="divannouncements">
160+
<ul>
161+
162+
157163
{% for announce in announcements.announcementList %}
158164
<li>
159165
{% with announceUrl=announce.get_absolute_url %}
@@ -174,8 +180,7 @@ <h1>{{ announce.category|default:"" }}</h1>
174180
<div id="divannouncemore">
175181
<a href="/myesp/home/">more announcements...</a></div>
176182
{% endif %}
177-
{% else %}
178-
<h1 class="title">{% block content_title %}&nbsp;{% endblock %}</h1>
183+
{% endif %}
179184
{% endif %}
180185
</div>
181186
{% endblock %}

0 commit comments

Comments
 (0)