-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
246 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{% extends 'santa/notes.html.twig' %} | ||
|
||
{% block user_item %} | ||
<label class="user-item notes"> | ||
{% if user.extra.image %} | ||
<img src="{{ user.extra.image }}" alt="{{ user.name }}" /> | ||
{% endif %} | ||
<span>{{ user.name }}{% if user.extra.nickname %} ({{ user.extra.nickname }}){% endif %}</span> | ||
{% if groups %} | ||
<span class="user-groups"> | ||
{% for group in groups %} | ||
{% if user.identifier in group.userIds %} | ||
<span class="user-group">{{ group.name }}</span> | ||
{% endif %} | ||
{% endfor %} | ||
</span> | ||
{% endif %} | ||
|
||
<input name="users[]" type="hidden" value="{{ user.identifier }}"> | ||
<input name="notes[{{ user.identifier }}]" type="text" {% if key in input_placeholders|keys %}placeholder="{{ input_placeholders[key] }}"{% endif %} /> | ||
</label> | ||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% extends 'santa/run.html.twig' %} | ||
|
||
{% block user_item %} | ||
<label class="user-item notes"> | ||
<img src="{{ user.extra.image }}" alt="{{ user.name }}" /> | ||
<span>{{ user.name }} ({{ user.extra.nickname }})</span> | ||
{% if groups %} | ||
<span class="user-groups"> | ||
{% for group in groups %} | ||
{% if user.identifier in group.userIds %} | ||
<span class="user-group">{{ group.name }}</span> | ||
{% endif %} | ||
{% endfor %} | ||
</span> | ||
{% endif %} | ||
|
||
<input name="users[]" type="hidden" value="{{ user.identifier }}"> | ||
<input name="notes[{{ user.identifier }}]" type="text" {% if key in input_placeholders|keys %}placeholder="{{ input_placeholders[key] }}"{% endif %} /> | ||
</label> | ||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{% extends 'santa/run.html.twig' %} | ||
|
||
{% block user_item %} | ||
<label class="user-item notes"> | ||
{% if user.extra.image %} | ||
<img src="{{ user.extra.image }}" alt="{{ user.name }}" /> | ||
{% endif %} | ||
<span>{{ user.name }}</span> | ||
{% if groups %} | ||
<span class="user-groups"> | ||
{% for group in groups %} | ||
{% if user.identifier in group.userIds %} | ||
<span class="user-group">{{ group.name }}</span> | ||
{% endif %} | ||
{% endfor %} | ||
</span> | ||
{% endif %} | ||
|
||
<input name="users[]" type="hidden" value="{{ user.identifier }}"> | ||
<input name="notes[{{ user.identifier }}]" type="text" {% if key in input_placeholders|keys %}placeholder="{{ input_placeholders[key] }}"{% endif %} /> | ||
</label> | ||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% set hasRestrictedUser = hasRestrictedUser|default(false) %} | ||
|
||
{% block content %} | ||
<div class="run-block"> | ||
<form method="post" id="run_form" action="{{ path('run', { application: application }) }}"> | ||
<div class="pure-g"> | ||
<div class="pure-u-1 user-field run-step"> | ||
<h2>Add notes for your participants</h2> | ||
|
||
{% apply spaceless %} | ||
<div class="user-list" id="user-list"> | ||
{% set key = 0 %} | ||
{% set input_placeholders = { | ||
0: 'Add some notes ...', | ||
1: 'An address ;', | ||
2: 'A food allergy ;', | ||
3: 'Or whatever you want ...', | ||
} %} | ||
|
||
{% for user in users %} | ||
{% if user.identifier in selectedUsers %} | ||
{% block user_item %}{% endblock %} | ||
{% set key = key + 1 %} | ||
{% endif %} | ||
{% endfor %} | ||
<div class="no-result is-hidden" id="no-user-matching"> | ||
No user matching. | ||
</div> | ||
</div> | ||
{% endapply %} | ||
<p class="help"> | ||
A user's note will be sent to the selected participant to send him/her a gift . | ||
</p> | ||
</div> | ||
|
||
<div class="pure-u-1 pure-u-lg-1-2"> | ||
<div class="run-column"> | ||
<div class="message-field run-step"> | ||
<h2> | ||
<label class="control-label" for="message">Check your message</label> | ||
</h2> | ||
|
||
<input type="hidden" name="message" value="{{ message }}" /> | ||
<textarea name="message" id="message" rows="5" disabled="disabled">{{ message }}</textarea> | ||
<p class="help"> | ||
This field is only here to check your message. | ||
If you want to edit it, please go to the previous page. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="pure-u-1 pure-u-lg-1-2"> | ||
<div class="run-column run-column-right"> | ||
<div class="run-step"> | ||
<h2>Ready?</h2> | ||
|
||
<p class="is-center"> | ||
We are going to shuffle selected users and send them a private message to inform them | ||
of their peer name. | ||
</p> | ||
|
||
<div class="is-center"> | ||
<button type="submit" class="big-button" id="submit-button"> | ||
<span class="fas fa-paper-plane" aria-hidden="true"></span> | ||
Finish and send Secret Santa messages! | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock content %} |
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