Browse Source

Merge pull request #1003 from jloguercio/8026

Fix "without Category" category show when it doesn't have a list of lp - Refs #8026
José Loguercio 9 years ago
parent
commit
4f59cfa227
1 changed files with 7 additions and 1 deletions
  1. 7 1
      main/template/default/learnpath/list.tpl

+ 7 - 1
main/template/default/learnpath/list.tpl

@@ -13,7 +13,13 @@
 {% for lp_data in data %}
     <h3 class="page-header">
         {% if (categories|length) > 1 %}
-            {{ lp_data.category.getName() }}
+            {% if lp_data.lp_list and lp_data.category.getId() != 0 %}
+                {{ lp_data.category.getName() }}
+            {% elseif lp_data.lp_list and lp_data.category.getId() == 0 %}
+                {{ lp_data.category.getName() }}
+            {% elseif not lp_data.lp_list and lp_data.category.getId() != 0 %}
+                {{ lp_data.category.getName() }}
+            {% endif %}
         {% endif %}
 
         {% if lp_data.category.getId() > 0 and is_allowed_to_edit %}