summaryrefslogtreecommitdiffstats
path: root/dashboard/src
diff options
context:
space:
mode:
authorSawyer Bergeron <sawyerbergeron@gmail.com>2019-01-04 09:38:43 -0500
committerSawyer Bergeron <sawyerbergeron@gmail.com>2019-01-04 09:38:43 -0500
commitcfca647b4c7f40b1283ffff158be971d953275d8 (patch)
treea152cbb5d4dbb248978f353c28e7b79f6784b225 /dashboard/src
parent676da0a8485b5c380b39857da55eaef9823d9347 (diff)
Fix landing page directions for not-logged-in users
Users will see a more informative landing page that directs them to log in if they have not yet done so, rather than displaying actions they can not yet take and having a required login get triggered later Change-Id: I9812367930665614933551f780f4c6726ff3049c Signed-off-by: Sawyer Bergeron <sawyerbergeron@gmail.com>
Diffstat (limited to 'dashboard/src')
-rw-r--r--dashboard/src/templates/dashboard/landing.html10
1 files changed, 7 insertions, 3 deletions
diff --git a/dashboard/src/templates/dashboard/landing.html b/dashboard/src/templates/dashboard/landing.html
index 867477a..71d2706 100644
--- a/dashboard/src/templates/dashboard/landing.html
+++ b/dashboard/src/templates/dashboard/landing.html
@@ -3,12 +3,16 @@
{% block content %}
<div class="">
+ {% if not request.user.is_anonymous %}
{% if not request.user.userprofile.ssh_public_key %}
<h4 style="text-align: center; background: #AA0000; color: #FFFFFF; padding: 10px; border-radius: 3px; height: 40px;">
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
</h4>
{% endif %}
- <p style="text-align:center;">Welcome to the Pharos Dashboard! To get started, select one of the options below:</p>
+ <p style="text-align:center;">Welcome to the Pharos Dashboard! To get started, select one of the options below:</p>
+ {% else %}
+ <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>
+ {% endif %}
</div>
{% csrf_token %}
@@ -33,6 +37,7 @@
grid-template-columns: 33% 34% 33%;
}
</style>
+{% if not request.user.is_anonymous %}
<div class='wf_create_div'>
<button class="wf_create btn btn-primary" onclick="cwf(0)">Create a Booking</button>
<button class="wf_create btn btn-primary" onclick="cwf(1)">Create a Pod</button>
@@ -41,6 +46,7 @@
{% if manager == True %}
<button class="wf_continue btn btn-primary" onclick="continue_wf()">Finish Unfinished Business</button>
{% endif %}
+{% endif %}
</div>
<script type="text/javascript">
@@ -66,8 +72,6 @@
window.location.replace("/wf/");
}
- //success: window.location.replace("/wf/")
-
</script>
<div class="hidden_form" id="form_div">