diff options
author | Frederick Muriuki Muriithi | 2022-05-26 16:54:38 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-05-26 16:54:38 +0300 |
commit | 12236c450f5db4a93cb8dd47456e984bc4fb672d (patch) | |
tree | 9f4af18a8ef373dd7bf170111ec974c886aa3604 | |
parent | 98367087f262c0d0cdd7aae691989f90f4d40dcc (diff) | |
download | genenetwork2-12236c450f5db4a93cb8dd47456e984bc4fb672d.tar.gz |
Enumerate rows and add checkboxes
3 files changed, 27 insertions, 10 deletions
diff --git a/wqflask/wqflask/partial_correlations_views.py b/wqflask/wqflask/partial_correlations_views.py index 50f295cc..f567cee3 100644 --- a/wqflask/wqflask/partial_correlations_views.py +++ b/wqflask/wqflask/partial_correlations_views.py @@ -336,6 +336,7 @@ def process_pcorrs_command_output(result): correlations=result["results"]["correlations"], dataset_type=result["results"]["dataset_type"], method=result["results"]["method"], + enumerate = enumerate, format_number=__format_number) if result["status"] == "error": return render_error( diff --git a/wqflask/wqflask/templates/partial_correlations/pcorrs_results_presentation.html b/wqflask/wqflask/templates/partial_correlations/pcorrs_results_presentation.html index 679a7510..735f0cdf 100644 --- a/wqflask/wqflask/templates/partial_correlations/pcorrs_results_presentation.html +++ b/wqflask/wqflask/templates/partial_correlations/pcorrs_results_presentation.html @@ -44,7 +44,10 @@ style="float: left;"> <thead> <tr> - <th></th> + <th> + <input type="checkbox" name="chk_{{trait['trait_name']}}" + value="{{trait['trait_fullname']}}" /> + </th> <th>Index</th> <th>Record</th> <th>Phenotype</th> @@ -60,10 +63,10 @@ </thead> <tbody> - {%for trait in correlations:%} + {%for idx, trait in enumerate(correlations, start=1):%} <tr class="results-row"> <td></td> - <td data-column-heading="Index"></td> + <td data-column-heading="Index">idx</td> <td data-column-heading="Record"> <a href="{{url_for( 'show_trait_page', @@ -120,10 +123,13 @@ </thead> <tbody> - {%for trait in correlations:%} + {%for idx, trait in enumerate(correlations, start=1):%} <tr class="results-row"> - <td></td> - <td data-column-heading="Index"></td> + <td> + <input type="checkbox" name="chk_{{trait['trait_name']}}" + value="{{trait['trait_fullname']}}" /> + </td> + <td data-column-heading="Index">idx</td> <td data-column-heading="Locus"> <a href="{{url_for( 'show_trait_page', @@ -186,10 +192,13 @@ </thead> <tbody> - {%for trait in correlations:%} + {%for trait in enumerate(correlations, start=1):%} <tr class="results-row"> - <td></td> - <td data-column-heading="Index"></td> + <td> + <input type="checkbox" name="chk_{{trait['trait_name']}}" + value="{{trait['trait_fullname']}}" /> + </td> + <td data-column-heading="Index">idx</td> <td data-column-heading="Record"> <a href="{{url_for( 'show_trait_page', diff --git a/wqflask/wqflask/templates/partial_correlations/pcorrs_results_with_target_traits.html b/wqflask/wqflask/templates/partial_correlations/pcorrs_results_with_target_traits.html index acea8f60..c1ef6001 100644 --- a/wqflask/wqflask/templates/partial_correlations/pcorrs_results_with_target_traits.html +++ b/wqflask/wqflask/templates/partial_correlations/pcorrs_results_with_target_traits.html @@ -77,7 +77,14 @@ </td> <td>{{idx}}</td> <td>{{trait["dataset_name"]}}</td> - <td>{{trait["trait_name"]}}</td> + <td> + <a href="{{url_for( + 'show_trait_page', + trait_id=trait['trait_name'], + dataset=trait['dataset_name'])}}"> + {{trait["trait_name"]}} + </a> + </td> <td>{{trait["symbol"]}}</td> <td>{{trait["description"]}}</td> <td>{{trait["noverlap"]}}</td> |