aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/base.html
blob: 0009e4d859f14b06e8cadd3d0530c5173f388353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
{% from "base_macro.html" import header, flash_me, timeago %}
<!DOCTYPE HTML>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8">
    <title>{% block title %}{% endblock %} GeneNetwork 2</title>
    <meta name="description" content="">
    <meta name="author" content="">
    <script type="text/javascript">
    var pageLoadStart = Date.now();
    </script>
    <link rel="icon" type="image/png" sizes="64x64" href="/static/new/images/CITGLogo.png">
    <link rel="apple-touch-icon" type="image/png" sizes="64x64" href="/static/new/images/CITGLogo.png">
    <link REL="stylesheet" TYPE="text/css" href="{{ url_for('css', filename='bootstrap/css/bootstrap.css') }}" />
    <link REL="stylesheet" TYPE="text/css" href="/static/new/css/bootstrap-custom.css" />
    <link REL="stylesheet" TYPE="text/css" href="/static/new/css/non-responsive.css" />
    <link REL="stylesheet" TYPE="text/css" href="/static/new/css/docs.css" />
    <link rel="stylesheet" type="text/css" href="/static/new/css/colorbox.css" />
    <link rel="stylesheet" type="text/css" href="/static/new/css/parsley.css" />
    <link rel="stylesheet" type="text/css" href="/static/new/css/broken_links.css" />
    <link rel="stylesheet" href="/static/new/css/autocomplete.css" />
  <link rel="stylesheet" type="text/css" href="{{ url_for('css', filename='fontawesome/css/font-awesome.min.css') }}" />

   {% block css %}
    {% endblock %}
    <style>
        .form-rounded {
            border-radius: 1rem;
        }
        table.dataTable thead .sorting_asc {
            background-image: url({{ url_for("js", filename="DataTables/images/sort_asc_disabled.png") }});
        }
        table.dataTable thead .sorting_desc {
            background-image: url({{ url_for("js", filename="DataTables/images/sort_desc_disabled.png") }});
        }


        .global_search_input{
            padding:9px 8px;
            text-decoration: none;
            border: none;

           border-radius: 5px;
        }


        .global_search_input:focus{
    outline: none;
}



.btn-stc {
    padding:9px 8px;

    border-left:none;

    border-radius:0 40px 40px 0;

    cursor: pointer;

    height: 40px;
    width: 64px;
    margin:0;
    border:1px solid #d3d3d3;
    background-color: white;

    position: absolute;

    top:0;
    left: 100%;

    right: 0;

    border-left: none;






}

.search-hist-btn{
 padding:15px;

 margin: 0 auto;
 border-bottom: 1px solid #ccc;
}


.search-hist-btn a:hover {

    text-decoration: None;
    padding:5px;
    border-radius: 10px;
    color:blue;
    cursor:pointer;
}



.search-hist-btn a {
    font-weight: bold;
    color:#000;
}



</style>
</head>

