diff --git a/ippisite/db.sqlite3 b/ippisite/db.sqlite3 index bb7ca110e188bf4d34171a62e5c4e6f6eda80691..54ce807e6aa9dacb5042158a9d03fbb8b299edf6 100644 Binary files a/ippisite/db.sqlite3 and b/ippisite/db.sqlite3 differ diff --git a/ippisite/ippidb/forms.py b/ippisite/ippidb/forms.py index 6c83082fd0c98373d0ae7fa95909b5e3f4fec84d..955a5f723bce8600bb86e28d87dc9b057c4b7255 100644 --- a/ippisite/ippidb/forms.py +++ b/ippisite/ippidb/forms.py @@ -19,6 +19,46 @@ class ProteinForm(ModelForm): model = Protein exclude = ['recommended_name_long', 'short_name'] + +ARCHI_TYPE = ( + ('inhibited', 'Inhibited'), + ('stabilized', 'Stabilized'), + ) + +INHIBITED_CHOICES = ( + ('Hetero2merAB','Hetero 2-mer AB'), + ('Homo2merA2','Homo 2-mer A2'), + ('custom', 'Custom your own'), + ) + +STABILIZED_CHOICES = ( + ('Hetero2merAB','Hetero 2-mer AB'), + ('Homo2merA2','Homo 2-mer A2'), + ('HomoLike2mer','Homo-Like 2-mer A2'), + ('Homo3merA3','Homo 3-mer A3'), + ('Homo3merA2','Homo 3-mer A3 inhibited A2-dimer'), + ('Homo4merA4','Homo 4-mer A4'), + ('RingHomo3mer','Ring-Like 3-mer A3'), + ('RingHomo5mer','Ring-Like 5-mer A5'), + ('custom', 'Custom your own'), + ) + +class ProteinDomainComplexTypeForm(forms.Form): + archi = forms.CharField( + label="PPI Architecture Type", + widget=forms.Select( + choices=ARCHI_TYPE) + ) + inhibited = forms.MultipleChoiceField( + widget=forms.CheckboxSelectMultiple, + choices=INHIBITED_CHOICES, + ) + + stabilized = forms.MultipleChoiceField( + widget=forms.CheckboxSelectMultiple, + choices=STABILIZED_CHOICES, + ) + class ProteinDomainComplexForm(ModelForm): class Meta: model = ProteinDomainComplex diff --git a/ippisite/ippidb/static/css/ippidb.css b/ippisite/ippidb/static/css/ippidb.css index b4fff45473265b909c1eca9202878d89b0181280..96c4f2abb6bc02b969170c62499494b2f16f3f58 100644 --- a/ippisite/ippidb/static/css/ippidb.css +++ b/ippisite/ippidb/static/css/ippidb.css @@ -439,8 +439,8 @@ text-align: center; /* -- Page Header -- */ .adv-page__header{ - margin-left: -50px; - margin-right: -50px; +margin-left: -50px; +margin-right: -50px; box-shadow: 0px 0px 0px 1500px rgba(0, 0, 0, 0.1) inset; min-height: 260px; line-height: 260px; @@ -604,7 +604,7 @@ display:block; } form { - width : 400px; + width : 80%; } button, input, select, textarea { @@ -625,17 +625,32 @@ button, input, select, textarea { background-color: #2d96fa; border: none; color: #fff; - width: inherit; } -.step { - width: 20%; +#step { + width: 80%; +} + +#step ul{ + text-align: center; +} + +#step li { + display: inline; +} + +#step button { + width: 156px; background-color: rgb(0, 0, 0); color: rgb(255, 255, 255); - padding-left: 15px; font-family: "PlayfairDisplayReg"; - font-size: 24px; - display: block; + font-size: 22px; + display: inline-block; +} + +#step button.no_active { + background-color: #E3E9EB; + color:#8D8888; } .step_desc { diff --git a/ippisite/ippidb/static/fonts.zip b/ippisite/ippidb/static/fonts.zip new file mode 100644 index 0000000000000000000000000000000000000000..56d174fa61d0ee205eca9022b13c9525ed095c02 Binary files /dev/null and b/ippisite/ippidb/static/fonts.zip differ diff --git a/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Hetero2merApo.png b/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Hetero2merApo.png new file mode 100644 index 0000000000000000000000000000000000000000..538f16f92fe138fe5993caebd7d10d99ff1f3f81 Binary files /dev/null and b/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Hetero2merApo.png differ diff --git a/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Hetero2merHolo.png b/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Hetero2merHolo.png new file mode 100644 index 0000000000000000000000000000000000000000..24accb7d969376b823d2dae387cf5cc347a41f54 Binary files /dev/null and b/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Hetero2merHolo.png differ diff --git a/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Homo2merApo.png b/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Homo2merApo.png new file mode 100644 index 0000000000000000000000000000000000000000..e614e3ee2288eda5d414feba6ea793f1f9137bc3 Binary files /dev/null and b/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Homo2merApo.png differ diff --git a/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Homo2merHolo.png b/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Homo2merHolo.png new file mode 100644 index 0000000000000000000000000000000000000000..75ec59ad5c08e635c0a376bc5aa06f6606e3bd2b Binary files /dev/null and b/ippisite/ippidb/static/images/DimericsPPI/Inhibited/Homo2merHolo.png differ diff --git a/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Hetero2merApo.png b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Hetero2merApo.png new file mode 100644 index 0000000000000000000000000000000000000000..3e8454bb488976a8f8093b7b233eb245fa40736e Binary files /dev/null and b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Hetero2merApo.png differ diff --git a/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Hetero2merHolo.png b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Hetero2merHolo.png new file mode 100644 index 0000000000000000000000000000000000000000..d24922087ba4e714eaa96656c1695af9d35e9c97 Binary files /dev/null and b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Hetero2merHolo.png differ diff --git a/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Homo2merApo.png b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Homo2merApo.png new file mode 100644 index 0000000000000000000000000000000000000000..f0b992316412241a28696b75fb31e8f514cbd2d6 Binary files /dev/null and b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Homo2merApo.png differ diff --git a/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Homo2merHolo.png b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Homo2merHolo.png new file mode 100644 index 0000000000000000000000000000000000000000..919817912121536f241c89a1190d6be7cc6b36ab Binary files /dev/null and b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/Homo2merHolo.png differ diff --git a/ippisite/ippidb/static/images/DimericsPPI/Stabilized/HomoLike2merApo.png b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/HomoLike2merApo.png new file mode 100644 index 0000000000000000000000000000000000000000..8c95fbb5c993e3d78956f9760b90a6ffc5ada633 Binary files /dev/null and b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/HomoLike2merApo.png differ diff --git a/ippisite/ippidb/static/images/DimericsPPI/Stabilized/HomoLike2merHolo.png b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/HomoLike2merHolo.png new file mode 100644 index 0000000000000000000000000000000000000000..eaa01b41c1401a229036aac2f239922e452a60f5 Binary files /dev/null and b/ippisite/ippidb/static/images/DimericsPPI/Stabilized/HomoLike2merHolo.png differ diff --git a/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merApo.png b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merApo.png new file mode 100644 index 0000000000000000000000000000000000000000..b957ce83fe617338433c17f070bd2800729ffb3e Binary files /dev/null and b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merApo.png differ diff --git a/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merHolo.png b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merHolo.png new file mode 100644 index 0000000000000000000000000000000000000000..710b9d4c3b4fed30914a2e5a4e27057d366358c2 Binary files /dev/null and b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merHolo.png differ diff --git a/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merInhibitedApo.png b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merInhibitedApo.png new file mode 100644 index 0000000000000000000000000000000000000000..a6713ab6587fb0cf8cb064ca81da2e23401d8c96 Binary files /dev/null and b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merInhibitedApo.png differ diff --git a/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merInhibitedHolo.png b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merInhibitedHolo.png new file mode 100644 index 0000000000000000000000000000000000000000..896b9af2ac0832ae0f4bf10ac3a24bb9e457065b Binary files /dev/null and b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo3merInhibitedHolo.png differ diff --git a/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo4merApo.png b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo4merApo.png new file mode 100644 index 0000000000000000000000000000000000000000..b3f702b9b8f43fab3c7708cb11962da2ff6b7b51 Binary files /dev/null and b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo4merApo.png differ diff --git a/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo4merHolo.png b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo4merHolo.png new file mode 100644 index 0000000000000000000000000000000000000000..3d8abdbf6cbb7e7421d2a400a65d3653c07c98f6 Binary files /dev/null and b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/Homo4merHolo.png differ diff --git a/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo3merApo.png b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo3merApo.png new file mode 100644 index 0000000000000000000000000000000000000000..295811d10b67733590499f8b6b4262af85885c15 Binary files /dev/null and b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo3merApo.png differ diff --git a/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo3merHolo.png b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo3merHolo.png new file mode 100644 index 0000000000000000000000000000000000000000..09b2f10afbc8dbddcc037936f97313f59575772f Binary files /dev/null and b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo3merHolo.png differ diff --git a/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo5merApo.png b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo5merApo.png new file mode 100644 index 0000000000000000000000000000000000000000..785840de1de4592ea995f8ebdcbc078d62f606af Binary files /dev/null and b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo5merApo.png differ diff --git a/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo5merHolo.png b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo5merHolo.png new file mode 100644 index 0000000000000000000000000000000000000000..af15684b19504a7a3bc57aab2964da43d477983b Binary files /dev/null and b/ippisite/ippidb/static/images/MultimericPPI/Stabilized/RingLikeHomo5merHolo.png differ diff --git a/ippisite/ippidb/static/images/Other/Plus.png b/ippisite/ippidb/static/images/Other/Plus.png new file mode 100644 index 0000000000000000000000000000000000000000..3726d3e314ccb7c3e948171be5bd96293090c455 Binary files /dev/null and b/ippisite/ippidb/static/images/Other/Plus.png differ diff --git a/ippisite/ippidb/static/js/ippidb.js b/ippisite/ippidb/static/js/ippidb.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ippisite/ippidb/templates/BibliographyForm.html b/ippisite/ippidb/templates/BibliographyForm.html index 7838aa76bd7665a0e8681d0c9714b8160a3e04de..55d086157f909ebb1ecfb4880f695b71809874f5 100644 --- a/ippisite/ippidb/templates/BibliographyForm.html +++ b/ippisite/ippidb/templates/BibliographyForm.html @@ -2,7 +2,16 @@ {% load i18n %} {% block form %} -<div class="step">{{ wizard.steps.step1 }}. Bibliography </div> +<nav id="step"> + <ul> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "ID" %}</button></li> + <li><button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "Bibliography" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit">{% trans "PDB id" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit">{% trans "Proteins" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit">{% trans "Architecture" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit">{% trans "PPI" %}</button></li> + </ul> +</nav> <div id="Form"> <div class="step_desc"> <p>Based on the ID you have provided, we have iden2fied the following informa2on concerning your bibliographic source. @@ -26,9 +35,8 @@ Please check that the information below is correct (Title, authors etc. ) and an {% endif %} </table> {% if wizard.steps.prev %} - <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button> - <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button> + {% endif %} - <input type="submit" value="{% trans "submit" %}"/> + <input type="submit" value="{% trans "Next step" %}"/> </div> {% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/IdForm.html b/ippisite/ippidb/templates/IdForm.html index ff7e265529195634207f557d0177cd9b34c6c871..33019cd7a989a531fe0bcab2ce8a6f5d2cf02703 100644 --- a/ippisite/ippidb/templates/IdForm.html +++ b/ippisite/ippidb/templates/IdForm.html @@ -2,7 +2,16 @@ {% load i18n %} {% block form %} -<div class="step">{{ wizard.steps.step1 }}. Id </div> +<nav id="step"> + <ul> + <li><button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "ID" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit">{% trans "Bibliography" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step2 }}">{% trans "PDB id" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step3 }}">{% trans "Proteins" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step4 }}">{% trans "Architecture" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step5 }}">{% trans "PPI" %}</button></li> + </ul> +</nav> <div id="Form"> <div class="step_desc"> <p> Please provide a valid ID for your bibliographic source, either a PubMed ID or WIPO ID. This ID should correspond to a bibliographic source in its final format. Therefore, PubMed articles in « Just Accepted » format should not be used as a source of data as they are not considered the official version of record. </p> @@ -24,10 +33,6 @@ {{ wizard.form }} {% endif %} </table> -{% if wizard.steps.prev %} - <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button> - <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button> -{% endif %} - <input type="submit" value="{% trans "submit" %}"/> + <input type="submit" value="{% trans "Next step" %}"/> </div> {% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/PDBForm.html b/ippisite/ippidb/templates/PDBForm.html index f0dc266fed4d20205007694ec1b0290569b95091..4a3a8e6dde4932a0ba1e320079d4020aa7fca2ce 100644 --- a/ippisite/ippidb/templates/PDBForm.html +++ b/ippisite/ippidb/templates/PDBForm.html @@ -2,7 +2,16 @@ {% load i18n %} {% block form %} -<div class="step">{{ wizard.steps.step1 }}. PDB id </div> +<nav id="step"> + <ul> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "ID" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "Bibliography" %}</button></li> + <li><button name="wizard_goto_step" type="submit" value="{{ wizard.steps.step2 }}">{% trans "PDB id" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step3 }}">{% trans "Proteins" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step4 }}">{% trans "Architecture" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step5 }}">{% trans "PPI" %}</button></li> + </ul> +</nav> <div id="Form"> <div class="step_desc"> <p>Please provide a valid PDB code that contains the structure of the full PPI complex for which you have data. If you have several PDB codes please list them all as they may contain information about homologous protein partners. The information within the PDB file will be used to prefill information of the corresponding proteins and domains participating to the PPI.</p> @@ -24,10 +33,6 @@ {{ wizard.form }} {% endif %} </table> -{% if wizard.steps.prev %} - <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button> - <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button> -{% endif %} - <input type="submit" value="{% trans "submit" %}"/> + <input type="submit" value="{% trans "Next step" %}"/> </div> {% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/PpiForm.html b/ippisite/ippidb/templates/PpiForm.html index 047deb959ba2375b28f3f94c53d6f12c825b99b5..367fe5049de8c8a6fee6e7753282e07115b4c889 100644 --- a/ippisite/ippidb/templates/PpiForm.html +++ b/ippisite/ippidb/templates/PpiForm.html @@ -2,7 +2,16 @@ {% load i18n %} {% block form %} -<div class="step">{{ wizard.steps.step1 }}. PPI </div> +<nav id="step"> + <ul> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "ID" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "Bibliography" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step2 }}">{% trans "PDB id" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step3 }}">{% trans "Proteins" %}</button></li> + <li><button name="wizard_goto_step" type="submit" value="{{ wizard.steps.step4 }}">{% trans "Architecture" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step5 }}">{% trans "PPI" %}</button></li> + </ul> +</nav> <div id="Form"> <div class="step_desc"> <p>Now that you have created ALL complexes that participate to the formation of the PPI, you need to constuct your PPI by selecting your complex bound and if necessary you partner complex along with their stoichiometry in the PPI.</p> diff --git a/ippisite/ippidb/templates/ProteinDomainComplexForm.html b/ippisite/ippidb/templates/ProteinDomainComplexForm.html index 9a210d4de9e3b1bd2a7b0083f8b850caa7ff9861..a0a2bc90169e59d74a3066a008bb4f09eae8a6da 100644 --- a/ippisite/ippidb/templates/ProteinDomainComplexForm.html +++ b/ippisite/ippidb/templates/ProteinDomainComplexForm.html @@ -2,10 +2,21 @@ {% load i18n %} {% block form %} -<div class="step">{{ wizard.steps.step1 }}. Proteins </div> +<nav id="step"> + <ul> + <li><button class="no_active" name="wizard_goto_step" type="button" value="{{ wizard.steps.first }}">{% trans "ID" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="button" value="{{ wizard.steps.prev }}">{% trans "Bibliography" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="button" value="{{ wizard.steps.step2 }}">{% trans "PDB id" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="button" value="{{ wizard.steps.step3 }}">{% trans "Proteins" %}</button></li> + <li><button name="wizard_goto_step" type="button" value="{{ wizard.steps.step4 }}">{% trans "Architecture" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="button" value="{{ wizard.steps.step5 }}">{% trans "PPI" %}</button></li> + </ul> +</nav> + <div id="Form"> <div class="step_desc"> - <p>Based on the PDB code(s) you have provided, we have identified a list of proteins and PFAM domains that may participate to the PPI. Please select ALL the proteins and PFAM domains that do participate to the formation of the full PPI complex.</p> + <p>Now that you have listed ALL proteins and PFAM domains that participate to the PPI, you need to select an architecture for this PPI complex among the proposed schematics below.</br> +If your PPI complex is not among them, please select « Create you Own »</p> </div> <form action="" method="post"> {% csrf_token %} @@ -25,9 +36,8 @@ {% endif %} </table> {% if wizard.steps.prev %} - <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "first step" %}</button> - <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">{% trans "previous step" %}</button> + {% endif %} - <input type="submit" value="{% trans "submit" %}"/> + <input type="submit" value="{% trans "Next step" %}"/> </div> {% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/ProteinDomainComplexTypeForm.html b/ippisite/ippidb/templates/ProteinDomainComplexTypeForm.html new file mode 100644 index 0000000000000000000000000000000000000000..cfe89bea89acbd0f2fc6f13b70186e25ffc2c252 --- /dev/null +++ b/ippisite/ippidb/templates/ProteinDomainComplexTypeForm.html @@ -0,0 +1,56 @@ +{% extends "add.html" %} +{% load i18n %} + +{% block form %} +<nav id="step"> + <ul> + <li><button class="no_active" name="wizard_goto_step" type="button" value="{{ wizard.steps.first }}">{% trans "ID" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="button" value="{{ wizard.steps.prev }}">{% trans "Bibliography" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="button" value="{{ wizard.steps.step2 }}">{% trans "PDB id" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="button" value="{{ wizard.steps.step3 }}">{% trans "Proteins" %}</button></li> + <li><button name="wizard_goto_step" type="button" value="{{ wizard.steps.step4 }}">{% trans "Architecture" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="button" value="{{ wizard.steps.step5 }}">{% trans "PPI" %}</button></li> + </ul> +</nav> + +<div id="Form"> + <div class="step_desc"> + <p>Now that you have listed ALL proteins and PFAM domains that participate to the PPI, you need to select an architecture for this PPI complex among the proposed schematics below.</br> +If your PPI complex is not among them, please select « Create you Own »</p> + </div> + <form action="" method="post"> + {% csrf_token %} + <table> + {{ wizard.management_form }} + {{ wizard.form.errors}} + {{ wizard.form.non_field_errors}} + {% block custom_form %}{% endblock %} + </form> +{% if wizard.form.forms %} + {{ wizard.form.management_form }} + {% for form in wizard.form.forms %} + <td>{{form.archi_type}}</td> + <td>{{form.inhibited_type}}</td> + {% endfor %} +{% else %} + <script type="text/javascript"> + function Hide (){ + if(document.getElementById('archi').value == 'inhibited'){ + document.getElementById('inhibited').style.display = 'block'; + document.getElementById('stabilized').style.display = ''; + } else { + document.getElementById('inhibited').style.display = ''; + document.getElementById('stabilized').style.display = 'block'; + } + } + ; + </script> + <div id='archi' name='archi' onclick='Hide ()'>{{ wizard.form.archi }}</div> + <div id='inhibited' name='inhibited'>{{ wizard.form.inhibited }}</div> + <div id='stabilized' name= 'stabilized'>{{ wizard.form.stabilized }}</div> + </div> +{% endif %} +</table> + <input type="submit" value="{% trans "Next step" %}"/> +</div> +{% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/templates/ProteinForm.html b/ippisite/ippidb/templates/ProteinForm.html new file mode 100644 index 0000000000000000000000000000000000000000..9609d2b69067a0b78c6e91448188f264b2533353 --- /dev/null +++ b/ippisite/ippidb/templates/ProteinForm.html @@ -0,0 +1,38 @@ +{% extends "add.html" %} +{% load i18n %} + +{% block form %} +<nav id="step"> + <ul> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">{% trans "ID" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit">{% trans "Bibliography" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step2 }}">{% trans "PDB id" %}</button></li> + <li><button name="wizard_goto_step" type="submit" value="{{ wizard.steps.step3 }}">{% trans "Proteins" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step4 }}">{% trans "Architecture" %}</button></li> + <li><button class="no_active" name="wizard_goto_step" type="submit" value="{{ wizard.steps.step5 }}">{% trans "PPI" %}</button></li> + </ul> +</nav> +<div id="Form"> + <div class="step_desc"> + <p> Based on the PDB code(s) you have provided, we have identified a list of proteins and PFAM domains that may participate to the PPI. Please select ALL the proteins and PFAM domains that do participate to the formation of the full PPI complex. </p> + </div> + <form action="" method="post"> + {% csrf_token %} + <table> + {{ wizard.management_form }} + {{ wizard.form.errors}} + {{ wizard.form.non_field_errors}} + {% block custom_form %}{% endblock %} + </form> +{% if wizard.form.forms %} + {{ wizard.form.management_form }} + {% for form in wizard.form.forms %} + {{ form }} + {% endfor %} +{% else %} + {{ wizard.form }} +{% endif %} +</table> + <input type="submit" value="{% trans "Next step" %}"/> +</div> +{% endblock %} \ No newline at end of file diff --git a/ippisite/ippidb/urls.py b/ippisite/ippidb/urls.py index e5e4269b6d3d0819b40587abd234b3e06c9f7eb8..076c66c281f07fd0c6e750317fb37e51f6f31c6f 100644 --- a/ippisite/ippidb/urls.py +++ b/ippisite/ippidb/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import include,url from . import views -from ippidb.forms import IdForm, BibliographyForm,PDBForm,ProteinDomainComplexForm,PpiForm +from ippidb.forms import IdForm, BibliographyForm,PDBForm,ProteinDomainComplexTypeForm,ProteinDomainComplexForm,PpiForm from ippidb.views import IppiWizard,FORMS urlpatterns = [ diff --git a/ippisite/ippidb/views.py b/ippisite/ippidb/views.py index 4f04a07065646bfd3c5b95ac742c9c3e6dfabad0..b1c7b5c5e671a996f3808fd09856a9ef43a28e1f 100644 --- a/ippisite/ippidb/views.py +++ b/ippisite/ippidb/views.py @@ -2,7 +2,7 @@ import ippidb from django.shortcuts import render from django.http import HttpResponseRedirect from formtools.wizard.views import SessionWizardView -from .forms import IdForm, BibliographyForm, PDBForm, ProteinForm, ProteinDomainComplexForm, PpiForm +from .forms import IdForm, BibliographyForm, PDBForm, ProteinForm, ProteinDomainComplexTypeForm, ProteinDomainComplexForm, PpiForm def index(request): return render(request, 'index.html') @@ -41,12 +41,16 @@ def add(request): FORMS = [("IdForm", ippidb.forms.IdForm), ("BibliographyForm", ippidb.forms.BibliographyForm), ("PDBForm", ippidb.forms.PDBForm), + ("ProteinForm",ippidb.forms.ProteinForm), + ("ProteinDomainComplexTypeForm", ippidb.forms.ProteinDomainComplexTypeForm), ("ProteinDomainComplexForm", ippidb.forms.ProteinDomainComplexForm), ("PpiForm", ippidb.forms.PpiForm)] TEMPLATES = {"IdForm": "IdForm.html", "BibliographyForm": "BibliographyForm.html", "PDBForm": "PDBForm.html", + "ProteinForm": "ProteinForm.html", + "ProteinDomainComplexTypeForm":"ProteinDomainComplexTypeForm.html", "ProteinDomainComplexForm": "ProteinDomainComplexForm.html", "PpiForm": "PpiForm.html"}