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