##// END OF EJS Templates
- Habilitando la edicion del perfil y estandarizando el menu de perfiles.
jsalyrosas -
r182:183
parent child
Show More
@@ -0,0 +1,38
1 {% extends "abscontrol/index.html" %}
2 {% block title %}ABS CONTROL:::::NEW PROFILE{% endblock %}
3 {% block scripting %}
4 <script src="/static/static/js/profiles.js"></script>
5 {% endblock %}
6 {% block mnu_profile %}
7 <nav class="MnuHorizontal" id="mnuProfiles">
8 <ul>
9 <li><a href="#" id="lnkChangeProfile">Save</a></li>
10 <li><a href="/abscontrol/edit/{{ objProfile.id }}/">Cancel</a></li>
11 </ul>
12 </nav>
13 {% endblock %}
14 {% block maincolumn%}
15 <div id="maincolumn">
16 <form action="/abscontrol/update/{{ objProfile.id }}/" method="post" id="frmProfile">
17 <div id="divProfile">
18 <label for="lblName">Profile: {{ profile_name }}</label>
19 <input type="text" name="txtProfile" value="{{ objProfile.name }}"/>
20 </div>
21 <div class="cleardivs"></div>
22 <input type="hidden" name="mode" value="e">
23 </form>
24 <div id="navPatterns">
25 <nav class="" id="navPatternList">
26 <ul>
27 {% for element in lsPatterns %}
28 {% if patternChoosen.id == element.id %}
29 <li><a href="/abscontrol/{{ objProfile.id }}/edit/{{ element.id }}" class="lnkPatternSelected">{{ element.value }}</a></li>
30 {% else %}
31 <li><a href="/abscontrol/{{ objProfile.id }}/edit/{{ element.id }}" class="lnkPattern">{{ element.value }}</a></li>
32 {% endif %}
33 {% endfor %}
34 </ul>
35 </nav>
36 </div>
37 </div>
38 {% endblock %}
@@ -1,24 +1,25
1 1 from django.conf.urls import patterns, url
2 2
3 3 urlpatterns = patterns('abscontrol.views',
4 4 url(r'^$', 'index'),
5 5 url(r'^new/$', 'new'),
6 6 url(r'^save/$', 'save'),
7 7 url(r'^view/(?P<profile_id>\d+)/$', 'view'),
8 8 url(r'^edit/(?P<profile_id>\d+)/$', 'edit'),
9 9 url(r'^update/(?P<profile_id>\d+)/$', 'update'),
10 url(r'^changeName/(?P<profile_id>\d+)/$', 'changeName'),
10 11 #url(r'^(?P<profile_id>\d+)/$', 'detail'),
11 12 url(r'^(?P<profile_id>\d+)/add/$', 'addPattern'),
12 13 url(r'^(?P<profile_id>\d+)/save/$', 'savePattern'),
13 14 url(r'^(?P<profile_id>\d+)/edit/(?P<pattern_id>\d+)/$', 'editPattern'),
14 15 url(r'^(?P<profile_id>\d+)/view/(?P<pattern_id>\d+)/$', 'viewPattern'),
15 16 url(r'^(?P<profile_id>\d+)/delete/(?P<pattern_id>\d+)/$', 'deletePattern'),
16 17 #url(r'^(?P<poll_id>\d+)/results/$', 'results'),
17 18 #url(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
18 19 url(r'^import/$', 'importProfile'),
19 20 url(r'^showImport/$', 'showImport'),
20 21 url(r'^saveImport/$', 'saveImport'),
21 22 url(r'^(?P<profile_id>\d+)/(?P<pattern_id>\d+)/overjro/(?P<antenna_id>\d+)/$', 'overJRO'),
22 23 url(r'^export/(?P<profile_id>\d+)/$', 'export'),
23 24 url(r'^send/(?P<profile_id>\d+)/$', 'send'),
24 25 ) No newline at end of file
@@ -1,404 +1,424
1 1 from django.shortcuts import render_to_response, redirect
2 2 from django.http import HttpResponse
3 3 from django.conf import settings
4 4 from django.utils.encoding import smart_str
5 5 from django.core.servers.basehttp import FileWrapper
6 6 import mimetypes
7 7
8 8 from datetime import datetime
9 9
10 10 from abscontrol.models import Profile, Pattern, AntennaDown, AntennaUp
11 11
12 12 from util.readABSFile import readABSFile
13 13 from util.saveABSFile import saveABSFile
14 14 from scripts.sendFile import sendFile
15 15
16 16 txtAntenna = "[[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]," \
17 17 "[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]," \
18 18 "[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]," \
19 19 "[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]," \
20 20 "[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]," \
21 21 "[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]," \
22 22 "[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]," \
23 23 "[0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5]]"
24 24
25 25 txtTxUp = "[[1,1,1,1,1,1,1,1]," \
26 26 "[1,1,1,1,1,1,1,1]," \
27 27 "[1,1,1,1,1,1,1,1]," \
28 28 "[1,1,1,1,1,1,1,1]," \
29 29 "[1,1,1,1,1,1,1,1]," \
30 30 "[1,1,1,1,1,1,1,1]," \
31 31 "[1,1,1,1,1,1,1,1]," \
32 32 "[1,1,1,1,1,1,1,1]]"
33 33
34 34 txtTxDown = "[[1,1,1,1,0,0,0,0]," \
35 35 "[1,1,1,1,0,0,0,0]," \
36 36 "[1,1,1,1,0,0,0,0]," \
37 37 "[1,1,1,1,0,0,0,0]," \
38 38 "[0,0,0,0,1,1,1,1]," \
39 39 "[0,0,0,0,1,1,1,1]," \
40 40 "[0,0,0,0,1,1,1,1]," \
41 41 "[0,0,0,0,1,1,1,1]]"
42 42
43 43 txtRxUp = "[[0,0,0,0,1,1,1,1]," \
44 44 "[0,0,0,0,1,1,1,1]," \
45 45 "[0,0,0,0,1,1,1,1]," \
46 46 "[0,0,0,0,1,1,1,1]," \
47 47 "[1,1,1,1,1,1,1,1]," \
48 48 "[1,1,1,1,1,1,1,1]," \
49 49 "[1,1,1,1,1,1,1,1]," \
50 50 "[1,1,1,1,1,1,1,1]]"
51 51
52 52 txtRxDown = "[[1,1,1,1,1,1,1,1]," \
53 53 "[1,1,1,1,1,1,1,1]," \
54 54 "[1,1,1,1,1,1,1,1]," \
55 55 "[1,1,1,1,1,1,1,1]," \
56 56 "[1,1,1,1,1,1,1,1]," \
57 57 "[1,1,1,1,1,1,1,1]," \
58 58 "[1,1,1,1,1,1,1,1]," \
59 59 "[1,1,1,1,1,1,1,1]]"
60 60
61 61 txtUes = "[0.533333,0.00000,1.06667,0.00000]"
62 62
63 63 def index(request):
64 64 #latest_poll_list = profileAntenna.objects.all().order_by('-pub_date')[:5]
65 65 profile_list = Profile.objects.filter(state=1)
66 66 return render_to_response('abscontrol/index.html', {'profile_list': profile_list})
67 67
68 68 def new(request):
69 69 profile_list = Profile.objects.filter(state=1)
70 70 txtProfile = datetime.now().strftime("%Y%m%d%H%M%S%f")
71 71 newprofile = Profile(name=txtProfile)
72 72 newprofile.save()
73 73
74 74 lsPatterns = None
75 75
76 76 return render_to_response('abscontrol/new.html', {'profile_list': profile_list,
77 77 'txtAntenna' : txtAntenna,
78 78 'profile_name' : newprofile.name,
79 79 'profile_id' : newprofile.id,
80 80 'lsPatterns' : lsPatterns,
81 81 'txtUes' : txtUes, 'txtTxUp' : txtTxUp,
82 82 'txtTxDown' : txtTxDown, 'txtRxUp' : txtRxUp,
83 83 'txtRxDown' : txtRxDown,
84 84 })
85 85
86 86 def save(request):
87 87
88 88 txtProfile = request.POST["txtProfile"]
89 89
90 90 txtAntennaUp = request.POST["txtAntennaUp"]
91 91 txtTxUp = request.POST["txtTxUp"]
92 92 txtRxUp = request.POST["txtRxUp"]
93 93 txtUesUp = request.POST["txtUesUp"]
94 94
95 95 txtAntennaDown = request.POST["txtAntennaDown"]
96 96 txtTxDown = request.POST["txtTxDown"]
97 97 txtRxDown = request.POST["txtRxDown"]
98 98 txtUesDown = request.POST["txtUesDown"]
99 99
100 100 newprofile = Profile(name=txtProfile)
101 101 newprofile.save()
102 102
103 103 newpattern = newprofile.pattern_set.create(value=1)
104 104 newpattern.antennaup_set.create(value=txtAntennaUp,tx=txtTxUp,rx=txtRxUp,ues=txtUesUp)
105 105 newpattern.antennadown_set.create(value=txtAntennaDown,tx=txtTxDown,rx=txtRxDown,ues=txtUesDown)
106 106
107 107 newurl = '/abscontrol/view/%d' % newprofile.id
108 108
109 109 return redirect(newurl)
110 110
111 111 def update(request, profile_id):
112 pass
112 txtProfile = request.POST["txtProfile"]
113
114 objProfile = Profile.objects.get(pk=profile_id)
115 objProfile.name = txtProfile
116 objProfile.state = 1
117 objProfile.save()
118
119 newurl = '/abscontrol/view/%d' % objProfile.id
120 return redirect(newurl)
121
122 def changeName(request, profile_id):
123 profile_list = Profile.objects.filter(state=1)
124 objProfile = Profile.objects.get(pk=profile_id)
125 lsPatterns = objProfile.pattern_set.all()
126
127 return render_to_response('abscontrol/changeName.html', {'profile_list': profile_list,
128 'objProfile': objProfile,
129 'lsPatterns' : lsPatterns,
130 })
113 131
114 132 def view(request, profile_id):
115 133 nextPattern = 0
116 134
117 135 if request.method == 'GET' and 'pattern' in request.GET:
118 136 pattern_value = request.GET["pattern"]
119 137 else:
120 138 pattern_value = 1
121 139
122 140 profile_list = Profile.objects.filter(state=1)
123 141 objProfile = Profile.objects.get(pk=profile_id)
124 142
125 143 lsPatterns = objProfile.pattern_set.all()
126 144 patternChoosen = objProfile.pattern_set.get(value=pattern_value)
127 145 objAntennaUp = patternChoosen.antennaup_set.get()
128 146 objAntennaDown = patternChoosen.antennadown_set.get()
129 147
130 148 if len(lsPatterns) > 1:
131 149 if pattern_value == 1:
132 150 nextValuePattern = pattern_value + 1
133 151 nextPattern = objProfile.pattern_set.get(value=nextValuePattern)
134 152
135 153
136 154 return render_to_response('abscontrol/view.html', {'objProfile': objProfile, 'profile_list': profile_list,
137 155 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns,
138 156 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown,
139 157 'nextPattern' : nextPattern,
140 158 })
141 159
142 160 def edit(request, profile_id):
143 161 if request.method == 'GET' and 'pattern' in request.GET:
144 162 pattern_value = request.GET["pattern"]
145 163 else:
146 164 pattern_value = 1
147 165
148 166 profile_list = Profile.objects.filter(state=1)
149 167 objProfile = Profile.objects.get(pk=profile_id)
150 168
151 169 lsPatterns = objProfile.pattern_set.all()
152 170 patternChoosen = objProfile.pattern_set.get(value=pattern_value)
153 171 objAntennaUp = patternChoosen.antennaup_set.get()
154 172 objAntennaDown = patternChoosen.antennadown_set.get()
155 173
156 174 return render_to_response('abscontrol/edit.html', {'objProfile': objProfile, 'profile_list': profile_list,
157 175 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns,
158 176 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown,
159 177 })
160 178
161 179 def addPattern(request, profile_id):
162 180 profile_list = Profile.objects.filter(state=1)
163 181 objProfile = Profile.objects.get(pk=profile_id)
164 182
165 183 return render_to_response('abscontrol/addPattern.html', {'objProfile': objProfile, 'profile_list': profile_list,
166 184 'txtAntenna' : txtAntenna, 'txtUes' : txtUes,
167 185 'txtTxUp' : txtTxUp, 'txtTxDown' : txtTxDown,
168 186 'txtRxUp' : txtRxUp, 'txtRxDown' : txtRxDown,
169 187 })
170 188
171 189 def editPattern(request, profile_id, pattern_id):
172 190 profile_list = Profile.objects.filter(state=1)
173 191 objProfile = Profile.objects.get(pk=profile_id)
174 192 lsPatterns = objProfile.pattern_set.all()
175 193 patternChoosen = Pattern.objects.get(pk=pattern_id)
176 194 objAntennaUp = patternChoosen.antennaup_set.get()
177 195 objAntennaDown = patternChoosen.antennadown_set.get()
178 196
179 197 return render_to_response('abscontrol/editPattern.html', {'objProfile': objProfile, 'profile_list': profile_list,
180 198 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns,
181 199 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown,
182 200 })
183 201
184 202 def savePattern(request, profile_id):
185 203 pattern_id = 0
186 204 method = "save"
187 205
188 206 if 'pattern_id' in request.POST:
189 207 pattern_id = request.POST["pattern_id"]
190 208 method = "update"
191 209
192 210 maxValuePattern = 0
193 211 txtAntennaUp = request.POST["txtAntennaUp"]
194 212 txtTxUp = request.POST["txtTxUp"]
195 213 txtRxUp = request.POST["txtRxUp"]
196 214 txtUesUp = request.POST["txtUesUp"]
197 215
198 216 txtAntennaDown = request.POST["txtAntennaDown"]
199 217 txtTxDown = request.POST["txtTxDown"]
200 218 txtRxDown = request.POST["txtRxDown"]
201 219 txtUesDown = request.POST["txtUesDown"]
202 220
203 221 mode = request.POST["mode"]
204 222
205 223 if method == "save":
206 224 objProfile = Profile.objects.get(pk=profile_id)
207 225 lsPatterns = objProfile.pattern_set.all()
208 226 if len(lsPatterns) > 0:
209 227 for element in lsPatterns:
210 228 if element.value > maxValuePattern:
211 229 maxPattern = element.value
212 230 else:
213 231 maxPattern = 0
214 232
215 233 if maxPattern < 10 :
216 234 newValuePattern = maxPattern + 1
217 235 newpattern = objProfile.pattern_set.create(value=newValuePattern)
218 236 newpattern.antennaup_set.create(value=txtAntennaUp,tx=txtTxUp,rx=txtRxUp,ues=txtUesUp)
219 237 newpattern.antennadown_set.create(value=txtAntennaDown,tx=txtTxDown,rx=txtRxDown,ues=txtUesDown)
220 238 error = 0
221 239 else:
222 240 error = 1 # Can not add more patterns
223 241
224 242 if mode == "e":
225 243 newurl = '/abscontrol/%d/edit/%d' % (int(profile_id), newpattern.id)
226 244 else:
227 245 newurl = '/abscontrol/%d/view/%d' % (int(profile_id), newpattern.id)
228 246 else:
229 247 txtAntennaUpId = request.POST["txtAntennaUpId"]
230 248 objAntennaUp = AntennaUp.objects.get(pk=txtAntennaUpId)
231 249 objAntennaUp.value = txtAntennaUp
232 250 objAntennaUp.tx = txtTxUp
233 251 objAntennaUp.rx = txtRxUp
234 252 objAntennaUp.ues = txtUesUp
235 253 objAntennaUp.save()
236 254
237 255 txtAntennaDownId = request.POST["txtAntennaDownId"]
238 256 objAntennaDown = AntennaDown.objects.get(pk=txtAntennaDownId)
239 257 objAntennaDown.value = txtAntennaDown
240 258 objAntennaDown.tx = txtTxDown
241 259 objAntennaDown.rx = txtRxDown
242 260 objAntennaDown.ues = txtUesDown
243 261 objAntennaDown.save()
244 262
245 263 if mode == "e":
246 264 newurl = '/abscontrol/%d/edit/%d' % (int(profile_id), int(pattern_id))
247 265 else:
248 266 newurl = '/abscontrol/%d/view/%d' % (int(profile_id), int(pattern_id))
249 267
250 268 return redirect(newurl)
251 269
252 270 def viewPattern(request, profile_id, pattern_id):
253 271
254 272 profile_list = Profile.objects.filter(state=1)
255 273 objProfile = Profile.objects.get(pk=profile_id)
256 274
257 275 patternChoosen = Pattern.objects.get(pk=pattern_id)
258 276
259 277 objAntennaUp = patternChoosen.antennaup_set.get()
260 278 objAntennaDown = patternChoosen.antennadown_set.get()
261 279
262 280 lsPatterns = objProfile.pattern_set.all()
263 281
264 282 return render_to_response('abscontrol/viewPattern.html', {'objProfile': objProfile, 'profile_list': profile_list,
265 283 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns,
266 284 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown,
267 285 })
268 286
269 287 def deletePattern(request, profile_id, pattern_id):
270 288 newurl = '/abscontrol/edit/%d' % int(profile_id)
271 289
272 290 return redirect(newurl)
273 291
274 292 def importProfile(request):
275 293 profile_list = Profile.objects.filter(state=1)
276 294 return render_to_response('abscontrol/import.html', {'profile_list': profile_list,})
277 295
278 296 def showImport(request):
297 profile_list = Profile.objects.filter(state=1)
279 298 if request.method == 'POST':
280 299 txtFilename = request.FILES['txtFile']
281 300 if txtFilename:
282 301 destination = open('/tmp/'+txtFilename.name, 'wb+')
283 302 for chunk in txtFilename.chunks():
284 303 destination.write(chunk)
285 304 destination.close()
286 305 filename = '/tmp/'+txtFilename.name
287 306 readFile = readABSFile(filename)
288 307 expName, num_patterns, patterns = readFile.getMetadata()
289 308 else:
290 309 txtFilename = "Error"
291 310 #content = "Error"
292 311 expName = ""
293 312 num_patterns = 0
294 313
295 314 return render_to_response('abscontrol/upload-edit.html', {'txtFilename': txtFilename, 'patterns' : patterns,
296 315 'expName' : expName, 'num_patterns' : num_patterns,
316 'profile_list': profile_list,
297 317 })
298 318
299 319 def saveImport(request):
300 320 patterns = []
301 321
302 322 expName = request.POST["txtProfile"]
303 323 num_patterns = int(request.POST["txtNumPatterns"])
304 324
305 325 newprofile = Profile(name=expName)
306 326 newprofile.save()
307 327
308 328 for i in range(0,num_patterns):
309 329 number = request.POST["txtNumberPattern"+str(i+1)]
310 330 txtAntennaUp = request.POST["txtAntennaUp"+str(i+1)]
311 331 txtAntennaDown = request.POST["txtAntennaDown"+str(i+1)]
312 332 dicPattern = {"number" : number, "up" : txtAntennaUp, "down" : txtAntennaDown}
313 333 patterns.append(dicPattern)
314 334 newpattern = newprofile.pattern_set.create(value=number)
315 335 newpattern.antennaup_set.create(value=txtAntennaUp)
316 336 newpattern.antennadown_set.create(value=txtAntennaDown)
317 337
318 338 newurl = '/abscontrol/view/%d' % newprofile.id
319 339
320 340 return redirect(newurl)
321 341 '''
322 342 return render_to_response('abscontrol/upload-view.html', {'expName' : expName, 'patterns' : patterns,
323 343 'num_patterns' : num_patterns,
324 344 })
325 345 '''
326 346
327 347 def overJRO(request, profile_id, pattern_id, antenna_id):
328 348 if request.GET["beam"] == "Up":
329 349 objAntenna = AntennaUp.objects.get(pk=antenna_id)
330 350 else:
331 351 objAntenna = AntennaDown.objects.get(pk=antenna_id)
332 352 objProfile = Profile.objects.get(pk=profile_id)
333 353 exp_name = objProfile.name
334 354
335 355 phase_tx = objAntenna.value
336 356 gain_tx = objAntenna.tx
337 357 gain_rx = objAntenna.rx
338 358 ues_tx = objAntenna.ues
339 359 only_rx = objAntenna.only_rx
340 360
341 361 return exp_name, phase_tx, gain_tx, gain_rx, ues_tx, only_rx
342 362
343 363 def export(request, profile_id):
344 364 listPatterns = []
345 365 objProfile = Profile.objects.get(pk=profile_id)
346 366 exp_name = objProfile.name
347 367 lsPatterns = objProfile.pattern_set.all()
348 368 for element in lsPatterns:
349 369 objAntennaUp = element.antennaup_set.get()
350 370 objAntennaDown = element.antennadown_set.get()
351 371 dicPatterns = {"number" : element.value, "up" : objAntennaUp.value, "down" : objAntennaDown.value}
352 372 listPatterns.append(dicPatterns)
353 373
354 374 absFile = saveABSFile()
355 375 absFile.setParameters(settings.MEDIA_ROOT, exp_name, listPatterns)
356 376 filename, filesize = absFile.save()
357 377
358 378 wrapper = FileWrapper( open( filename, "r" ) )
359 379 content_type = mimetypes.guess_type( filename )[0]
360 380
361 381 response = HttpResponse(wrapper, content_type = content_type)
362 382 response['Content-Description'] = 'File Transfer'
363 383 response['Content-Disposition'] = 'attachment; filename=%s' % smart_str(filename)
364 384 response['Content-Transfer-Encoding'] = 'binary'
365 385 response['Expires'] = '0'
366 386 response['Cache-Control'] = 'must-revalidate'
367 387 response['Pragma'] = 'public'
368 388 response['Content-Length'] = '%s' % str(filesize)
369 389 response['X-Sendfile'] = '%s' % smart_str(filename)
370 390
371 391 return response
372 392
373 393 def send(request, profile_id):
374 394 listPatterns = []
375 395 objProfile = Profile.objects.get(pk=profile_id)
376 396 exp_name = objProfile.name
377 397
378 398 lsPatterns = objProfile.pattern_set.all()
379 399 for element in lsPatterns:
380 400 objAntennaUp = element.antennaup_set.get()
381 401 objAntennaDown = element.antennadown_set.get()
382 402 dicPatterns = {"number" : element.value, "up" : objAntennaUp.value, "down" : objAntennaDown.value}
383 403 listPatterns.append(dicPatterns)
384 404
385 405 absFile = saveABSFile()
386 406 absFile.setParameters(settings.MEDIA_ROOT, exp_name, listPatterns)
387 407 filename, filesize = absFile.save()
388 408
389 409 apiclient = sendFile()
390 410 apiclient.execute(filename)
391 411 output = apiclient.getOutput()
392 412
393 413 if output == "OK":
394 414 message = "File sent successfully."
395 415 objProfile.hits += 1
396 416 objProfile.save()
397 417 else:
398 418 message = "Error sending file."
399 419
400 420 profile_list = Profile.objects.all()
401 421
402 422 return render_to_response('abscontrol/sendFile.html', {'message': message, "profile_list" : profile_list,
403 423 'objProfile': objProfile,
404 424 })
@@ -1,114 +1,117
1 1 /*
2 2 * font-family: 'Droid Sans', sans-serif;
3 3 * font-family: 'Ubuntu', sans-serif;
4 4 * font-family: 'Open Sans', sans-serif;
5 5 * font-family: 'Open Sans Condensed', sans-serif;
6 6 * font-family: 'Roboto Condensed', sans-serif;
7 7 */
8 8
9 9 body { font-size: 12px; }
10 10 header {width: 980px; border: 0px solid #fcc !important; height: 50px; text-align: center; line-height: 50px}
11 11 #schema {margin: 0 auto; width: 980px; border: 0px solid #f00 !important; padding: 10px 10px 10px 10px}
12 12 #content {border: 0px solid #1cc; margin-top: 5px; margin-bottom: 5px}
13 13 #content #topcolumn {float: left; border: 1px solid #ddd !important; width: 980px; height: 40px; line-height: 35px;
14 14 margin: 2px 0px; box-shadow: 2px 2px 5px #888;}
15 15 #content #maincolumn {float: left; border: 1px solid #ddd !important; width: 980px; margin: 2px 0px; padding: 0px 0px;
16 16 box-shadow: 2px 2px 5px #666;}
17 17 footer {border: 0px solid #200 !important; height: 30px; text-align: center; line-height: 30px;
18 18 margin: 2px 0px; box-shadow: 2px 2px 5px #888;}
19 19
20 20 .cleardivs {clear: both; border: 0px solid #400; height: 0px}
21 21 /****************************************************************************************/
22 22 /****** ESTILOS GENERALES *****************/
23 23 /****************************************************************************************/
24 24 .mnu{ height: 22px; border: 0px solid #c55 !important;}
25 25 .mnu li{ display:inline;}
26 .MnuVertical, .MnuHorizontal { font-family: 'Droid Sans', sans-serif; font-size: 1.2em; font-style: italic; text-shadow: 2px 2px #eee}
26 .MnuVertical, .MnuHorizontal { font-family: 'Droid Sans', sans-serif; font-size: inherit;
27 font-style: normal; text-shadow: 2px 2px #eee;}
27 28 .MnuHorizontal ul{ list-style: none; list-style-type: none; margin: 0;}
28 29
29 30 /*.MnuHorizontal{ display: -webkit-box; -webkit-box-orient:horizontal;}*/
30 31 /*.MnuHorizontal a{ display:block; padding:10px; -webkit-box-flex:1; text-align:center; }*/
31 32
32 33 /****************************************************************************************/
33 34 /****** MENU DE NAVEGACION DE PERFILES **********************************/
34 35 /****************************************************************************************/
35 36 #infoProfiles {border: 0px solid #1cc !important; width: 300px; margin: 0px; padding-top: 2px; padding-bottom: 2px;
36 37 float: left;}
37 38 #infoProfiles label {padding: 10px 10px 10px 12px; margin: 10px 0}
38 39 #infoProfiles select {padding: 4px 0px; margin: 0; font-family: 'Droid Sans', sans-serif;
39 40 font-size: 12px; letter-spacing: 0.029em; width: 200px;}
40 #mnuProfiles{margin: 0px; border: 0px solid #1494F6 !important; float: left; padding: 2px 10px}
41 #mnuProfiles{margin: 0px 0px 0px 0px; border: 0px solid #1494F6 !important; float: right; padding: 2px 10px}
41 42 #mnuProfiles ul{list-style: none; list-style-type: none; margin: 0; padding-left: 20px; border: 0px solid #f00 !important}
42 43 #mnuProfiles li{ width: 80px; padding: 2px; border: 0px solid #c55 !important; float: left; }
43 #mnuProfiles a{ font-weight: normal; color: #1494F6; display: block; border: 0px solid #1cc !important; text-align: center}
44 #mnuProfiles a{ font-weight: normal; color: #1494F6; display: block; border: 0px solid #1cc !important; text-align: center;
45 border-bottom: 1px solid #1494F6 !important; text-decoration: none; padding: 0px 4px;
46 line-height: 18px; margin: 6px 6px;}
44 47
45 48 /****************************************************************************************/
46 49 /******** FORMULARIO DE PERFILES *************************************/
47 50 /****************************************************************************************/
48 51 #divProfile { border: 0px solid #dff !important; margin: 10px 0px; padding: 10px 10px; width: 500px }
49 52 .flsAntenna { margin: 0; width: 100%; padding: 0px; border: 0px solid #f00 !important }
50 53 #divPattern textarea,input[type=text],label{ font-family: "Open Sans"; font-size: inherit; }
51 54 #divPattern textarea {resize: none; overflow: hidden}
52 55 .antenna{ border: 0px solid #1494F6 !important; padding: 2px; margin: 5px 10px; float: left; width: 480px}
53 56 .infoAntenna{ border: 0px solid #f00 !important; width: 480px; float: left}
54 57 .overJRO{ border: 0px solid #1cc !important; width: 250px; float: left; margin: 0px 5px}
55 58 .divAntenna { float: left; margin: 10px; border: 0px solid #fcc !important; width: 190px }
56 59 .divAntenna label{ display: block }
57 60 .txtAntenna { width: 175px; max-width: 180px; height: 160px; max-height: 165px; background: #fdfdfb; padding: 4px;
58 61 border: 2px solid #eee !important; /*font-family: "Ubuntu"; font-size: inherit;*/
59 62 text-align: justify; margin: 0 auto; line-height: 20px}
60 63 .divAntenna p{ width: 175px; max-width: 180px; height: 160px; max-height: 165px; background: #fdfdfb; padding: 2px;
61 64 border: 1px solid #eee !important; font-family: "Ubuntu"; font-size: inherit;
62 65 text-align: justify; margin: 0 auto; line-height: 20px}
63 66
64 67 .divTx { display: block; float: left; margin: 10px; height: 150px }
65 68 .divTx label{ display: block }
66 69 .divTx textarea{ width: 135px; max-width: 135px; height: 135px; max-height: 140px; text-align: justify }
67 70 .divTx p{ width: 100px; max-width: 105px; height: 160px; max-height: 165px; background: #fdfdfb; padding: 2px;
68 71 border: 1px solid #eee !important; font-family: "Ubuntu"; font-size: inherit;
69 72 text-align: justify; margin: 0 auto; line-height: 20px;}
70 73
71 74 .divUes { display: block; margin: 10px}
72 75 .divUes input[type=text] { width: 240px; max-width: 240px; font-family: "Ubuntu"; font-size: inherit;}
73 76
74 77 .overJRO img{width: 400px; height: 200px; text-align: center; vertical-align: middle; margin: 40px 5px 5px 5px;
75 78 display: block; background: #fdfdfb; border: 1px solid #eee !important;}
76 79 .overJRO a{ text-align: center; margin: 0 auto; display: block}
77 80
78 81 /****************************************************************************************/
79 82 /****** MENU DE NAVEGACION DE PATRONES **********************************/
80 83 /****************************************************************************************/
81 84 #divMnuPattern{ width: 280px; height: 25px; display: block; border: 0px solid #1cc !important; float: right;
82 85 margin: 5px 40px 5px 0px;}
83 86 #divMnuPattern li{ float: right; display: block; width: 60px; border: 0px solid #2cc !important}
84 87 #divMnuPattern a{ display: block; line-height: 22px; text-decoration: none; padding: 0px 5px;
85 88 border-bottom: 1px solid #1494F6 !important; margin: 0px 2px; text-align: center; color: #1494F6
86 89 }
87 90 #infoPattern{ display: block; border: 1px solid #1494f6 !important; margin: 5px 2px; }
88 91
89 92 #navPatterns{ margin: 0 auto; border: 0px solid #d00 !important; width: 700px; height: 30px;
90 93 font-family: 'Ubuntu', sans-serif; font-size: 14px; padding: 5px 0px}
91 94 #navPatternList{ margin: 0 auto; border: 0px solid #ecc !important}
92 95 #navPatternList ul{ list-style: none; list-style-type: none; margin: 0;}
93 96 #navPatternList ul li{ float: left; width: 50px; border: 1px solid #eee !important; }
94 97 #navPatternList a{ width: 50px; border: 0px solid #1cc !important; display: block; text-align: center; line-height: 30px; padding: 1px 0px}
95 98 .lnkPattern{ background-color: #ccc !important; color: #eee;}
96 99 .lnkPatternSelected{ background-color: #2cc !important; color: #fff;}
97 100
98 101 .divListofPatterns{ width: 650px; display: block; border: 1px solid #1cc !important; margin: 0 auto}
99 102 .divPattern{ width: 600px; display: block; border: 1px solid #f00 !important; margin: 2px auto; }
100 103
101 104 /****************************************************************************************/
102 105 /****** HEADER *************/
103 106 /****************************************************************************************/
104 107 header nav{width: 960px; border: 0px solid #1cc !important; margin: 0 auto; height: 100%}
105 108 header nav a{font-family: 'Roboto Condensed', sans-serif; font-size: 1.98em; text-transform: uppercase; width: 232px;
106 109 padding: 2px; text-align: center; border: 1px solid #ddd !important; box-shadow: 1px 1px 2px #ddd; display: block;
107 110 float: left; height: 45px; text-decoration: none; background: #eee; line-height: 45px;
108 111 color: #15425d; margin: 0px 1px}
109 112
110 113 /****************************************************************************************/
111 114 /****** FOOTER *************/
112 115 /****************************************************************************************/
113 116 footer p{font-family: 'Roboto Condensed', sans-serif; font-size: 0.98em}
114 117
@@ -1,35 +1,38
1 1 /**
2 2 * @author Jose Antonio Sal y Rosas Celi
3 3 * @contact: jose.salyrosas@jro.igp.gob.pe, arturo.jasyrc@gmail.com
4 4 */
5 5
6 6 $(document).on('ready',function(){
7 7 $('#listProfiles').change(function() {
8 8 if($(this).val() != -1){
9 9 location.href = "/abscontrol/view/" + $(this).val();
10 10 }
11 11 });
12 12 $('#lnkAdd').click(function() {
13 13 profile_id = $("#profile_id").val();
14 14 location.href = "/abscontrol/" + profile_id + "/add/";
15 15 });
16 16 $('#lnkSave').click(function() {
17 17 $('#frmPattern').submit();
18 18 });
19 19 $('#lnkCancel').click(function() {
20 20 if ($("#pattern_id").val() == 0){
21 21 location.href = "/abscontrol/edit/" + $("#profile_id").val();
22 22 }else{
23 23 //location.href="/abscontrol/" + $("#profile_id").val() + "/view/" + $("#pattern_id").val();
24 24 location.href = "/abscontrol/edit/" + $("#profile_id").val();
25 25 }
26 26 });
27 27 $('#lnkExport').click(function(){
28 28 profile_id = $(this).attr("alt");
29 29 location.href = "/abscontrol/export/" + profile_id + "/";
30 30 });
31 31 $('#lnkSendFile').click(function(){
32 32 profile_id = $(this).attr("alt");
33 33 location.href = "/abscontrol/send/" + profile_id + "/";
34 34 });
35 $('#lnkUpdateProfile').click(function(){
36 $('#frmProfile').submit();
37 });
35 38 }); No newline at end of file
@@ -1,31 +1,37
1 1 /**
2 2 * @author Jose Antonio Sal y Rosas Celi
3 3 * @contact: jose.salyrosas@jro.igp.gob.pe, arturo.jasyrc@gmail.com
4 4 */
5 5
6 6 $(document).on('ready',function(){
7 7 $('#listProfiles').change(function() {
8 8 if($(this).val() != -1){
9 9 location.href="/abscontrol/view/" + $(this).val();
10 10 }
11 11 });
12 12 $('.activeOverJRO').click(function() {
13 13 profile_id = $('input[name=txtProfileId]').val();
14 14 pattern_id = $('input[name=txtPatternId]').val();
15 15 field_Id = $(this).attr("id");
16 16 field_value = $('input[name=txtAntenna'+field_Id+'Id]').val();
17 17 url = "/abscontrol/"+profile_id+"/"+pattern_id+"/overjro/"+field_value+"/?beam="+field_Id;
18 18 alert(url);
19 19 });
20 20 $('#lnkSaveImport').click(function(){
21 21 $('#frmImportProfile').submit();
22 22 });
23 $('#lnkUpload').click(function(){
24 $('#frmImport').submit();
25 });
23 26 $('#lnkExport').click(function(){
24 27 profile_id = $(this).attr("alt");
25 28 location.href="/abscontrol/export/" + profile_id + "/";
26 29 });
27 30 $('#lnkSendFile').click(function(){
28 31 profile_id = $(this).attr("alt");
29 32 location.href="/abscontrol/send/" + profile_id + "/";
30 33 });
34 $('#lnkChangeProfile').click(function(){
35 $('#frmProfile').submit();
36 });
31 37 }); No newline at end of file
@@ -1,114 +1,123
1 1 {% extends "abscontrol/index.html" %}
2 2 {% block title %}ABS CONTROL:::PROFILE:::{{ objProfile.name }}{% endblock %}
3 3 {% block scripting %}
4 4 <script src="/static/static/js/patterns.js"></script>
5 5 {% endblock %}
6 6 {% block mnu_profile %}
7 <nav class="MnuVertical" id="mnuProfiles">
7 <nav class="MnuHorizontal" id="mnuProfiles">
8 8 <ul>
9 9 <li><a href="/abscontrol/new/">New</a></li>
10 10 {% if objProfile.state == 0 %}
11 <li><a href="/abscontrol/update/{{ objProfile.id }}/?opt=changeName">Save</a></li>
11 <li><a href="/abscontrol/changeName/{{ objProfile.id }}/">Save</a></li>
12 12 {% else %}
13 <li><a href="/abscontrol/update/{{ objProfile.id }}/?opt=update">Save</a></li>
13 <li><a href="#" id="lnkUpdateProfile">Save</a></li>
14 14 {% endif %}
15 15 <li><a href="#">Save as</a></li>
16 16 <li><a href="/abscontrol/import/">Import</a></li>
17 17 {% if objProfile %}
18 18 <li><a href="#" id="lnkExport" alt="{{ objProfile.id }}">Export</a></li>
19 19 {% endif %}
20 20 </ul>
21 21 </nav>
22 22 {% endblock %}
23 23 {% block maincolumn%}
24 24 <div id="maincolumn">
25 {% if objProfile.state == 1 %}
26 <form action="/abscontrol/update/{{ objProfile.id }}/" method="post" id="frmProfile">
25 27 <div id="divProfile">
26 28 <label for="lblName">Profile:</label>
27 <label for="lblProfile">{{ objProfile.name }}</label>
29 <input type="text" name="txtProfile" value="{{ objProfile.name }}"/>
28 30 </div>
31 <input type="hidden" name="mode" value="e">
32 </form>
33 {% else %}
34 <div id="divProfile">
35 <label for="lblName">Profile: {{ objProfile.name }}</label>
36 </div>
37 {% endif %}
29 38 {% if patternChoosen %}
30 39 <div id="navPatterns">
31 40 <nav class="" id="navPatternList">
32 41 <ul>
33 42 {% for element in lsPatterns %}
34 43 {% if patternChoosen.id == element.id %}
35 44 <li><a href="/abscontrol/{{ objProfile.id }}/edit/{{ element.id }}" class="lnkPatternSelected">{{ element.value }}</a></li>
36 45 {% else %}
37 46 <li><a href="/abscontrol/{{ objProfile.id }}/edit/{{ element.id }}" class="lnkPattern">{{ element.value }}</a></li>
38 47 {% endif %}
39 48 {% endfor %}
40 49 </ul>
41 50 </nav>
42 51 </div>
43 52 {% endif %}
44 53 <div id="divPattern">
45 54 {% block mnuPattern %}
46 55 <div class="divMenu" id="divMnuPattern">
47 56 <nav class="MnuHorizontal">
48 57 <ul class="mnu" id="mnuPattern">
49 58 {% if lsPatterns|length > 1 %}
50 59 <li><a href="/abscontrol/{{ objProfile.id }}/delete/{{ patternChoosen.id }}">Delete</a></li>
51 60 {% endif %}
52 61 <li><a href="#" class="" id="lnkSave">Save</a></li>
53 62 {% if lsPatterns|length < 10 %}
54 63 <li><a href="/abscontrol/{{ objProfile.id }}/add">Add</a></li>
55 64 {% endif %}
56 65 </ul>
57 66 </nav>
58 67 </div>
59 68 <div class="cleardivs"></div>
60 69 {% endblock %}
61 70 {% block pattern %}
62 71 <div id="infoPattern">
63 72
64 73 <div id="antennaUp">
65 74 <fieldset class="flsAntenna">
66 75 <legend>UP</legend>
67 76 <div class="divAntenna">
68 77 <label for="lblAntenna">Antenna</label>
69 78 <textarea name="txtAntennaUp" class="txtAntenna" cols="38" rows="8">{{ antennaUp.value }}</textarea>
70 79 </div>
71 80 <div class="divTx">
72 81 <label for="lblTx">Tx</label>
73 82 <textarea name="txtTxUp" class="txtTR" cols="20" rows="8">{{ antennaUp.tx }}</textarea>
74 83 </div>
75 84 <div class="divTx">
76 85 <label for="lblRx">Rx</label>
77 86 <textarea name="txtRxUp" class="txtTR" cols="20" rows="8">{{ antennaUp.rx }}</textarea>
78 87 </div>
79 88 <div class="cleardivs"></div>
80 89 <div class="divUes">
81 90 <label for="lblUes">Ues:</label>
82 91 <input type="text" name="txtUesUp" value="{{ antennaUp.ues }}" />
83 92 </div>
84 93 <input type="hidden" name="txtAntennaUpId" value="{{ antennaUp.id }}" />
85 94 </fieldset>
86 95 </div>
87 96 <div id="antennaDown">
88 97 <fieldset class="flsAntenna">
89 98 <legend>DOWN</legend>
90 99 <div class="divAntenna">
91 100 <label for="lblAntenna">Antenna</label>
92 101 <textarea name="txtAntennaDown" class="txtAntenna" cols="38" rows="8">{{ antennaDown.value }}</textarea>
93 102 </div>
94 103 <div class="divTx">
95 104 <label for="lblTx">Tx</label>
96 105 <textarea name="txtTxDown" class="txtTR" cols="20" rows="8">{{ antennaDown.tx }}</textarea>
97 106 </div>
98 107 <div class="divTx">
99 108 <label for="lblRx">Rx</label>
100 109 <textarea name="txtRxDown" class="txtTR" cols="20" rows="8">{{ antennaDown.rx }}</textarea>
101 110 </div>
102 111 <div class="cleardivs"></div>
103 112 <div class="divUes">
104 113 <label for="lblUes">Ues:</label>
105 114 <input type="text" name="txtUesDown" value="{{ antennaDown.ues }}" />
106 115 </div>
107 116 <input type="hidden" name="txtAntennaDownId" value="{{ antennaDown.id }}" />
108 117 </fieldset>
109 118 </div>
110 119 </div>
111 120 {% endblock %}
112 121 </div>
113 122 </div>
114 123 {% endblock %}
@@ -1,16 +1,23
1 1 {% extends "abscontrol/index.html" %}
2 2 {% block title %}ABS CONTROL:::::IMPORT PROFILE{% endblock %}
3 3
4 {% block mnu_profile %}
5 <nav class="MnuHorizontal" id="mnuProfiles">
6 <ul>
7 <li><a href="#" id="lnkUpload">Upload</a></li>
8 <li><a href="#" id="lnkCancel">Cancel</a></li>
9 </ul>
10 </nav>
11 {% endblock %}
4 12 {% block maincolumn %}
5 13 <div id="maincolumn">
6 <form action="/abscontrol/showImport/" method="post" enctype="multipart/form-data">
14 <form name="frmImport" id="frmImport" action="/abscontrol/showImport/" method="post" enctype="multipart/form-data">
7 15 <div id="divPattern">
8 16 <div class="divUes">
9 17 <label for="lblFile">Choose File:</label>
10 18 <input type="file" name="txtFile" />
11 <input type="submit" name="btnSend" value="Upload" />
12 19 </div>
13 20 </div>
14 21 </form>
15 22 </div>
16 23 {% endblock %} No newline at end of file
@@ -1,64 +1,64
1 1 {% extends "base.html" %}
2 2
3 3 {% block title %}ABS CONTROL:::::{% endblock %}
4 4 {% block scripting %}
5 5 {% if profile_list %}
6 6 <script src="/static/static/js/profiles.js"></script>
7 7 {% endif %}
8 8 {% endblock %}
9 9 {% block content %}
10 10 <div id="content">
11 11 {% block topcolumn %}
12 12 <div id="topcolumn">
13 13 <div id="lsProfiles">
14 14 <div id="infoProfiles">
15 15 <label for="lblProfile" class="lblInfo">Profiles: </label>
16 16 {% if profile_list %}
17 17 <select name="lsProfiles" id="listProfiles">
18 18 <option value="-1">Choose ...</option>
19 19 {% for entry in profile_list %}
20 20 {% if objProfile %}
21 21 {% if objProfile.id == entry.id %}
22 22 <option value="{{ entry.id }}" selected>{{ entry.name }}</option>
23 23 {% else %}
24 24 <option value="{{ entry.id }}">{{ entry.name }}</option>
25 25 {% endif %}
26 26 {% else %}
27 27 <option value="{{ entry.id }}">{{ entry.name }}</option>
28 28 {% endif %}
29 29 {% endfor %}
30 30 </select>
31 31 {% else %}
32 32 <label for="lblMessage" class="lblInfo">No profiles.</label>
33 33 {% endif %}
34 34 </div>
35 35 </div>
36 36 {% block mnu_profile %}
37 37 <div id="mnuProfiles">
38 <nav class="MnuVertical" id="navProfiles">
38 <nav class="MnuHorizontal" id="navProfiles">
39 39 <ul>
40 40 <li><a href="/abscontrol/new">New</a></li>
41 41 {% if objProfile %}
42 42 <li><a href="/abscontrol/edit/{{ objProfile.id }}">Edit</a></li>
43 43 <li><a href="#">Save</a></li>
44 44 {% endif %}
45 45 <li><a href="#">Save as</a></li>
46 46 <li><a href="/abscontrol/import">Import</a></li>
47 47 {% if objProfile %}
48 48 <li><a href="#" id="lnkExport" alt="{{ objProfile.id }}">Export</a></li>
49 49 <li><a href="#" id="lnkSendFile" alt="{{ objProfile.id }}">Send</a></li>
50 50 {% endif %}
51 51 </ul>
52 52 <div class="cleardivs"></div>
53 53 </nav>
54 54 </div>
55 55 {% endblock %}
56 56 <div class="cleardivs"></div>
57 57 </div>
58 58 {% endblock %}
59 59 {% block maincolumn %}
60 60 <div id="maincolumn" style="height: 50px"></div>
61 61 {% endblock %}
62 62 <div class="cleardivs"></div>
63 63 </div>
64 64 {% endblock %} No newline at end of file
@@ -1,56 +1,56
1 1 {% extends "abscontrol/index.html" %}
2 2 {% block title %}ABS CONTROL:::::IMPORT PROFILE{% endblock %}
3 3 {% block scripting %}
4 4 <script src="/static/static/js/profiles.js"></script>
5 5 {% endblock %}
6 6 {% block mnu_profile %}
7 <nav class="MnuVertical" id="mnuProfiles">
7 <nav class="MnuHorizontal" id="mnuProfiles">
8 8 <ul>
9 9 <li><a href="/abscontrol/new">New</a></li>
10 10 <li><a href="#" id="lnkSaveImport">Save</a></li>
11 11 <li><a href="/abscontrol/import">Import</a></li>
12 12 <li><a href="#">Export</a></li>
13 13 <li><a href="#">Apply</a></li>
14 14 </ul>
15 15 </nav>
16 16 {% endblock %}
17 17 {% block maincolumn %}
18 18 <div id="maincolumn">
19 19 <div id="divPattern">
20 20 <div class="divUes">
21 21 <label for="lblFile">File: {{ txtFilename }}</label>
22 22 </div>
23 23 <form action="/abscontrol/saveImport/" id="frmImportProfile" method="post">
24 24 <div class="divUes">
25 25 <label for="lblExperiment">Experiment: </label>
26 26 <input type="text" name="txtProfile" value="{{ expName }}">
27 27 <br />
28 28 <label for="lblNumber">Number of patterns: {{ num_patterns }}</label>
29 29 <input type="hidden" name="txtNumPatterns" value="{{ num_patterns }}" />
30 30 </div>
31 31 {% if patterns %}
32 32 <div class="divListofPatterns">
33 33 {% for element in patterns %}
34 34 <div class="divPattern">
35 35 <div>
36 36 <label for="lblNumber">Pattern: {{ element.number }}</label>
37 37 <input type="hidden" name="txtNumberPattern{{ element.number }}" value="{{ element.number }}" />
38 38 </div>
39 39 <div class="divAntenna">
40 40 <label for="lblAntennaUp">Antenna Up:</label>
41 41 <textarea name="txtAntennaUp{{ element.number }}" class="txtAntenna" cols="38" rows="8">{{ element.up }}</textarea>
42 42 </div>
43 43 <div class="divAntenna">
44 44 <label for="lblAntennaDown">Antenna Down:</label>
45 45 <textarea name="txtAntennaDown{{ element.number }}" class="txtAntenna" cols="38" rows="8">{{ element.down }}</textarea>
46 46 </div>
47 47 <div class="cleardivs"></div>
48 48 </div>
49 49 <div class="cleardivs"></div>
50 50 {% endfor %}
51 51 </div>
52 52 {% endif %}
53 53 </form>
54 54 </div>
55 55 </div>
56 56 {% endblock %}
@@ -1,45 +1,45
1 1 {% extends "abscontrol/index.html" %}
2 2 {% block title %}ABS CONTROL:::::IMPORT PROFILE{% endblock %}
3 3
4 4 {% block mnu_profile %}
5 <nav class="MnuVertical" id="mnuProfiles">
5 <nav class="MnuHorizontal" id="mnuProfiles">
6 6 <ul>
7 7 <li><a href="/abscontrol/new">New</a></li>
8 8 <li><a href="#">Save</a></li>
9 9 <li><a href="/abscontrol/import">Import</a></li>
10 10 <li><a href="#">Export</a></li>
11 11 <li><a href="#">Apply</a></li>
12 12 </ul>
13 13 </nav>
14 14 {% endblock %}
15 15 {% block maincolumn %}
16 16 <div id="maincolumn">
17 17 <div id="divPattern">
18 18 <div class="divUes">
19 19 <label for="lblExperiment">Experiment: {{ expName }}</label><br />
20 20 <label for="lblNumber">Number of patterns: {{ num_patterns }}</label>
21 21 </div>
22 22 {% if patterns %}
23 23 <div class="divListofPatterns">
24 24 {% for element in patterns %}
25 25 <div class="divPattern">
26 26 <div>
27 27 <label for="lblNumber">Pattern: {{ element.number }}</label>
28 28 </div>
29 29 <div class="divAntenna">
30 30 <label for="lblAntennaUp">Antenna Up:</label>
31 31 <p>{{ element.up }}</p>
32 32 </div>
33 33 <div class="divAntenna">
34 34 <label for="lblAntennaDown">Antenna Down:</label>
35 35 <p>{{ element.down }}</p>
36 36 </div>
37 37 <div class="cleardivs"></div>
38 38 </div>
39 39 <div class="cleardivs"></div>
40 40 {% endfor %}
41 41 </div>
42 42 {% endif %}
43 43 </div>
44 44 </div>
45 45 {% endblock %}
@@ -1,133 +1,135
1 1 {% extends "abscontrol/index.html" %}
2 2 {% block title %}ABS CONTROL:::PROFILE:::{{ objProfile.name }}{% endblock %}
3 3
4 4 {% block mnu_profile %}
5 <nav class="MnuVertical" id="mnuProfiles">
5 <nav class="MnuHorizontal" id="mnuProfiles">
6 6 <ul>
7 7 <li><a href="/abscontrol/new">New</a></li>
8 8 {% if patternChoosen %}
9 9 <li><a href="/abscontrol/{{ objProfile.id }}/edit/{{ patternChoosen.id }}">Edit</a></li>
10 10 {% else %}
11 11 <li><a href="/abscontrol/edit/{{ objProfile.id }}">Edit</a></li>
12 12 {% endif %}
13 13 <li><a href="#">Save as</a></li>
14 14 <li><a href="/abscontrol/import">Import</a></li>
15 15 <li><a href="#" id="lnkExport" alt="{{ objProfile.id }}">Export</a></li>
16 16 <li><a href="#" id="lnkSendFile" alt="{{ objProfile.id }}">Send</a></li>
17 17 </ul>
18 18 </nav>
19 19 {% endblock %}
20 20 {% block maincolumn%}
21 21 <div id="maincolumn">
22 {% if objProfile.state == 0 %}
22 23 <div id="divProfile">
23 24 <label for="lblName">Profile:</label>
24 25 <label for="lblProfile">{{ objProfile.name }}</label>
25 26 </div>
27 {% endif %}
26 28 {% if patternChoosen %}
27 29 <div id="navPatterns">
28 30 <nav class="" id="navPatternList">
29 31 <ul>
30 32 {% for element in lsPatterns %}
31 33 {% if patternChoosen.id == element.id %}
32 34 <li><a href="/abscontrol/{{ objProfile.id }}/view/{{ element.id }}/" class="lnkPatternSelected">{{ element.value }}</a></li>
33 35 {% else %}
34 36 <li><a href="/abscontrol/{{ objProfile.id }}/view/{{ element.id }}/" class="lnkPattern">{{ element.value }}</a></li>
35 37 {% endif %}
36 38 {% endfor %}
37 39 </ul>
38 40 <div class="cleardivs"></div>
39 41 </nav>
40 42 </div>
41 43 {% endif %}
42 44 {% block mnuPattern %}
43 45 <div class="divMenu" id="divMnuPattern">
44 46 <nav class="MnuHorizontal">
45 47 <ul class="mnu" id="mnuPattern">
46 48 <li><a href="#">Apply</a></li>
47 49 </ul>
48 50 </nav>
49 51 </div>
50 52 <div class="cleardivs"></div>
51 53 {% endblock %}
52 54 <div id="divPattern">
53 55 <div id="infoPattern">
54 56 <div id="antennaUp" class="antenna">
55 57 <fieldset class="flsAntenna">
56 58 <legend>UP</legend>
57 59 <div class="infoAntenna">
58 60 <div class="divAntenna">
59 61 <label for="lblAntenna">Antenna</label>
60 62 <p>{{ antennaUp.value }}</p>
61 63 </div>
62 64 <div class="divTx">
63 65 <label for="lblTx">Tx</label>
64 66 <p>{{ antennaUp.tx }}</p>
65 67 </div>
66 68 <div class="divTx">
67 69 <label for="lblRx">Rx</label>
68 70 <p>{{ antennaUp.rx }}</p>
69 71 </div>
70 72 <div class="cleardivs"></div>
71 73 <div class="divUes">
72 74 <label for="lblUes">Ues:</label>
73 75 <label for="lblAntennaUpUes">{{ antennaUp.ues }}</label>
74 76 {% if antennaUp.only_rx == 0 %}
75 77 <input type="checkbox" name="chkOnlyRxUp" value="" />
76 78 {% else %}
77 79 <input type="checkbox" name="chkOnlyRxUp" value="" checked="checked"/>
78 80 {% endif %}
79 81 <label for="lblOnlyRx">Only RX</label>
80 82 </div>
81 83 </div>
82 84 </fieldset>
83 85 </div>
84 86 <div class="overJRO">
85 87 <img />
86 88 <a href="#" class="activeOverJRO" id="Up">Preview</a>
87 89 </div>
88 90 <div class="cleardivs"></div>
89 91
90 92 <div id="antennaDown" class="antenna">
91 93 <fieldset class="flsAntenna">
92 94 <legend>DOWN</legend>
93 95 <div class="infoAntenna">
94 96 <div class="divAntenna">
95 97 <label for="lblAntenna">Antenna</label>
96 98 <p>{{ antennaDown.value }}</p>
97 99 </div>
98 100 <div class="divTx">
99 101 <label for="lblTx">Tx</label>
100 102 <p>{{ antennaDown.tx }}</p>
101 103 </div>
102 104 <div class="divTx">
103 105 <label for="lblRx">Rx</label>
104 106 <p>{{ antennaDown.rx }}</p>
105 107 </div>
106 108 <div class="cleardivs"></div>
107 109 <div class="divUes">
108 110 <label for="lblUes">Ues:</label>
109 111 <label for="lblAntennaDownUes">{{ antennaDown.ues }}</label>
110 112 {% if antennaDown.only_rx == 0 %}
111 113 <input type="checkbox" name="chkOnlyRxDown" value="" />
112 114 {% else %}
113 115 <input type="checkbox" name="chkOnlyRxDown" value="" checked="checked"/>
114 116 {% endif %}
115 117 <label for="lblOnlyRx">Only RX</label>
116 118 </div>
117 119 </div>
118 120
119 121 </fieldset>
120 122 </div>
121 123 <div class="overJRO">
122 124 <img />
123 125 <a href="#" class="activeOverJRO" id="Down">Preview</a>
124 126 </div>
125 127 <div class="cleardivs"></div>
126 128 </div>
127 129 <input type="hidden" name="txtAntennaUpId" value="{{ antennaUp.id }}"/>
128 130 <input type="hidden" name="txtAntennaDownId" value="{{ antennaDown.id }}"/>
129 131 <input type="hidden" name="txtPatternId" value="{{ patternChoosen.id }}"/>
130 132 <input type="hidden" name="txtProfileId" value="{{ objProfile.id }}"/>
131 133 </div>
132 134 </div>
133 135 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now