private function outputReservations(&$out, $res) { /* if (isset($res['messages'])){ if ( count( $res['messages'] ) > 0 ) { foreach ( $res['messages'] AS $w ) { if ( isset( $w['type'] ) && isset( $w['message']) ){ if ( 'warning'== $w['type'] ){ $out->addHTML( "<span class='res-warning'>" . $w['message'] . "</span>" ) ; } if ( 'success'== $w['type'] ){ $out->addHTML( "<span class='res-success'>" . $w['message'] . "</span>" ) ; } } } } } */ $render = new ReservationRender(); if (isset($res['output']['unrendered'])) { $res = $render->get_rendered_result($res['output']['unrendered'], ''); } if (isset($res['immediate'])) { $out->addWikiMsg('reservation-section-available-cores'); $out->addHTML($res['immediate']); } /* if (isset($res['forms'])){ foreach ($res['forms'] AS $_f){ $out->addHTML( $_f ); } } if (isset($res['bookings'])){ $out->addWikiText("==Future bookings=="); $out->addHTML( $res['bookings'] ); } if (isset($res['all-blades'])){ $out->addWikiMsg( 'reservation-section-blades-available-for-anyone' ); $out->addWikiMsg( 'reservation-section-blades-see-sysop' ); $out->addHTML( $res['all-blades'] ); $out->addWikiMsg( 'reservation-section-usage-person' ); } */ if (isset($res['usage'])) { $out->addHTML($res['usage']); } $out->addWikiMsg('reservation-section-log'); if (isset($res['log'])) { // $out->addHTML( $res['log'] ); } }
private function outputReservations(&$out, $res) { if (isset($res['messages'])) { if (count($res['messages']) > 0) { foreach ($res['messages'] as $w) { if (isset($w['type']) && isset($w['message'])) { if ('warning' == $w['type']) { $out->addHTML("<span class='res-warning'>" . $w['message'] . "</span>"); } if ('success' == $w['type']) { $out->addHTML("<span class='res-success'>" . $w['message'] . "</span>"); } } } } } $render = new ReservationRender(); if (isset($res['output']['unrendered'])) { $res = $render->get_rendered_result($res['output']['unrendered'], ''); } if (isset($res['immediate'])) { $out->addWikiMsg('reservation-section-available-cores'); $out->addHTML($res['immediate']); } if (isset($res['forms'])) { foreach ($res['forms'] as $_f) { $out->addHTML($_f); } } if (isset($res['current-usage'])) { $out->addWikiMsg('reservation-section-cores-booked'); $out->addHTML($res['current-usage']); $out->addWikiMsg('reservation-see-userrights'); } if (isset($res['bookings'])) { $out->addWikiMsg('reservation-section-future-bookings'); $out->addHTML($res['bookings']); } /* if (isset($res['your-blades'])){ $out->addWikiMsg( 'reservation-section-blades-available-for-you' ); $out->addWikiMsg( 'reservation-see-userrights' ); $out->addHTML( $res['your-blades'] ); } if (isset($res['usage'])){ $out->addWikiText("==Usage by person=="); $out->addHTML( $res['usage'] ); } if (isset($res['log'])){ $out->addWikiText("==Latest log=="); $out->addHTML( $res['log'] ); } */ $out->addWikiMsg('reservation-section-log'); $out->addWikiMsg('reservation-see-log'); }