diff options
author | zsloan | 2020-06-04 14:23:30 -0500 |
---|---|---|
committer | zsloan | 2020-06-04 14:23:30 -0500 |
commit | 1a663f987bf3a640d21c2c89402318d5433efd9e (patch) | |
tree | 07314f422059ce6e502feb9827f574af7512e73d /wqflask/wqflask/templates | |
parent | c562bd7cd68735ded82d39868cf1af36c35a7920 (diff) | |
download | genenetwork2-1a663f987bf3a640d21c2c89402318d5433efd9e.tar.gz |
Really should have split this into many more commits:
- Now use proxy to pull trait data and hide traits/results that the user
doesn't have view permission for
- Created a factory method for creating trait ob so it can return None
when user doesn't have view permissions (this is why such a large number
of files are changed)
- Added metadata to permutation export
- Added current group management code
- Added fixed password verification e-mail code
Diffstat (limited to 'wqflask/wqflask/templates')
-rw-r--r-- | wqflask/wqflask/templates/admin/group_manager.html | 45 | ||||
-rw-r--r-- | wqflask/wqflask/templates/correlation_page.html | 1 | ||||
-rw-r--r-- | wqflask/wqflask/templates/email/verification.txt | 7 | ||||
-rw-r--r-- | wqflask/wqflask/templates/gsearch_pheno.html | 2 | ||||
-rw-r--r-- | wqflask/wqflask/templates/mapping_results.html | 31 |
5 files changed, 61 insertions, 25 deletions
diff --git a/wqflask/wqflask/templates/admin/group_manager.html b/wqflask/wqflask/templates/admin/group_manager.html index ac5c1350..b7df1aad 100644 --- a/wqflask/wqflask/templates/admin/group_manager.html +++ b/wqflask/wqflask/templates/admin/group_manager.html @@ -2,17 +2,25 @@ {% block title %}Group Manager{% endblock %} {% block content %} <!-- Start of body --> - {{ header("List of groups", "" )}} - <div class="container"> <div class="page-header"> <h1>Manage Groups</h1> + <button type="button" id="remove_groups" class="btn btn-primary" data-url="/groups/remove">Remove Selected Groups</button> </div> - <form action="/manage/groups" method="POST"> + <form id="groups_form" action="/groups/manage" method="POST"> + <input type="hidden" name="selected_group_ids" value=""> <div class="container" style="margin-bottom: 30px;"> + {% if admin_groups|length == 0 and user_groups|length == 0 %} + <h4>You currently aren't a member or admin of any groups.</h4> + <br> + <button type="submit" name="add_new_group" class="btn btn-primary">Create a new group</button> + {% else %} <div><h3>Admin Groups</h3></div> <hr> - <table id="admin_groups" class="table table-hover"> + {% if admin_groups|length == 0 %} + <h4>You currently aren't the administrator of any groups.</h4> + {% else %} + <table id="admin_groups" class="table table-hover" style="min-width: 800px; max-width: 1000px;"> <thead> <tr> <th></th> @@ -26,7 +34,7 @@ <tbody> {% for group in admin_groups %} <tr> - <td><input type="checkbox" name="read" value="{{ group.id }}"></td> + <td><input type="checkbox" name="group_id" value="{{ group.id }}"></td> <td>{{ loop.index }}</td> <td>{{ group.name }}</td> <td>{{ group.admins|length + group.users|length }}</td> @@ -36,12 +44,16 @@ {% endfor %} </tbody> </table> + {% endif %} </div> <hr> <div class="container"> <div><h3>User Groups</h3></div> <hr> - <table id="user_groups" class="table table-hover"> + {% if user_groups|length == 0 %} + <h4>You currently aren't a member of any groups.</h4> + {% else %} + <table id="user_groups" class="table table-hover" style="min-width: 800px; max-width: 1000px;"> <thead> <tr> <th></th> @@ -65,12 +77,12 @@ {% endfor %} </tbody> </table> + {% endif %} + {% endif %} </div> </form> </div> - - <!-- End of body --> {% endblock %} @@ -79,7 +91,6 @@ <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.js"></script> <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='DataTables/js/jquery.dataTables.min.js') }}"></script> - <script language="javascript" type="text/javascript" src="/static/packages/TableTools/media/js/TableTools.min.js"></script> <script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script> <script type="text/javascript" charset="utf-8"> @@ -113,6 +124,22 @@ "paging": false, "orderClasses": true } ); + + submit_special = function(url) { + $("#groups_form").attr("action", url); + return $("#groups_form").submit(); + }; + + $("#remove_groups").on("click", function() { + url = $(this).data("url") + groups = [] + $("input[name=group_id]:checked").each(function() { + groups.push($(this).val()); + }); + groups_string = groups.join(":") + $("input[name=selected_group_ids]").val(groups_string) + return submit_special(url) + }); }); </script> {% endblock %} diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html index 1c84239c..71705390 100644 --- a/wqflask/wqflask/templates/correlation_page.html +++ b/wqflask/wqflask/templates/correlation_page.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% block title %}Correlation Results{% endblock %} {% block css %} <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='DataTables/css/jquery.dataTables.css') }}" /> <link rel="stylesheet" type="text/css" href="/static/new/packages/DataTables/extensions/buttons.bootstrap.css" /> diff --git a/wqflask/wqflask/templates/email/verification.txt b/wqflask/wqflask/templates/email/verification.txt deleted file mode 100644 index 76149a3a..00000000 --- a/wqflask/wqflask/templates/email/verification.txt +++ /dev/null @@ -1,7 +0,0 @@ -Thank you for signing up for GeneNetwork. - -We need to verify your email address. - -To do that please click the following link, or cut and paste it into your browser window: - -{{ url_for_hmac("verify_email", code = verification_code, _external=True )}} diff --git a/wqflask/wqflask/templates/gsearch_pheno.html b/wqflask/wqflask/templates/gsearch_pheno.html index 05b2f988..04b45659 100644 --- a/wqflask/wqflask/templates/gsearch_pheno.html +++ b/wqflask/wqflask/templates/gsearch_pheno.html @@ -31,7 +31,7 @@ </form> <br /> <br /> - <div style="width: 100%;"> + <div style="min-width: 2000px; width: 100%;"> <table id="trait_table" class="table-hover table-striped cell-border" style="float: left;"> <tbody> <td colspan="100%" align="center"><br><b><font size="15">Loading...</font></b><br></td> diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html index b4429b46..c5d49168 100644 --- a/wqflask/wqflask/templates/mapping_results.html +++ b/wqflask/wqflask/templates/mapping_results.html @@ -41,7 +41,8 @@ <input type="hidden" name="selected_chr" value="{{ selectedChr }}"> <input type="hidden" name="manhattan_plot" value="{{ manhattan_plot }}"> <input type="hidden" name="num_perm" value="{{ nperm }}"> - <input type="hidden" name="perm_results" value=""> + <input type="hidden" name="perm_info" value=""> + <input type="hidden" name="perm_strata" value="{{ perm_strata }}"> <input type="hidden" name="num_bootstrap" value="{{ nboot }}"> <input type="hidden" name="do_control" value="{{ doControl }}"> <input type="hidden" name="control_marker" value="{{ controlLocus }}"> @@ -464,13 +465,27 @@ {% if mapping_method != "gemma" and mapping_method != "plink" %} $('#download_perm').click(function(){ - var num_perm, perm_data; - num_perm = js_data.num_perm - perm_data = js_data.perm_results - json_perm_data = JSON.stringify(perm_data); - $('input[name=perm_results]').val(json_perm_data); - $('#marker_regression_form').attr('action', '/export_perm_data'); - return $('#marker_regression_form').submit(); + perm_info_dict = { + perm_data: js_data.perm_results, + num_perm: "{{ nperm }}", + trait_name: "{{ this_trait.display_name }}", + trait_description: "{{ this_trait.description_display }}", + cofactors: "{{ covariates }}", + n_samples: {{ n_samples }}, + n_genotypes: {{ qtl_results|length }}, + {% if genofile_string is defined %} + genofile: "{{ genofile_string }}", + {% else %} + genofile: "", + {% endif %} + units_linkage: "{{ LRS_LOD }}", + strat_cofactors: js_data.categorical_vars + } + json_perm_data = JSON.stringify(perm_info_dict); + + $('input[name=perm_info]').val(json_perm_data); + $('#marker_regression_form').attr('action', '/export_perm_data'); + return $('#marker_regression_form').submit(); }); modebar_options = { |