diff options
Diffstat (limited to 'uploader/templates')
| -rw-r--r-- | uploader/templates/index2.html | 48 | ||||
| -rw-r--r-- | uploader/templates/species/macro-display-species-card.html | 27 | ||||
| -rw-r--r-- | uploader/templates/species/sui-base.html | 10 | ||||
| -rw-r--r-- | uploader/templates/species/sui-view-species.html | 91 | ||||
| -rw-r--r-- | uploader/templates/sui-base.html (renamed from uploader/templates/base2.html) | 12 | ||||
| -rw-r--r-- | uploader/templates/sui-index.html | 111 |
6 files changed, 241 insertions, 58 deletions
diff --git a/uploader/templates/index2.html b/uploader/templates/index2.html deleted file mode 100644 index 72fea2f..0000000 --- a/uploader/templates/index2.html +++ /dev/null @@ -1,48 +0,0 @@ -{%extends "base2.html"%} -{%from "flash_messages.html" import flash_all_messages%} - -{%block title%}Home{%endblock%} - -{%block pagetitle%}Home{%endblock%} - -{%block extra_breadcrumbs%}{%endblock%} - -{%block contents%} - -<div class="row">{{flash_all_messages()}}</div> - -{%if user_logged_in()%} -<div class="row"> - <p>Select from:</p> - <ul> - <li>Species</li> - <li>Publications</li> - </ul> -</div> -{%else%} -<div class="row"> - <p> - <a href="{{authserver_authorise_uri()}}" - title="Sign in to the system" - class="btn btn-primary">Sign in</a> - to continue.</p> -</div> -{%endif%} - -{%endblock%} - - - -{%block sidebarcontents%} -<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> -{%endblock%} diff --git a/uploader/templates/species/macro-display-species-card.html b/uploader/templates/species/macro-display-species-card.html index 166c7b9..d7c4082 100644 --- a/uploader/templates/species/macro-display-species-card.html +++ b/uploader/templates/species/macro-display-species-card.html @@ -20,3 +20,30 @@ </div> </div> {%endmacro%} + + +{%macro display_sui_species_card(species)%} +<div class="row"> + <table> + <caption>Selected Species</caption> + <tr> + <th>Name</th> + <td>{{species["Name"] | title}}</td> + </tr> + <tr> + <th>Scientific</th> + <td>{{species["FullName"]}}</td> + </tr> + {%if species["TaxonomyId"]%} + <tr> + <th>Taxonomy ID</th> + <td> + <a href="https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id={{species.TaxonomyId}}" + title="NCBI's Taxonomy Browser page for {{species.Name}}"> + {{species.TaxonomyId}}</a> + </td> + </tr> + {%endif%} + </table> +</div> +{%endmacro%} diff --git a/uploader/templates/species/sui-base.html b/uploader/templates/species/sui-base.html new file mode 100644 index 0000000..5d2e6e3 --- /dev/null +++ b/uploader/templates/species/sui-base.html @@ -0,0 +1,10 @@ +{%extends "sui-base.html"%} + +{%block breadcrumbs%} +{{super()}} +<li class="breadcrumb-item"> + <a href="{{url_for('species.view_species', species_id=species['SpeciesId'], streamlined_ui=streamlined_ui)}}"> + {{species["Name"]|title}} + </a> +</li> +{%endblock%} diff --git a/uploader/templates/species/sui-view-species.html b/uploader/templates/species/sui-view-species.html new file mode 100644 index 0000000..5373766 --- /dev/null +++ b/uploader/templates/species/sui-view-species.html @@ -0,0 +1,91 @@ +{%extends "species/sui-base.html"%} +{%from "flash_messages.html" import flash_all_messages%} +{%from "macro-step-indicator.html" import step_indicator%} +{%from "species/macro-display-species-card.html" import display_sui_species_card%} + +{%block title%}View Species{%endblock%} + + +{%block contents%} +<div class="row"> + <h2>{{step_indicator("2(a)")}} Select the Population</h2> + + <p>Data belonging to a particular species is further divided into one or more + populations for easier handling. Please select the population you want to work + with.</p> + + <form method="GET" + action="{{url_for('species.view_species', species_id=species.SpeciesId)}}" + class="form-horizontal"> + <input type="hidden" name="streamlined_ui" value="{{streamlined_ui}}" /> + {%if populations | length != 0%} + + <p class="form-text">Search for, and select the population from the table + below.</p> + + <div style="margin-top:3em;"> + <table id="tbl-select-population" class="table compact stripe" + data-populations-list='{{populations | tojson}}'> + <thead> + <tr> + <th></th> + <th>Population</th> + </tr> + </thead> + + <tbody></tbody> + </table> + </div> + + {%else%} + <p class="form-text"> + There are no populations currently defined for {{species['FullName']}} + ({{species['SpeciesName']}}).</p> + {%endif%} + + <div class="row form-buttons"> + <div class="col"> + <input type="submit" + value="use selected population" + class="btn btn-primary" /> + </div> + + <div class="col"><strong>OR</strong></div> + + <div class="col"> + <a href="url_for('species.population.create_population', + species_id=species.SpeciesId, + return_to='species.view_species', + streamlined_ui=streamlined_ui)" + title="Create a new population for species '{{species.Name}}'." + class="btn btn-outline-info"> + Create a new population + </a> + </div> + </div> + + </form> +</div> + +<div class="row"> </div> + +<div class="row"> + <h2>{{step_indicator("2(b)")}} Manage sequencing platforms</h2> + <p>Upload and manage the sequencing platforms for species + '{{species.Name | title}} ({{species.FullName}})' + <a href="{{url_for('species.platforms.list_platforms', + species_id=species.SpeciesId, + streamlined_ui=streamlined_ui)}}" + title="Manage sequencing platforms for {{species.Name}}">here</a>. + </p> +</div> +{%endblock%} + +{%block sidebarcontents%} +{{display_sui_species_card(species)}} +{%endblock%} + + +{%block javascript%} +<script type="text/javascript" src="/static/js/populations.js"></script> +{%endblock%} diff --git a/uploader/templates/base2.html b/uploader/templates/sui-base.html index 4c5d613..b247c3c 100644 --- a/uploader/templates/base2.html +++ b/uploader/templates/sui-base.html @@ -50,17 +50,9 @@ <main id="main" class="main"> <nav id="breadcrumbs" aria-label="breadcrumb"> <ol class="breadcrumb"> + {%block breadcrumbs%} <li class="breadcrumb-item"> - <a href="{{url_for('base.index')}}">Home</a></li> - {%block extra_breadcrumbs%} - <li class="breadcrumb-item"> - <a href="{{url_for('base.index')}}">Page01</a></li> - <li class="breadcrumb-item"> - <a href="{{url_for('base.index')}}">Page02</a></li> - <li class="breadcrumb-item"> - <a href="{{url_for('base.index')}}">Page03</a></li> - <li class="breadcrumb-item"> - <a href="{{url_for('base.index')}}">Page04</a></li> + <a href="{{url_for('base.index', streamlined_ui='true')}}">Home</a></li> {%endblock%} </ol> </nav> diff --git a/uploader/templates/sui-index.html b/uploader/templates/sui-index.html new file mode 100644 index 0000000..e6873e2 --- /dev/null +++ b/uploader/templates/sui-index.html @@ -0,0 +1,111 @@ +{%extends "sui-base.html"%} +{%from "flash_messages.html" import flash_all_messages%} +{%from "macro-step-indicator.html" import step_indicator%} + +{%block title%}Home{%endblock%} + +{%block pagetitle%}Home{%endblock%} + +{%block extra_breadcrumbs%}{%endblock%} + +{%block contents%} + +<div class="row">{{flash_all_messages()}}</div> + +{%if user_logged_in()%} + +<div class="row"> + <div class="row"> + <h2>{{step_indicator("1")}} Select the Species</h2> + + <p>The data in Genenetwork is related to one species or another. To get + started, please select the species you want to work with.</p> + </div> +</div> + +<div class="row"> + <form method="GET" action="{{url_for('base.index')}}" class="form-horizontal"> + <input type="hidden" name="streamlined_ui", value="{{streamlined_ui}}" /> + + {%if species | length != 0%} + <div style="margin-top:3em;"> + <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%} + + <div class="row form-buttons"> + <div class="col"> + <input type="submit" + class="btn btn-primary" + value="continue with selected" /> + </div> + <div class="col"><strong>OR</strong></div> + <div class="col"> + <a href="{{url_for('species.create_species', return_to='base.index')}}" + title="Create a new species.">Create a new Species</a> + </div> + </div> + + </form> +</div> + +{%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%} +<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> +{%endblock%} + + +{%block javascript%} +<script type="text/javascript" src="/static/js/species.js"></script> +{%endblock%} |
