about summary refs log tree commit diff
path: root/uploader/templates/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/templates/index.html')
-rw-r--r--uploader/templates/index.html235
1 files changed, 149 insertions, 86 deletions
diff --git a/uploader/templates/index.html b/uploader/templates/index.html
index d6f57eb..e426732 100644
--- a/uploader/templates/index.html
+++ b/uploader/templates/index.html
@@ -1,99 +1,162 @@
 {%extends "base.html"%}
 {%from "flash_messages.html" import flash_all_messages%}
+{%from "macro-forms.html" import add_http_feature_flags%}
 
 {%block title%}Home{%endblock%}
 
 {%block pagetitle%}Home{%endblock%}
 
+{%block extra_breadcrumbs%}{%endblock%}
+
 {%block contents%}
 
+{%macro add_form_buttons()%}
+<div class="row form-buttons">
+  <div class="col">
+    <input type="submit"
+           class="btn btn-primary"
+           value="use selected species" />
+  </div>
+  <div class="col">
+    <a href="{{url_for('species.create_species', return_to='base.index')}}"
+       class="btn btn-outline-primary"
+       title="Create a new species.">Create a new Species</a>
+  </div>
+</div>
+{%endmacro%}
+
+<div class="row">{{flash_all_messages()}}</div>
+
+{%if user_logged_in()%}
+
+<div class="row">
+  <ul class="nav nav-tabs" id="index-actions">
+    <li class="nav-item presentation">
+      <button class="nav-link active"
+              id="upload-data-tab"
+              data-bs-toggle="tab"
+              data-bs-target="#upload-data-content"
+              type="button"
+              role="tab"
+              aria-controls="upload-data-content"
+              aria-selected="false">Upload Data</button></li>
+    <li class="nav-item presentation">
+      <button class="nav-link"
+              id="publications-tab"
+              data-bs-toggle="tab"
+              data-bs-target="#publications-content"
+              type="button"
+              role="tab"
+              aria-controls="publications-content"
+              aria-selected="true">Publications</button></li>
+  </ul>
+</div>
+
 <div class="row">
