diff --git a/codalab/apps/web/templates/web/competitions/_results.html b/codalab/apps/web/templates/web/competitions/_results.html index 14cbc20a8..e43a8e42b 100644 --- a/codalab/apps/web/templates/web/competitions/_results.html +++ b/codalab/apps/web/templates/web/competitions/_results.html @@ -1,14 +1,13 @@ -
-
-
-
- Phase 1 -
-
- Phase 2 -
-
-
+
+
+ {% for phase in competition.phases.all %} + {% if not phase.is_active %} + + {% else %} + + {% endif %} + {% endfor %} +
@@ -25,6 +24,7 @@ + 1 guest2 diff --git a/codalab/apps/web/templates/web/competitions/_submit_results.html b/codalab/apps/web/templates/web/competitions/_submit_results.html index e0184b17f..9bc3e6192 100644 --- a/codalab/apps/web/templates/web/competitions/_submit_results.html +++ b/codalab/apps/web/templates/web/competitions/_submit_results.html @@ -1,23 +1,25 @@ {% load codalab %} -
-
-
-
- Phase 1 -
-
- Phase 2 -
-
-
-
- -

Submit a new result set or view your previous submissions.

+
+
+ {% for phase in competition.phases.all %} + {% if not phase.is_active %} + + {% else %} + + {% endif %} + {% endfor %} +
+
+
Submit a new result set or view your previous submissions.

+
+
+
diff --git a/codalab/apps/web/templatetags/codalab.py b/codalab/apps/web/templatetags/codalab.py index 64bbf5e7f..28515a5b4 100644 --- a/codalab/apps/web/templatetags/codalab.py +++ b/codalab/apps/web/templatetags/codalab.py @@ -1,10 +1,13 @@ import os - from django import template - register = template.Library() @register.filter def filename(value): - return os.path.basename(value.file.name) \ No newline at end of file + return os.path.basename(value.file.name) + +# by mikeivanov (on April 16, 2007) +@register.filter +def in_list(value,arg): + return value in arg \ No newline at end of file