aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGravatar momothereal <[email protected]>2018-06-19 14:53:49 -0400
committerGravatar momothereal <[email protected]>2018-06-19 14:53:49 -0400
commitca900f7a8e363dbc832cb77149a980adcd225102 (patch)
treec43d003f488136aa5457f13cf868d610321e9a80 /templates
parent[Jams] EasyList was blocking the JetBrains logo (diff)
Disable the join button if the user has already applied to a code jam
Diffstat (limited to 'templates')
-rw-r--r--templates/main/jams/index.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/templates/main/jams/index.html b/templates/main/jams/index.html
index e2201398..8e6985c6 100644
--- a/templates/main/jams/index.html
+++ b/templates/main/jams/index.html
@@ -62,9 +62,15 @@
Code Jam {{ jam.number }}: {{ jam.title }}
<span class="uk-float-right">
{% if jam.state == "announced" %}
- <a class="uk-button uk-button-primary" href="{{ url_for("main.jams.join", jam=jam.number) }}">
- <i class="uk-icon fa-fw far fa-plus"></i> &nbsp;Join
- </a>
+ {% if has_applied_to_jam(jam) %}
+ <a class="uk-button uk-button-default uk-disabled" href="#">
+ <i class="uk-icon fa-fw far fa-check"></i> &nbsp;Applied
+ </a>
+ {% else %}
+ <a class="uk-button uk-button-primary" href="{{ url_for("main.jams.join", jam=jam.number) }}">
+ <i class="uk-icon fa-fw far fa-plus"></i> &nbsp;Join
+ </a>
+ {% endif %}
{% else %}
<a class="uk-button uk-button-default" target="_blank" href="{{ jam.repo }}">
<i class="uk-icon fa-fw fab fa-gitlab"></i> &nbsp;Repository