diff options
author | Sawyer Bergeron <sawyerbergeron@gmail.com> | 2019-01-04 09:38:43 -0500 |
---|---|---|
committer | Sawyer Bergeron <sawyerbergeron@gmail.com> | 2019-01-04 09:38:43 -0500 |
commit | 18ea74d35cab34b5e1c1e1c8bf4f8e1c9af79a51 (patch) | |
tree | edd18849838a8caee955e88c283f1cc20fb3e141 /src | |
parent | b3fd0140ac4096a37beab1b9ec135a178503f9c7 (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 'src')
-rw-r--r-- | src/templates/dashboard/landing.html | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/templates/dashboard/landing.html b/src/templates/dashboard/landing.html index 867477a..71d2706 100644 --- a/src/templates/dashboard/landing.html +++ b/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"> |