<body style="width: 100%">
    <!-- Navbar ================================================== -->
    <div class="navbar navbar-inverse navbar-static-top pull-left" role="navigation" style="width: 100%; min-width: 850px; white-space: nowrap;">
        <div class="container-fluid" style="width: 100%;">
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div>
                <ul class="nav navbar-nav">
                    <li class="" style="margin-right: 20px;">
                        <a href="/" style="font-weight: bold;">GeneNetwork</a>
                    </li>
                    <li class="">
                        <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Intro <span class="caret"></a>
                        <ul class="dropdown-menu">
                            <li><a href="/intro">Intro</a></li>
                            <li><a href="/submit_trait">Submit Trait</a></li>
                            <li><a href="http://genenetwork.org/webqtl/main.py?FormID=batSubmit">Batch Submission</a></li>
                        </ul>
                    </li>
                    <li class="">
                        <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Help <span class="caret"></a>
                        <ul class="dropdown-menu">
                            <li><a href="{{ url_for('references_blueprint.references') }}">References</a></li>
                            <li><a href="/tutorials">Webinars, Tutorials/Primers</a></li>
                            <li><a href="{{ url_for('blogs_blueprint.blogs_list') }}">Blogs</a></li>
                            <li><a href="{{ url_for('glossary_blueprint.glossary') }}">Glossary of Term</a></li>
                            <li><a href="http://gn1.genenetwork.org/faq.html">FAQ</a></li>
                            <li><a href="{{ url_for('policies_blueprint.policies') }}">Policies</a></li>
                            <li><a href="{{ url_for('links_blueprint.links') }}">Links</a></li>
                            <li><a href="{{ url_for('facilities_blueprint.facilities') }}">Facilities</a></li>
                            <li><a href="{{ url_for('environments_blueprint.environments') }}">Environments</a></li>
                            <li><a href="/news">GN1 News</a></li>
                        </ul>
                    </li>
                    <li class="">
                        <a href="/help" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Tools <span class="caret"></a>
                        <ul class="dropdown-menu">
                            <li><a href="/snp_browser">Variant Browser</a></li>
                            <li><a href="http://bnw.genenetwork.org/sourcecodes/home.php">Bayesian Network Webserver</a></li>
                            <li><a href="https://systems-genetics.org/">Systems Genetics PheWAS</a></li>
                            <li><a href="http://ucscbrowser.genenetwork.org/">Genome Browser</a></li>
                            <li><a href="http://power.genenetwork.org">BXD Power Calculator</a></li>
                            <li><a href="{{url_for('jupyter_notebooks.launcher')}}">Jupyter Notebooks</a></li>
                            <li><a href="https://files.genenetwork.org/current/">Public Datasets</a></li>
                        </ul>
                    </li>
                    {% if g.user_session %}
                    <li class="">
                        <a href="/collections/list">Collections
                            <span class="badge badge-info">{{num_collections()}}</span>
                        </a>
                    </li>
                    <li class="">
                        <a href="/repositories" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Source Code <span class="caret"></a>
                        <ul class="dropdown-menu">
                            <li><a href="https://github.com/genenetwork/genenetwork2">GN2 Source Code</a></li>
                            <li><a href="https://github.com/genenetwork/genenetwork">GN1 Source Code</a></li>
                            <li><a href="https://github.com/genenetwork/sysmaintenance">System Maintenance Code</a></li>
                            <li><a href="https://github.com/genenetwork/genenetwork2/blob/testing/doc/API_readme.md">REST API Documentation</a></li>
                        </ul>
                    </li>
                    {% if g.user_session.logged_in %}
                    <li class="">
                        <a href="/edit_account_settings" class="dropdow-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{% if g.user_session.user_email %}{{ g.user_session.user_email }}{% else %}User Account Settings{% endif %}<span class="caret"></a>
                        <ul class="dropdown-menu">
                            <li><a id="manage_user" title="User Options" href="/user/manage">User Options</a></li>
                            <li><a id="manage_groups" title="Manage Groups" href="/group-management/groups">Manage Groups</a></li>
                        </ul>
                    </li>
                    {% endif %}
                    <li class="">
                      {%if logged_in()%}
		      {%if user_details is mapping%}
		      {%set user_dets = user_details%}
		      {%else%}
		      {%set user_dets = user_details()%}
		      {%endif%}
                      <a id="login_out"
			   title="Signed in as {{user_dets.name}}({{user_dets.email}})"
			   href="{{url_for('oauth2.user.logout')}}">Sign out</a>
                        {%else%}
                        <a id="login_in" href="{{authserver_authorise_uri()}}">Sign in</a>
                        {%endif%}
                    </li>
                    {% endif %}

		    {%if not logged_in()%}
		    <li class="">
		      <a id="user:register" title="Register a new user account."
			 href="{{url_for('oauth2.user.register_user')}}">
			Register
		      </a>
		    </li>
		    {%endif%}

		    {%if logged_in()%}
		    <li class="">
		      <a id="user:profile" title="User's profile page."
			 href="{{url_for('oauth2.user.user_profile')}}">
			Profile
		      </a>
		    </li>
		    {%endif%}
                    <!--
                        <li style="margin-left: 20px;">
                            <a href="http://gn2-staging.genenetwork.org" style="font-weight: bold;" >Use Staging Branch</a>
                        </li>
                        -->
                </ul>
            </div>
        </div>
    </div>
    <div class="container-fluid" style="width: 100%; min-width: 650px; position: relative;background-color: #d5d5d5; height: 100px;">
        <form id="gnqna_search_home" method="POST" action="/gnqna" style="display:none;width: 100%;">

            <!--- init gnqa codebase here -->
           <div  style="width: 100%; display: flex;justify-content: space-evenly;">

              <input  id="gnqna_search_home_input" style="width:50vw" type="text" autocomplete="off" 