-  {{flash_all_messages()}}
-  <div class="explainer">
-    <p>Welcome to the <strong>GeneNetwork Data Quality Control and Upload System</strong>. This system is provided to help in uploading your data onto GeneNetwork where you can do analysis on it.</p>
-
-    <p>The sections below provide an overview of what features the menu items on
-      the left provide to you. Please peruse the information to get a good
-      big-picture understanding of what the system provides you and how to get
-      the most out of it.</p>
-
-    {%block extrapageinfo%}{%endblock%}
-
-    <h2>Species</h2>
-
-    <p>The GeneNetwork service provides datasets and tools for doing genetic
-      studies &mdash; from
-      <a href="{{gn2server_intro}}"
-         target="_blank"
-         title="GeneNetwork introduction — opens in a new tab.">
-        its introduction</a>:
-
-      <blockquote class="blockquote">
-        <p>GeneNetwork is a group of linked data sets and tools used to study
-          complex networks of genes, molecules, and higher order gene function
-          and phenotypes. &hellip;</p>
-      </blockquote>
-    </p>
-
-    <p>With this in mind, it follows that the data in the system is centered
-      aroud a variety of species. The <strong>species section</strong> will
-      list the currently available species in the system, and give you the
-      ability to add new ones, if the one you want to work on does not currently
-      exist on GeneNetwork</p>
-
-    <h2>Populations</h2>
-
-    <p>Your studies will probably focus on a particular subset of the entire
-      species you are interested in &ndash; your population.</p>
-    <p>Populations are a way to organise the species data so as to link data to
-      specific know populations for a particular species, e.g. The BXD
-      population of mice (Mus musculus)</p>
-    <p>In older GeneNetwork documentation, you might run into the term
-      <em>InbredSet</em>. Should you run into it, it is a term that we've
-      deprecated that essentially just means the population.</p>
-
-    <h2>Samples</h2>
-
-    <p>These are the samples or individuals (sometimes cases) that were involved
-      in the experiment, and from whom the data was derived.</p>
-
-    <h2>Genotype Data</h2>
-
-    <p>This section will allow you to view and upload the genetic markers for
-      your species, and the genotype encodings used for your particular
-      population.</p>
-    <p>While, technically, genetic markers relate to the species in general, and
-      not to a particular population, the data (allele information) itself
-      relates to the particular population it was generated from &ndash;
-      specifically, to the actual individuals used in the experiment.</p>
-    <p>This is the reason why the genotype data information comes under the
-      population, and will check for the prior existence of the related
-      samples/individuals before attempting an upload of your data.</p>
-
-    <h2>Expression Data</h2>
-
-    <p class="text-danger">
-      <span class="glyphicon glyphicon-exclamation-sign"></span>
-      <strong>TODO</strong>: Document this &hellip;</p>
-
-    <h2>Phenotype Data</h2>
-
-    <p class="text-danger">
-      <span class="glyphicon glyphicon-exclamation-sign"></span>
-      <strong>TODO</strong>: Document this &hellip;</p>
-
-    <h2>Individual Data</h2>
-
-    <p class="text-danger">
-      <span class="glyphicon glyphicon-exclamation-sign"></span>
-      <strong>TODO</strong>: Document this &hellip;</p>
-
-    <h2>RNA-Seq Data</h2>
-
-    <p class="text-danger">
-      <span class="glyphicon glyphicon-exclamation-sign"></span>
-      <strong>TODO</strong>: Document this &hellip;</p>
+  <div class="tab-content" id="upload-data-tabs-content">
+    <div class="tab-pane fade show active"
+         id="upload-data-content"
+         role="tabpanel"
+         aria-labelledby="upload-data-content-tab">
+      <h2 class="heading">Species</h2>
+
+      <p>Select the species you want to work with.</p>
+
+      <form method="GET" action="{{url_for('base.index')}}" class="form-horizontal">
+        {{add_http_feature_flags()}}
+
+        {{add_form_buttons()}}
+
+        {%if species | length != 0%}
+        <div style="margin-top:1em;">
+          <table id="tbl-select-species" class="table compact stripe"
+                 data-species-list='{{species | tojson}}'>
+            <thead>
+              <tr>
+                <th></th>
+                <th>Species Name</th>
+              </tr>
+            </thead>
+
+            <tbody></tbody>
+          </table>
+        </div>
+
+        {%else%}
+
+        <label class="control-label" for="rdo-cant-find-species">
+          <input id="rdo-cant-find-species" type="radio" name="species_id"
+                 value="CREATE-SPECIES" />
+          There are no species to select from. Create the first one.</label>
+
+        <div class="col-sm-offset-10 col-sm-2">
+          <input type="submit"
+                 class="btn btn-primary col-sm-offset-1"
+                 value="continue" />
+        </div>
+
+        {%endif%}
+
+        {{add_form_buttons()}}
+
+      </form>
+    </div>
+
+    <div class="tab-pane fade"
+         id="publications-content"
+         role="tabpanel"
+         aria-labelledby="publications-content-tab">
+      <p>View, edit and delete existing publications, and add new
+        publications by clicking on the button below.</p>
+
+      <a href="{{url_for('publications.index')}}"
+         title="Manage publications."
+         class="btn btn-primary">manage publications</a>
+    </div>
   </div>
 </div>
 
-{%endblock%}
+  {%else%}
+
+  <div class="row">
+    <p>The Genenetwork Uploader (<em>gn-uploader</em>) enables upload of new data
+      into the Genenetwork System. It provides Quality Control over data, and
+      guidance in case you data does not meet the standards for acceptance.</p>
+    <p>
+      <a href="{{authserver_authorise_uri()}}"
+         title="Sign in to the system"
+         class="btn btn-primary">Sign in</a>
+      to get started.</p>
+  </div>
+  {%endif%}
+
+  {%endblock%}
+
+
+
+  {%block sidebarcontents%}
+  {%if view_under_construction%}
+  <div class="row">
+    <p>The data in Genenetwork is related to one species or another. Use the form
+      provided to select from existing species, or click on the
+      "Create a New Species" button if you cannot find the species you want to
+      work with.</p>
+  </div>
+  <div class="row">
+    <form id="frm-quick-navigation">
+      <legend>Quick Navigation</legend>
+      <div class="form-group">
+        <label for="fqn-species-id">Species</label>
+        <select name="species_id">
+          <option value="">Select species</option>
+        </select>
+      </div>
+    </form>
+  </div>
+  {%endif%}
+  {%endblock%}
+
+
+  {%block javascript%}
+  <script type="text/javascript" src="/static/js/species.js"></script>
+  {%endblock%}