Display Blog on the sidebar, if available

This commit is contained in:
Pablo Vazquez 2016-09-05 15:59:22 +02:00
parent 3d9b9e40d4
commit fa050da8e2
2 changed files with 11 additions and 2 deletions

View File

@ -49,8 +49,9 @@ def jstree_get_children(node_id, project_id=None):
if child.node_type not in ['comment', 'post']:
if child.properties.status == 'published':
children_list.append(jstree_parse_node(child))
elif child.node_type == 'blog':
children_list.append(jstree_parse_node(child))
# TODO: Remove this code (blog now accessible from sidebar)
# elif child.node_type == 'blog':
# children_list.append(jstree_parse_node(child))
elif current_user.is_authenticated and child.user == current_user.objectid:
children_list.append(jstree_parse_node(child))
except ForbiddenAccess:

View File

@ -58,6 +58,14 @@ link(href="{{ url_for('static_pillar', filename='assets/css/project-main.css', v
| {% else %}
i.pi-home
| {% endif %}
| {% if project.nodes_blog %}
li.tabs-blog(
title="Blog",
data-toggle="tooltip",
data-placement="left")
a(href="{{url_for('main.project_blog', project_url=project.url)}}")
i.pi-newspaper
| {% endif %}
li.tabs-browse(
title="Browse",
data-toggle="tooltip",