summaryrefslogtreecommitdiff
path: root/gnowsys-ndf/gnowsys_ndf
diff options
context:
space:
mode:
authorKedar Aitawdekar <kedar2a@gmail.com>2015-07-09 15:45:28 +0530
committerKedar Aitawdekar <kedar2a@gmail.com>2015-07-09 15:45:28 +0530
commit919a5c1f8aa1c9ca3ee4612b683f9ea35a81cbdc (patch)
tree8241a124794149a6ba31b71d172f369a74c00b15 /gnowsys-ndf/gnowsys_ndf
parent64d799f6ed83de26b032237f177acc249ec79a50 (diff)
parent64e94db7b99f85c8ea5844d9f2f19242df3eda73 (diff)
downloadgnowsys-919a5c1f8aa1c9ca3ee4612b683f9ea35a81cbdc.tar.gz
Merge branch 'mongokit' of http://github.com/gnowledge/gstudio into mongokit-dev
Diffstat (limited to 'gnowsys-ndf/gnowsys_ndf')
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/person_details.html45
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/student_create_edit.html17
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/student_list.html2
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/views/person.py8
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/views/userDashboard.py20
5 files changed, 72 insertions, 20 deletions
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/person_details.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/person_details.html
index b1dbabe..159a259 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/person_details.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/person_details.html
@@ -23,17 +23,22 @@
<header class="row event">
<section class="medium-12 columns" >
<h2>
- <span class='node'>{{node.name}}</span>
- <small class="label-list">
+ <span class='node'>{{node.name}}
+ {% if "Student" in node.member_of_names_list %}
+ - {{node.enrollment_code}}
+ {% endif %}
+ </span>
+<!-- <small class="label-list">
{% for tag in node.tags %}
<a href="{% url 'tag_info' groupid tag %}"><span class="label">{{tag}}</span></a>
{% endfor %}
</small>
+ -->
</h2>
<dl class="row tabs" data-tab data-options="deep_linking:true">
{% for tab_details in property_order_list %}
- <dd {% if forloop.counter == 1 %}class="active"{% endif %} title="Click here to add {{tab_details.0}} details...">
+ <dd {% if forloop.counter == 1 %}class="active"{% endif %} title="Click here to see {{tab_details.0}} details.">
<a href="#panel_{{tab_details.0}}">{{tab_details.0}}</a>
</dd>
{% endfor %}
@@ -73,9 +78,33 @@
<label>{{field.altnames}}</label>
</div>
<div class="small-7 end columns">
- {% if field.type == "RelationType" %}
- {% for details in field.value %}
- <label>{{details.name}}</label>
+ {% if field.altnames == "Caste" or field.altnames == "District" or field.altnames == "State" or field.altnames == "College ( Graduation )" %}
+ <label>{{field.value.0.name|title}}</label>
+ {% elif field.altnames == "Languages Known" %}
+ {% for each_lang in field.value %}
+ <label>{{each_lang|title}}</label>
+ {% endfor %}
+
+ {% elif field.altnames == "College(s)" %}
+ {% for each_colg in field.value %}
+ <label>{{each_colg.name}} </label>
+ {% endfor %}
+
+ {% elif field.altnames == "Volunteer to teach Course in College" %}
+ {% for course_colg in field.value %}
+ <label>{{course_colg.0.name|title}} - {{course_colg.1.name|title}}</label>
+ {% endfor %}
+
+ {% elif field.altnames == "Voluntary Teacher: Minimum qualifications requirement" %}
+ {% for min_qual in field.value %}
+ {% for key,val in min_qual.items %}
+ <label>{{key|title}}
+ {% for reqd_qual in val %}
+ - {{reqd_qual}}</label>
+ {% empty %}
+ - Not specified</label>
+ {% endfor %}
+ {% endfor %}
{% endfor %}
{% else %}
<label>{{field.value|title}}</label>
@@ -126,7 +155,8 @@
{{ node.member_of_names_list.0 }}
Edited {{ node.last_update|timesince }} ago by <a class="user" href="{% url 'dashboard' node.modified_by %}">{{node.user_details_dict.modified_by}}</a>
<br>
- <small>
+
+<!-- <small>
<a href="#view-changes"><i class="fi-clock"></i> Versions </a>
{% for seq_no, version_no in node.version_dict.items|slice:"-6:" reversed %}
<abbr title="Version #{{version_no}}">
@@ -140,6 +170,7 @@
</abbr>
{% endfor %}
</small>
+ -->
</p>
</div>
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/student_create_edit.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/student_create_edit.html
index d67c66d..216f045 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/student_create_edit.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/student_create_edit.html
@@ -210,6 +210,23 @@
</div>
</div>
+
+ <!-- For Aadhar id -->
+ <div class="row">
+ <div class="small-6 columns">
+ <div class="row">
+ <div class="small-3 columns">
+ <label for="{{property_order_list.0.1.13.name}}" class="right inline"> {{property_order_list.0.1.13.altnames}} </label>
+ </div>
+ <div class="small-9 columns">
+ {% html_widget groupid node.pk property_order_list.0.1.13 %}
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+
<br>
<!-- Navigation buttons for tab -->
<div class="row tab-nav">
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/student_list.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/student_list.html
index 68a516b..2c7accb 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/student_list.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/student_list.html
@@ -586,7 +586,7 @@
s_id = data["stud_id"];
$(row).attr("id", s_id);
- edit_url = "{% url 'mis:mis_app_instance_edit' 'groupid' 'app_id' 'app_set_id' 'stud_id' %}".replace("groupid", groupid_val).replace("app_id", app_id_val).replace("app_set_id", app_set_id_val).replace("stud_id", s_id);
+ edit_url = "{% url 'mis:mis_app_instance_detail' 'groupid' 'app_id' 'app_set_id' 'stud_id' %}".replace("groupid", groupid_val).replace("app_id", app_id_val).replace("app_set_id", app_set_id_val).replace("stud_id", s_id);
name = data['Name']
$(row).find("td:nth-child(3)").html("<a href='" + edit_url + "'>"+name+"</a>");
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/views/person.py b/gnowsys-ndf/gnowsys_ndf/ndf/views/person.py
index f3e0e3d..a2adc0e 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/views/person.py
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/views/person.py
@@ -638,7 +638,7 @@ def person_create_edit(request, group_id, app_id, app_set_id=None, app_set_insta
if old_college_group_id_list:
# If college-group list exists
- # Then update their group_admin field (append PO's created_by)
+ # Then update their group_admin field (remove PO's created_by)
res = node_collection.collection.update(
{'_id': {'$in': old_college_group_id_list}, '$or': [{'group_admin': auth_node.created_by},
{'author_set': auth_node.created_by}]},
@@ -657,8 +657,12 @@ def person_create_edit(request, group_id, app_id, app_set_id=None, app_set_insta
# Its purpose is to change the agency type back to Other
auth_node.reload()
+ # if person_gst.name != "Student":
+ # return HttpResponseRedirect(reverse(app_name.lower()+":"+template_prefix+'_app_detail', kwargs={'group_id': group_id, "app_id":app_id, "app_set_id":app_set_id}))
+ # else:
+ return HttpResponseRedirect(reverse('mis:mis_app_instance_detail',kwargs={'group_id': group_id, "app_id":app_id, "app_set_id":app_set_id, "app_set_instance_id":unicode(person_gs._id)}))
- return HttpResponseRedirect(reverse(app_name.lower()+":"+template_prefix+'_app_detail', kwargs={'group_id': group_id, "app_id":app_id, "app_set_id":app_set_id}))
+ # return HttpResponseRedirect(reverse(app_name.lower()+":"+template_prefix+'_app_detail', kwargs={'group_id': group_id, "app_id":app_id, "app_set_id":app_set_id}))
default_template = "ndf/person_create_edit.html"
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/views/userDashboard.py b/gnowsys-ndf/gnowsys_ndf/ndf/views/userDashboard.py
index c64cac9..bdd8735 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/views/userDashboard.py
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/views/userDashboard.py
@@ -150,37 +150,37 @@ def uDashboard(request, group_id):
user_activity = []
page_gst = node_collection.one({'_type': "GSystemType", 'name': 'Page'})
- page_cur = node_collection.find ({'member_of': {'$all': [page_gst._id]},
+ page_cur = node_collection.find({'member_of': {'$all': [page_gst._id]},
'created_by': int(usrid), "status": {"$nin": ["HIDDEN"]}})
- file_cur = node_collection.find ({'_type': u"File", 'created_by': int(usrid),
+ file_cur = node_collection.find({'_type': u"File", 'created_by': int(usrid),
"status": {"$nin": ["HIDDEN"]}})
forum_gst = node_collection.one({"_type": "GSystemType", "name": "Forum"})
- forum_count = node_collection.find ({"_type": "GSystem",
+ forum_count = node_collection.find({"_type": "GSystem",
"member_of": forum_gst._id, 'created_by': int(usrid),
"status": {"$nin": ["HIDDEN"]}})
quiz_gst = node_collection.one({"_type": "GSystemType", "name": "Quiz"})
- quiz_count = node_collection.find ({"_type": "GSystem",
+ quiz_count = node_collection.find({"_type": "GSystem",
"member_of": quiz_gst._id, 'created_by': int(usrid),
"status": {"$nin": ["HIDDEN"]}})
thread_gst = node_collection.one({"_type": "GSystemType", "name": "Twist"})
- thread_count =node_collection.find ({"_type": "GSystem",
+ thread_count =node_collection.find({"_type": "GSystem",
"member_of": thread_gst._id, 'created_by': int(usrid),
"status": {"$nin": ["HIDDEN"]}})
reply_gst = node_collection.one({"_type": "GSystemType", "name": "Reply"})
- reply_count = node_collection.find ({"_type": "GSystem",
+ reply_count = node_collection.find({"_type": "GSystem",
"member_of": reply_gst._id, 'created_by': int(usrid),
"status": {"$nin": ["HIDDEN"]}})
task_cur = ""
if current_user:
if int(current_user) == int(usrid):
- task_cur = node_collection.find (
+ task_cur = node_collection.find(
{'member_of': task_gst._id, 'attribute_set.Status': {'$in': ["New", "In Progress"]}, 'attribute_set.Assignee':usrid}
).sort('last_update', -1).limit(10)
dashboard_count.update({'Task': task_cur.count()})
- group_cur = node_collection.find (
+ group_cur = node_collection.find(
{'_type': "Group", 'name': {'$nin': ["home", auth.name]},"access_policy":{"$in":Access_policy},
'$or': [{'group_admin': int(usrid)}, {'author_set': int(usrid)}]}).sort('last_update', -1).limit(10)
@@ -189,7 +189,7 @@ def uDashboard(request, group_id):
# user activity gives all the activities of the users
activity = ""
- activity_user = node_collection.find (
+ activity_user = node_collection.find(
{'$and': [{'$or': [{'_type': 'GSystem'}, {'_type': 'group'},
{'_type': 'File'}]}, {"access_policy": {"$in": Access_policy}},{'status':{'$in':[u"DRAFT",u"PUBLISHED"]}},
{'member_of': {'$nin': [exclued_from_public]}},
@@ -243,7 +243,7 @@ def uDashboard(request, group_id):
task_cur gives the task asigned to users
'''
- obj = node_collection.find (
+ obj = node_collection.find(
{'_type': {'$in': [u"GSystem", u"File"]}, 'contributors': int(usrid),
'group_set': {'$all': [ObjectId(group_id)]}}
)