Commit 5b50ccb4 authored by Rachel TORCHET's avatar Rachel TORCHET
Browse files

Remove templates and errors from contribute files

parent e672b4a0
Pipeline #30842 failed with stages
in 1 minute and 19 seconds
......@@ -604,7 +604,7 @@ class CompoundForm(forms.Form):
label=_("molecule_smiles_label"),
help_text=_(""),
required=False,
widget=forms.Textarea(attrs={"class": "molecule-composition", "rows": "9", "onkeyup":"showCanvas(this)"}),
widget=forms.Textarea(attrs={"class": "molecule-composition", "rows": "9", "oninput":"showCanvas(this)"}),
)
molecule_iupac = forms.CharField(
label=_("molecule_iupac_label"),
......
......@@ -67,9 +67,11 @@ $(document).ready(function () {
function displayMoleculeCode(Compound) {
var x = document.getElementById('draw_smile-'.concat(Compound));
var y = document.getElementById('smile_button-'.concat(Compound));
var z = document.getElementById('id_'.concat(Compound));
if (x.style.display === "none") {
x.style.display = "flex";
y.className = 'molecule_code_button_active';
showCanvas(z);
} else {
x.style.display = "none";
y.className = 'molecule_code_button';
......
......@@ -219,6 +219,14 @@ function create_bootstrap_multiselect_from_applicant(source) {
}
}).show();
}
function openNav() {
document.getElementById("mySidenav").style.width = "300px";
document.getElementById("main").style.marginLeft = "0px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0px";
document.getElementById("main").style.marginLeft = "0px";
}
$(document).ready(function () {
$("select[multiple].bootstrap-multiselect-applicant").each(function (i, e) {
......
......@@ -3,187 +3,195 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>IPPI-DB {% block title %}{% endblock %}</title>
{% if gacode %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ gacode }}"></script>
<script>
<head>
<title>IPPI-DB {% block title %}{% endblock %}</title>
{% if gacode %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ gacode }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '{{ gacode }}');
</script>
{% endif %}
</script>
{% endif %}
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/css/fonts.css">
<link rel="stylesheet" href="/static/css/main.css">
<link rel="stylesheet" href="/static/css/ippidb.css">
{% block extra_css %}{% endblock %}
<link rel="stylesheet" href="/static/css/ippidb-typeahead.css">
<link rel="stylesheet" href="/static/academicons-1.8.6/css/academicons.min.css"/>
<link rel="stylesheet" href="/static/bootstrap-slider-master/dist/css/bootstrap-slider.min.css">
<link rel="stylesheet" href="https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.3/fonts.css">
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/css/fonts.css">
<link rel="stylesheet" href="/static/css/main.css">
<link rel="stylesheet" href="/static/css/ippidb.css">
{% block extra_css %}{% endblock %}
<link rel="stylesheet" href="/static/css/ippidb-typeahead.css">
<link rel="stylesheet" href="/static/academicons-1.8.6/css/academicons.min.css" />
<link rel="stylesheet" href="/static/bootstrap-slider-master/dist/css/bootstrap-slider.min.css">
<link rel="stylesheet" href="https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.3/fonts.css">
<script src="/static/url-polyfill/url-polyfill.js"></script>
<script src="/static/jquery/jquery-3.3.1.min.js"></script>
<script src="/static/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/static/typeahead/typeahead.bundle.min.js"></script>
<script defer src="/static/font-awesome/js/all.min.js"></script>
<script src="/static/smilesdrawer/smiles-drawer.min.js"></script>
<script src="/static/bootstrap-slider-master/dist/bootstrap-slider.min.js"></script>
<script src="/static/url-polyfill/url-polyfill.js"></script>
<script src="/static/jquery/jquery-3.3.1.min.js"></script>
<script src="/static/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/static/typeahead/typeahead.bundle.min.js"></script>
<script defer src="/static/font-awesome/js/all.min.js"></script>
<script src="/static/smilesdrawer/smiles-drawer.min.js"></script>
<script src="/static/bootstrap-slider-master/dist/bootstrap-slider.min.js"></script>
<script src="/static/js/ippidb.js" type="text/javascript"></script>
<script src="/static/js/ippidb-smilesdrawer.js" type="text/javascript"></script>
<script src="/static/js/ippidb.js" type="text/javascript"></script>
<script src="/static/js/ippidb-smilesdrawer.js" type="text/javascript"></script>
{% block extra_js %}{% endblock %}
{% block extra_js %}{% endblock %}
</head>
</head>
<body {% if debug %}class="debug"{%endif%} style="min-height:100vh; display:flex; flex-direction:column;">
{% if gacode %}
<div id="consent" class="fixed-bottom pl-5 pr-5 pt-2 pb-2 text-light bg-dark text-center">
By using the site you are agreeing to the use of third party cookies for statistical purposes. You can read more about our policy <a href="/about-general/#terms-privacy"><b>here</b></a>.
<button id="consentBtn" class="btn btn-dark ml-2" type="button" aria-label="Accept">Accept
</button>
</div>
<script>
if(localStorage.getItem('consent') == 'true'){
$('#consent').hide();
}
var consent = function(){
localStorage.setItem('consent', 'true');
$('#consent').hide();
}
$('#consentBtn').click(consent);
</script>
{% endif %}
<div class="jumbotron logoJum">
<div class="container">
<a href="/" id="home">
<h1 class="display-3">iPPI-DB</h1>
<p class="lead">Inhibitors of Protein-Protein Interaction Database</p>
</a>
</div><!-- /.container-fluid -->
</div>
<nav class="fixed-top">
<ul class="nav justify-content-end">
{% if user.is_authenticated %}
<li><i class="fas {% if user.is_superuser %}fa-user-shield{% elif perms.ippidb.add_contribution %}fa-user-graduate{% else %}fa-user-circle{% endif %}"></i> {{ user.username }}<a class="ml-2" href="{% url 'logout' %}">logout</a></li>
{% else %}
<li><a href="/accounts/login/"><i class="fas fa-user-circle mr-2" title="Login"></i> LOGIN</a></li>
{% endif %}
</ul>
</nav>
<body {% if debug %}class="debug" {%endif%} style="min-height:100vh; display:flex; flex-direction:column;">
{% if gacode %}
<div id="consent" class="fixed-bottom pl-5 pr-5 pt-2 pb-2 text-light bg-dark text-center">
By using the site you are agreeing to the use of third party cookies for statistical purposes. You can read more
about our policy <a href="/about-general/#terms-privacy"><b>here</b></a>.
<button id="consentBtn" class="btn btn-dark ml-2" type="button" aria-label="Accept">Accept
</button>
</div>
<script>
if (localStorage.getItem('consent') == 'true') {
$('#consent').hide();
}
var consent = function () {
localStorage.setItem('consent', 'true');
$('#consent').hide();
}
$('#consentBtn').click(consent);
</script>
{% endif %}
<div class="jumbotron logoJum">
<div class="container">
<a href="/" id="home">
<h1 class="display-3">iPPI-DB</h1>
<p class="lead">Inhibitors of Protein-Protein Interaction Database</p>
</a>
</div><!-- /.container-fluid -->
</div>
<nav class="fixed-top">
<ul class="nav justify-content-end">
{% if user.is_authenticated %}
<li><i
class="fas {% if user.is_superuser %}fa-user-shield{% elif perms.ippidb.add_contribution %}fa-user-graduate{% else %}fa-user-circle{% endif %}"></i>
{{ user.username }}<a class="ml-2" href="{% url 'logout' %}">logout</a></li>
{% else %}
<li><a href="/accounts/login/"><i class="fas fa-user-circle mr-2" title="Login"></i> LOGIN</a></li>
{% endif %}
</ul>
</nav>
</nav>
<div id="mainnav">
<nav class="main-nav">
<div style="display: inline-block;">
<ul>
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/about-general">About</a>
</li>
<li>
<a href="/compounds">Query compounds</a>
</li>
<li>
<a href="/tutorials">Tutorials</a>
</li>
<li>
<a href="{% url 'admin-session'%}">Contribute</a>
</li>
{% if request.user.is_staff %}
<li>
<a href="/admin">Admin</a>
</li>
{%endif%}
</ul>
</div>
</nav>
<div id="mainnav">
<nav class="main-nav">
<div style="display: inline-block;">
<ul>
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/about-general">About</a>
</li>
<li>
<a href="/compounds">Query compounds</a>
</li>
<li>
<a href="/tutorials">Tutorials</a>
</li>
<li>
<a href="{% url 'admin-session'%}">Contribute</a>
</li>
{% if request.user.is_staff %}
<li>
<a href="/admin">Admin</a>
</li>
{%endif%}
</ul>
</div>
<div id="content">
{% block content %}{% endblock %}
</div> <!-- end main -->
<footer class="main-footer">
<div class="inner-wrap">
<div class="footer__section footer__address">
<div class="footer__logo clearfix">
<img src="https://www.pasteur.fr/sites/all/themes/custom/pasteur/assets/img/pasteur-white.png"
alt="Institut Pasteur" title="Institut Pasteur">
</div>
</nav>
</div>
<div id="content">
{% block content %}{% endblock %}
</div> <!-- end main -->
<footer class="main-footer">
<div class="inner-wrap">
<div class="footer__section footer__address">
<div class="footer__logo clearfix">
<img src="https://www.pasteur.fr/sites/all/themes/custom/pasteur/assets/img/pasteur-white.png" alt="Institut Pasteur" title="Institut Pasteur">
</div>
<div class="block block-block block-block-1">
<div class="content">
<root>
<div class="block block-block block-block-1">
<div class="content">
<root>
<div class="address_street">
<span>25-28 Rue du Dr Roux, 75015 Paris</span>
</div>
<div class="address_phone"><span>01 45 68 80 00</span>
</div>
</root>
</div>
</root>
</div>
</div>
<div class="footer__section footer__menu-1">
<div id="block-menu-menu-footer-menu-1" class="block block-menu">
<nav>
<ul>
<li>
<a href="/about-general">About</a>
</li>
<li>
<a href="/compounds">Query compounds</a>
</li>
<li>
<a href="/tutorials">Tutorials</a>
</li>
<li>
<a href="{% url 'admin-session'%}">{% trans 'Admin_session_title' %}</a>
</li>
</ul>
</nav>
</div>
</div>
<div class="footer__section footer__menu-1">
<div id="block-menu-menu-footer-menu-1" class="block block-menu">
<nav>
<ul>
<li>
<a href="/about-general">About</a>
</li>
<li>
<a href="/compounds">Query compounds</a>
</li>
<li>
<a href="/tutorials">Tutorials</a>
</li>
<li>
<a href="{% url 'admin-session'%}">{% trans 'Admin_session_title' %}</a>
</li>
</ul>
</nav>
</div>
<div class="footer__section footer__menu-social">
<div class="block block-menu block-menu-menu-footer-menu-social">
<nav>
<ul>
<li>
<a href="/credits">Credits</a>
</li>
<li>
<a href="/citation">How to cite?</a>
</li>
<li>
<a href="/news">Latest News</a>
</li>
</ul>
</nav>
</div>
</div>
<div class="footer__section footer__menu-social">
<div class="block block-menu block-menu-menu-footer-menu-social">
<nav>
<ul>
<li>
<a href="/credits">Credits</a>
</li>
<li>
<a href="/citation">How to cite?</a>
</li>
<li>
<a href="/news">Latest News</a>
</li>
</ul>
</nav>
</div>
</div>
</footer>
</div>
</footer>
<div class="modal fade" id="loadingModal" tabindex="-1" role="dialog" aria-labelledby="loadingModal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title update_modal_title" id="exampleModalLabel">Loading...</h5>
</div>
<div class="modal-body">
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 100%"></div>
<div class="modal fade" id="loadingModal" tabindex="-1" role="dialog" aria-labelledby="loadingModal"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title update_modal_title" id="exampleModalLabel">Loading...</h5>
</div>
<div class="modal-body">
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar"
style="width: 100%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
</body>
</html>
\ No newline at end of file
......@@ -14,16 +14,7 @@
<script src="/static/js/compound_list.js"></script>
<script src="/static/js/ippidb-query-url.js" type="text/javascript"></script>
<script>
function openNav() {
document.getElementById("mySidenav").style.width = "300px";
document.getElementById("main").style.marginLeft = "0px";
}
function closeNav() {
document.getElementById("mySidenav").style.width = "0";
document.getElementById("main").style.marginLeft = "0";
}
</script>
{% endblock %}
{% block content %}
......@@ -45,6 +36,12 @@
<div class="container-fluid">
<div class="m-2">
</div>
<script>
localStorage.setItem('mySidenav', 'true');
if (localStorage.getItem('mySidenav') == 'true') {
openNav();
}
</script>
<div id="mySidenav" class="sidenav">
<a href="javascript:void(0)" class="close_btn" onclick="closeNav()">&times; Close</a>
<h1 class="side_menu_title">
......@@ -202,7 +199,7 @@
</div>
<span class="open_filters_btn">
<span onclick="openNav()"><a><i class="fas fa-filter"></i> Open filters</a></span>
<span id="mySidenavBtn" onclick="openNav()"><a><i class="fas fa-filter"></i> Open filters</a></span>
</span>
......@@ -372,6 +369,6 @@
<script>
var queryUrl = new QueryUrl($('#loadingModal'));
</script>
</script>
{% endblock %}
\ No newline at end of file
......@@ -50,10 +50,6 @@
{%for o in testactivitydescription%}
{% include "ippidb/testactivitydescription_card.html" with object=o %}
{%endfor%}
{%for o in testactivityresults%}
<div>test</div>
{% include "ippidb/testactivityresults_card.html" with object=o %}
{%endfor%}
{%for o in testcytotoxdescription%}
{% include "ippidb/testcytotoxdescription_card.html" with object=o %}
{%endfor%}
......
......@@ -599,12 +599,7 @@ def admin_session_view(request, biblio_pk, ppi_pk, contribution_pk=None):
"testcytotoxdescription"
] = bibliography.testcytotoxdescription_set.all()
context["testpkdescription"] = bibliography.testpkdescription_set.all()
<<<<<<< HEAD
=======
context["testactivityresults"] = bibliography.testactivitydescription_set.all()
>>>>>>> 884c28ccea7af44c055407869a491cec205424b3
context["refcompoundbiblio"] = bibliography.refcompoundbiblio_set.all()
if ppi_pk:
ppi = get_object_or_404(models.Ppi, pk=ppi_pk)
if ppi:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment