Skip to content

Commit

Permalink
Merge pull request #89 from ccnmtl/add-pageblock-count
Browse files Browse the repository at this point in the history
Add pageblock count to sections in the edit page
  • Loading branch information
sdreher committed May 15, 2015
2 parents 2e177e2 + 7e8436f commit ab3da83
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.1.5 (2015-05-15)
==================
* Add pageblock count to sections in the edit page

1.1.4 (2015-05-13)
==================
* Show sections with empty labels in the edit_page hierarchy
Expand Down
19 changes: 9 additions & 10 deletions pagetree/media/css/pagetree.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.admin_block_column
{
.admin_block_column {
width: 870px;
margin: 5px 0 0 15px;
padding: 5px 0 0 25px;
Expand All @@ -13,27 +12,27 @@
border-bottom-color: #eeeeee;
}

.admin_tools_column
{
.admin_tools_column {
text-align: left;
}

.admin_block_view_row1
{
.admin_block_view_row1 {
background-color: #eee;
}

.admin_block_view_row2
{
.admin_block_view_row2 {
background-color: #fff;
}

#id_label, #id_slug, #id_template
{
#id_label, #id_slug, #id_template {
width: 300px;
}

.draghandle {
cursor: move;
float: left;
}

.pagetree-pageblock-section-count {
font-size: smaller;
}
10 changes: 8 additions & 2 deletions pagetree/templates/pagetree/edit_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,14 @@ <h3 style="margin-top: 0;"><a href="{{root.get_edit_url}}">{{hierarchy.name}}</a
<span class="glyphicon glyphicon-hand-right"></span>
<strong>
{% endifequal %}
<a href="{{s.get_edit_url}}"
>{{s.label|default:"Empty Label"}}{% if s.label|length < 1 %} ({{s.slug}}){% endif %}</a>
<span title="The number of pageblocks in this section"
class="pagetree-pageblock-section-count">
{{s.pageblock_set.count}}
</span>
<a href="{{s.get_edit_url}}"
>{{s.label|default:"Empty Label"}}
{% if s.label|length < 1 %} ({{s.slug}}) {% endif %}
</a>
{% ifequal s section %}
</strong>
<span class="glyphicon glyphicon-hand-left"></span>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

setup(
name="django-pagetree",
version="1.1.4",
version="1.1.5",
author="Anders Pearson",
author_email="anders@columbia.edu",
url="https://github.com/ccnmtl/django-pagetree",
Expand Down

0 comments on commit ab3da83

Please sign in to comment.