aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/base/dashboard/landing.html
blob: 960ad39648e7448a4637a66d588eed4459c6a912 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{% extends "base.html" %}
{% load staticfiles %}
{% load bootstrap4 %}
{% block content %}

<div class="text-center">
    {% if not request.user.is_anonymous %}
    {% else %}
    {% endif %}
</div>
{% csrf_token %}

<div class="row">
    <div class="col-12 col-lg-6 mb-4">
        <!-- About us -->
        <h2 class="border-bottom">About Us</h2>
        {% block about_us %}
        <p>Here is some information about us!</p>
        {% endblock about_us %}
        {% block welcome_back %}
            {% if user.is_authenticated %}
            <h2 class="border-bottom">Welcome Back!</h2>
                {% if bookings %}
                    <h5> These are your current bookings: </h5>
                    <ul style="list-style: none;">
                    {% for book in bookings %}
                        <li><a href="/booking/detail/{{ book.id }}/">{{ book.purpose }}</a></li>
                    {% endfor %}
                    </ul>
                {% else %}
                    <h5> You have no current bookings <h5>
                {% endif %}
            {% endif %}
        {% endblock welcome_back %}
    </div>

    <!-- Get started -->
    <div class="col-12 col-lg-6 mb-4">
        <h2 class="border-bottom">Get Started</h2>
        {% if request.user.is_anonymous %}
        {% if LFID %}
        <h4 class="text-center">
            To get started, please log in with <a href="{% url 'oidc_authentication_init' %}" class="inTextLink">Linux Foundation ID</a>
        </h4>
        {% else %}
        <h4 class="text-center">
            To get started, please log in with your <a href="/accounts/login" class="inTextLink">Linux Foundation Jira account</a>
        </h4>
        {% endif %}
        {% else %}
        {% block btnGrp %}
        <p>To get started, book a server below:</p>
        <a class="btn btn-primary btn-lg d-flex flex-column justify-content-center align-content-center border p-4 btnAnuket" href="{% url 'workflow:book_a_pod' %}" >
            Book a Pod
        </a>
        <a class="btn btn-primary btn-lg d-flex flex-column justify-content-center align-content-center border p-4 btnAnuket" href="{% url 'workflow:design_a_pod' %}" >
            Design a Pod
        </a>
        {% endblock btnGrp %}
        {% endif %}
    </div>
</div>

<!-- IPA Modal -->
<div class="modal fade" id="ipa-modal" tabindex="-1">
    <div class="modal-dialog modal-xl">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title">Welcome to LaaS 3.0</h5>
        </div>
        <div class="modal-body" id="add_resource_modal_body">
            <p>We have made large scale improvements to the dashboard and our host provisioning service to improve your user experience.</p>
            <p>{{ ipa_migrator.message }}</p>
            <form action="{{ipa_migrator.action}}" method="post">
                {% csrf_token %}
                <p class="text-danger">{{error}}</p>
                {{ ipa_migrator.form }}
                <div class="form-group">
                    <input class="btn btn-success" name="submitButton" type="submit" value="{{ipa_migrator.button}}">
                </div>
            </form>
        </div>
      </div>
    </div>
  </div>

<script>

$(window).on('load', function() {
    if ({{ipa_migrator.exists}}) {
        $('#ipa-modal').modal({backdrop: 'static', keyboard: false});
        $('#ipa-modal').modal('show');
    }
    });
</script>

{% endblock content %}