Changeset c8a3a93 in indico


Ignore:
Timestamp:
03/22/12 18:05:24 (14 months ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
2626c2
Parents:
b49d75
Message:

[FIX] Needs assistance modification - Notif

Location:
indico
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/rb_reservation.py

    rb5c359 rc8a3a93  
    489489        return emails 
    490490 
    491     def notifyAboutUpdate( self ): 
     491    def notifyAboutUpdate( self, attrsBefore ): 
    492492        """ 
    493493        FINAL (not intented to be overriden) 
     
    558558        # ---- Email Assistance ---- 
    559559 
    560         if getRoomBookingOption('assistanceNotificationEmails') and self.room.resvNotificationAssistance: 
     560        if getRoomBookingOption('assistanceNotificationEmails') and self.room.resvNotificationAssistance and (attrsBefore.get('needsAssistance', False) or self.needsAssistance): 
    561561            to = getRoomBookingOption('assistanceNotificationEmails') 
    562562            if to: 
     
    566566                else: 
    567567                    user = None 
    568                 subject = "[Support Request Modification][" + self.room.getFullName() + "] Modified request for " + formatDateTime(self.startDT) 
     568                hasCancelled = attrsBefore.get('needsAssistance', False) and not self.needsAssistance 
     569                textHeader = "Cancelled" if hasCancelled else "Modification" 
     570                subject = "[Support Request "+textHeader+"][" + self.room.getFullName() + "] Modified request for " + formatDateTime(self.startDT) 
    569571                wc = WTemplated( 'RoomBookingEmail_AssistanceAfterBookingModification' ) 
    570                 text = wc.getHTML( { 'reservation': self, 'currentUser': user } ) 
     572                text = wc.getHTML( { 'reservation': self, 'currentUser': user, 'hasCancelled': hasCancelled } ) 
    571573                fromAddr = Config.getInstance().getNoReplyEmail() 
    572574                addrs = [] 
  • indico/MaKaC/webinterface/rh/roomBooking.py

    rf777b0 rc8a3a93  
    12401240 
    12411241        self._clearSessionState() 
     1242        self._isAssistenceEmailSetup = getRoomBookingOption('assistanceNotificationEmails') 
    12421243 
    12431244    def _businessLogic( self ): 
     
    15311532                    self._orig_candResv.update() 
    15321533                    self._orig_candResv.indexDayReservations() 
    1533                     emailsToBeSent += self._orig_candResv.notifyAboutUpdate() 
     1534                    emailsToBeSent += self._orig_candResv.notifyAboutUpdate(self._resvAttrsBefore) 
    15341535 
    15351536                    # Add entry to the log 
  • indico/MaKaC/webinterface/tpls/RoomBookingBookingForm.tpl

    rb5c359 rc8a3a93  
    244244                                                </td> 
    245245                                            </tr> 
    246                                             <tr> 
    247                                                 <td align="right" class="subFieldWidth" valign="top"><small><span style="color: Red;"> ${ _("I need assistance with this video-conf. system")}</span>&nbsp;&nbsp;</small></td> 
    248                                                 <td align="left" class="blacktext"> 
    249                                                     <input id="needsAVCSupport" name="needsAVCSupport" type="checkbox" ${' checked="checked" ' if candResv.needsAVCSupport else ""} /> 
    250                                                     ${contextHelp('iNeedAVCSupport' )} 
    251                                                 </td> 
    252                                             </tr> 
    253246                                        % endif 
    254                                         % if rh._isAssistenceEmailSetup and candResv.room.resvNotificationAssistance: 
    255                                             <tr> 
     247                                        % if candResv.room.needsAVCSetup or (rh._isAssistenceEmailSetup and candResv.room.resvNotificationAssistance): 
     248                                        <tr> 
    256249                                            <td align="right" class="subFieldWidth" valign="top"><small>${ _("Assistance")}&nbsp;&nbsp;</small></td> 
    257                                             <td align="left" class="blacktext"> 
    258                                                 <table cellpadding=0 cellspacing=0> 
    259                                                 <tr> 
    260                                                     <td style="vertical-align:top;"><input id="needsAssistance" name="needsAssistance" type="checkbox" ${' checked="checked" ' if candResv.needsAssistance else ""} /></td> 
    261                                                     <td style="width:100%;padding-left: 3px;">${_("Request technical assistance for the startup of your meeting. A technician will be present 10 to 15 mn before the event to help you start up the room equipment")}</td> 
    262                                                 </tr> 
     250                                            <td> 
     251                                                <table valign='top' cellpadding=0 cellspacing=0> 
     252                                                    % if candResv.room.needsAVCSetup: 
     253                                                    <tr> 
     254                                                        <td align="left" class="blacktext"> 
     255                                                            <table cellpadding=0 cellspacing=0> 
     256                                                            <tr> 
     257                                                                <td style="vertical-align:top;"><input id="needsAVCSupport" name="needsAVCSupport" type="checkbox" ${' checked="checked" ' if candResv.needsAVCSupport else ""} /></td> 
     258                                                                <td style="width:100%;padding-left: 3px;">${ _("Request assistance for the startup of the videoconference session. This support will most probably be done remotely")}</td> 
     259                                                            </tr> 
     260                                                            </table> 
     261                                                        </td> 
     262                                                    </tr> 
     263                                                    % endif 
     264                                                    % if rh._isAssistenceEmailSetup and candResv.room.resvNotificationAssistance: 
     265                                                    <tr> 
     266                                                        <td align="left" class="blacktext"> 
     267                                                            <table cellpadding=0 cellspacing=0> 
     268                                                            <tr> 
     269                                                                <td style="vertical-align:top;"><input id="needsAssistance" name="needsAssistance" type="checkbox" ${' checked="checked" ' if candResv.needsAssistance else ""} /></td> 
     270                                                                <td style="width:100%;padding-left: 3px;">${_("Request assistance for the startup of your meeting. A technician will be physically present 10 to 15 mn before the event to help you start up the room equipment (microphone, projector, etc)")}</td> 
     271                                                            </tr> 
     272                                                            </table> 
     273                                                        </td> 
     274                                                    </tr> 
     275                                                    % endif 
    263276                                                </table> 
    264277                                            </td> 
    265                                             </tr> 
     278                                        </tr> 
    266279                                        % endif 
    267280                                    </table> 
  • indico/MaKaC/webinterface/tpls/RoomBookingDetails.tpl

    r443bee rc8a3a93  
    226226                                        </tr> 
    227227                                        <tr> 
    228                                             <td align="right" valign="top"><small> ${ _("Assistance")}&nbsp;&nbsp;</small></td> 
     228                                            <td align="right" valign="top" nowrap><small> ${ _("Video-conf Assistance")}&nbsp;&nbsp;</small></td> 
    229229                                            <td align="left" class="blacktext"> 
    230230                                                ${ verbose( reservation.needsAVCSupport, "no" ) } 
    231231                                                ${contextHelp('iNeedAVCSupport' )} 
     232                                            </td> 
     233                                        </tr> 
     234                                        % endif 
     235                                        % if rh._isAssistenceEmailSetup and reservation.room.resvNotificationAssistance: 
     236                                        <tr> 
     237                                            <td align="right" valign="top" nowrap><small> ${ _("Startup Assistance")}&nbsp;&nbsp;</small></td> 
     238                                            <td align="left" class="blacktext"> 
     239                                                ${ verbose( reservation.needsAssistance, "no" ) } 
    232240                                            </td> 
    233241                                        </tr> 
  • indico/MaKaC/webinterface/tpls/RoomBookingEmail_AssistanceAfterBookingModification.tpl

    rb5c359 rc8a3a93  
    22 
    33 
    4 ${ currentUser.getStraightFullName()} requested ASSISTANCE for the meeting startup. 
     4${ currentUser.getStraightFullName()} ${'has cancelled' if hasCancelled else 'requested'} ASSISTANCE for the meeting startup. 
    55 
    66For:  ${ reservation.bookedForName } 
  • indico/locale/fr_FR/LC_MESSAGES/messages.po

    re6dc57 rc8a3a93  
    22# Copyright (C) 2012 ORGANIZATION 
    33# This file is distributed under the same license as the indico project. 
    4 #  
     4# 
    55# Translators: 
    66# Dirk Hoffmann <Hoffmann@cppm.in2p3.fr>, 2012. 
     
    2334223342#: MaKaC/webinterface/tpls/RoomBookingBookingForm.tpl:247 
    2334323343#: indico/MaKaC/webinterface/tpls/RoomBookingBookingForm.tpl:247 
    23344 msgid "I need assistance with this video-conf. system" 
     23344msgid "Request assistance for the startup of the videoconference session. This support will most probably be done remotely" 
    2334523345msgstr "J'ai besoin d'assistance avec ce systÚme de video-conférence" 
    2334623346 
  • indico/locale/messages.pot

    re9a1f8 rc8a3a93  
    2315023150#: MaKaC/webinterface/tpls/RoomBookingBookingForm.tpl:247 
    2315123151#: indico/MaKaC/webinterface/tpls/RoomBookingBookingForm.tpl:247 
    23152 msgid "I need assistance with this video-conf. system" 
     23152msgid "Request assistance for the startup of the videoconference session. This support will most probably be done remotely" 
    2315323153msgstr "" 
    2315423154 
Note: See TracChangeset for help on using the changeset viewer.