Commit eebb0949 authored by Kedar A.'s avatar Kedar A. 💻

Merge pull request #1249 from kedar2a/mongokit-dev

Showing blogpages to all course-group members
parents c3d64f59 a33fd650
......@@ -118,14 +118,14 @@
{% if user_access == "allow" %}
<div class="content" id="journal-tab">
<div class="row">
<a href="{% url 'page_create_edit' node.pk %}?course_event_id={{node.pk}}" class="round button small" style="float:right"> Add Blog </a>
<div class="">
<a href="{% url 'page_create_edit' node.pk %}?course_event_id={{node.pk}}" class="button small" style="float:right"> Add Blog </a>
</div>
<div class="row all_blogs">
{% for each_blog in blog_pages %}
<div class="blogpage" style="margin-left:10px;">
<h4><u>{{each_blog.name}}</u></h4>
<a class="fi-pencil" href="{% url 'page_create_edit' node.pk each_blog.pk %}?course_event_id={{node.pk}}">Edit</a>
<h4><a href="{% url 'page_details' group_id node.pk %}">{{each_blog.name}}</a></h4>
<a class="fi-pencil" href="{% url 'page_create_edit' node.pk each_blog.pk %}?course_event_id={{node.pk}}"> Edit </a>
<span>
Created at {{each_blog.created_at}}
by {{request.user.username}}
......@@ -134,6 +134,7 @@
{{each_blog.html_content|safe}}
</div>
</div>
<hr/>
{% empty %}
<div class="blogpage" style="margin-left:10px;">
<h4><u>
......
......@@ -1758,8 +1758,11 @@ def group_dashboard(request, group_id=None):
'group_set': ObjectId(group_obj._id),
}).sort('created_at', -1)
if request.user.id:
blog_pages = node_collection.find({'member_of':page_gst._id, 'created_by': int(request.user.id),
'type_of': blogpage_gst._id, 'group_set': group_obj._id})
blog_pages = node_collection.find({
'member_of':page_gst._id,
'type_of': blogpage_gst._id,
'group_set': group_obj._id
})
for each in existing_forums:
temp_forum = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment