Fix Multiple Select Filter Widget
[pharos-tools.git] / dashboard / src / templates / dashboard / landing.html
1 {% extends "base.html" %}
2 {% load staticfiles %}
3
4 {% block content %}
5     <div class="">
6         {% if not request.user.is_anonymous %}
7         {% if not request.user.userprofile.ssh_public_key %}
8         <h4 style="text-align: center; background: #AA0000; color: #FFFFFF; padding: 10px; border-radius: 3px; height: 40px;">
9             Warning: you need to upload an ssh key under <a href="/accounts/settings">account settings</a> if you wish to log into the servers you book
10         </h4>
11         {% endif %}
12             <p style="text-align:center;">Welcome to the Pharos Dashboard! To get started, select one of the options below:</p>
13         {% else %}
14             <p style="text-align:center;">Welcome to the Pharos Dashboard! To get started, please log in with your <a href="/accounts/login">Linux Foundation Jira account</a></p>
15         {% endif %}
16     </div>
17 {% csrf_token %}
18
19 <style>
20     .wf_create{
21         display: inline-block;
22         text-align: center;
23     }
24     .wf_create_div{
25         text-align: center;
26     }
27     .hidden_form{
28         display: none;
29     }
30
31     .panel {
32         border: none;
33     }
34
35     .panels {
36         display: grid;
37         grid-template-columns: 33% 34% 33%;
38     }
39 </style>
40 {% if not request.user.is_anonymous %}
41 <div class='wf_create_div'>
42 <button class="wf_create btn btn-primary" onclick="cwf(0)">Create a Booking</button>
43 <button class="wf_create btn btn-primary" onclick="cwf(1)">Create a Pod</button>
44 <button class="wf_create btn btn-primary" onclick="cwf(2)">Configure a Pod</button>
45 <button class="wf_create btn btn-primary" onclick="cwf(3)">Create a Snapshot</button>
46 {% if manager == True %}
47 <button class="wf_continue btn btn-primary" onclick="continue_wf()">Finish Unfinished Business</button>
48 {% endif %}
49 {% endif %}
50 </div>
51
52 <script type="text/javascript">
53     function cwf(type)
54     {
55         $.ajax({
56             type: "POST",
57             url: "/",
58             data: {"create":type},
59             beforeSend: function(request) {
60                 request.setRequestHeader("X-CSRFToken",
61                 $('input[name="csrfmiddlewaretoken"]').val()
62                 );
63             }
64
65         }).done(function (data) {
66             window.location.replace("/wf/");
67         }).fail(function(jqxHR, textstatus) {
68             alert("Something went wrong...");});
69     }
70     function continue_wf()
71     {
72         window.location.replace("/wf/");
73     }
74
75 </script>
76
77 <div class="hidden_form" id="form_div">
78     <form method="post" action="" class="form" id="wf_selection_form">
79         {% csrf_token %}
80
81         <input type="hidden" id="landing_action">
82
83         <button type="submit" class="btn btn btn-success">
84             Confirm Edit
85         </button>
86     </form>
87 </div>
88
89 {% block vport_comm %}
90 {% endblock %}
91 {% endblock content %}