From 3755224448fd5f2ecedb88bc49649e578f4bc880 Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Wed, 8 Jul 2015 16:58:18 +0530 Subject: showing partner and group info on LHS --- .../gnowsys_ndf/ndf/templates/ndf/group.html | 22 +++++++++++++++++++--- .../gnowsys_ndf/ndf/templates/ndf/partner.html | 11 ++++++++++- .../ndf/templates/ndf/partner_list.html | 13 +++++++++++++ .../ndf/templates/registration/logout.html | 3 +++ gnowsys-ndf/gnowsys_ndf/ndf/views/group.py | 6 +++--- gnowsys-ndf/gnowsys_ndf/ndf/views/partner.py | 14 +++++++++++--- 6 files changed, 59 insertions(+), 10 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/group.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/group.html index 25bc57c..0829d8e 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/group.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/group.html @@ -6,10 +6,26 @@ {% block title %} Group {% endblock %} -{% block meta_content %} -

{% trans "Groups" %}

-{% endblock %} + +{% block meta_content %} + +

{% trans "Groups" %}

+ +{% endblock %} {% block help_content %} {% blocktrans %}

Groups are an easy way to share content and conversation, either privately or with the world. Many times, a group already exist for a specific interest or topic. If you can't find one you like, feel free to start your own.

diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/partner.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/partner.html index b12f90b..1349b1d 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/partner.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/partner.html @@ -7,7 +7,16 @@ {% block title %} {{groups_category}} {% endblock %} {% block meta_content %} -

{{groups_category}}

+ +

+ {% if app_gst.altnames and app_gst.altnames != "None" %} + {{app_gst.altnames}} + {% else %} + {{app_gst.name}} + {% endif%} +

+ {{app_gst.content|default_if_none:''|safe}} + {% endblock %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/partner_list.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/partner_list.html index 4223e87..5432d1a 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/partner_list.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/partner_list.html @@ -8,6 +8,19 @@ {% block meta_content %}

{{groups_category}}s

+ {% endblock %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/registration/logout.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/registration/logout.html index 269f8f9..43f2eaa 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/registration/logout.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/registration/logout.html @@ -10,6 +10,9 @@

{% trans "You have sucessfully logged out." %}

{% trans "Thank you for visiting our website. Please return often to take advantage of this platform." %}
+ + +
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/views/group.py b/gnowsys-ndf/gnowsys_ndf/ndf/views/group.py index 97a6915..f35ae09 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/views/group.py +++ b/gnowsys-ndf/gnowsys_ndf/ndf/views/group.py @@ -1191,7 +1191,7 @@ def group(request, group_id, app_id=None, agency_type=None): return render_to_response("ndf/group.html", {'title': title, - 'appId':app._id, + 'appId':app._id, 'app_gst': group_gst, 'searching': True, 'query': search_field, 'group_nodes': group_nodes, 'group_nodes_count': group_count, 'groupid':group_id, 'group_id':group_id @@ -1241,7 +1241,7 @@ def group(request, group_id, app_id=None, agency_type=None): return render_to_response("ndf/group.html", {'group_nodes': group_nodes, - 'appId':app._id, + 'appId':app._id, 'app_gst': group_gst, 'group_nodes_count': group_count, 'groupid': group_id, 'group_id': group_id }, context_instance=RequestContext(request)) @@ -1436,7 +1436,7 @@ def group_dashboard(request, group_id=None): return render_to_response([alternate_template,default_template] ,{'node': group_obj, 'groupid':group_id, 'group_id':group_id, 'user':request.user, 'shelf_list': shelf_list, - 'appId':app._id, + 'appId':app._id, 'app_gst': group_gst, 'annotations' : annotations, 'shelves': shelves, 'prof_pic_obj': profile_pic_image },context_instance=RequestContext(request) diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/views/partner.py b/gnowsys-ndf/gnowsys_ndf/ndf/views/partner.py index 8e6389f..1d5a60b 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/views/partner.py +++ b/gnowsys-ndf/gnowsys_ndf/ndf/views/partner.py @@ -30,6 +30,7 @@ from gnowsys_ndf.ndf.views.notify import set_notif_val # ###################################################################################################################################### gst_group = node_collection.one({"_type": "GSystemType", 'name': GAPPS[2]}) +partner_group_gst = node_collection.one({"_type": "GSystemType", 'name': u'PartnerGroup'}) get_all_usergroups=get_all_user_groups() at_apps_list=node_collection.one({'$and':[{'_type':'AttributeType'},{'name':'apps_list'}]}) ins_objectid = ObjectId() @@ -175,7 +176,7 @@ def partner_list(request, group_id): # print GSTUDIO_NROER_MENU return render_to_response("ndf/partner_list.html", {'group_nodes': collection_set, "groups_category": groups_category, - 'groupid': group_id, 'group_id': group_id + 'groupid': group_id, 'group_id': group_id, "app_gst": partner_group_gst, }, context_instance=RequestContext(request)) @@ -200,10 +201,17 @@ def nroer_groups(request, group_id, groups_category): 'name': {'$nin': ["home"], '$in': groups_names_list}, 'group_type': "PUBLIC" })#.sort('last_update', -1) - + + if groups_category == "Partners": + app_gst = node_collection.one({'_type': 'GSystemType', 'name': 'PartnerGroup'}) + + elif groups_category == "Groups": + app_gst = gst_group + + # print "=============", app_gst group_nodes_count = group_nodes.count() if group_nodes else 0 return render_to_response("ndf/partner.html", {'group_nodes': group_nodes, "groups_category": groups_category, - 'group_nodes_count': group_nodes_count, + 'group_nodes_count': group_nodes_count, 'app_gst': app_gst, 'groupid': group_id, 'group_id': group_id }, context_instance=RequestContext(request)) -- cgit v1.1