Changeset 1349:632fc46fa6fb
- Timestamp:
- 05/15/10 02:03:34 (2 years ago)
- Branch:
- default
- Location:
- zine
- Files:
-
- 2 edited
-
templates/widgets/pages_navigation.html (modified) (1 diff)
-
widgets.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
zine/templates/widgets/pages_navigation.html
r465 r1349 3 3 {% block body %} 4 4 {%- if widget.pages %} 5 <ul class="pages _navigation">5 <ul class="pages-navigation"> 6 6 {%- for item in widget.pages %} 7 7 <li><a href="{{ url_for(item)|e }}">{{ item.title|e }}</a></li> -
zine/widgets.py
r1279 r1349 119 119 120 120 121 class PagesNavigation(Widget): 122 """Show a list of all pages.""" 123 124 name = 'pages_navigation' 125 template = 'widgets/pages_navigation.html' 126 127 def __init__(self, show_title=False, show_drafts=False): 128 self.pages = Post.query.type('page').published().all() 129 if show_drafts: 130 self.pages += Post.query.type('page').drafts().all() 131 self.show_title = show_title 132 121 133 #: list of all core widgets 122 134 all_widgets = [PostArchiveSummary, LatestPosts, LatestComments, TagCloud, 123 CategoryList, IncludePage ]135 CategoryList, IncludePage, PagesNavigation]
Note: See TracChangeset
for help on using the changeset viewer.