[new] sidebar added on chapter web page

This commit is contained in:
Vishal
2017-12-01 13:46:04 +05:30
parent a72a3bd536
commit 74fb550a70
3 changed files with 22 additions and 17 deletions

View File

@@ -30,6 +30,7 @@ class Chapter(WebsiteGenerator):
def get_list_context(context):
context.allow_guest = True
context.no_cache = True
context.show_sidebar = True
context.title = 'All Chapters'
context.no_breadcrumbs = True
context.order_by = 'creation desc'

View File

@@ -1,19 +1,21 @@
<div style="margin-bottom: 30px; max-width: 600px" class="with-border clickable">
<a href="/{{ doc.route }}">
<h3>{{ doc.title }}</h3>
<p>
<span class="label">{{ frappe.db.get_value('User', chapter_head, 'full_name') }}</span>
<span class="label">
{% if members %}
Members: {{ members|length }}
{% else %}
Members: 0
{% endif %}
</span>
</p>
<p>{{ html2text(doc.introduction[:200]) }}{% if introduction|len > 200 %}...{% endif %}</p>
</a>
</div>
{% if doc.published %}
<div style="margin-bottom: 30px; max-width: 600px" class="with-border clickable">
<a href="/{{ doc.route }}">
<h3>{{ doc.title }}</h3>
<p>
<span class="label">{{ frappe.db.get_value('User', chapter_head, 'full_name') }}</span>
<span class="label">
{% if members %}
Members: {{ members|length }}
{% else %}
Members: 0
{% endif %}
</span>
</p>
<p>{{ html2text(doc.introduction[:200]) }}{% if introduction|len > 200 %}...{% endif %}</p>
</a>
</div>
{% endif %}
<style type="text/css">
.label {