Permalink
Browse files

Show page's published state on the site map.

  • Loading branch information...
gvarela
gvarela committed Aug 28, 2012
1 parent 58c7175 commit 320e7daa0c90a773d6d2fff34e24823934c73a2e
@@ -28,6 +28,15 @@ class CMSimple.Page extends Spine.Model
hasChildren: ->
@children().all().length > 0
+ publishedState: ->
+ if @published
+ if @unpublished_changes
+ 'has-changes'
+ else
+ 'published'
+ else
+ 'unpublished'
+
versions: ->
CMSimple.Version.allForPage(@)
@@ -2,6 +2,7 @@
%article
- if @page.hasChildren()
%span.caret
+ %span.icon(class="#{@page.publishedState()}")
%span= @page.title
%span.path
= @page.path()
@@ -265,6 +265,20 @@
color: #ccc;
margin-left: 0.5em;
}
+.mercury-panel ul.sitemap > li article .icon {
+ height: 16px;
+ width: 16px;
+ background: url('/assets/sitemap/unpublished.png') no-repeat left top;
+ background-size: 16px 16px;
+ margin-top: -1px;
+ margin-left: -4px;
+}
+.mercury-panel ul.sitemap > li article .icon.has-changes {
+ background-image: url('/assets/sitemap/has-changes.png');
+}
+.mercury-panel ul.sitemap > li article .icon.published {
+ background-image: url('/assets/sitemap/published.png');
+}
.mercury-panel ul.sitemap .caret {
display: inline-block;
vertical-align: middle;
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 320e7da

Please sign in to comment.