aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-07-02 13:02:08 +0000
committerGravatar Gareth Coles <[email protected]>2018-07-02 13:02:08 +0000
commitf4b71a32ee210f049025962e790c080b976945e1 (patch)
tree417db0c4f3ada7a5a23a444b797d1bab74413333 /templates
parent[Jams/Teams] Show pushes creating new branches in GitLab activity (diff)
parentFix typo from last commit (diff)
Merge branch 'momo/enhance-jam-index' into 'master'
Disable the join button if the user has already applied to a code jam See merge request python-discord/projects/site!7
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 b2ffa1af..9a228b74 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 %}
{% if jam.teams and jam.teams | length > 0 %}
<a class="uk-button uk-button-primary" href="{{ url_for('main.jams.jam_team_list', jam_id=jam.number) }}">