Commits

buzmakov committed 8a2e5a8 Draft

little bootstrap of tomo_results

  • Participants
  • Parent commits 0a17c1d
  • Branches bootstrap

Comments (0)

Files changed (2)

tomofrontend/web/templates/tomo_info.html

             </dd>
 
             <dt>Tomo config:
-
                 <button class="btn-mini btn-primary" data-toggle="collapse" data-target="#tomo_config">
                     Hide/Show
                 </button>
         </dl>
     </div>
 </div>
-{% endblock%}
+{% endblock%}
+
+{% block my_scripts %} {% endblock %}

tomofrontend/web/templates/tomo_result.html

-<!DOCTYPE html>
-<html>
-<head>
-    <title>Tomo reconstruction</title>
-    <script src='/static/my_scripts.js'></script>
-    <script src='/static/jquery/jquery.min.js'></script>
-    <script src='/static/autosize/jquery.autosize.js'></script>
-    <script>
-        function update_log() {
-            $.getJSON("{{ url_for('tomo_log',tomo_object_id=tomo_object['id']) }}",
-                    {}, function(data) {
-                        $("#log_text").text(data.log);
-                        $("#log_text")[0].scrollTop= $("#log_text")[0].scrollHeight;
-                    });
-            return false;
-        }
+{% extends "base.html" %}
+{% block title %}Информация об объекте{% endblock %}
+{% block body %}
+<div class="container">
+    <header class="jumbotron subhead" id="overview">
 
-        $(function() {
-            $('a#get_log').bind('click',
-                function() {
-                    $.getJSON("{{ url_for('tomo_log',tomo_object_id=tomo_object['id']) }}",
-                        {}, function(data) {
-                                $("#log_text").text(data.log);
-                                $("#log_text")[0].scrollTop= $("#log_text")[0].scrollHeight;
-                            });
-                    return false;
-                });
-            });
+        <p class="lead">
+            Информация об объекте {{ tomo_object['data_dir'] }}
+        </p>
 
-        $(function() {
-            $('a#start_reconstruction').bind('click',
-                    function() {
-                        $.getJSON(
-                                "{{ url_for('tomo_reconstruct',tomo_object_id=tomo_object['id']) }}",
-                                {},
-                                {}
-                        );
-                        return false;
-                    });
-        });
+        <div class="subnav subnav-fixed">
+            <ul class="nav nav-pills">
+                <li >
+                    <a href="{{ url_for('tomo_info',tomo_object_id=tomo_object['id']) }}">
+                        Информация об объекте
+                    </a>
+                </li>
 
-        $(function() {
-            $('a#start_preprocess').bind('click',
-                    function() {
-                        $.getJSON(
-                                "{{ url_for('tomo_reconstruct',tomo_object_id=tomo_object['id']) }}",
-                                {just_preprocess:'True'},
-                                {}
-                            );
-                        return false;
-                    });
-        });
-        setInterval( "update_log()", 5000 );
-
-        $('#u_images_div_switcher').live("click", function (ob) {
-            $('#u_images_div').toggle();
-        });
-
-        $('#rx_images_div_switcher').live("click", function (ob) {
-            $('#rx_images_div').toggle();
-        });
-    </script>
-
-</head>
-<body>
+                <li class=active>
+                    <a href="#"> Результат реконструкции  </a>
+                </li>
+            </ul>
+        </div>
+    </header>
 Поищите результаты реконструкции в <span style="text-decoration: underline;">{{tomo_object['data_dir'] }}/reconstruction</span>
 <div>
     <a href="#" id="start_reconstruction">Добавить объект в очередь на восстановление</a>
         {% endfor %}
     </div>
 </div>
-<a href={{url_for('tomo_experiments')}}>Список всех образцов</a>
-<a href="{{ url_for('tomo_info',tomo_object_id=tomo_object['id']) }}"> Информация об объекте</a>
-</body>
-</html>
+
+</div>
+{% endblock%}
+
+{% block my_scripts %}
+    <script>
+        function update_log() {
+            $.getJSON("{{ url_for('tomo_log',tomo_object_id=tomo_object['id']) }}",
+                    {}, function(data) {
+                        $("#log_text").text(data.log);
+                        $("#log_text")[0].scrollTop= $("#log_text")[0].scrollHeight;
+                    });
+            return false;
+        }
+
+        $(function() {
+            $('a#get_log').bind('click',
+                    function() {
+                        $.getJSON("{{ url_for('tomo_log',tomo_object_id=tomo_object['id']) }}",
+                                {}, function(data) {
+                                    $("#log_text").text(data.log);
+                                    $("#log_text")[0].scrollTop= $("#log_text")[0].scrollHeight;
+                                });
+                        return false;
+                    });
+        });
+
+        $(function() {
+            $('a#start_reconstruction').bind('click',
+                    function() {
+                        $.getJSON(
+                                "{{ url_for('tomo_reconstruct',tomo_object_id=tomo_object['id']) }}",
+                                {},
+                                {}
+                        );
+                        return false;
+                    });
+        });
+
+        $(function() {
+            $('a#start_preprocess').bind('click',
+                    function() {
+                        $.getJSON(
+                                "{{ url_for('tomo_reconstruct',tomo_object_id=tomo_object['id']) }}",
+                                {just_preprocess:'True'},
+                                {}
+                        );
+                        return false;
+                    });
+        });
+        setInterval( "update_log()", 5000 );
+
+        $('#u_images_div_switcher').live("click", function (ob) {
+            $('#u_images_div').toggle();
+        });
+
+        $('#rx_images_div_switcher').live("click", function (ob) {
+            $('#rx_images_div').toggle();
+        });
+    </script>
+{% endblock %}