-
Notifications
You must be signed in to change notification settings - Fork 16
/
account_overview.jinja2
140 lines (128 loc) · 5.96 KB
/
account_overview.jinja2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{% extends "sitebase.jinja2" %}
{% set page_title = _("Account") %}
{% set show_breadcrumbs = True %}
{% block head %}
<script src="/static/vendor/js/jquery-3.4.1.min.js"></script>
<script src="/static/vendor/js/jquery.validate.min.js"></script>
<style>
.card-img {
height:46px;
width: auto;
}
.card-title {
font-size: 1.125rem;
font-weight: 700;
}
.center-text {
text-align: center;
}
.info-col {
min-width: 277.5px;
}
.info-card {
border: solid 1px #e5e5e5;
background-color: #eceeef;
min-width: 200px;
}
.source-card {
min-width: 200px;
}
#new-source-title {
text-align: center;
}
</style>
{% endblock %}
{% block breadcrumb %}
<li class="breadcrumb-item active" aria-current="page">{{ _('Dashboard') }}</li>
{% endblock %}
{% block content %}
<div class="container default-container">
{% if sources|length > 0 %}
<h2 class="account-h2">{{ _('Active Profiles') }}</h2>
{% if non_human_sources %}
<p class="tmi-tooltip">{{ _('Please note: animal and environmental profiles are currently unavailable.') }}</p>
{% endif %}
<div class="row mb-5">
{% for source in sources %}
<div class="col-md-4 mb-4">
{% if source.alerts > 0 %}
<div class="card card-profile-alerts">
<img src="/static/img/profile_card_icon.png" class="mx-auto card-profile-icon">
<h2 class="profile-card-h2 mx-auto mt-2 mb-3">{{ source.source_name|e}}</h2>
<div class="alert-updates mx-auto mb-3">
{% if source.alerts > 1 %}
{{ _('You have') }} <span class="orange-text">{{ source.alerts }}</span> {{ _('updates') }}
{% else %}
{{ _('You have') }} <span class="orange-text">{{ source.alerts }}</span> {{ _('update') }}
{% endif %}
<a class="btn btn-orange ms-4" style="width: fit-content;" href="/accounts/{{account.account_id}}/sources/{{ source.source_id|e }}">{{ _('View') }}</a>
</div>
</div>
{% else %}
{% if source.source_type == "animal" %}
<div class="card card-profile">
<img src="/static/img/source_animal.png" class="mx-auto card-profile-icon" width="70px">
<h2 class="profile-card-h2 mx-auto mt-2 mb-4" title="{{ source.source_name|e}}">{{ source.source_name|e}}</h2>
<a class="btn btn-blue-gradient mx-auto" style="width: fit-content; pointer-events: none;" href="#" disabled>
{{ _('Unavailable') }}
</a>
</div>
{% elif source.source_type == "environmental" %}
<div class="card card-profile">
<img src="/static/img/source_environmental.png" class="mx-auto card-profile-icon" width="70px">
<h2 class="profile-card-h2 mx-auto mt-2 mb-4" title="{{ source.source_name|e}}">{{ source.source_name|e}}</h2>
<a class="btn btn-blue-gradient mx-auto" style="width: fit-content; pointer-events: none;" href="#" disabled>
{{ _('Unavailable') }}
</a>
</div>
{% else %}
<div class="card card-profile">
<img src="/static/img/profile_card_icon.png" class="mx-auto card-profile-icon">
<h2 class="profile-card-h2 mx-auto mt-2 mb-4" title="{{ source.source_name|e}}">{{ source.source_name|e}}</h2>
<a class="btn btn-blue-gradient mx-auto" style="width: fit-content;" href="/accounts/{{account.account_id}}/sources/{{ source.source_id|e }}">
{{ _('Go to My Profile') }}
</a>
</div>
{% endif %}
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
<h2 class="account-h2">{{ _('Add New Profile') }}</h2>
<p class="tmi-content">{{ _('Select the type of profile you would like to create.') }}</p>
<div class="card" id="human-source">
<img src="/static/img/source_human.png" class="card-img-top card-img mx-auto mt-3" alt="..."/>
<div class="card-body center-text">
<h2 class="center-text">{{ _('Human Profile') }}</h2>
<p class="center-text tmi-content">{{ _('Share your diet, health, and lifestyle details to help discover more about how this affects the human microbiome.') }}</p>
<a class="btn btn-blue-gradient btn-lg" href="/accounts/{{ account.account_id }}/create_human_source" role="button">{{ _('Add Human Profile') }}</a>
</div>
</div>
<div class="row mt-3">
<div class="col-md-1">
<img src="/static/img/source_animal.png" class="card-img-top card-img mx-auto my-3" alt="..."/>
</div>
<div class="col-md-5">
<h3 class="disabled-source-types">{{ _('Pet Profile') }}</h3>
<p class="small-text disabled-source-types">{{ _('Share sample(s) from an animal (e.g. fecal, saliva, skin, etc.)') }}</p>
<p class="disabled-source-types"><strong>{{ _('Coming Soon') }}</strong></p>
</div>
<div class="col-md-1">
<img src="/static/img/source_environmental.png" class="card-img-top card-img mx-auto my-3" alt="..."/>
</div>
<div class="col-md-5">
<h3 class="disabled-source-types">{{ _('Environment Profile') }}</h3>
<p class="small-text disabled-source-types">{{ _('Share sample(s) from the environment (e.g. kitchen counter, food, etc.)') }}</p>
<p class="disabled-source-types"><strong>{{ _('Coming Soon') }}</strong></p>
</div>
</div>
{% if admin_mode %}
<div class="row mt-3">
<div class="col-12">
<center><h2><a href="/accounts/{{ account.account_id }}/details">{{ _('Account Details') }}</a></h2></center>
</div>
</div>
{% endif %}
</div>
{% endblock %}