-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#509] Add Sidebar for General Pages
* Refactor the Newest Community & Documents blocks into include-able templates. Closes #509
- Loading branch information
Showing
7 changed files
with
56 additions
and
28 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
fec/communities/templates/communities/includes/newest_communities_list_group.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% load communities_tags %} | ||
{% community_newest_communities limit=limit|default:3 as newest_communities %} | ||
<div id="newest-communities" class="list-group"> | ||
{% for community in newest_communities %} | ||
<div class="list-group-item"> | ||
{% community_blurb community show_picture=False truncate_description_at=truncate_description_at|default:25 %} | ||
</div> | ||
{% endfor %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% overextends "pages/page.html" %} | ||
|
||
{% load i18n %} | ||
|
||
|
||
{% block right_panel %} | ||
|
||
<h3 class="text-center" id="newest-communities-pages-sidebar"> | ||
{% trans "Newest Communities" %}</h3> | ||
{% include "communities/includes/newest_communities_list_group.html" with limit=5 truncate_description_at=18 %} | ||
|
||
<h3 class="text-center">{% trans "Newest Documents" %}</h3> | ||
{% include "documents/includes/newest_documents_list_group.html" with limit=5 %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
fec/documents/templates/documents/includes/newest_documents_list_group.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% load documents_tags %} | ||
|
||
<ul class="list-group"> | ||
{% documents_newest limit=limit|default:3 as newest_documents %} | ||
{% for document in newest_documents %} | ||
<li class="list-group-item"> | ||
<a href="{{ document.get_absolute_url }}">{{ document.title }}</a> | ||
<small> | ||
by | ||
<a href="{{ document.community.get_absolute_url }}">{{ document.community }}</a> | ||
in | ||
<a href="{{ document.category.get_absolute_url }}">{{ document.category.title }}</a> | ||
</small> | ||
</li> | ||
{% endfor %} | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters