##// 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" %}
No newline at end of file
2 {% block title %}ABS CONTROL:::::NEW PROFILE{% endblock %}
No newline at end of file
3 {% block scripting %}
No newline at end of file
4 <script src="/static/static/js/profiles.js"></script>
No newline at end of file
5 {% endblock %}
No newline at end of file
6 {% block mnu_profile %}
No newline at end of file
7 <nav class="MnuHorizontal" id="mnuProfiles">
No newline at end of file
8 <ul>
No newline at end of file
9 <li><a href="#" id="lnkChangeProfile">Save</a></li>
No newline at end of file
10 <li><a href="/abscontrol/edit/{{ objProfile.id }}/">Cancel</a></li>
No newline at end of file
11 </ul>
No newline at end of file
12 </nav>
No newline at end of file
13 {% endblock %}
No newline at end of file
14 {% block maincolumn%}
No newline at end of file
15 <div id="maincolumn">
No newline at end of file
16 <form action="/abscontrol/update/{{ objProfile.id }}/" method="post" id="frmProfile">
No newline at end of file
17 <div id="divProfile">
No newline at end of file
18 <label for="lblName">Profile: {{ profile_name }}</label>
No newline at end of file
19 <input type="text" name="txtProfile" value="{{ objProfile.name }}"/>
No newline at end of file
20 </div>
No newline at end of file
21 <div class="cleardivs"></div>
No newline at end of file
22 <input type="hidden" name="mode" value="e">
No newline at end of file
23 </form>
No newline at end of file
24 <div id="navPatterns">
No newline at end of file
25 <nav class="" id="navPatternList">
No newline at end of file
26 <ul>
No newline at end of file
27 {% for element in lsPatterns %}
No newline at end of file
28 {% if patternChoosen.id == element.id %}
No newline at end of file
29 <li><a href="/abscontrol/{{ objProfile.id }}/edit/{{ element.id }}" class="lnkPatternSelected">{{ element.value }}</a></li>
No newline at end of file
30 {% else %}
No newline at end of file
31 <li><a href="/abscontrol/{{ objProfile.id }}/edit/{{ element.id }}" class="lnkPattern">{{ element.value }}</a></li>
No newline at end of file
32 {% endif %}
No newline at end of file
33 {% endfor %}
No newline at end of file
34 </ul>
No newline at end of file
35 </nav>
No newline at end of file
36 </div>
No newline at end of file
37 </div>
No newline at end of file
38 {% endblock %} No newline at end of file
@@ -7,6 +7,7
7 url(r'^view/(?P<profile_id>\d+)/$', 'view'), No newline at end of file
7 url(r'^view/(?P<profile_id>\d+)/$', 'view'),
8 url(r'^edit/(?P<profile_id>\d+)/$', 'edit'), No newline at end of file
8 url(r'^edit/(?P<profile_id>\d+)/$', 'edit'),
9 url(r'^update/(?P<profile_id>\d+)/$', 'update'), No newline at end of file
9 url(r'^update/(?P<profile_id>\d+)/$', 'update'),
10 url(r'^changeName/(?P<profile_id>\d+)/$', 'changeName'), No newline at end of file
10 #url(r'^(?P<profile_id>\d+)/$', 'detail'), No newline at end of file
11 #url(r'^(?P<profile_id>\d+)/$', 'detail'),
11 url(r'^(?P<profile_id>\d+)/add/$', 'addPattern'), No newline at end of file
12 url(r'^(?P<profile_id>\d+)/add/$', 'addPattern'),
12 url(r'^(?P<profile_id>\d+)/save/$', 'savePattern'), No newline at end of file
13 url(r'^(?P<profile_id>\d+)/save/$', 'savePattern'),
@@ -109,7 +109,25
109 return redirect(newurl) No newline at end of file
109 return redirect(newurl)
110 No newline at end of file
110
111 def update(request, profile_id):
111 def update(request, profile_id):
No newline at end of file
112 txtProfile = request.POST["txtProfile"]
112 pass No newline at end of file
No newline at end of file
113
No newline at end of file
114 objProfile = Profile.objects.get(pk=profile_id)
No newline at end of file
115 objProfile.name = txtProfile
No newline at end of file
116 objProfile.state = 1
No newline at end of file
117 objProfile.save()
No newline at end of file
118
No newline at end of file
119 newurl = '/abscontrol/view/%d' % objProfile.id
No newline at end of file
120 return redirect(newurl)
No newline at end of file
121
No newline at end of file
122 def changeName(request, profile_id):
No newline at end of file
123 profile_list = Profile.objects.filter(state=1)
No newline at end of file
124 objProfile = Profile.objects.get(pk=profile_id)
No newline at end of file
125 lsPatterns = objProfile.pattern_set.all()
No newline at end of file
126
No newline at end of file
127 return render_to_response('abscontrol/changeName.html', {'profile_list': profile_list,
No newline at end of file
128 'objProfile': objProfile,
No newline at end of file
129 'lsPatterns' : lsPatterns,
No newline at end of file
130 }) No newline at end of file
113 No newline at end of file
131
114 def view(request, profile_id): No newline at end of file
132 def view(request, profile_id):
115 nextPattern = 0 No newline at end of file
133 nextPattern = 0
@@ -23,7 +23,8
23 /****************************************************************************************/ No newline at end of file
23 /****************************************************************************************/
24 .mnu{ height: 22px; border: 0px solid #c55 !important;} No newline at end of file
24 .mnu{ height: 22px; border: 0px solid #c55 !important;}
25 .mnu li{ display:inline;}
25 .mnu li{ display:inline;}
No newline at end of file
26 .MnuVertical, .MnuHorizontal { font-family: 'Droid Sans', sans-serif; font-size: inherit;
26 .MnuVertical, .MnuHorizontal { font-family: 'Droid Sans', sans-serif; font-size: 1.2em; font-style: italic; text-shadow: 2px 2px #eee} No newline at end of file
No newline at end of file
27 font-style: normal; text-shadow: 2px 2px #eee;} No newline at end of file
27 .MnuHorizontal ul{ list-style: none; list-style-type: none; margin: 0;} No newline at end of file
28 .MnuHorizontal ul{ list-style: none; list-style-type: none; margin: 0;}
28 No newline at end of file
29
29 /*.MnuHorizontal{ display: -webkit-box; -webkit-box-orient:horizontal;}*/ No newline at end of file
30 /*.MnuHorizontal{ display: -webkit-box; -webkit-box-orient:horizontal;}*/
@@ -32,4 +32,7
32 profile_id = $(this).attr("alt"); No newline at end of file
32 profile_id = $(this).attr("alt");
33 location.href = "/abscontrol/send/" + profile_id + "/"; No newline at end of file
33 location.href = "/abscontrol/send/" + profile_id + "/";
34 }); No newline at end of file
34 });
35 $('#lnkUpdateProfile').click(function(){
No newline at end of file
36 $('#frmProfile').submit(); No newline at end of file
35 }); No newline at end of file
37 });
38 }); No newline at end of file
@@ -20,6 +20,9
20 $('#lnkSaveImport').click(function(){ No newline at end of file
20 $('#lnkSaveImport').click(function(){
21 $('#frmImportProfile').submit(); No newline at end of file
21 $('#frmImportProfile').submit();
22 }); No newline at end of file
22 });
23 $('#lnkUpload').click(function(){
No newline at end of file
24 $('#frmImport').submit();
No newline at end of file
25 }); No newline at end of file
23 $('#lnkExport').click(function(){ No newline at end of file
26 $('#lnkExport').click(function(){
24 profile_id = $(this).attr("alt"); No newline at end of file
27 profile_id = $(this).attr("alt");
25 location.href="/abscontrol/export/" + profile_id + "/"; No newline at end of file
28 location.href="/abscontrol/export/" + profile_id + "/";
@@ -4,13 +4,13
4 <script src="/static/static/js/patterns.js"></script> No newline at end of file
4 <script src="/static/static/js/patterns.js"></script>
5 {% endblock %} No newline at end of file
5 {% endblock %}
6 {% block mnu_profile %}
6 {% block mnu_profile %}
No newline at end of file
7 <nav class="MnuHorizontal" id="mnuProfiles"> No newline at end of file
7 <nav class="MnuVertical" id="mnuProfiles"> No newline at end of file
8 <ul> No newline at end of file
8 <ul>
9 <li><a href="/abscontrol/new/">New</a></li> No newline at end of file
9 <li><a href="/abscontrol/new/">New</a></li>
10 {% if objProfile.state == 0 %}
10 {% if objProfile.state == 0 %}
No newline at end of file
11 <li><a href="/abscontrol/changeName/{{ objProfile.id }}/">Save</a></li> No newline at end of file
11 <li><a href="/abscontrol/update/{{ objProfile.id }}/?opt=changeName">Save</a></li> No newline at end of file
12 {% else %}
12 {% else %}
No newline at end of file
13 <li><a href="#" id="lnkUpdateProfile">Save</a></li> No newline at end of file
13 <li><a href="/abscontrol/update/{{ objProfile.id }}/?opt=update">Save</a></li> No newline at end of file
14 {% endif %} No newline at end of file
14 {% endif %}
15 <li><a href="#">Save as</a></li> No newline at end of file
15 <li><a href="#">Save as</a></li>
16 <li><a href="/abscontrol/import/">Import</a></li> No newline at end of file
16 <li><a href="/abscontrol/import/">Import</a></li>
@@ -1,14 +1,21
1 {% extends "abscontrol/index.html" %} No newline at end of file
1 {% extends "abscontrol/index.html" %}
2 {% block title %}ABS CONTROL:::::IMPORT PROFILE{% endblock %} No newline at end of file
2 {% block title %}ABS CONTROL:::::IMPORT PROFILE{% endblock %}
3 No newline at end of file
3
4 {% block mnu_profile %}
No newline at end of file
5 <nav class="MnuHorizontal" id="mnuProfiles">
No newline at end of file
6 <ul>
No newline at end of file
7 <li><a href="#" id="lnkUpload">Upload</a></li>
No newline at end of file
8 <li><a href="#" id="lnkCancel">Cancel</a></li>
No newline at end of file
9 </ul>
No newline at end of file
10 </nav>
No newline at end of file
11 {% endblock %} No newline at end of file
4 {% block maincolumn %} No newline at end of file
12 {% block maincolumn %}
5 <div id="maincolumn">
13 <div id="maincolumn">
No newline at end of file
14 <form name="frmImport" id="frmImport" action="/abscontrol/showImport/" method="post" enctype="multipart/form-data"> No newline at end of file
6 <form action="/abscontrol/showImport/" method="post" enctype="multipart/form-data"> No newline at end of file
7 <div id="divPattern"> No newline at end of file
15 <div id="divPattern">
8 <div class="divUes"> No newline at end of file
16 <div class="divUes">
9 <label for="lblFile">Choose File:</label> No newline at end of file
17 <label for="lblFile">Choose File:</label>
10 <input type="file" name="txtFile" />
18 <input type="file" name="txtFile" />
No newline at end of file
11 <input type="submit" name="btnSend" value="Upload" /> No newline at end of file
12 </div> No newline at end of file
19 </div>
13 </div> No newline at end of file
20 </div>
14 </form> No newline at end of file
21 </form>
@@ -35,7 +35,7
35 </div> No newline at end of file
35 </div>
36 {% block mnu_profile %} No newline at end of file
36 {% block mnu_profile %}
37 <div id="mnuProfiles">
37 <div id="mnuProfiles">
No newline at end of file
38 <nav class="MnuHorizontal" id="navProfiles"> No newline at end of file
38 <nav class="MnuVertical" id="navProfiles"> No newline at end of file
39 <ul> No newline at end of file
39 <ul>
40 <li><a href="/abscontrol/new">New</a></li> No newline at end of file
40 <li><a href="/abscontrol/new">New</a></li>
41 {% if objProfile %} No newline at end of file
41 {% if objProfile %}
@@ -4,7 +4,7
4 <script src="/static/static/js/profiles.js"></script> No newline at end of file
4 <script src="/static/static/js/profiles.js"></script>
5 {% endblock %} No newline at end of file
5 {% endblock %}
6 {% block mnu_profile %}
6 {% block mnu_profile %}
No newline at end of file
7 <nav class="MnuHorizontal" id="mnuProfiles"> No newline at end of file
7 <nav class="MnuVertical" id="mnuProfiles"> No newline at end of file
8 <ul> No newline at end of file
8 <ul>
9 <li><a href="/abscontrol/new">New</a></li> No newline at end of file
9 <li><a href="/abscontrol/new">New</a></li>
10 <li><a href="#" id="lnkSaveImport">Save</a></li> No newline at end of file
10 <li><a href="#" id="lnkSaveImport">Save</a></li>
@@ -2,7 +2,7
2 {% block title %}ABS CONTROL:::::IMPORT PROFILE{% endblock %} No newline at end of file
2 {% block title %}ABS CONTROL:::::IMPORT PROFILE{% endblock %}
3 No newline at end of file
3
4 {% block mnu_profile %}
4 {% block mnu_profile %}
No newline at end of file
5 <nav class="MnuHorizontal" id="mnuProfiles"> No newline at end of file
5 <nav class="MnuVertical" id="mnuProfiles"> No newline at end of file
6 <ul> No newline at end of file
6 <ul>
7 <li><a href="/abscontrol/new">New</a></li> No newline at end of file
7 <li><a href="/abscontrol/new">New</a></li>
8 <li><a href="#">Save</a></li> No newline at end of file
8 <li><a href="#">Save</a></li>
@@ -2,7 +2,7
2 {% block title %}ABS CONTROL:::PROFILE:::{{ objProfile.name }}{% endblock %} No newline at end of file
2 {% block title %}ABS CONTROL:::PROFILE:::{{ objProfile.name }}{% endblock %}
3 No newline at end of file
3
4 {% block mnu_profile %}
4 {% block mnu_profile %}
No newline at end of file
5 <nav class="MnuHorizontal" id="mnuProfiles"> No newline at end of file
5 <nav class="MnuVertical" id="mnuProfiles"> No newline at end of file
6 <ul> No newline at end of file
6 <ul>
7 <li><a href="/abscontrol/new">New</a></li> No newline at end of file
7 <li><a href="/abscontrol/new">New</a></li>
8 {% if patternChoosen %} No newline at end of file
8 {% if patternChoosen %}
General Comments 0
You need to be logged in to leave comments. Login now