@@ -1,152 +1,154 | |||
|
1 | 1 | <!DOCTYPE html> |
|
2 | 2 | {% load static %} |
|
3 | 3 | <html lang="en"> |
|
4 | 4 | <head> |
|
5 | 5 | <meta charset="utf-8"> |
|
6 | 6 | <title>{% block title %}Jicamarca Integrated Radar System:::::{% endblock %}</title> |
|
7 | 7 | <meta name="description" content=""> |
|
8 | 8 | <meta name="author" content=""> |
|
9 | 9 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
|
10 | 10 | {# bootstrap_css #} |
|
11 | 11 | <link href="{% static 'css/bootstrap-spacelab.min.css' %}" media="all" rel="stylesheet"> |
|
12 | 12 | <style type="text/css"> |
|
13 | 13 | body {padding-top: 60px} |
|
14 | 14 | .logo {padding-top: 5px; height: 50px} |
|
15 | 15 | .clickable-row {cursor: pointer;} |
|
16 | 16 | .col-no-padding { padding-left:0;} |
|
17 | 17 | .gi-2x{font-size: 2em;} |
|
18 | 18 | .gi-3x{font-size: 3em;} |
|
19 | 19 | .gi-4x{font-size: 4em;} |
|
20 | 20 | .gi-5x{font-size: 5em;} |
|
21 | 21 | </style> |
|
22 | 22 | <!--[if lt IE 9]> |
|
23 | 23 | <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> |
|
24 | 24 | <![endif]--> |
|
25 | 25 | <script src="{% static 'js/jquery.min.js' %}"></script> |
|
26 | 26 | {% block extra-head %} |
|
27 | 27 | {% endblock %} |
|
28 | 28 | </head> |
|
29 | 29 | |
|
30 | 30 | <body> |
|
31 | 31 | |
|
32 | 32 | {% block main_menu %} |
|
33 | 33 | <nav class="navbar navbar-default navbar-fixed-top" role="banner"> |
|
34 | 34 | <div class="container-fluid"> |
|
35 | 35 | <div class="navbar-header"> |
|
36 | 36 | <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigationbar"> |
|
37 | 37 | <span class="sr-only">Toggle navigation</span> |
|
38 | 38 | <span class="icon-bar"></span> |
|
39 | 39 | <span class="icon-bar"></span> |
|
40 | 40 | <span class="icon-bar"></span> |
|
41 | 41 | </button> |
|
42 | 42 | <a class="navbar-brand" href="{% url 'index' %}" style="padding-top:1px"><img class="logo" alt="JRO" src="{% static "images/logo-jro-color-trans.png" %}"></a> |
|
43 | 43 | </div> |
|
44 | 44 | <div class="collapse navbar-collapse" id="navigationbar"> |
|
45 | 45 | <ul class="nav navbar-nav"> |
|
46 | 46 | <li class=" dropdown {% block operation-active %}{% endblock %}"><a href="{% url 'url_operation'%}">Operation</a> |
|
47 | 47 | </li> |
|
48 | 48 | <li class=" dropdown {% block new-active %}{% endblock %}"> |
|
49 | 49 | <a href="#" class="dropdown-toggle" data-toggle="dropdown">New<span class="caret"></span></a> |
|
50 | 50 | <ul class="dropdown-menu" role="menu"> |
|
51 | 51 | <li><a href="{% url 'url_add_campaign' %}">Campaign</a></li> |
|
52 | 52 | <li><a href="{% url 'url_add_experiment' %}">Experiment</a></li> |
|
53 | 53 | <li><a href="{% url 'url_add_dev_conf' 0%}">Device Configuration</a></li> |
|
54 | 54 | <li><a href="{% url 'url_add_device'%}">Device</a></li> |
|
55 | 55 | <li><a href="{% url 'url_add_location'%}">Radar System</a></li> |
|
56 | 56 | </ul> |
|
57 | 57 | </li> |
|
58 | 58 | <li class=" dropdown {% block search-active %}{% endblock %}"> |
|
59 | 59 | <a href="#" class="dropdown-toggle" data-toggle="dropdown">Search<span class="caret"></span></a> |
|
60 | 60 | <ul class="dropdown-menu" role="menu"> |
|
61 | 61 | <li><a href="{% url 'url_campaigns' %}">Campaigns</a></li> |
|
62 | 62 | <li><a href="{% url 'url_experiments' %}">Experiments</a></li> |
|
63 | 63 | <li><a href="{% url 'url_dev_confs' %}">Configurations</a></li> |
|
64 | 64 | <li><a href="{% url 'url_devices' %}">Devices</a></li> |
|
65 | 65 | <li><a href="{% url 'url_locations' %}">Radar Systems</a></li> |
|
66 | 66 | </ul> |
|
67 | 67 | </li> |
|
68 | 68 | </ul> |
|
69 | 69 | <ul class="nav navbar-nav navbar-right"> |
|
70 | 70 | <li class="nav-divider"></li> |
|
71 | 71 | {% if user.is_authenticated %} |
|
72 | 72 | <li class="dropdown"> |
|
73 | 73 | <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hi {{ user.username }}<span class="caret"></span></a> |
|
74 | 74 | <ul class="dropdown-menu" role="menu"> |
|
75 | 75 | <li><a href="/admin">Control Panel</a></li> |
|
76 | 76 | <li><a href="{% url 'url_logout' %}">Logout</a></li> |
|
77 | 77 | </ul> |
|
78 | 78 | </li> |
|
79 | 79 | {% else %} |
|
80 | 80 | <li><a href="{% url 'url_login' %}?next={{request.get_full_path}}">Login</a></li> |
|
81 | 81 | {% endif %} |
|
82 | 82 | </ul> |
|
83 | 83 | </div> |
|
84 | 84 | </div> |
|
85 | 85 | </nav> |
|
86 | 86 | <div style="clear: both;"></div> |
|
87 | 87 | {% endblock %} |
|
88 | 88 | |
|
89 | 89 | <div class="container"> |
|
90 | 90 | <div id="page" class="row" style="min-height:600px"> |
|
91 | 91 | |
|
92 | 92 | {% if no_sidebar %} |
|
93 | <div class="col-md-0 hidden-xs hidden-sm" role="complementary"> | |
|
93 | <div class="col-md-0 hidden-xs hidden-sm" role="complementary"></div> | |
|
94 | 94 | |
|
95 | 95 | {% else %} |
|
96 | 96 | <div class="col-md-3 hidden-xs hidden-sm" role="complementary"> |
|
97 | <br><br> | |
|
98 | <div id="sidebar"> | |
|
99 | {% block sidebar%} | |
|
100 | {% include "sidebar_devices.html" %} | |
|
101 | {% endblock %} | |
|
102 | </div> | |
|
103 | </div> | |
|
97 | 104 | {% endif %} |
|
98 | <br><br> | |
|
99 | <div id="sidebar"> | |
|
100 | {% block sidebar%} | |
|
101 | {% endblock %} | |
|
102 | </div> | |
|
103 | </div> | |
|
105 | ||
|
104 | 106 | |
|
105 | 107 | {% if no_sidebar %} |
|
106 | 108 | <div class="col-md-12 col-xs-12" role="main"> |
|
107 | 109 | {% else %} |
|
108 | 110 | <div class="col-md-9 col-xs-12" role="main"> |
|
109 | 111 | {% endif %} |
|
110 | 112 | <div class="page-header"> |
|
111 | 113 | <h1>{% block content-title %}{% endblock %} <small>{% block content-suptitle %}{% endblock %}</small></h1> |
|
112 | 114 | </div> |
|
113 | 115 | {% block messages %} |
|
114 | 116 | {% if messages %} |
|
115 | 117 | {% for message in messages %} |
|
116 | 118 | <div class="alert alert-{% if message.tags %}{% if 'error' in message.tags %}danger{% else %}{{ message.tags }}{% endif %}{% else %}info{% endif %} alert-dismissible" role="alert"> |
|
117 | 119 | <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> |
|
118 | 120 | <strong>{{message.tags|title}}!</strong> {{ message }} |
|
119 | 121 | </div> |
|
120 | 122 | {% endfor %} |
|
121 | 123 | {% endif %} |
|
122 | 124 | {% endblock %} |
|
123 | 125 | |
|
124 | 126 | {% block content %} |
|
125 | 127 | {% endblock %} |
|
126 | 128 | |
|
127 | 129 | </div> |
|
128 | 130 | |
|
129 | 131 | |
|
130 | 132 | </div><!--/row--> |
|
131 | 133 | </div> <!-- container --> |
|
132 | 134 | |
|
133 | 135 | <div id="debug">{{debug}}</div> |
|
134 | 136 | |
|
135 | 137 | {% block footer %} |
|
136 | 138 | <footer class="footer"> |
|
137 | 139 | <div class="container"> |
|
138 | 140 | <p><hr></p> |
|
139 | 141 | <p> |
|
140 | 142 | © <a href="http://jro.igp.gob.pe">Jicamarca Radio Observatory</a> - {% now "Y" %} |
|
141 | 143 | </p> |
|
142 | 144 | </div> |
|
143 | 145 | </footer> |
|
144 | 146 | {% endblock %} |
|
145 | 147 | |
|
146 | 148 | {# bootstrap_javascript jquery=True #} |
|
147 | 149 | |
|
148 | 150 | <script src="{% static 'js/bootstrap.min.js' %}"></script> |
|
149 | 151 | {% block extra-js %} |
|
150 | 152 | {% endblock%} |
|
151 | 153 | </body> |
|
152 | 154 | </html> |
@@ -1,84 +1,82 | |||
|
1 | 1 | {% extends "base.html" %} |
|
2 | 2 | {% load bootstrap3 %} |
|
3 | 3 | {% load static %} |
|
4 | 4 | {% load main_tags %} |
|
5 | 5 | |
|
6 | 6 | {% block search-active %}active{% endblock %} |
|
7 | 7 | |
|
8 | 8 | {% block content-title %}{{title}}{% endblock %} |
|
9 | 9 | {% block content-suptitle %}{{suptitle}}{% endblock %} |
|
10 | 10 | |
|
11 | 11 | {% block content %} |
|
12 | 12 | |
|
13 | 13 | {% block menu-actions %} |
|
14 | 14 | <span class=" dropdown pull-right"> |
|
15 | 15 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-menu-hamburger gi-2x" aria-hidden="true"></span></a> |
|
16 | 16 | <ul class="dropdown-menu" role="menu"> |
|
17 | 17 | <li><a href="{{ dev_conf.get_absolute_url_edit }}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit</a></li> |
|
18 | 18 | <li><a href="{% url 'url_delete_dev_conf' dev_conf.id %}"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</a></li> |
|
19 | 19 | <li><a href="{{ dev_conf.get_absolute_url_import }}"><span class="glyphicon glyphicon-import" aria-hidden="true"></span> Import </a></li> |
|
20 |
<li><a href="{{ dev_conf.get_absolute_url_export }}"><span class="glyphicon glyphicon-export" aria-hidden="true"></span> Export </a></li> |
|
|
20 | <li><a href="{{ dev_conf.get_absolute_url_export }}"><span class="glyphicon glyphicon-export" aria-hidden="true"></span> Export </a></li> | |
|
21 | 21 | {% block extra-menu-actions %} |
|
22 | 22 | {% endblock %} |
|
23 | 23 | <li><a>----------------</a></li> |
|
24 | 24 | <li><a href="{{ dev_conf.get_absolute_url_status }}"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> Status</a></li> |
|
25 | 25 | {% if not no_play %} |
|
26 | 26 | {% if not only_stop %} |
|
27 | 27 | <li><a href="{{ dev_conf.get_absolute_url_start}}"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> Start</a></li> |
|
28 | 28 | {% endif %} |
|
29 | 29 | <li><a href="{{ dev_conf.get_absolute_url_stop }}"><span class="glyphicon glyphicon-stop" aria-hidden="true"></span> Stop</a></li> |
|
30 | 30 | {% endif %} |
|
31 | 31 | <li><a href="{{ dev_conf.get_absolute_url_write }}"><span class="glyphicon glyphicon-download" aria-hidden="true"></span> Write</a></li> |
|
32 | 32 | <li><a href="{{ dev_conf.get_absolute_url_read }}"><span class="glyphicon glyphicon-upload" aria-hidden="true"></span> Read</a></li> |
|
33 | </ul> | |
|
33 | </ul> | |
|
34 | 34 | </span> |
|
35 | 35 | {% endblock %} |
|
36 | 36 | |
|
37 | 37 | <table class="table table-bordered"> |
|
38 | 38 | <tr> |
|
39 | 39 | <th>Status</th> |
|
40 | <td class="text-{{dev_conf.device.status_color}}"> {{dev_conf.device.get_status_display}} </td> | |
|
40 | <td class="text-{{dev_conf.device.status_color}}"> {% if dev_conf.device.device_type.name == 'abs' %} {{connected_modules}} {% else %} {{dev_conf.device.get_status_display}}{% endif %} </td> | |
|
41 | 41 | </tr> |
|
42 | ||
|
42 | ||
|
43 | 43 | {% for key in dev_conf_keys %} |
|
44 | 44 | <tr> |
|
45 | 45 | <th>{% get_verbose_field_name dev_conf key %}</th> |
|
46 | 46 | <td>{{dev_conf|attr:key}}</td> |
|
47 | 47 | </tr> |
|
48 | 48 | {% endfor %} |
|
49 | 49 | </table> |
|
50 | 50 | |
|
51 | 51 | {% block extra-content %} |
|
52 | 52 | {% endblock %} |
|
53 | 53 | |
|
54 | 54 | {% endblock %} |
|
55 | 55 | |
|
56 | {% block sidebar%} | |
|
57 | {% include "sidebar_devices.html" %} | |
|
58 | {% endblock %} | |
|
56 | ||
|
59 | 57 | |
|
60 | 58 | {% block extra-js%} |
|
61 | 59 | <script type="text/javascript"> |
|
62 | ||
|
60 | ||
|
63 | 61 | $("#bt_edit").click(function() { |
|
64 | 62 | document.location = "{{ dev_conf.get_absolute_url_edit }}"; |
|
65 | 63 | }); |
|
66 | ||
|
64 | ||
|
67 | 65 | $("#bt_read").click(function() { |
|
68 | 66 | document.location = "{{ dev_conf.get_absolute_url_read }}"; |
|
69 | 67 | }); |
|
70 | 68 | |
|
71 | 69 | $("#bt_write").click(function() { |
|
72 | 70 | document.location = "{{ dev_conf.get_absolute_url_write }}"; |
|
73 | 71 | }); |
|
74 | 72 | |
|
75 | 73 | $("#bt_import").click(function() { |
|
76 | 74 | document.location = "{{ dev_conf.get_absolute_url_import }}"; |
|
77 | 75 | }); |
|
78 | 76 | |
|
79 | 77 | $("#bt_export").click(function() { |
|
80 | 78 | document.location = "{{ dev_conf.get_absolute_url_export }}"; |
|
81 | 79 | }); |
|
82 | ||
|
80 | ||
|
83 | 81 | </script> |
|
84 | {% endblock %} No newline at end of file | |
|
82 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now