Rework portlet to match mockup

This commit is contained in:
Frédéric Péters 2011-08-16 12:00:36 +02:00
parent 886695d710
commit 1491d5c032
2 changed files with 15 additions and 22 deletions

View File

@ -13,16 +13,11 @@
<dt class="portletHeader">
<span class="portletTopLeft"></span>
<a href="#" rel="nofollow"
title="Previous month"
tal:define="prevMonthMonth view/prevMonthMonth;
prevMonthYear view/prevMonthYear"
tal:attributes="id python:showPrevMonth and 'calendar-previous' or '';
href python:'%s?%smonth:int=%d&amp;year:int=%d&amp;orig_query=%s' % (request['ACTUAL_URL'], query_string, prevMonthMonth, prevMonthYear, url_quote_plus(query_string));
class string:kssCalendarChange kssattr-year-${prevMonthYear} kssattr-month-${prevMonthMonth} calendarPrevious;"
tal:condition="showPrevMonth"
i18n:attributes="title title_previous_month;">&laquo;</a>
<a tal:attributes="href view/eventsurl">Agenda</a>
<span class="portletTopRight"></span>
</dt>
<dd class="portletItem">
<span i18n:translate="" tal:omit-tag="">
<span i18n:name="monthname" i18n:translate=""
tal:content="view/monthName"
@ -32,19 +27,6 @@
tal:omit-tag="">year</span>
</span>
<a href="#" rel="nofollow"
title="Next month"
tal:define="nextMonthMonth view/nextMonthMonth;
nextMonthYear view/nextMonthYear"
tal:attributes="id python:showNextMonth and 'calendar-next' or '';
href python:'%s?%smonth:int=%d&amp;year:int=%d&amp;orig_query=%s' % (request['ACTUAL_URL'], query_string, nextMonthMonth, nextMonthYear, url_quote_plus(query_string));
class string:kssCalendarChange kssattr-year-${nextMonthYear} kssattr-month-${nextMonthMonth} calendarNext;"
tal:condition="showNextMonth"
i18n:attributes="title title_next_month;">&raquo;</a>
<span class="portletTopRight"></span>
</dt>
<dd class="portletItem">
<table class="ploneCalendar"
summary="Agenda"
i18n:domain="plone"

View File

@ -5,6 +5,8 @@ from plone.memoize import ram
from plone.memoize.compress import xhtml_compress
from plone.portlets.interfaces import IPortletDataProvider
from zope import component
from zope.interface import implements
from zope.component import getMultiAdapter
@ -14,10 +16,14 @@ from Products.CMFCore.utils import getToolByName
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from Products.PythonScripts.standard import url_quote_plus
from plone.registry.interfaces import IRegistry
from plone.app.portlets import PloneMessageFactory as _
from plone.app.portlets import cache
from plone.app.portlets.portlets import base
from tabellio.config.interfaces import ITabellioSettings
from utils import MonthlyView
@ -131,6 +137,11 @@ class AgendaPortletRenderer(base.Renderer, MonthlyView):
query_string = '%s&amp;' % query_string
return query_string
def eventsurl(self):
settings = component.getUtility(IRegistry).forInterface(ITabellioSettings, False)
path = settings.parleventsPath
return path
class AgendaPortletAddForm(base.NullAddForm):