Ignore:
Timestamp:
06/16/10 17:09:17 (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, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
3908a4
Parents:
9c186f
git-author:
Ian Rolewicz <ian.rolewicz@…> (04/27/10 12:25:57)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (06/16/10 17:09:17)
Message:

[IMP] Booking Actions History

  • fixes #268
  • On the details page of a booking, the history of previous actions performed on that booking is displayed for the owner of the room, the people allowed to modify the booking and the administrators.
  • Updated the User Guide
  • reviewed by jbenito: doc regenerated
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/tpls/RoomBookingDetails.tpl

    r5fc9a3 rcd05ca  
    6868        <div id="tooltipPool" style="display: none"> 
    6969 
    70         <!-- Status -->  
     70        <!-- Status --> 
    7171                <div id="statusHelp" class="tip"> 
    7272             <%= _("Validity")%>:<br /> 
     
    8484                </div> 
    8585        <img style="border-style: solid; border-width: thick; border-color: #101010;" /> 
    86         <!-- Repetition type -->  
     86        <!-- Repetition type --> 
    8787        <div id="repetitionTypeHelp" class="tip"> 
    8888             <%= _("Repetition type - this indicates how a booking repeats itself.")%> 
    8989        </div> 
    90         <!-- Where is key? -->  
     90        <!-- Where is key? --> 
    9191        <div id="whereIsKeyHelp" class="tip"> 
    9292             <%= _("How to obtain a key? Often just a phone number.")%> 
    9393        </div> 
    94         <!-- Created -->  
     94        <!-- Created --> 
    9595        <div id="createdHelp" class="tip"> 
    9696             <%= _("When the booking was made?")%> 
     
    103103             <%= _("Has user requested support for video-conferencing equipment?")%><br /> 
    104104        </div> 
    105          
     105 
    106106        </div> 
    107107 
    108108    <!-- END OF CONTEXT HELP DIVS --> 
    109109 
    110     <table cellpadding="0" cellspacing="0" border="0" width="80%"> 
     110    <table cellpadding="0" cellspacing="0" border="0" width="100%"> 
    111111                <% if standalone: %> 
    112112                    <tr> 
     
    130130                              <!-- ROOM --> 
    131131                              <tr> 
    132                                 <td class="titleUpCellTD"><span class="titleCellFormat"> <%= _("Room")%></span></td> 
     132                                <td class="bookingDisplayTitleCell"><span class="titleCellFormat"> <%= _("Room")%></span></td> 
    133133                                <td> 
    134134                                    <table width="100%"> 
     
    153153                              <!-- WHEN --> 
    154154                              <tr> 
    155                                 <td class="titleUpCellTD"><span class="titleCellFormat"> <%= _("When")%></span></td> 
     155                                <td class="bookingDisplayTitleCell"><span class="titleCellFormat"> <%= _("When")%></span></td> 
    156156                                <td> 
    157157                                    <table width="100%"> 
     
    175175                            <!-- BOOKED FOR --> 
    176176                            <tr> 
    177                                 <td class="titleUpCellTD"><span class="titleCellFormat"> <%= _("Booked for")%></span></td> 
     177                                <td class="bookingDisplayTitleCell"><span class="titleCellFormat"> <%= _("Booked for")%></span></td> 
    178178                                <td> 
    179179                                    <table width="100%"> 
     
    196196                            <!-- CREATED --> 
    197197                            <tr> 
    198                                 <td class="titleUpCellTD"><span class="titleCellFormat"> <%= _("Created")%></span></td> 
     198                                <td class="bookingDisplayTitleCell"><span class="titleCellFormat"> <%= _("Created")%></span></td> 
    199199                                <td> 
    200200                                    <table width="100%"> 
     
    242242                            <!-- ACTIONS --> 
    243243                            <tr> 
    244                                 <td class="titleUpCellTD"><span class="titleCellFormat"> <%= _("Actions")%></span></td> 
     244                                <td class="bookingDisplayTitleCell"><span class="titleCellFormat"> <%= _("Actions")%></span></td> 
    245245                                <td> 
    246246                                    <form name="submits" action="" method="post"> 
     
    265265                                </td> 
    266266                            </tr> 
     267                            <% if reservation.getResvHistory().hasHistory() and ( reservation.isOwnedBy( user ) or reservation.room.isOwnedBy( user ) or user.isAdmin() ) : %> 
     268                            <tr><td>&nbsp;</td></tr> 
     269                            <!-- BOOKING HISTORY --> 
     270                            <script type="text/javascript"> 
     271                                function performSlideOnEntry(entryNum, state){ 
     272                                    if ( state ) { 
     273                                         IndicoUI.Effect.slide('bookingEntryLine' + entryNum, eval('height' + entryNum)); 
     274                                         $E('bookingEntryMoreInfo' + entryNum).set('More Info'); 
     275                                         $E('bookingEntryMoreInfo' + entryNum).dom.className = "fakeLink bookingDisplayEntryMoreInfo"; 
     276                                     } else { 
     277                                         IndicoUI.Effect.slide('bookingEntryLine' + entryNum, eval('height' + entryNum)); 
     278                                         $E('bookingEntryMoreInfo' + entryNum).set('Hide Info'); 
     279                                         $E('bookingEntryMoreInfo' + entryNum).dom.className = "fakeLink bookingDisplayEntryHideInfo"; 
     280                                     } 
     281                                     return !state 
     282                                } 
     283                            </script> 
     284                            <tr> 
     285                                <td class="bookingDisplayTitleCell"><span class="titleCellFormat"> <%= _("Booking History")%></span></td> 
     286                                <td> 
     287                                <% count = 0 %> 
     288                                <% for entry in reservation.getResvHistory().getEntries() : %> 
     289                                    <% if count == 1 : %> 
     290                                    <!-- Construct the divs needed by the sliding effect --> 
     291                                    <div id="bookingHistoryLine" style="visibility: hidden; overflow: hidden;"> 
     292                                    <div class="bookingDisplayBookingHistoryLine"> 
     293                                    <% end %> 
     294                                        <div class="bookingHistoryEntry"> 
     295                                            <span class="bookingDisplayHistoryTimestamp"><%= entry.getTimestamp() %></span> 
     296                                            <span class="bookingDisplayHistoryInfo"><%= entry.getInfo()[0] %> by <%= entry.getResponsibleUser() %> 
     297                                            <% if len(entry.getInfo()) > 1 : %> 
     298                                                <span class='fakeLink bookingDisplayEntryMoreInfo' id='bookingEntryMoreInfo<%= count %>'> More Info </span> 
     299                                                </span> 
     300                                                <div id="bookingEntryLine<%= count %>"  style="visibility: hidden; overflow: hidden;"> 
     301                                                <div class="bookingDisplayEntryLine"> 
     302                                                    <ul> 
     303                                                    <% for elem in entry.getInfo(): %> 
     304                                                        <% if entry.getInfo().index(elem) != 0: %> 
     305                                                        <li> 
     306                                                        <%= elem %> 
     307                                                        </li> 
     308                                                        <% end %> 
     309                                                    <% end %> 
     310                                                    </ul> 
     311                                                </div> 
     312                                                </div> 
     313                                                <script type="text/javascript"> 
     314                                                    $E('bookingEntryMoreInfo<%= count %>').dom.onmouseover = function (event) { 
     315                                                        IndicoUI.Widgets.Generic.tooltip($E('bookingEntryMoreInfo<%= count %>').dom, event, '<div class="bookingHistoryTooltip">Click here to show / hide detailed information.</div>' 
     316                                                            ); 
     317                                                      } 
     318                                                    var showEntryMoreState<%= count %> = false; 
     319                                                    var height<%= count %> = IndicoUI.Effect.prepareForSlide('bookingEntryLine<%= count %>', true); 
     320                                                    $E('bookingEntryMoreInfo<%= count %>').observeClick(function () { 
     321                                                        showEntryMoreState<%= count %> = performSlideOnEntry(<%= count %>, showEntryMoreState<%= count %>); 
     322                                                        }); 
     323                                                </script> 
     324                                            <% end %> 
     325                                            <% else : %> 
     326                                                </span> 
     327                                            <% end %> 
     328                                            <% count += 1 %> 
     329                                        </div> 
     330                                <% end %> 
     331                                <% if count > 1 : %> 
     332                                    </div> 
     333                                    </div> 
     334                                    <div class="bookingShowHideHistory"> 
     335                                        <span class="fakeLink bookingDisplayShowHistory" id="bookingShowHistory"> 
     336                                        Show All History ... 
     337                                        </span> 
     338                                    </div> 
     339                                    <script type="text/javascript"> 
     340                                          $E('bookingShowHistory').dom.onmouseover = function (event) { 
     341                                              IndicoUI.Widgets.Generic.tooltip($E('bookingShowHistory').dom, event, '<div class="bookingHistoryTooltip">Click here to show / hide detailed information.</div>' 
     342                                                  ); 
     343                                            } 
     344                                          var height = IndicoUI.Effect.prepareForSlide('bookingHistoryLine', true); 
     345                                          var showHistoryState = false; 
     346                                          $E('bookingShowHistory').observeClick(function() { 
     347                                              if (showHistoryState) { 
     348                                                  height = IndicoUI.Effect.prepareForSlide('bookingHistoryLine', false); 
     349                                                  $E('bookingShowHistory').dom.className = "fakeLink bookingDisplayShowHistory"; 
     350                                                  IndicoUI.Effect.slide('bookingHistoryLine', height); 
     351                                                  $E('bookingShowHistory').set('Show All History ...'); 
     352                                                  } 
     353                                              else { 
     354                                                  $E('bookingShowHistory').dom.className = "fakeLink bookingDisplayHideHistory"; 
     355                                                  IndicoUI.Effect.slide('bookingHistoryLine', height); 
     356                                                  $E('bookingShowHistory').set('Hide All History'); 
     357                                                  } 
     358                                              showHistoryState = !showHistoryState 
     359                                        }); 
     360                                    </script> 
     361                                <% end %> 
     362                                </td> 
     363                            </tr> 
     364                            <% end %> 
    267365                            <% if reservation.repeatability != None  and  reservation.getExcludedDays(): %> 
     366                            <tr><td>&nbsp;</td></tr> 
    268367                            <!-- Excluded dates --> 
    269368                            <tr> 
    270                                 <td class="titleUpCellTD"><span class="titleCellFormat"> <%= _("Excluded days")%></span></td> 
     369                                <td class="bookingDisplayTitleCell"><span class="titleCellFormat"> <%= _("Excluded days")%></span></td> 
    271370                                <td> 
    272371                                    <table width="100%"> 
     
    288387                            <% end %> 
    289388                            <% if reservation.repeatability != None: %> 
     389                            <tr><td>&nbsp;</td></tr> 
    290390                            <!-- Occurrences --> 
    291391                            <tr> 
    292                                 <td class="titleUpCellTD"><span class="titleCellFormat"> <%= _("Occurrences")%></span></td> 
     392                                <td class="bookingDisplayTitleCell"><span class="titleCellFormat"> <%= _("Occurrences")%></span></td> 
    293393                                <td> 
    294394                                    <table width="100%"> 
     
    304404 
    305405                                            <% for period in reservation.splitToPeriods(): %> 
    306                                                 <%= formatDate(period.startDT.date()) %>  
     406                                                <%= formatDate(period.startDT.date()) %> 
    307407                                                <% if canReject: %> 
    308408                                                    <a href="javascript: void( 0 )" onclick="submit_reject_occurrence( '<%= urlHandlers.UHRoomBookingRejectBookingOccurrence.getURL( reservation, formatDate(period.startDT.date()) ) %>');">Reject</a> 
     
    321421                            <% end %> 
    322422                        </table> 
    323                          
     423 
    324424                        </td> 
    325425                    </tr> 
Note: See TracChangeset for help on using the changeset viewer.