Changeset 499:778418d5eabf
- Timestamp:
- 02/07/11 21:30:54 (23 months ago)
- Branch:
- default
- Children:
- 500:1d7694b67246, 502:deeaa7cb57d5
- Location:
- cyclope/core/collections
- Files:
-
- 1 added
- 1 deleted
- 5 edited
-
frontend_views.py (modified) (7 diffs)
-
templates/collections/category_alphabetical_teaser_list.html (deleted)
-
templates/collections/category_contents_base.html (added)
-
templates/collections/category_labeled_icon_list.html (modified) (2 diffs)
-
templates/collections/category_root_items_list.html (modified) (2 diffs)
-
templates/collections/category_teaser_list.html (modified) (2 diffs)
-
templates/collections/hierarchycal_navigation_block.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cyclope/core/collections/frontend_views.py
r451 r499 37 37 from cyclope.core.collections.models import Collection, Category, Categorization 38 38 39 40 39 class CategoryRootItemsList(frontend.FrontendView): 41 40 """A flat list view of the root members for a Category. … … 51 50 categorizations_list = category.categorizations.all() 52 51 template = "collections/category_root_items_list.html" 53 req_context['categorizations'] = categorizations_list 52 req_context.update({"categorizations": categorizations_list, 53 "category": category}) 54 54 t = loader.get_template(template) 55 55 return t.render(req_context) … … 58 58 59 59 class TeaserListOptions(forms.Form): 60 show_title = forms.BooleanField(label=_("Show title"), initial=True, required=False) 61 show_description = forms.BooleanField(label=_("Show description"), initial=True, required=False) 62 show_image = forms.BooleanField(label=_("Show image"), initial=True, required=False) 60 63 items_per_page = forms.IntegerField(label=_('Items per page'), min_value=1, 61 64 initial=cyc_settings.CYCLOPE_PAGINATION['TEASER'],) … … 68 71 traverse_children = forms.BooleanField(label=_("Include descendant's elements"), 69 72 initial=False, required=False) 73 navigation = forms.ChoiceField(label=_('Show navigation'), 74 choices=(("TOP", _(u"Top")), 75 ("BOTTOM", _(u"Bottom")), 76 ("DISABLED", _(u"Disabled"))), 77 initial="TOP") 78 79 70 80 71 81 class CategoryDefaultList(frontend.FrontendView): … … 118 128 reverse=reverse) 119 129 paginator = Paginator(categorizations_list, options["items_per_page"]) 120 template = self.template121 130 122 131 elif sort_by == "ALPHABETIC": 123 132 paginator = NamePaginator(categorizations_list, on="content_object.name", 124 per_page=self.items_per_page) 125 template = "collections/category_alphabetical_teaser_list.html" 133 per_page=options["items_per_page"]) 126 134 127 135 page = cyclope.utils.get_page(paginator, request) … … 132 140 'inline_view_name': self.inline_view_name, 133 141 'simplified_view': options["simplified"]}) 134 t = loader.get_template( template)142 t = loader.get_template(self.template) 135 143 return t.render(req_context) 136 144 … … 245 253 'has_children': has_children,}) 246 254 return context 247 255 248 256 nested_list = [] 249 257 for child in base_category.get_children(): -
cyclope/core/collections/templates/collections/category_labeled_icon_list.html
r234 r499 1 {% extends host_template%}1 {% extends 'collections/category_contents_base.html' %} 2 2 3 3 {% load i18n cyclope_utils %} 4 4 5 {% block content %} 6 7 {% include 'collections/hierarchycal_navigation_block.html' %} 5 {% block category_content %} 8 6 9 7 {% comment %} … … 29 27 <br class="clear" /> 30 28 31 <!-- <div class="pagEspacio"></div> -->32 {% if page %}33 {% include 'cyclope/pagination_block.html' %}34 {% endif %}35 36 29 {% endblock %} -
cyclope/core/collections/templates/collections/category_root_items_list.html
r492 r499 1 {% extends host_template%}1 {% extends 'collections/category_contents_base.html' %} 2 2 3 {% block c ontent %}3 {% block category_content %} 4 4 5 5 {% comment %} … … 17 17 </ul> 18 18 </div> 19 {% endblock c ontent%}19 {% endblock category_content %} -
cyclope/core/collections/templates/collections/category_teaser_list.html
r491 r499 1 {% extends host_template%}1 {% extends 'collections/category_contents_base.html' %} 2 2 3 3 {% load i18n cyclope_utils fb_versions %} 4 4 5 {% block content %} 6 7 {% include 'collections/hierarchycal_navigation_block.html' %} 8 9 {% if category.description %} 10 <div class="collection_teaser">{% if category.image %} 11 <img class="image" src="{% version category.image.path 'small' %}" border="0"/> 12 {% endif %} 13 <div class="summary"> 14 {{ category.description|smart_style }} 15 </div> 16 </div> 17 {% else %} 18 19 {% if category.image %} 20 <div class="collection_teaser"> 21 <img class="image" src="{% version category.image.path 'small' %}" border="0"/> 22 </div> 23 {% endif %} 24 25 {% endif %} 5 {% block category_content %} 26 6 27 7 {% comment %} … … 48 28 {% endfor %} 49 29 50 {% if page %}51 {% include 'cyclope/pagination_block.html' %}52 {% endif %}53 54 30 {% endblock %} -
cyclope/core/collections/templates/collections/hierarchycal_navigation_block.html
r482 r499 1 1 2 {% if category.collection.visible %} 2 3 … … 19 20 {% endif%} 20 21 21 <div class="category_title">22 <h1 class="title">23 <a href="{% url category-default category.slug %}">{{ category.name }}</a>24 </h1>25 </div>26 27 22 {% endif %}
Note: See TracChangeset
for help on using the changeset viewer.

