Skip to content

Commit

Permalink
Working on phases.
Browse files Browse the repository at this point in the history
  • Loading branch information
irjudson committed Aug 8, 2013
1 parent dcd7218 commit a003cfc
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 28 deletions.
22 changes: 11 additions & 11 deletions codalab/apps/web/templates/web/competitions/_results.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<div class="row">
<div class="small-4 columns push right">
<div class="row">
<div class="globalBlueButton phaseToggleBtn lFloat">
<a href="#">Phase 1</a>
</div>
<div class="globalBlueButton phaseToggleBtn lFloat">
<a href="#">Phase 2</a>
</div>
</div>
</div>
<div class="row right">
<div class="small-12 columns">
{% for phase in competition.phases.all %}
{% if not phase.is_active %}
<button class="globalBlueButton disabled" id="phase_{{phase.id}}">{{phase.label}}</button>
{% else %}
<button class="globalBlueButton" id="phase_{{phase.id}}">{{phase.label}}</button>
{% endif %}
{% endfor %}
</div>
</div>

<div class="row">
Expand All @@ -25,6 +24,7 @@
</tr>
</thead>
<tbody>

<tr>
<td>1</td>
<td>guest2</td>
Expand Down
30 changes: 16 additions & 14 deletions codalab/apps/web/templates/web/competitions/_submit_results.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{% load codalab %}
<div class="row">
<div class="small-4 columns push right">
<div class="row">
<div class="globalBlueButton phaseToggleBtn lFloat">
<a href="#">Phase 1</a>
</div>
<div class="globalBlueButton phaseToggleBtn lFloat">
<a href="#">Phase 2</a>
</div>
</div>
</div>
</div>

<p>Submit a new result set or view your previous submissions.</p>

<div class="row right">
<div class="small-12 columns">
{% for phase in competition.phases.all %}
{% if not phase.is_active %}
<button class="globalBlueButton disabled" id="phase_{{phase.id}}">{{phase.label}}</button>
{% else %}
<button class="globalBlueButton" id="phase_{{phase.id}}">{{phase.label}}</button>
{% endif %}
{% endfor %}
</div>
</div>
<div class="row"
<p>Submit a new result set or view your previous submissions.</p>
</div>
<div class="row">
<input type="file" name="file" id="fileUpload" class="fileUpload" />
<div id="details"></div>
<div id="response"></div>
<div id="previews"></div>
</div>

<div class="row">
<div class="user_results">
Expand Down
9 changes: 6 additions & 3 deletions codalab/apps/web/templatetags/codalab.py
Original file line number Diff line number Diff line change
@@ -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)
return os.path.basename(value.file.name)

# by mikeivanov (on April 16, 2007)
@register.filter
def in_list(value,arg):
return value in arg

0 comments on commit a003cfc

Please sign in to comment.