aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/base/dashboard/landing.html
blob: fea4deb5c197aa399e8956693c53a49834cdcb94 (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
{% extends "base.html" %}
{% load staticfiles %}

{% block content %}

<div class="text-center">
    {% if not request.user.is_anonymous %}
    {% if not request.user.userprofile.ssh_public_key %}
    <div class="alert alert-danger alertAnuket" role="alert">
        <b>Warning: you need to upload an ssh key under <a href="/accounts/settings" class="inTextLink" >account settings</a> if you wish to
        log into the servers you book</b>
    </div>
    {% endif %}
    {% 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>

<div class="hidden_form d-none" id="form_div">
    <form method="post" action="" class="form" id="wf_selection_form">
        {% csrf_token %}
    </form>
</div>

{% endblock content %}