forked from codalab/codalab-competitions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request codalab#2740 from codalab/fix_lri_merge
revert lri merge commit
- Loading branch information
Showing
12 changed files
with
266 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
!certs/.gitkeep | ||
certs/ | ||
var/* | ||
var_*/ | ||
docker-compose.override.yml | ||
*_old/ | ||
.pytest_cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,96 @@ | ||
{% extends 'base.html' %} | ||
{% block head_title %}Competitions{% endblock head_title %} | ||
{% block page_title %}Competitions{% endblock page_title %} | ||
{% block content %} | ||
|
||
{% load static %} | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
{% comment commenting out until we have sorting %} | ||
<div class="sort margin-bottom"> | ||
Sort by: | ||
<div class="btn-group" data-toggle="buttons"> | ||
<label class="btn btn-default btn-sm active"> | ||
<input type="radio" name="sortby" id="recent"> Most Recent | ||
</label> | ||
<label class="btn btn-default btn-sm"> | ||
<input type="radio" name="sortby" id="active"> Most Active | ||
</label> | ||
</div> | ||
</div> | ||
{% endcomment %} | ||
<form id="search_form" action="." method="GET"> | ||
<div class="input-group margin-bottom"> | ||
<input id="search_query_input" class="form-control" type="search" name="q" placeholder="Search..."> | ||
<span class="input-group-btn"> | ||
<input class="btn btn-primary" type="submit" value="Search"> | ||
</span> | ||
</div> | ||
<!-- | ||
<div class="checkbox-inline"> | ||
<label> | ||
<input name="is_active" type="checkbox"> Is active | ||
</label> | ||
</div> | ||
<div class="checkbox-inline"> | ||
<label> | ||
<input name="is_finished" type="checkbox"> Is finished | ||
</label> | ||
</div> | ||
<div class="checkbox-inline"> | ||
<label> | ||
<input name="medical_image_viewer" type="checkbox"> Medical image viewer | ||
</label> | ||
</div> | ||
--> | ||
</form> | ||
</div> | ||
</div> | ||
|
||
{% block head_title %}Competitions search{% endblock head_title %} | ||
{% block nosubheader %}{% endblock %} {# don't show header #} | ||
<div class="row pad-top"> | ||
<div class="col-md-12 competition-list"> | ||
{% if not competitions %} | ||
<p><em>There are no competitions.</em></p> | ||
{% else %} | ||
{% for competition in competitions %} | ||
{% include "web/my/_competition_tile.html" with competition=competition %} | ||
{% endfor %} | ||
{% endif %} | ||
</div> | ||
</div> | ||
<a href="https://github.com/codalab/codalab/wiki/User_Competition-Roadmap">Learn how to create your own competition.</a> | ||
{% endblock content%} | ||
|
||
{% block content_wrapper %} | ||
<iframe id="chahub_embed" src="{{ CHAHUB_URL }}?producer={{ CHAHUB_PRODUCER_ID }}&embedded=1" frameborder="no"></iframe> | ||
{% endblock %} | ||
{% block js %} | ||
function populate(frm, data) { | ||
$.each(data, function(key, value){ | ||
var $ctrl = $('[name='+key+']', frm); | ||
switch($ctrl.attr("type")) | ||
{ | ||
case "text": | ||
case "hidden": | ||
$ctrl.val(value); | ||
break; | ||
case "radio": | ||
case "checkbox": | ||
$ctrl.each(function(){ | ||
if(value=='on') { | ||
$(this).attr("checked",value); | ||
} | ||
}); | ||
break; | ||
default: | ||
$ctrl.val(value); | ||
} | ||
}); | ||
} | ||
$('.competition-tile').on('click',function(){ | ||
var competitionID = $(this).find('#competitionID').val(); | ||
window.location.href = '/competitions/' + competitionID; | ||
}); | ||
|
||
var params = {} | ||
location.search.substr(1).split("&").forEach(function(item) {params[item.split("=")[0]] = item.split("=")[1]}) | ||
|
||
populate('#search_form', params); | ||
{% endblock js %} |
Oops, something went wrong.