-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added basic foobar razzia copy called fnugfald razzia * Removed unused, duplicated element id: 'result' * Added the razzia to admin menu. * Moved .result div into each razzia type, to allow multiple results * Implemented fnugfald razzia * Made use of guard clauses * Don't store razzia information on users who don't have a ticket * Changed hardcoded values to actual values. * Fixed crash issue when product id isn't recognized
- Loading branch information
1 parent
add394b
commit 85b33b5
Showing
9 changed files
with
175 additions
and
67 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
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
64 changes: 64 additions & 0 deletions
64
stregsystem/templates/admin/stregsystem/razzia/fnugfald.html
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{% extends "admin/stregsystem/razzia/razzia_search.html" %} | ||
|
||
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Hjem</a> › <a href="../../../">Stregsystem</a> › <a href="../">Fnugfald razzia</a></div>{% endblock %} | ||
|
||
{% block member_present %} | ||
<div class="result"> | ||
<div class="status"> | ||
{% if drunkard %} | ||
<script> | ||
// fade/flash background color to more easily notify foobar crew | ||
let ofs = 0; | ||
let el = document.body; | ||
window.setInterval(function(){ | ||
el.style.background = 'rgba(255,255,0,'+Math.abs(Math.sin(ofs))+')'; | ||
ofs += 0.02; | ||
}, 10); | ||
</script> | ||
<div class="fa fa-exclamation-triangle failure" aria-hidden="true"></div> | ||
{% else %} | ||
<div class="fa {% if already_used %} fa-exclamation-circle sucess {% else %} fa-check-circle sucess {% endif %}" aria-hidden="true"></div> | ||
{% endif %} | ||
</div> | ||
{% if drunkard %} | ||
{{member.firstname}} {{member.lastname}} ({{member.username}}) <b>wait {{ remaining_time_mins }}m {{ remaining_time_secs }}s </b> before next free beer | ||
{% else %} | ||
{{member.firstname}} {{member.lastname}} ({{member.username}}) {% if already_checked_in %} last checked in at {{last_entry.time}} {% endif %} | ||
{% endif %} | ||
</div> | ||
|
||
{% if username %} | ||
{% if member_name %} | ||
{% if items_bought %} | ||
{% for item, count in items_bought %} | ||
<div class="result"> | ||
{% if count > 0 %} | ||
<div class="status"><div class="fa fa-check-circle sucess fa-fw" aria-hidden="true"></div></div> | ||
{% else %} | ||
<div class="status"><div class="fa fa-times-circle failure fa-fw" aria-hidden="true"></div></div> | ||
{% endif %} | ||
{{ item }}: {{ count }} | ||
</div> | ||
{% endfor %} | ||
{% else %} | ||
<div class="result"> | ||
<div class="status"><div class="fa fa-times-circle failure fa-fw" aria-hidden="true"></div></div> | ||
{{ member_name }} has not bought any products in the list | ||
</div> | ||
{% endif %} | ||
{% else %} | ||
<div class="result"> | ||
<div class="status"><div class="fa fa-times-circle failure fa-fw" aria-hidden="true"></div></div> | ||
"{{ username }}" not found | ||
</div> | ||
{% endif %} | ||
|
||
{% endif %} | ||
|
||
{% endblock %} | ||
|
||
{% block drunkard_present %} | ||
fa-exclamation-triangle | ||
{% if drunkard %} checked in within the previous hour, wait {{ remaining_time }}{% endif %} | ||
{% endblock %} | ||
|
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