Skip to content

Commit

Permalink
Merge pull request #207 from biocore/st_dh_issue_144
Browse files Browse the repository at this point in the history
St dh issue 144
  • Loading branch information
wasade committed Jun 12, 2020
2 parents 1578272 + f29332a commit 15300b6
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 354 deletions.
81 changes: 23 additions & 58 deletions microsetta_private_api/templates/error.jinja2
Original file line number Diff line number Diff line change
@@ -1,58 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Microsetta Error Page</title>
<link rel="stylesheet" href="/static/vendor/bootstrap-4.4.1-dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="/static/css/minimal_interface.css" />
</head>
<body>
<a href="https://microsetta.ucsd.edu" title="microsetta.ucsd.edu">
<img src="/static/img/logo-co.png" class="resize"/>
<br />
<br />
Return to microsetta.ucsd.edu
</a>
<br />
<br />

<div class="content">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/home">Home</a></li>
</ol>
</nav>
<div>
<a href="{{authrocket_url}}/logout?redirect_uri={{endpoint}}/logout">Log Out</a>
</div>
<div class="container">
<p>
An error seemed to have occurred (see below). It is most likely our fault.
We are actively modifying our infrastructure to support COVID-19 research,
and we’re still in the process of handling the different type of scenarios
that can happen on a website. We apologize for any inconvenience.
</p>
<p>
If you have any concerns, please email us at <a href="{{ mailto_url }}">microsetta@ucsd.edu</a>
and please note the error below.
</p>
<strong>Error:</strong>
<br/>
<pre>{{ error_msg }}</pre>
</div>
</div>
<div>
<br />
<p>
Questions? Check our <a href="/view_faq" target="_blank">FAQ</a>!
</p>
<p>
We are in the process of revising the site and
apologize for any inconvenience.
Please contact
<a href="mailto:microsetta@ucsd.edu">microsetta@ucsd.edu</a>
for help.
</p>
</div>
</body>
</html>
{% extends "sitebase.jinja2" %}
{% set page_title = "Error Page" %}
{% set show_breadcrumbs = True %}
{% set show_logout = True %}
{% block head %}
{% endblock %}
{% block breadcrumb %}
{% endblock %}
{% block content %}
<p>
An error seemed to have occurred (see below). It is most likely our fault.
We are actively modifying our infrastructure to support COVID-19 research,
and we’re still in the process of handling the different type of scenarios
that can happen on a website. We apologize for any inconvenience.
</p>
<p>
If you have any concerns, please email us at <a href="{{ mailto_url }}">microsetta@ucsd.edu</a>
and please note the error below.
</p>
<strong>Error:</strong>
<br/>
<pre>{{ error_msg }}</pre>
{% endblock %}
3 changes: 2 additions & 1 deletion microsetta_private_api/templates/faq.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends "sitebase.jinja2" %}
{% set page_title = "Frequently Asked Questions" %}
{% set show_breadcrumbs = True %}
{% set show_breadcrumbs = False %}
{% set disable_faq = True %}
{% block head %}
<script src="/static/vendor/js/jquery-3.4.1.min.js"></script>
<script>
Expand Down
111 changes: 40 additions & 71 deletions microsetta_private_api/templates/home.jinja2
Original file line number Diff line number Diff line change
@@ -1,81 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Microsetta Account</title>
<link rel="stylesheet" href="/static/vendor/bootstrap-4.4.1-dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="/static/css/minimal_interface.css" />
</head>
<body>
<a href="https://microsetta.ucsd.edu" title="microsetta.ucsd.edu">
<img src="/static/img/logo-co.png" class="resize"/>
<br />
<br />
Return to microsetta.ucsd.edu
</a>
<br />
<br />
{% extends "sitebase.jinja2" %}
{% set page_title = "Home" %}
{% set show_breadcrumbs = True %}
{% set show_logout = False %}
{% set is_home = True %}
{% block head %}
{% endblock %}

<div class="content">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item active" aria-current="page">Home</li>
</ol>
</nav>

