Changeset e309f6 in indico


Ignore:
Timestamp:
04/19/10 14:11:41 (3 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, new-webex, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
Children:
4f0fe6
Parents:
44947c
git-author:
Leszek Syroka <leszek.marek.syroka@…> (03/25/10 13:59:36)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (04/19/10 14:11:41)
Message:

[FIX] Room names in conference overview

  • room names in break, session and contribution were chaged to following foramt buidling-floor-room - roomName
  • class RHConferenceOtherViews inherits from RoomBookingDBMixin to establish DB connection
  • fix#347
Location:
indico/MaKaC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/common/output.py

    r11debe re309f6  
    274274                    roomFromDB = CrossLocationQueries.getRooms( roomName = roomName, location = loc.getName() ) 
    275275                    # if there's a room with such name 
    276                     if roomFromDB: 
     276                    if roomFromDB != []: 
    277277                        # use the full name instead 
    278                         roomName = roomFromDB.getFullName() 
     278                        roomName = roomFromDB[0].getFullName() 
    279279 
    280280                out.writeTag("room", roomName) 
     
    420420                out.writeTag("address",l.getAddress()) 
    421421            if session.getRoom(): 
    422                 out.writeTag("room",session.getRoom().getName()) 
     422                # get the name that is saved 
     423                roomName = session.getRoom().getName() 
     424 
     425                # if there is a connection to the room booking DB 
     426                if CrossLocationDB.isConnected() and l: 
     427                    # get the room info 
     428                    roomFromDB = CrossLocationQueries.getRooms( roomName = roomName, location = l.getName() ) 
     429                    # if there's a room with such name 
     430                    if roomFromDB != []: 
     431                        # use the full name instead 
     432                        roomName = roomFromDB[0].getFullName() 
     433                out.writeTag("room", roomName) 
    423434                url=RoomLinker().getURL(session.getRoom(), l) 
    424435                if url != "": 
     
    516527                out.writeTag("address",l.getAddress()) 
    517528            if room: 
    518                 out.writeTag("room",room.getName()) 
     529                # get the name that is saved 
     530                roomName = room.getName() 
     531                # if there is a connection to the room booking DB 
     532                if CrossLocationDB.isConnected() and l: 
     533                    # get the room info 
     534                    roomFromDB = CrossLocationQueries.getRooms( roomName = roomName, location = l.getName() ) 
     535                    # if there's a room with such name 
     536                    if roomFromDB != []: 
     537                        # use the full name instead 
     538                        roomName = roomFromDB[0].getFullName() 
     539                out.writeTag("room", roomName) 
    519540                url=RoomLinker().getURL(room, l) 
    520541                if url != "": 
     
    615636                out.writeTag("address",l.getAddress()) 
    616637            if cont.getRoom(): 
    617                 out.writeTag("room",cont.getRoom().getName()) 
     638                roomName = cont.getRoom().getName() 
     639                # if there is a connection to the room booking DB 
     640                if CrossLocationDB.isConnected() and l: 
     641                    # get the room info 
     642                    roomFromDB = CrossLocationQueries.getRooms( roomName = roomName, location = l.getName() ) 
     643                    # if there's a room with such name 
     644                    if roomFromDB != []: 
     645                        # use the full name instead 
     646                        roomName = roomFromDB[0].getFullName() 
     647                out.writeTag("room", roomName) 
    618648                url=RoomLinker().getURL(cont.getRoom(), l) 
    619649                if url != "": 
     
    826856                out.writeTag("address",l.getAddress()) 
    827857            if br.getRoom(): 
    828                 out.writeTag("room",br.getRoom().getName()) 
     858                roomName = br.getRoom().getName() 
     859                # if there is a connection to the room booking DB 
     860                if CrossLocationDB.isConnected() and l: 
     861                    # get the room info 
     862                    roomFromDB = CrossLocationQueries.getRooms( roomName = roomName, location = l.getName() ) 
     863                    # if there's a room with such name 
     864                    if roomFromDB != []: 
     865                        # use the full name instead 
     866                        roomName = roomFromDB[0].getFullName() 
     867                out.writeTag("room", roomName) 
    829868                url=RoomLinker().getURL(br.getRoom(), l) 
    830869                if url != "": 
     
    903942 
    904943            if conf.getRoom(): 
    905                 loc = loc + ", "+conf.getRoom().getName() 
     944                roomName = conf.getRoom().getName() 
     945                # if there is a connection to the room booking DB 
     946                if CrossLocationDB.isConnected() and l: 
     947                    # get the room info 
     948                    roomFromDB = CrossLocationQueries.getRooms( roomName = roomName, location = l.getName() ) 
     949                    # if there's a room with such name 
     950                    if roomFromDB != []: 
     951                        # use the full name instead 
     952                        roomName = roomFromDB[0].getFullName() 
     953                loc = loc + ", " + roomName 
    906954 
    907955            if l.getName() != "": 
  • indico/MaKaC/webinterface/rh/conferenceDisplay.py

    rbdd862 re309f6  
    458458 
    459459 
    460 class RHConferenceOtherViews( RHConferenceBaseDisplay ): 
     460class RHConferenceOtherViews( RoomBookingDBMixin, RHConferenceBaseDisplay ): 
    461461    """this class is for the conference type objects only 
    462462    it is an alternative to the standard TimeTable view""" 
Note: See TracChangeset for help on using the changeset viewer.