Пример #1
0
 function _getAdditionalFormFieldsAsHTML()
 {
     $current_context = $this->_environment->getCurrentContextItem();
     $session = $this->_environment->getSession();
     $left_menue_status = $session->getValue('left_menue_status');
     if ($left_menue_status != 'disapear') {
         $width = '14.3';
     } else {
         $width = '18.3';
     }
     $html = '';
     // institutions and topics
     $html .= parent::_getAdditionalFormFieldsAsHTML();
     // time (clock pulses)
     $current_context = $this->_environment->getCurrentContextItem();
     $portal_item = $current_context->getContextItem();
     if ($this->_environment->inCommunityRoom() and $current_context->showTime() and $portal_item->showTime()) {
         $seltime = $this->getSelectedTime();
         $time_list = $portal_item->getTimeListRev();
         $this->translatorChangeToPortal();
         $html .= '<div style="text-align:left; font-size: 10pt;">' . $this->_translator->getMessage('COMMON_TIME_NAME') . BRLF;
         $this->translatorChangeToCurrentContext();
         // jQuery
         //$html .= '   <select style="width: '.$width.'em; font-size:8pt; margin-bottom:5px;" name="seltime" size="1" onChange="javascript:document.indexform.submit()">'.LF;
         $html .= '   <select style="width: ' . $width . 'em; font-size:8pt; margin-bottom:5px;" name="seltime" size="1" id="submit_form">' . LF;
         // jQuery
         $html .= '      <option value="-3"';
         if (!isset($seltime) or $seltime == 0 or $seltime == -3) {
             $html .= ' selected="selected"';
         }
         $html .= '>*' . $this->_translator->getMessage('COMMON_NO_SELECTION') . '</option>' . LF;
         $html .= '      <option class="disabled" disabled="disabled" value="-2">------------------------------</option>' . LF;
         if ($time_list->isNotEmpty()) {
             $time_item = $time_list->getFirst();
             while ($time_item) {
                 $html .= '      <option value="' . $time_item->getItemID() . '"';
                 if (!empty($seltime) and $seltime == $time_item->getItemID()) {
                     $html .= ' selected="selected"';
                 }
                 $html .= '>' . $this->_translator->getTimeMessage($time_item->getTitle()) . '</option>' . LF;
                 $time_item = $time_list->getNext();
             }
         }
         $html .= '      <option class="disabled" disabled="disabled" value="-2">------------------------------</option>' . LF;
         $html .= '      <option value="-1"';
         if (isset($seltime) and $seltime == -1) {
             $html .= ' selected="selected"';
         }
         $html .= '>*' . $this->_translator->getMessage('COMMON_NOT_LINKED') . '</option>' . LF;
         $html .= '   </select>' . LF;
         $html .= '</div>' . LF;
     }
     return $html;
 }
Пример #2
0
 function getInfoForHeaderAsHTML()
 {
     global $cs_color;
     $retour = parent::getInfoForHeaderAsHTML();
     if (!empty($this->_list)) {
         $retour .= '   <!-- BEGIN Styles -->' . LF;
         $retour .= '   <style type="text/css">' . LF;
         $session = $this->_environment->getSession();
         $session_id = $session->getSessionID();
         $retour .= '    img { border: 0px; }' . LF;
         $retour .= '    img.logo_small { width: 40px; }' . LF;
         $retour .= '    td.header_left_no_logo { text-align: left; width:1%; vertical-align: middle; font-size: x-large; font-weight: bold; height: 50px; padding-top: 3px;padding-bottom: 3px;padding-right: 3px; padding-left: 15px; }' . LF;
         $item = $this->_list->getFirst();
         while (!empty($item)) {
             $color_array = $item->getColorArray();
             if (count($color_array) > 0) {
                 $cs_color['room_title'] = $color_array['tabs_title'];
                 $cs_color['room_background'] = $color_array['content_background'];
                 $cs_color['tableheader'] = $color_array['tabs_background'];
             } else {
                 $cs_color['room_title'] = '';
                 $cs_color['room_background'] = '';
                 $cs_color['tableheader'] = '';
             }
             $retour .= '    table.room_window' . $item->getItemID() . ' {width: 17em; border:1px solid  ' . $cs_color['tableheader'] . '; margin:0px; padding:5px 10px 5px 10px; ';
             if ($color_array['schema'] == 'SCHEMA_OWN') {
                 if ($item->getBGImageFilename()) {
                     global $c_single_entry_point;
                     if ($item->issetBGImageRepeat()) {
                         $retour .= 'background: url(' . $c_single_entry_point . '?cid=' . $item->getItemID() . '&mod=picture&fct=getfile&picture=' . $item->getBGImageFilename() . ') repeat; ';
                     } else {
                         $retour .= 'background: url(' . $c_single_entry_point . '?cid=' . $item->getItemID() . '&mod=picture&fct=getfile&picture=' . $item->getBGImageFilename() . ') no-repeat; ';
                     }
                 }
             } else {
                 if (isset($color_array['repeat_background']) and $color_array['repeat_background'] == 'xy') {
                     $retour .= 'background: url(css/images/bg-' . $color_array['schema'] . '.jpg) repeat; ';
                 } elseif (isset($color_array['repeat_background']) and $color_array['repeat_background'] == 'x') {
                     $retour .= 'background: url(css/images/bg-' . $color_array['schema'] . '.jpg) repeat-x; ';
                 } elseif (isset($color_array['repeat_background']) and $color_array['repeat_background'] == 'y') {
                     $retour .= 'background: url(css/images/bg-' . $color_array['schema'] . '.jpg) repeat-y; ';
                 } else {
                     $retour .= 'background: url(css/images/bg-' . $color_array['schema'] . '.jpg) no-repeat; ';
                 }
             }
             $retour .= 'background-color: ' . $color_array['content_background'] . ';';
             if (isset($color_array['page_title'])) {
                 $retour .= 'color:' . $color_array['page_title'] . ' }';
             } else {
                 $retour .= 'color:#000000; }';
             }
             $retour .= '    td.detail_view_content_room_window' . $item->getItemID() . ' { width: 17em; padding: 3px;text-align: left; border-bottom: 1px solid ' . $cs_color['tableheader'] . ';}' . LF;
             $retour .= '    td.detail_view_title_room_window' . $item->getItemID() . ' {background-color: ' . $cs_color['tableheader'] . '; color: ' . $cs_color['room_title'] . '; padding: 0px;text-align: left;}' . LF;
             $retour .= '    td.detail_view_title_room_window' . $item->getItemID() . ' a {background-color: ' . $cs_color['tableheader'] . '; color: ' . $cs_color['room_title'] . '; padding: 0px;text-align: left;}' . LF;
             $retour .= '    td.detail_view_title_room_window' . $item->getItemID() . ' a:hover {background-color: ' . $cs_color['tableheader'] . '; color: ' . $cs_color['room_title'] . '; padding: 0px;text-align: left;}' . LF;
             $retour .= ' .gauge' . $item->getItemID() . ' { background-color: #FFFFFF; width: 100%; margin: 2px 0px; border: 1px solid #666; }' . LF;
             $retour .= ' .gauge-bar' . $item->getItemID() . ' { background-color: ' . $cs_color['tableheader'] . '; text-align: right; font-size: 8pt; color: black; }' . LF;
             $item = $this->_list->getNext();
         }
         $retour .= '   </style>' . "\n";
         $retour .= '   <!-- END Styles -->' . "\n";
     }
     $retour .= $this->_initDropDownMenus();
     return $retour;
 }