LFID login for both projects
[laas.git] / src / templates / base / dashboard / landing.html
1 {% extends "base.html" %}
2 {% load staticfiles %}
3
4 {% block content %}
5 <div class="text-center">
6     {% if not request.user.is_anonymous %}
7     {% if not request.user.userprofile.ssh_public_key %}
8     <div class="alert alert-danger" role="alert">
9         Warning: you need to upload an ssh key under <a href="/accounts/settings">account settings</a> if you wish to
10         log into the servers you book
11     </div>
12     {% endif %}
13     {% else %}
14     {% endif %}
15 </div>
16 {% csrf_token %}
17
18 <div class="row">
19     <div class="col-12 col-lg-6 mb-4">
20         <!-- About us -->
21         <h2 class="border-bottom">About Us</h2>
22         {% block about_us %}
23         <p>Here is some information about us!</p>
24         {% endblock about_us %}
25         {% block welcome_back %}
26             {% if user.is_authenticated %}
27             <h2 class="border-bottom">Welcome Back!</h2>
28                 {% if bookings %}
29                     <h5> These are your current bookings: </h5>
30                     <ul style="list-style: none;">
31                     {% for book in bookings %}
32                         <li><a href="/booking/detail/{{ book.id }}/">{{ book.purpose }}</a></li>
33                     {% endfor %}
34                     </ul>
35                 {% else %}
36                     <h5> You have no current bookings <h5>
37                 {% endif %}
38             {% endif %}
39         {% endblock welcome_back %}
40     </div>
41
42     <!-- Get started -->
43     <div class="col-12 col-lg-6 mb-4">
44         <h2 class="border-bottom">Get Started</h2>
45         {% if request.user.is_anonymous %}
46         {% if LFID %}
47         <h4 class="text-center">
48             To get started, please log in with <a href="{% url 'oidc_authentication_init' %}">Linux Foundation ID</a>
49         </h4>
50         {% else %}
51         <h4 class="text-center">
52             To get started, please log in with your <a href="/accounts/login">Linux Foundation Jira account</a>
53         </h4>
54         {% endif %}
55         {% else %}
56         {% block btnGrp %}
57         <p>To get started, book a server below:</p>
58         <a class="btn btn-primary btn-lg d-flex flex-column justify-content-center align-content-center border text-white p-4" href="/booking/quick/">
59             Book a Resource
60         </a>
61         <p class="mt-4">PTLs can use our advanced options to book multi-node pods. If you are a PTL, you may use the options
62             below:
63         </p>
64         <div class="btn-group-vertical w-100">
65             <button class="btn btn-primary" onclick="create_workflow(0)">Book a Pod</button>
66             <button class="btn btn-primary" onclick="create_workflow(1)">Design a Pod</button>
67         </div>
68         {% endblock btnGrp %}
69         {% endif %}
70     </div>
71
72     <!-- Returning users -->
73     {% if not request.user.is_anonymous %}
74     {% block returningUsers %}
75     <div class="col-12 col-lg-6 offset-lg-6 mb-4 mt-lg-4">
76         <h2 class="ht-4 border-bottom">Returning Users</h2>
77         <p>If you're a returning user, some of the following options may be of interest:</p>
78         <div class="btn-group-vertical w-100">
79             <button class="btn btn-primary" onclick="create_workflow(3)">Snapshot a Host</button>
80             <a class="btn btn-primary" href="{% url 'account:my-bookings' %}">
81                 My Bookings
82             </a>
83             {% if manager == True %}
84             <button class="btn btn-primary" onclick="continue_workflow()">
85                 Resume Workflow
86             </button>
87             {% endif %}
88         </div>
89     </div>
90     {% endblock returningUsers %}
91     {% endif %}
92 </div>
93
94 <div class="hidden_form d-none" id="form_div">
95     <form method="post" action="" class="form" id="wf_selection_form">
96         {% csrf_token %}
97     </form>
98 </div>
99
100 {% endblock content %}