Skip to content

Commit

Permalink
Merge pull request #1502 from codalab/ui_submission_limit
Browse files Browse the repository at this point in the history
Add a display when there is no submission limit
  • Loading branch information
Didayolo authored Jun 26, 2024
2 parents 2cb826a + d5f1094 commit 3eedc7a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/static/riot/competitions/detail/submission_limit.tag
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<submission-limit>

<div class="ui sixteen wide column submission-container">
<div class="col">
<div class="col-content">
Expand All @@ -7,19 +8,30 @@
<i class="grey question circle icon"></i>
</a>
</div>
<span if="{selected_phase.max_submissions_per_day}" class="badge {badgeColor(selected_phase.used_submissions_per_day, selected_phase.max_submissions_per_day)}">
<!-- Badge for when there is a limit -->
<span if="{selected_phase.max_submissions_per_day > 0}" class="badge {badgeColor(selected_phase.used_submissions_per_day, selected_phase.max_submissions_per_day)}">
{selected_phase.used_submissions_per_day} out of {selected_phase.max_submissions_per_day}
</span>
<!-- Badge for when there is no limit -->
<span if="{selected_phase.max_submissions_per_day == 0}" class="badge badge-green">
{selected_phase.used_submissions_per_day} out of ∞
</span>
</div>
<div class="col">
<div class="col-content">
Number of total submissions used
</div>
<span if="{selected_phase.max_submissions_per_person}" class="badge {badgeColor(selected_phase.used_submissions_per_person, selected_phase.max_submissions_per_person)}">
<!-- Badge for when there is a limit -->
<span if="{selected_phase.max_submissions_per_person > 0}" class="badge {badgeColor(selected_phase.used_submissions_per_person, selected_phase.max_submissions_per_person)}">
{selected_phase.used_submissions_per_person} out of {selected_phase.max_submissions_per_person}
</span>
<!-- Badge for when there is no limit -->
<span if="{selected_phase.max_submissions_per_person == 0}" class="badge badge-green">
{selected_phase.used_submissions_per_person} out of ∞
</span>
</div>
</div>

<script>
var self = this;
self.selected_phase = {}
Expand Down

0 comments on commit 3eedc7a

Please sign in to comment.