~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to templates/wlscheduling/scheduling.html

  • Committer: franku
  • Author(s): trimard
  • Date: 2018-02-17 10:52:15 UTC
  • mfrom: (478.1.16 module_scheduling)
  • Revision ID: somal@arcor.de-20180217105215-8luihqojg51ipu6j
merged the scheduling module by trimard

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
{% extends "wlscheduling/base.html" %}
 
3
{% comment %}
 
4
   vim:ft=htmldjango
 
5
{% endcomment %}
 
6
 
 
7
 
 
8
 
 
9
{% block content %}
 
10
<script type="text/javascript">
 
11
document.addEventListener('DOMContentLoaded', function(){ 
 
12
    var calendar = createCalendar();
 
13
    addTimeZoneWarningIfNeeded();
 
14
    addPreviousDateFromUser(calendar);
 
15
    addOtherUsersAvailabilities();
 
16
    
 
17
    //Validate btn
 
18
    document.getElementById('validate-btn').onclick = function () {
 
19
        sendDataAsForm(calendar);
 
20
    }
 
21
}, false);
 
22
</script>
 
23
 
 
24
<h1>Multiplayer</h1>
 
25
 
 
26
<div class="blogEntry">
 
27
    <h2>Select the dates you'll be available on</h2>
 
28
    {% include "wlscheduling/timezone-msg.html" %}
 
29
    <div id="scheduling-datepicker"></div>
 
30
    
 
31
    <div id="second-step" hidden="hidden">
 
32
        <h2>Select the hours you'll be available on these dates</h2>
 
33
        <div id="days-wrapper"></div>
 
34
        <h2>Players that are currently available at the same hours as you</h2>
 
35
        <div id="other-users-wrapper"></div>
 
36
        <div id="no-user-to-display" hidden="hidden">Sorry, there are currently no players available at these hours. But your availabilities are noted, and another user might want to play with you!</div>
 
37
        <button id="validate-btn">Update</button>
 
38
    </div>
 
39
</div>
 
40
 
 
41
<!-- Templates for the js script -->
 
42
<!-- Template for the days of avaibility of the current user  -->
 
43
<div id="day-template" class="day" hidden="hidden">
 
44
    <div class="day-title"></div>
 
45
    <div class="hours-title-wrapper">
 
46
        {% for i in "xxxxxxxxxxxxxxxxxxxxxxxxx" %}
 
47
            <p>{{ forloop.counter0 }}</p>
 
48
        {% endfor %}
 
49
    </div>
 
50
    <div class="hours-wrapper">
 
51
    {% for i in "xxxxxxxxxxxxxxxxxxxxxxxx" %}
 
52
        <div class="hours"></div>
 
53
    {% endfor %}
 
54
        <div class="hidden-hour"></div>
 
55
    </div>
 
56
</div>
 
57
    
 
58
 
 
59
<!-- Template for the days of avaibility of the other users  -->
 
60
{% include "wlscheduling/other-users.html" %}
 
61
 
 
62
<!-- Div to send django data to js file -->
 
63
<div id="django-data" user-time-zone="{{user.wlprofile.time_zone}}" day-to-fill = "{{ current_user_availabilities }}" users-to-fill="{{other_users_availabilities}}" csrf-token = "{% csrf_token %}"></div>
 
64
 
 
65
 
 
66
{% endblock %}