required placeholder="Ask More Questions or Topics (E.g Genes) " value='' name="querygnqa">  


      <button type="button"  data-toggle="modal" data-target=".bd-example-modal-lg" style="border:none;text-decoration:underline;outline: none;padding:5px;margin-left:25px;background-color:  #d5d5d5;"> 
     GNQA Search History
      </button>
      </div>    
            
            
<div class="modal fade  bd-example-modal-lg " id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg" role="document" >
    <div class="modal-content">
      <div class="modal-header">
        <h2 class="modal-title" id="exampleModalLabel">Your Search History</h2>

      </div>
            <div class="modal-body">
                <div>
                    <form></form>
                </div>
          <div>
            {% if prev_queries %}
            <div >
                {% for search in prev_queries[:8] %}
            
                <div class="search-hist-btn" style="display:flex;justify-content: space-between;align-items: center;">
                <form  class="search-hist-btn-form" method="GET" data-link="{{search}}">
                    <a  class="search-hist-btn-link" data-link="{{search}}">{{search}}</a>
                </form>

                </div>

                {% endfor %}
            </div>


            {% endif %}
              
          </div>
            
      </div>
      <div class="modal-footer">

        <button type="button" class="btn btn-danger " style="color:white" >Delete All</button>
        <button type="button" class="btn btn-primary" data-dismiss="modal" style="color:white">Cancel</button>
     </div>
    </div>
  </div>
