Voici mon code comme vous le voyez j'utilise la macro basebox_welcome,
moi j'aimerai en avoir une nouvlle appelle basebox_whoonline

cependant si je fais cela et elle ne s'affichera pas dans la gestion des boites
comment faire alors ?

<!-- ============================================================ -->
<metal:block define-macro="basebox_welcome">
<div metal:define-macro="portlet"
     tal:omit-tag="">
 <div class="portlet"
         tal:condition="here/who_online/hasPermission"
         tal:define="who_online here/who_online/getActiveMembers | nothing;
                     visitors here/who_online/getActiveVisitors | nothing;
                     view_more python:test(len(who_online)>10,1,0);">

        <h5 i18n:translate="">Who is online</h5>

        <div class="portletBody">

        <div class="content odd">
           <strong tal:condition="not: visitors" i18n:translate="">No visitor
online</strong>
           <span tal:condition="visitors">
               <strong i18n:translate="">Current visitor(s)</strong>:
               <span tal:content="visitors">0</span>
           </span>
        </div>
        <div class="content even">
           <strong tal:condition="not: who_online"
i18n:translate="box_who_online_no_members">No member online</strong>
           <span tal:condition="who_online">
               <strong i18n:translate="box_who_online_members">Current
member(s)</strong>:
               <span tal:content="python: len(who_online)">0</span>
           </span>
        </div>

        <table cellpadding="2" cellspacing="0" border="0" id="who_online"
               tal:condition="who_online"
               >
            <tr tal:repeat="member python: who_online[:10]">
                <td class="odd"
                    tal:define="member_id member/getUserName;
                                member_home
python:container.portal_membership.getHomeUrl(member_id);">
                    &nbsp;

                    <a href="#" tal:condition="member_home"
                                tal:attributes="href member_home"
                                tal:content="member_id">id</a>

                    <span tal:condition="not: member_home"
                          tal:content="member_id">id</span>

                </td>
            </tr>
        </table>

        <!--
        <div class="content even" tal:condition="view_more">
            <a href="#" tal:attributes="href
string:${here/portal_url}/members_online;">
               <span i18n:translate="">View all online members</span>...
           </a>
        </div>
        -->

       </div>

    </div>
</div>

</metal:block>

<!-- ============================================================ -->
<metal:block define-macro="eventcalendarbox_default">
  <metal:block use-macro="python:path(box['settings']['box_skin'])">
    <metal:block fill-slot="box_title" i18n:translate=""
                 tal:content="box/box/title">
      box text title
    </metal:block>
    <metal:block fill-slot="box_body">
    <div class="CalendarBox"
         tal:define="DateTime python:modules['DateTime'].DateTime;
                     yearmonth python:here.getMonthAndYear();
                     year python:yearmonth[0];
                     month python:yearmonth[1];
                     location box/box/events_in|nothing;
                     event_types python:box['box'].event_types or [];
                     weeks python:here.portal_calendar.getCPSEventsForCalendar(
                           month=month, year=year, location=location,
                           event_types=event_types);">

      <table cellpadding="0" cellspacing="0" border="0">
      <tr><td>
        <table cellpadding="2" cellspacing="0" border="0" class="calendar">
          <tr>
            <th>
              <a href="#" class="CalendarArrow"
                 tal:attributes="href python:here.getPreviousMonthLink(
                                             request.URL0, month, year)">
                �
              </a>
            </th>
            <th colspan="5" tal:define="date string:$month/1/$year">
              <span tal:replace="
                  python:cpsmcat('calendar_month_%s' % month)"/>
              <span tal:replace="python:DateTime(date).year()"/>
            </th>
            <th>
              <a href="#" class="CalendarArrow"
                 tal:attributes="href python:here.getNextMonthLink(
                                             request.URL0, month, year)">
                �
              </a>
            </th>
          </tr>
          <tr tal:define="weekdays
python:here.portal_calendar.getDayList(here.Localizer)">
            <tal:weekday tal:repeat="weekday weekdays">
              <td class="weekdays" tal:content="python:cpsmcat('calendar_day_%s'
% weekday)">Su</td>
            </tal:weekday>
          </tr>
          <tr tal:repeat="week weeks">
            <tal:week tal:define="days week">
              <tal:day tal:repeat="day days">
                <tal:daynumber tal:define="daynumber day/day;
                                           datestring python:'%d/%0.2d/%0.2d' %
                                           (year, month, daynumber);">
                  <tal:block tal:condition="day/event">
                    <td class="event"
                        tal:attributes="class python:here.getDaysClass(
                                        daynumber, month, year, day['event'])">
                      <a href=""
                         tal:attributes="href
python:here.getCalCPSDayViewParams(
                                                      context_url=context_url,
                                                      datestring=datestring,
                                                      location=location,
                                                      event_types=event_types)"
                         tal:content="python: daynumber or default">
                      </a>
                    </td>
                  </tal:block>
                  <tal:block tal:condition="not: day/event">
                    <td tal:content="python: daynumber or default"
                        tal:attributes="class python:here.getDaysClass(
                                        daynumber, month, year)">

                    </td>
                  </tal:block>
                </tal:daynumber>
              </tal:day>
            </tal:week>
          </tr>
        </table>
      </td></tr>
      </table>
    </div>
    </metal:block>
  </metal:block>
</metal:block>
_______________________________________________
cps-users-fr 
Adresse de la liste : [email protected]
Gestion de l'abonnement : <http://lists.nuxeo.com/mailman/listinfo/cps-users-fr>

Répondre à