{% if user %}
{% block content %}
{% if user %}
<div>
<a href="{{authrocket_url}}/logout?redirect_uri={{endpoint}}/logout">Log Out</a>
<div class="container">
{% if email_verified %}
<div class="list-group">
</div>
{% if email_verified %}
<div class="list-group">
{% if accounts|length > 0 %}
{% for account in accounts %}
<a href="/accounts/{{ account.account_id }}" class="list-group-item list-group-item-action">{{ account.email }}'s account</a>
{% endfor %} <!-- end of for account in accounts -->
{% else %}
<a href="/create_account" class="list-group-item list-group-item-action">
Click here to create a new account...
</a>
{% endif %}
</div>
{% else %}
<p>
It appears that your email has not yet been verified.
Please check your email account (and spam folder) for a verification email
from "The Microsetta Initiative" and follow its instructions.
This email will come from our authentication service AuthRocket,
and use the email address "noreply@loginrocket.com".
</p>
<p>
If you cannot locate the original verification email, have it resent by
clicking <a href = "{{ authrocket_url }}/profile">here</a> to view your AuthRocket profile and then
clicking the "resend verification email" link.
</p>
<p>
<button class = "btn btn-primary" onclick="window.location.replace('{{authrocket_url}}/login?redirect_uri={{endpoint}}/authrocket_callback');">
Refresh
</button>
</p>
{% endif %}
</div>
{% else %}
You are not logged in. Please click to either: <br/>
<a href="{{authrocket_url}}/login?redirect_uri={{endpoint}}/authrocket_callback">Log In</a> or
<a href="/signup_intermediate">Sign Up</a>
Click here to create a new account...
</a>
{% endif %}
</div>
<div>
<br />
<p>
Questions? Check our <a href="/view_faq" target="_blank">FAQ</a>!
</p>
<p>
We are in the process of revising the site and
apologize for any inconvenience.
Please contact
<a href="mailto:microsetta@ucsd.edu">microsetta@ucsd.edu</a>
for help.
</p>
</div>
</body>
</html>
{% else %}
<p>
It appears that your email has not yet been verified.
Please check your email account (and spam folder) for a verification email
from "The Microsetta Initiative" and follow its instructions.
This email will come from our authentication service AuthRocket,
and use the email address "noreply@loginrocket.com".
</p>
<p>
If you cannot locate the original verification email, have it resent by
clicking <a href = "{{ authrocket_url }}/profile">here</a> to view your AuthRocket profile and then
clicking the "resend verification email" link.
</p>
<p>
<button class = "btn btn-primary" onclick="window.location.replace('{{authrocket_url}}/login?redirect_uri={{endpoint}}/authrocket_callback');">
Refresh
</button>
</p>
{% endif %}
{% else %}
You are not logged in. Please click to either: <br/>
<a href="{{authrocket_url}}/login?redirect_uri={{endpoint}}/authrocket_callback">Log In</a> or
<a href="/signup_intermediate">Sign Up</a>
{% endif %}
{% endblock %}
4 changes: 3 additions & 1 deletion microsetta_private_api/templates/new_participant.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@
}
</style>
{% endblock %}

{% block breadcrumb %}
<li class="breadcrumb-item active" aria-current="page">Consent</li>
{% endblock %}
{% block content%}
<h2>{{ tl['ADD_HUMAN_TITLE'] |e}}</h2>
{% if message %}
Expand Down
9 changes: 8 additions & 1 deletion microsetta_private_api/templates/sitebase.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
{% if show_breadcrumbs %}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
{% if is_home %}
<li class="breadcrumb-item active" aria-current="page">Home</li>
{% else %}
<li class="breadcrumb-item"><a href="/home">Home</a></li>
{% endif %}
{%block breadcrumb%}
{%endblock%}
</ol>
Expand All @@ -61,7 +65,8 @@
<a href="{{authrocket_url}}/logout?redirect_uri={{endpoint}}/logout">Log Out</a>
</div>
{% endif %}
<div class="container">
<!-- Vue Form Generator references a container named "app" -->
<div class="container" id="app">
{%block content%}
{%endblock%}
</div>
Expand All @@ -71,9 +76,11 @@
{% if not admin_mode %}
<div>
<br />
{% if not disable_faq %}
<p>
Questions? Check our <a href="/view_faq" target="_blank">FAQ</a>!
</p>
{% endif %}
<p>
We are in the process of revising the site and
apologize for any inconvenience.
Expand Down

0 comments on commit 15300b6

Please sign in to comment.