</div>

     
</form>
        <form method="get" action="/gsearch" id="globalsearchform">
            <div class="form-group">
                <div class="controls">
                    <select name="type">
                        <option value="gene">Genes / Molecules</option>
                        <option value="phenotype" {% if type=="phenotype" %}selected{% endif %}>Phenotypes</option>
                    </select>
                    <div class="col-8  autocomplete" style="margin-left: 30px;margin-right: 10px;">
                        <input autocomplete="off" class="global_search_input" id="term" style="width:45vw" type="text" required placeholder="Enter you search term here (ex: cytochrome AND P450)" name="terms">

                  <button   type="submit" class="btn-stc" style="position: absolute;  background-color: #336699"><i class="fa fa-search" title="Search " style="color:white;"></i></button>
                    </div>

  

                    <!-- todo fix text overlap for this;;responsiveness-->

                    <span style="padding: 5px;margin-left: 65px;" id="gnqna_home">
                        <a href="/gnqna">GNQA Search</a>
                    </span>

                    <span  style="padding: 5px;margin-left: 65px;" >
                                <a style="text-decoration: none" target="_blank" href="https://issues.genenetwork.org/topics/xapian/xapian-search-queries">
                                    <i  style="text-align: center;color:#336699;;" class="fa fa-question-circle fa-2x" title="see more search hints" aria-hidden="true"></i>
                                </a>
                
                    </span>
    
                </div>
            </div>

        </form>

    </div>
    {% block content %}
    {% endblock %}
    <footer class="footer">
        <div class="row" style="margin: 10px; width: 100%; min-width: 1200px;">
            <div class="col-xs-6">
                <p>Web services initiated January, 1994 as
                    <a href="http://www.ncbi.nlm.nih.gov/pubmed?term=8043953">
                        The Portable Dictionary of the Mouse Genome
                    </a>; June 15, 2001 as <a href="https://www.ncbi.nlm.nih.gov/pubmed/15043217">WebQTL</a>; and Jan 5, 2005 as GeneNetwork.
                </p>
                <p>
                    This site is currently operated by
                    <a href="mailto:rwilliams@uthsc.edu">Rob Williams</a>,
                    <a href="https://thebird.nl/">Pjotr Prins</a>,
                    <a href="http://www.senresearch.org">Saunak Sen</a>,
                    <a href="mailto:zachary.a.sloan@gmail.com">Zachary Sloan</a>,
                    <a href="mailto:acenteno@uthsc.edu">Arthur Centeno</a>,
                    and <a href="mailto:bonfacemunyoki@gmail.com">Bonface Munyoki</a>.
                </p>
                <p>Design and code by Pjotr Prins, Shelby Solomon, Zach Sloan, Arthur Centeno, Christan Fischer, Bonface Munyoki, Danny Arends, Arun Isaac, Alex Mwangi, Fred Muriithi, Sam Ockman, Lei Yan, Xiaodong Zhou, Christian Fernandez,
                    Ning Liu, Rudi Alberts, Elissa Chesler, Sujoy Roy, Evan G. Williams, Alexander G. Williams, Kenneth Manly, Jintao Wang, Robert W. Williams, and
                    <a href="/credits">colleagues</a>.</p>
                <br />
                <p>GeneNetwork support from:</p>
                <ul>
                    <li>
                        <a href="http://citg.uthsc.edu">
                            The UT Center for Integrative and Translational Genomics
                        </a>
                    </li>
                    <li>
                        <a href="https://www.nigms.nih.gov/">NIGMS</a>
                        Systems Genetics and Precision Medicine Project (R01 GM123489, 2017-2026)
                    </li>
                    <li>
                        <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2118709">NSF</a>
                        Panorama: Integrated Rack-Scale Acceleration for Computational Pangenomics
                        (PPoSS 2118709, 2021-2016)
                    </li>
                    <li>
                        <a href="https://www.drugabuse.gov/">NIDA</a>
                        NIDA Core Center of Excellence in Transcriptomics, Systems Genetics, and the Addictome (P30 DA044223, 2017-2022)
                    </li>
                    <li>
                        <a href="http://www.nia.nih.gov/">NIA</a>
                        Translational Systems Genetics of Mitochondria, Metabolism, and Aging (R01AG043930, 2013-2018)
                    </li>
                    <li>
                        <a href="https://www.ohsu.edu/iniastress-consortium">NIAAA</a>
                        Integrative Neuroscience Initiative on Alcoholism (U01 AA016662, U01 AA013499, U24 AA013513, U01 AA014425, 2006-2017)
                    </li>
                    <li>
                        <a href="http://www.drugabuse.gov/">NIDA</a>, <a href="http://www.nimh.nih.gov/">NIMH</a>, and <a href="http://www.niaaa.nih.gov/">NIAAA</a>
                        (P20-DA 21131, 2001-2012)
                    </li>
                    <li>
                        NCI <a href="http://emice.nci.nih.gov/">MMHCC</a> (U01CA105417), NCRR, <span class="broken_link test" href="http://www.birncommunity.org/">BIRN</span>, (U24 RR021760)
                    </li>
                </UL>
                <p>Published in
                    <a href="http://joss.theoj.org/papers/10.21105/joss.00025"><img src="https://camo.githubusercontent.com/846b750f582ae8f1d0b4f7e8fee78bed705c88ba/687474703a2f2f6a6f73732e7468656f6a2e6f72672f7061706572732f31302e32313130352f6a6f73732e30303032352f7374617475732e737667" alt="JOSS" data-canonical-src="http://joss.theoj.org/papers/10.21105/joss.00025/status.svg" style="max-width:100%;"></a>
                </p>
                <p>
                    Development and source code on <a href="https://github.com/genenetwork/">github</a> with <a href="https://issues.genenetwork.org/">issue tracker</a> and <a href="https://github.com/genenetwork/genenetwork2/blob/master/README.md">documentation</a>.
                    {% if version: %}
                    <p><small>GeneNetwork {{ version }}</small></p>
                    {% endif %}
                    <p> It took the server {{ g.request_time() }} seconds to process this page.</p>
            </div>
            <div class="col-xs-2">
                <a href="http://www.python.org/" target="_blank">
                    <img src="/static/new/images/PythonLogo.png" alt="Python Powered" border="0">
                </a>
                <a href="http://www.neuinfo.org" target="_blank">
                    <img src="/static/new/images/Nif.png" alt="Registered with Nif" border="0">
                </a>
            </div>
        </div>
    </footer>
    <!--http://stackoverflow.com/questions/14045515/how-can-i-reuse-one-bootstrap-modal-div-->
    <!-- Modal -->
    <div id="utility" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-body">
            <p>.</p>
        </div>
    </div>
    <script src="{{ url_for('js', filename='jquery/jquery.min.js') }}" type="text/javascript"></script>
    <script src="{{ url_for('js', filename='bootstrap/js/bootstrap.min.js') }}" type="text/javascript"></script>
    <script src="/static/new/javascript/search_autocomplete.js"></script>
    <script>
    //http://stackoverflow.com/questions/11521763/bootstrap-scrollspy-not-working
    var $window = $(window)
    $('.bs-docs-sidenav').affix({
        offset: {
            top: function() { return $window.width() <= 980 ? 290 : 210 },
            bottom: 270
        }
    })
    </script>
    <script type="text/javascript">
    $(document).ready(function() {

        $("#btn-hist-gnqa").on("click",function() {
            $("#exampleModal").modal("show")
        })

    const urlParams = new  URLSearchParams(window.location.search)
   let term = urlParams.get("terms")

        //should web scrap
        var global_search_hint = [
            "cytochrome",
            "cytochrome AND P450",
            "cytochrome NEAR P450",
            "cytochrome -P450",
            "cytochrome NOT P450",
            "species:human",
            "group:BXD",
            "Hs:chr4:9930021 species:mouse",
            "Hs:chr4:9130000..9980000 species:mouse",
            "mean:5..7",
            "mean:7..",
            "Hs:chr4:9930021",
            "Hs:chr4:9930021 species:mouse",
            "Hs:chr4:9130000..9980000 species:mouse",
            "bx*",
            "*",
        ]
        autocomplete(document.getElementById("term"), global_search_hint);
        $("#term").keyup(function(event) {
            if (event.keyCode === 13) {
                event.preventDefault();
                $('#globalsearchform').attr('action', "/gsearch").submit();
                if ($("#term").val().trim() != "") {
                    saveBeforeSubmit($("#term").val().trim())
                    $("#globalsearchform")[0].submit();
                }

            }
        })

    });
    </script>
    <script src="{{ url_for('js', filename='jquery-cookie/jquery.cookie.js') }}" type="text/javascript"></script>
    <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='jquery-ui/jquery-ui.min.js') }}"></script>    <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='colorbox/jquery.colorbox-min.js') }}"></script>
    <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='js_alt/parsley.min.js') }}"></script>
    {% block js %}
    {% endblock %}
    <script type="text/javascript">
    document.addEventListener('DOMContentLoaded', function() {
        let timeToLoad = document.createElement("p");
        timeToLoad.innerHTML = "It took your browser " + ((Date.now() - pageLoadStart) / 1000) + " second(s) to render this page";
        document.querySelector("footer .row .col-xs-6").appendChild(timeToLoad);
  
    $(".search-hist-btn-form").each(function(){
let item = $(this)
item.on("click",(e)=>{
    item.attr("action",`/gnqna/hist/search/${item.data("link")}`).submit()
})

 


    });
})
    </script>
</body>

</html>