~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to templates/wlscheduling/scheduling.html

  • Committer: gschmitlin at gmail
  • Date: 2017-12-23 09:15:02 UTC
  • mto: This revision was merged to the branch mainline in revision 480.
  • Revision ID: gschmitlin@gmail.com-20171223091502-j1zscwdies0625nv
added scheduling module in a clean way

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 = createCalandar();
 
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
<!-- Template for the days of avaibility of the other users  -->
 
59
<div id="other-day-template" hidden="hidden">
 
60
    <div class="day-title"></div>
 
61
    <div id="hours-wrapper" class="hours-wrapper" >
 
62
        {% for i in "xxxxxxxxxxxxxxxxxxxxxxxx" %}
 
63
            <div class="hours" title="{{ forloop.counter0 }} to {{ forloop.counter0|add:1 }} hour"></div>
 
64
        {% endfor %}
 
65
    </div>
 
66
</div>
 
67
 
 
68
<div id="other-user-template" class="other-user-div" hidden="hidden">
 
69
    <div class="title"></div>
 
70
</div>
 
71
 
 
72
<!-- Div to send django data to js file -->
 
73
<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>
 
74
 
 
75
 
 
76
{% endblock %}