1 | NO CONTENT: new file 10644 |
|
NO CONTENT: new file 10644 |
@@ -118,6 +118,9 | |||||
118 | }, context_instance=RequestContext(request)) |
|
118 | }, context_instance=RequestContext(request)) | |
119 |
|
119 | |||
120 | def view(request, profile_id): |
|
120 | def view(request, profile_id): | |
|
121 | objProfileActive = None | |||
|
122 | objPatternActive = None | |||
|
123 | ||||
121 | if request.method == 'GET' and 'pattern' in request.GET: |
|
124 | if request.method == 'GET' and 'pattern' in request.GET: | |
122 | pattern_value = request.GET["pattern"] |
|
125 | pattern_value = request.GET["pattern"] | |
123 | else: |
|
126 | else: | |
@@ -131,9 +134,18 | |||||
131 | objAntennaUp = patternChoosen.antennaup_set.get() |
|
134 | objAntennaUp = patternChoosen.antennaup_set.get() | |
132 | objAntennaDown = patternChoosen.antennadown_set.get() |
|
135 | objAntennaDown = patternChoosen.antennadown_set.get() | |
133 |
|
136 | |||
|
137 | lsProfilesActive = Profile.objects.filter(is_active=1) | |||
|
138 | if len(lsProfilesActive) > 0: | |||
|
139 | objProfileActive = Profile.objects.get(is_active=1) | |||
|
140 | ||||
|
141 | lsPatternsActive = Pattern.objects.filter(is_active=1) | |||
|
142 | if len(lsPatternsActive) > 0: | |||
|
143 | objPatternActive = Pattern.objects.get(is_active=1) | |||
|
144 | ||||
134 | return render_to_response('abscontrol/view.html', {'objProfile': objProfile, 'profile_list': profile_list, |
|
145 | return render_to_response('abscontrol/view.html', {'objProfile': objProfile, 'profile_list': profile_list, | |
135 | 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns, |
|
146 | 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns, | |
136 | 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown, |
|
147 | 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown, | |
|
148 | 'profileActive' : objProfileActive, 'patternActive' : objPatternActive, | |||
137 | }, context_instance=RequestContext(request)) |
|
149 | }, context_instance=RequestContext(request)) | |
138 |
|
150 | |||
139 | def edit(request, profile_id): |
|
151 | def edit(request, profile_id): | |
@@ -322,9 +334,18 | |||||
322 |
|
334 | |||
323 | lsPatterns = objProfile.pattern_set.all() |
|
335 | lsPatterns = objProfile.pattern_set.all() | |
324 |
|
336 | |||
|
337 | lsProfilesActive = Profile.objects.filter(is_active=1) | |||
|
338 | if len(lsProfilesActive) > 0: | |||
|
339 | objProfileActive = Profile.objects.get(is_active=1) | |||
|
340 | ||||
|
341 | lsPatternsActive = Pattern.objects.filter(is_active=1) | |||
|
342 | if len(lsPatternsActive) > 0: | |||
|
343 | objPatternActive = Pattern.objects.get(is_active=1) | |||
|
344 | ||||
325 | return render_to_response('abscontrol/viewPattern.html', {'objProfile': objProfile, 'profile_list': profile_list, |
|
345 | return render_to_response('abscontrol/viewPattern.html', {'objProfile': objProfile, 'profile_list': profile_list, | |
326 | 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns, |
|
346 | 'patternChoosen' : patternChoosen, 'lsPatterns' : lsPatterns, | |
327 | 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown, |
|
347 | 'antennaUp' : objAntennaUp, 'antennaDown' : objAntennaDown, | |
|
348 | 'profileActive' : objProfileActive, 'patternActive' : objPatternActive, | |||
328 | }, context_instance=RequestContext(request)) |
|
349 | }, context_instance=RequestContext(request)) | |
329 |
|
350 | |||
330 | def deletePattern(request, profile_id, pattern_id): |
|
351 | def deletePattern(request, profile_id, pattern_id): |
@@ -25,8 +25,8 | |||||
25 | border: 0px solid #f00 !important; } |
|
25 | border: 0px solid #f00 !important; } | |
26 |
|
26 | |||
27 | #content { |
|
27 | #content { | |
28 |
margin: |
|
28 | margin: 2px 0px 0px 0px; | |
29 | border: 0px solid #1cc; } |
|
29 | border: 0px solid #1cc !important; } | |
30 |
|
30 | |||
31 | #topcolumn { |
|
31 | #topcolumn { | |
32 | float: left; |
|
32 | float: left; | |
@@ -37,11 +37,19 | |||||
37 | border: 1px solid #ddd !important; |
|
37 | border: 1px solid #ddd !important; | |
38 | box-shadow: 2px 2px 5px #888; } |
|
38 | box-shadow: 2px 2px 5px #888; } | |
39 |
|
39 | |||
|
40 | #activeProfileBar { | |||
|
41 | float: left; | |||
|
42 | width: 980px; | |||
|
43 | margin: 0px 0px; | |||
|
44 | height: 25px; | |||
|
45 | border: 1px solid #ddd !important; | |||
|
46 | box-shadow: 1px 1px 5px #ccc; } | |||
|
47 | ||||
40 | #maincolumn { |
|
48 | #maincolumn { | |
41 | float: left; |
|
49 | float: left; | |
42 | width: 980px; |
|
50 | width: 980px; | |
43 | margin: 2px 0px; |
|
51 | margin: 2px 0px 0px 0px; | |
44 | padding: 0px 0px; |
|
52 | padding: 2px 0px 6px 0px; | |
45 | border: 1px solid #ddd !important; |
|
53 | border: 1px solid #ddd !important; | |
46 | box-shadow: 2px 2px 5px #666; } |
|
54 | box-shadow: 2px 2px 5px #666; } | |
47 |
|
55 | |||
@@ -124,7 +132,7 | |||||
124 | padding: 4px 0px; margin: 0; |
|
132 | padding: 4px 0px; margin: 0; | |
125 | font-family: 'Droid Sans', sans-serif; |
|
133 | font-family: 'Droid Sans', sans-serif; | |
126 | font-size: 12px; |
|
134 | font-size: 12px; | |
127 | letter-spacing: 0.006; |
|
135 | letter-spacing: 0.006em; | |
128 | width: 200px; } |
|
136 | width: 200px; } | |
129 |
|
137 | |||
130 | #mnuProfiles { |
|
138 | #mnuProfiles { | |
@@ -158,6 +166,31 | |||||
158 | margin: 6px; } |
|
166 | margin: 6px; } | |
159 |
|
167 | |||
160 | /****************************************************************************************/ |
|
168 | /****************************************************************************************/ | |
|
169 | /****** BARRA DE PERFILES ACTIVOS *************/ | |||
|
170 | /****************************************************************************************/ | |||
|
171 | ||||
|
172 | #activeProfileBar label, a{ | |||
|
173 | line-height: 20px; | |||
|
174 | float: left; | |||
|
175 | letter-spacing: 0.01em; | |||
|
176 | padding: 3px 12px; | |||
|
177 | border: 0px solid #f00 !important; } | |||
|
178 | ||||
|
179 | .titleBar { | |||
|
180 | color: #333; | |||
|
181 | margin-left: 2px; | |||
|
182 | text-align: right; } | |||
|
183 | ||||
|
184 | .ActiveProfile, .ActivePattern, .lnkActiveProfile { | |||
|
185 | color: #001bf4; | |||
|
186 | margin: 0px 2px; | |||
|
187 | text-align: left; | |||
|
188 | text-decoration: None; } | |||
|
189 | ||||
|
190 | .navbarsep{ | |||
|
191 | float: left; } | |||
|
192 | ||||
|
193 | /****************************************************************************************/ | |||
161 | /******** FORMULARIO DE PERFILES *************************************/ |
|
194 | /******** FORMULARIO DE PERFILES *************************************/ | |
162 | /****************************************************************************************/ |
|
195 | /****************************************************************************************/ | |
163 | #divProfile { |
|
196 | #divProfile { | |
@@ -168,8 +201,31 | |||||
168 |
|
201 | |||
169 | #divProfile label,input[type=text],input[type=file] { |
|
202 | #divProfile label,input[type=text],input[type=file] { | |
170 | font-family: 'Open Sans', sans-serif; |
|
203 | font-family: 'Open Sans', sans-serif; | |
171 | /*font-family: 'Roboto Condensed', sans-serif;*/ |
|
|||
172 | font-size: inherit; } |
|
204 | font-size: inherit; } | |
|
205 | ||||
|
206 | #divProfile label { | |||
|
207 | float: left; | |||
|
208 | text-align: right; | |||
|
209 | width: 120px; | |||
|
210 | padding: 3px 10px 3px 10px; | |||
|
211 | line-height: 20px; | |||
|
212 | border: 0px solid #d85 !important; | |||
|
213 | } | |||
|
214 | ||||
|
215 | #divProfile input[type=text] { | |||
|
216 | letter-spacing: 0.08em; | |||
|
217 | padding: 2px 10px 2px 10px; | |||
|
218 | width: 200px; | |||
|
219 | } | |||
|
220 | ||||
|
221 | #divProfile input[type=text]:FOCUS { | |||
|
222 | border: 1px solid #faa !important; | |||
|
223 | border-radius: 0.26em; | |||
|
224 | box-shadow: 2px 2px 5px #fbb; | |||
|
225 | } | |||
|
226 | ||||
|
227 | .lblProfile { | |||
|
228 | width: 200px; } | |||
173 |
|
229 | |||
174 | #divPattern textarea,input[type=text],label,input[type=file],input[type=button],input[type=submit] { |
|
230 | #divPattern textarea,input[type=text],label,input[type=file],input[type=button],input[type=submit] { | |
175 | font-family: 'Roboto Condensed', sans-serif; |
|
231 | font-family: 'Roboto Condensed', sans-serif; |
@@ -7,7 +7,9 | |||||
7 | <nav class="MnuHorizontal" id="mnuProfiles"> |
|
7 | <nav class="MnuHorizontal" id="mnuProfiles"> | |
8 | <ul> |
|
8 | <ul> | |
9 | <li><a href="{% url abscontrol.views.new %}">New</a></li> |
|
9 | <li><a href="{% url abscontrol.views.new %}">New</a></li> | |
|
10 | {% if objProfile and patternChoosen %} | |||
10 | <li><a href="{% url abscontrol.views.viewPattern objProfile.id patternChoosen.id %}">View</a></li> |
|
11 | <li><a href="{% url abscontrol.views.viewPattern objProfile.id patternChoosen.id %}">View</a></li> | |
|
12 | {% endif %} | |||
11 | {% if objProfile.state == 0 %} |
|
13 | {% if objProfile.state == 0 %} | |
12 | <li><a href="/abscontrol/changeName/{{ objProfile.id }}/">Save</a></li> |
|
14 | <li><a href="/abscontrol/changeName/{{ objProfile.id }}/">Save</a></li> | |
13 | {% else %} |
|
15 | {% else %} | |
@@ -34,8 +36,10 | |||||
34 | </form> |
|
36 | </form> | |
35 | {% else %} |
|
37 | {% else %} | |
36 | <div id="divProfile"> |
|
38 | <div id="divProfile"> | |
37 |
<label for="lblName">Profile: |
|
39 | <label for="lblName">Profile:</label> | |
38 | </div> |
|
40 | <label for="lblName" class="lblProfile">{{ objProfile.name }}</label> | |
|
41 | </div> | |||
|
42 | <div class="cleardivs"></div> | |||
39 | {% endif %} |
|
43 | {% endif %} | |
40 | {% if patternChoosen %} |
|
44 | {% if patternChoosen %} | |
41 | <div id="navPatterns"> |
|
45 | <div id="navPatterns"> |
@@ -6,11 +6,11 | |||||
6 | {% endblock %} |
|
6 | {% endblock %} | |
7 | {% block maincolumn%} |
|
7 | {% block maincolumn%} | |
8 | <div id="maincolumn"> |
|
8 | <div id="maincolumn"> | |
9 | <!-- <form action="/abscontrol/{{ profile_id }}/save/" method="post" id="frmPattern"> --> |
|
|||
10 | <form action="/abscontrol/upgrade/{{ profile_id }}/" method="post" id="frmPattern"> |
|
9 | <form action="/abscontrol/upgrade/{{ profile_id }}/" method="post" id="frmPattern"> | |
11 | {% csrf_token %} |
|
10 | {% csrf_token %} | |
12 | <div id="divProfile"> |
|
11 | <div id="divProfile"> | |
13 |
<label for="lblName">Profile: |
|
12 | <label for="lblName">Profile:</label> | |
|
13 | <label for="lblName" class="lblProfile">{{ profile_name }}</label> | |||
14 | </div> |
|
14 | </div> | |
15 | {% block mnuPattern %} |
|
15 | {% block mnuPattern %} | |
16 | <div class="divMenu" id="divMnuPattern"> |
|
16 | <div class="divMenu" id="divMnuPattern"> |
@@ -18,6 +18,21 | |||||
18 | </nav> |
|
18 | </nav> | |
19 | {% endblock %} |
|
19 | {% endblock %} | |
20 | {% block maincolumn%} |
|
20 | {% block maincolumn%} | |
|
21 | {% block activeProfileBar %} | |||
|
22 | <div class="cleardivs"></div> | |||
|
23 | <div id="activeProfileBar"> | |||
|
24 | <label for="lblProfileTitle" class="titleBar">Active Profile</label> | |||
|
25 | <img src="/media/navbarsep.png" class="navbarsep"> | |||
|
26 | {% if profileActive != None %} | |||
|
27 | <a href="{% url abscontrol.views.view profileActive.id %}" class="lnkActiveProfile">{{ profileActive.name }}</a> | |||
|
28 | {% endif %} | |||
|
29 | {% if patternActive != None %} | |||
|
30 | <img src="/media/navbarsep.png" class="navbarsep"> | |||
|
31 | <a href="{% url abscontrol.views.viewPattern profileActive.id patternActive.id %}" class="lnkActiveProfile">{{ patternActive.value }}</a> | |||
|
32 | {% endif %} | |||
|
33 | </div> | |||
|
34 | <div class="cleardivs"></div> | |||
|
35 | {% endblock %} | |||
21 | <div id="maincolumn"> |
|
36 | <div id="maincolumn"> | |
22 | {% if objProfile.state == 0 %} |
|
37 | {% if objProfile.state == 0 %} | |
23 | <div id="divProfile"> |
|
38 | <div id="divProfile"> |
General Comments 0
You need to be logged in to leave comments.
Login now