function asHTML()
 {
     $buzzword_list = $this->_buzzword_list;
     $html = '';
     $html .= '<div id="' . get_class($this) . '">' . LF;
     $html .= '<div style="font-size:8pt; width:100%">' . LF;
     $buzzword = $buzzword_list->getFirst();
     $params = $this->_environment->getCurrentParameterArray();
     $buzzword = $buzzword_list->getFirst();
     if (!$buzzword) {
         $html .= '<span class="disabled" style="font-size:10pt;">' . $this->_translator->getMessage('COMMON_NO_ENTRIES') . '</span>';
     }
     while ($buzzword) {
         $count = $buzzword->getCountLinks();
         if ($count > 0 or true) {
             $font_size = $this->getBuzzwordSizeLogarithmic($count);
             $font_color = 100 - $this->getBuzzwordColorLogarithmic($count);
             $params['selbuzzword'] = $buzzword->getItemID();
             $temp_text = '';
             $style_text = 'style="margin-left:2px; margin-right:2px;';
             if (!empty($this->_selbuzzword) and $this->_selbuzzword == $buzzword->getItemID()) {
                 $style_text .= ' color:#000000;';
                 $style_text .= ' font-weight:bold;';
             } else {
                 $style_text .= ' color: rgb(' . $font_color . '%,' . $font_color . '%,' . $font_color . '%);';
             }
             $style_text .= 'font-size:' . $font_size . 'px;"';
             $title = '<span id="buzzword_' . $buzzword->getItemID() . '" class="droppable_buzzword" ' . $style_text . '>' . LF;
             $title .= $this->_text_as_html_short($buzzword->getName()) . LF;
             $title .= '</span> ';
             $html .= ahref_curl($this->_environment->getCurrentContextID(), 'entry', 'index', $params, $title, $buzzword->getName()) . LF;
         }
         $buzzword = $buzzword_list->getNext();
     }
     $html .= '</div>' . LF;
     $html .= '</div>' . LF;
     return $html;
 }
Beispiel #2
0
 function asHTML()
 {
     $html = LF . '<!-- BEGIN OF LIST VIEW -->' . LF;
     $html .= '<div id="profile_content">' . LF;
     $html .= '<form style="padding:0px; margin:0px;" action="';
     $params = $this->_environment->getCurrentParameterArray();
     $html .= curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), $this->_environment->getCurrentFunction(), $params) . '" method="post">' . LF;
     $params = $this->_environment->getCurrentParameterArray();
     unset($params['attach_view']);
     unset($params['attach_type']);
     $params['return_attach_tag_list'] = 'true';
     $title = ahref_curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), $this->_environment->getCurrentFunction(), $params, 'X', '', '', '', '', '', '', 'class="titlelink"');
     $html .= '<div>' . LF;
     $html .= '<div class="profile_title" style="float:right">' . $title . '</div>';
     $html .= '<h2 id="profile_title">' . $this->_translator->getMessage('COMMON_TAG_NEW_ATTACH') . '</h2>';
     $html .= '</div>' . LF;
     $current_browser = mb_strtolower($this->_environment->getCurrentBrowser(), 'UTF-8');
     $current_browser_version = $this->_environment->getCurrentBrowserVersion();
     if ($current_browser == 'msie' and (strstr($current_browser_version, '5.') or strstr($current_browser_version, '6.'))) {
         $width = ' width:100%; padding-right:10px;';
     } else {
         $width = '';
     }
     $html .= '<div style="width:100%; padding-top:5px; vertical-align:bottom;">' . LF;
     #      $html .= '<table class="list" style="width: 100%; border-collapse: collapse;" summary="Layout">'.LF;
     $html .= $this->_getContentAsHTML();
     #      $html .= '</table>'.LF;
     $html .= '<table class="list" style="width: 100%; border-collapse: collapse;" summary="Layout">' . LF;
     $html .= $this->_getTablefootAsHTML();
     $html .= '</table>' . LF;
     $html .= '</div>' . LF;
     $html .= '<div style="clear:both;">' . LF;
     $html .= '</div>' . LF;
     $html .= '</form>' . LF;
     $html .= '</div>' . LF;
     $html .= '<!-- END OF PLAIN LIST VIEW -->' . LF . LF;
     return $html;
 }
Beispiel #3
0
 function getTitle($not_with_actions = false)
 {
     $this->_show_title = false;
     $retour = '';
     if ($this->_environment->inServer() and !$not_with_actions) {
         $retour .= '<div class="actions" style="font-size: small; font-weight: normal;">' . LF;
         $retour .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'index', '', $this->_translator->getMessage('ADMIN_INDEX')) . LF;
         $retour .= '</div>' . LF;
     }
     $retour .= $this->_translator->getMessage('SERVER_STATISTIC_TITLE');
     return $retour;
 }
 function _getDetailItemActionsAsHTML($item)
 {
     $current_context = $this->_environment->getCurrentContextItem();
     $current_user = $this->_environment->getCurrentUserItem();
     $html = '';
     $context_item = $this->_environment->getCurrentContextItem();
     if ($item->isMember($current_user)) {
         if (!$item->isSystemLabel() and $this->_with_modifying_actions) {
             $params = array();
             $params['iid'] = $this->_item->getItemID();
             $params['institution_option'] = '2';
             if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
                 $image = '<img src="images/commsyicons_msie6/22x22/group_leave.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('TOPIC_LEAVE') . '"/>';
             } else {
                 $image = '<img src="images/commsyicons/22x22/group_leave.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('TOPIC_LEAVE') . '"/>';
             }
             $html .= ahref_curl($this->_environment->getCurrentContextID(), CS_INSTITUTION_TYPE, 'detail', $params, $image, $this->_translator->getMessage('TOPIC_LEAVE')) . LF;
             unset($params);
         } else {
             if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
                 $image = '<img src="images/commsyicons_msie6/22x22/group_leave_grey.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('GROUP_LEAVE') . '"/>';
             } else {
                 $image = '<img src="images/commsyicons/22x22/group_leave_grey.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('GROUP_LEAVE') . '"/>';
             }
             $html .= '<a title="' . $this->_translator->getMessage('TOPIC_LEAVE') . ' "class="disabled">' . $image . '</a>' . LF;
         }
     } else {
         if (!$item->isSystemLabel() and $this->_with_modifying_actions) {
             $params = array();
             $params['iid'] = $this->_item->getItemID();
             $params['institution_option'] = '1';
             if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
                 $image = '<img src="images/commsyicons_msie6/22x22/group_enter.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('TOPIC_ENTER') . '"/>';
             } else {
                 $image = '<img src="images/commsyicons/22x22/group_enter.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('TOPIC_ENTER') . '"/>';
             }
             $html .= ahref_curl($this->_environment->getCurrentContextID(), CS_INSTITUTION_TYPE, 'detail', $params, $image, $this->_translator->getMessage('TOPIC_ENTER')) . LF;
             unset($params);
         } else {
             if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
                 $image = '<img src="images/commsyicons_msie6/22x22/group_enter_grey.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('TOPIC_ENTER') . '"/>';
             } else {
                 $image = '<img src="images/commsyicons/22x22/group_enter_grey.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('TOPIC_ENTER') . '"/>';
             }
             $html .= '<a title="' . $this->_translator->getMessage('TOPIC_ENTER') . ' "class="disabled">' . $image . '</a>' . LF;
         }
     }
     // delete
     $html .= $this->_getDeleteAction($item, $current_user);
     return $html;
 }
 /** get the single entry of the list view as HTML
  * this method returns the single entry in HTML-Code
  *
  * @returns string $item as HMTL
  *
  * @param cs_material_item material     the single list entry
  */
 function _getItemAsHTML($item, $version_id = NULL, $with_links = TRUE)
 {
     $context_item = $this->_environment->getCurrentContextItem();
     $html = LF . '<!-- BEGIN OF MATERIAL ITEM DETAIL -->' . LF;
     $html .= $this->_getPluginInfosForMaterialDetailAsHTML();
     $formal_data1 = array();
     $bib_kind = $item->getBibKind() ? $item->getBibKind() : 'none';
     $biblio = '';
     // Author, Year
     $temp_array = array();
     /*      $author = $item->getAuthor();
           if ($bib_kind =='none' and !empty($author)){
              $temp_array[0]  = $this->_translator->getMessage('MATERIAL_AUTHORS');
              $temp_array[1]  = $this->_text_as_html_short($item->getAuthor());
              $formal_data1[] = $temp_array;
              $temp_array = array();
              $old_bibtext = $item->getBibliographicValues();
              if( !empty($old_bibtext) ){
                 $temp_array[0]  = $this->_translator->getMessage('MATERIAL_PUBLISHING_DATE');
                 $temp_array[1]  = $this->_text_as_html_long($item->getPublishingDate());
                 $formal_data1[] = $temp_array;
                 $temp_array = array();
                 $temp_array[0]  = $this->_translator->getMessage('MATERIAL_BIBLIOGRAPHIC');
                 $temp_array[1]  = $this->_text_as_html_long($item->getBibliographicValues());
                 $formal_data1[] = $temp_array;
                 $temp_array = array();
              }
           }else
           */
     if ($bib_kind == 'common') {
         $author = $item->getAuthor();
         $formal_data1 = array();
         if (!empty($author)) {
             $temp_array[0] = $this->_translator->getMessage('MATERIAL_AUTHORS');
             $temp_array[1] = $this->_text_as_html_short($this->_compareWithSearchText($item->getAuthor()));
             $formal_data1[] = $temp_array;
         }
         $pub_date = $item->getPublishingDate();
         if (!empty($pub_date)) {
             $temp_array[0] = $this->_translator->getMessage('MATERIAL_PUBLISHING_DATE');
             $temp_array[1] = $this->_text_as_html_short($this->_compareWithSearchText($item->getPublishingDate()));
             $formal_data1[] = $temp_array;
         }
         if (!empty($formal_data1)) {
             $html .= $this->_getFormalDataAsHTML($formal_data1);
             if (isset($html_script) and !empty($html_script)) {
                 $html .= $html_script;
             }
         }
         $formal_data1 = array();
         $temp_array = array();
         $biblio = $item->getBibliographicValues();
     } elseif ($bib_kind == 'website') {
         $biblio = $item->getAuthor() . ',';
     } elseif ($bib_kind == 'document') {
         $biblio = '';
     } else {
         $biblio = $item->getAuthor() . ' (' . $item->getPublishingDate() . '). ';
     }
     if ($bib_kind != 'common') {
         // Bibliographic
         switch ($bib_kind) {
             case 'book':
             case 'collection':
                 $biblio .= $item->getAddress() . ': ' . $item->getPublisher();
                 if ($item->getEdition()) {
                     $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_EDITION', $item->getEdition());
                 }
                 if ($item->getSeries()) {
                     $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_SERIES', $item->getSeries());
                 }
                 if ($item->getVolume()) {
                     $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_VOLUME', $item->getVolume());
                 }
                 if ($item->getISBN()) {
                     $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_ISBN', $item->getISBN());
                 }
                 $biblio .= '.';
                 if ($item->getURL()) {
                     $biblio .= ' ' . $this->_translator->getMessage('MATERIAL_BIB_URL', $item->getURL());
                     if ($item->getURLDate()) {
                         $biblio .= ' (' . $this->_translator->getMessage('MATERIAL_BIB_URL_DATE', $item->getURLDate()) . ')';
                     }
                     $biblio .= '.';
                 }
                 break;
             case 'incollection':
                 $editor = $item->getEditor();
                 if (!empty($editor)) {
                     $biblio .= $this->_translator->getMessage('MATERIAL_BIB_IN') . ': ';
                     $biblio .= $this->_translator->getMessage('MATERIAL_BIB_EDITOR', $item->getEditor()) . ': ';
                 }
                 $biblio .= $item->getBooktitle() . '. ';
                 $biblio .= $item->getAddress() . ': ' . $item->getPublisher();
                 if ($item->getEdition()) {
                     $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_EDITION', $item->getEdition());
                 }
                 if ($item->getSeries()) {
                     $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_SERIES', $item->getSeries());
                 }
                 if ($item->getVolume()) {
                     $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_VOLUME', $item->getVolume());
                 }
                 if ($item->getISBN()) {
                     $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_ISBN', $item->getISBN());
                 }
                 $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_PAGES', $item->getPages()) . '.';
                 if ($item->getURL()) {
                     $biblio .= ' ' . $this->_translator->getMessage('MATERIAL_BIB_URL', $item->getURL());
                     if ($item->getURLDate()) {
                         $biblio .= ' (' . $this->_translator->getMessage('MATERIAL_BIB_URL_DATE', $item->getURLDate()) . ')';
                     }
                     $biblio .= '.';
                 }
                 break;
             case 'article':
                 $biblio .= $this->_translator->getMessage('MATERIAL_BIB_IN') . ': ' . $item->getJournal();
                 if ($item->getVolume()) {
                     $biblio .= ', ' . $item->getVolume();
                     if ($item->getIssue()) {
                         $biblio .= ' (' . $item->getIssue() . ')';
                     }
                 } elseif ($item->getIssue()) {
                     $biblio .= ', ' . $item->getIssue();
                 }
                 $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_PAGES', $item->getPages()) . '. ';
                 $bib2 = '';
                 if ($item->getAddress()) {
                     $bib2 .= $item->getAddress();
                 }
                 if ($item->getPublisher()) {
                     $bib2 .= $bib2 ? ', ' : '';
                     $bib2 .= $item->getPublisher();
                 }
                 if ($item->getISSN()) {
                     $bib2 .= $bib2 ? ', ' : '';
                     $bib2 .= $item->getISSN();
                 }
                 $bib2 .= $bib2 ? '. ' : '';
                 $biblio .= $bib2 ? $bib2 : '';
                 if ($item->getURL()) {
                     $biblio .= ' ' . $this->_translator->getMessage('MATERIAL_BIB_URL', $item->getURL());
                     if ($item->getURLDate()) {
                         $biblio .= ' (' . $this->_translator->getMessage('MATERIAL_BIB_URL_DATE', $item->getURLDate()) . ')';
                     }
                     $biblio .= '.';
                 }
                 break;
             case 'inpaper':
                 $biblio .= $this->_translator->getMessage('MATERIAL_BIB_IN') . ': ' . $item->getJournal();
                 if ($item->getIssue()) {
                     $biblio .= ', ' . $item->getIssue();
                 }
                 $biblio .= ', ' . $this->_translator->getMessage('MATERIAL_BIB_PAGES', $item->getPages()) . '. ';
                 $bib2 = '';
                 if ($item->getAddress()) {
                     $bib2 .= $item->getAddress();
                 }
                 if ($item->getPublisher()) {
                     $bib2 .= $bib2 ? ', ' : '';
                     $bib2 .= $item->getPublisher();
                 }
                 $bib2 .= $bib2 ? '. ' : '';
                 $biblio .= $bib2 ? $bib2 : '';
                 if ($item->getURL()) {
                     $biblio .= ' ' . $this->_translator->getMessage('MATERIAL_BIB_URL', $item->getURL());
                     if ($item->getURLDate()) {
                         $biblio .= ' (' . $this->_translator->getMessage('MATERIAL_BIB_URL_DATE', $item->getURLDate()) . ')';
                     }
                     $biblio .= '.';
                 }
                 break;
             case 'thesis':
                 $temp_Thesis_Kind = mb_strtoupper($item->getThesisKind(), 'UTF-8');
                 switch ($temp_Thesis_Kind) {
                     case 'BACHELOR':
                         $biblio .= $this->_translator->getMessage('MATERIAL_THESIS_BACHELOR') . '. ';
                         break;
                     case 'DIPLOMA':
                         $biblio .= $this->_translator->getMessage('MATERIAL_THESIS_DIPLOMA') . '. ';
                         break;
                     case 'DISSERTATION':
                         $biblio .= $this->_translator->getMessage('MATERIAL_THESIS_DISSERTATION') . '. ';
                         break;
                     case 'EXAM':
                         $biblio .= $this->_translator->getMessage('MATERIAL_THESIS_EXAM') . '. ';
                         break;
                     case 'KIND':
                         $biblio .= $this->_translator->getMessage('MATERIAL_THESIS_KIND') . '. ';
                         break;
                     case 'KIND_DESC':
                         $biblio .= $this->_translator->getMessage('MATERIAL_THESIS_KIND_DESC') . '. ';
                         break;
                     case 'MASTER':
                         $biblio .= $this->_translator->getMessage('MATERIAL_THESIS_MASTER') . '. ';
                         break;
                     case 'OTHER':
                         $biblio .= $this->_translator->getMessage('MATERIAL_THESIS_OTHER') . '. ';
                         break;
                     case 'POSTDOC':
                         $biblio .= $this->_translator->getMessage('MATERIAL_THESIS_POSTDOC') . '. ';
                         break;
                     case 'TERM':
                         $biblio .= $this->_translator->getMessage('MATERIAL_THESIS_TERM') . '. ';
                         break;
                     default:
                         $biblio .= $this->_translator->getMessage('COMMON_MESSAGETAG_ERROR') . ' cs_material_detail_view(446) ';
                         break;
                 }
                 $biblio .= $item->getAddress() . ': ' . $item->getUniversity();
                 if ($item->getFaculty()) {
                     $biblio .= ', ' . $item->getFaculty();
                 }
                 $biblio .= '.';
                 if ($item->getURL()) {
                     $biblio .= ' ' . $this->_translator->getMessage('MATERIAL_BIB_URL', $item->getURL());
                     if ($item->getURLDate()) {
                         $biblio .= ' (' . $this->_translator->getMessage('MATERIAL_BIB_URL_DATE', $item->getURLDate()) . ')';
                     }
                     $biblio .= '.';
                 }
                 break;
             case 'website':
                 $biblio .= ' ' . $this->_translator->getMessage('MATERIAL_BIB_URL', $item->getURL());
                 if ($item->getURLDate()) {
                     $biblio .= ' (' . $this->_translator->getMessage('MATERIAL_BIB_URL_DATE', $item->getURLDate()) . ')';
                 }
                 $biblio .= '.';
                 break;
             case 'manuscript':
                 $biblio .= $item->getBibliographicValues();
                 if ($item->getAddress()) {
                     $biblio .= ' ' . $item->getAddress();
                     $biblio .= '.';
                 }
                 if ($item->getURL()) {
                     $biblio .= ' ' . $this->_translator->getMessage('MATERIAL_BIB_URL', $item->getURL());
                     if ($item->getURLDate()) {
                         $biblio .= ' (' . $this->_translator->getMessage('MATERIAL_BIB_URL_DATE', $item->getURLDate()) . ')';
                     }
                     $biblio .= '.';
                 }
                 break;
                 /** Start Dokumentenverwaltung **/
             /** Start Dokumentenverwaltung **/
             case 'document':
                 $formal_data_bib = array();
                 $html .= $this->_translator->getMessage('MATERIAL_BIB_DOCUMENT_ADMINISTRATION_INFO');
                 if ($item->getDocumentEditor()) {
                     $temp_array = array();
                     $temp_array[] = $this->_translator->getMessage('MATERIAL_BIB_DOCUMENT_EDITOR');
                     $temp_array[] = $item->getDocumentEditor();
                     $formal_data_bib[] = $temp_array;
                 }
                 if ($item->getDocumentMaintainer()) {
                     $temp_array = array();
                     $temp_array[] = $this->_translator->getMessage('MATERIAL_BIB_DOCUMENT_MAINTAINER');
                     $temp_array[] = $item->getDocumentMaintainer();
                     $formal_data_bib[] = $temp_array;
                 }
                 if ($item->getDocumentReleaseNumber()) {
                     $temp_array = array();
                     $temp_array[] = $this->_translator->getMessage('MATERIAL_BIB_DOCUMENT_RELEASE_NUMBER');
                     $temp_array[] = $item->getDocumentReleaseNumber();
                     $formal_data_bib[] = $temp_array;
                 }
                 if ($item->getDocumentReleaseDate()) {
                     $temp_array = array();
                     $temp_array[] = $this->_translator->getMessage('MATERIAL_BIB_DOCUMENT_RELEASE_DATE');
                     $temp_array[] = $item->getDocumentReleaseDate();
                     $formal_data_bib[] = $temp_array;
                 }
                 if (!empty($formal_data_bib)) {
                     $html .= $this->_getFormalDataAsHTML($formal_data_bib);
                 }
                 break;
                 /** Ende Dokumentenverwaltung **/
             /** Ende Dokumentenverwaltung **/
             case 'none':
             default:
                 $biblio .= $item->getBibliographicValues();
         }
     }
     $biblio_pur = strip_tags($biblio);
     $biblio_pur = str_ireplace('&nbsp;', '', $biblio_pur);
     $biblio_pur = trim($biblio_pur);
     if ($bib_kind != 'none' and !empty($biblio_pur)) {
         $temp_array = array();
         $temp_array[] = $this->_translator->getMessage('MATERIAL_BIBLIOGRAPHIC');
         if (!empty($biblio)) {
             $temp_array[] = $this->_text_as_html_long($this->_compareWithSearchText($this->_cleanDataFromTextArea($biblio)));
         } else {
             $temp_array[] = '<span class="disabled">' . $this->_translator->getMessage('COMMON_NONE') . '</span>';
         }
         $formal_data1[] = $temp_array;
     }
     if ($item->issetBibTOC()) {
         $temp_array = array();
         $temp_array[] = $this->_translator->getMessage('COMMON_TABLE_OF_CONTENT');
         $temp_array[] = '<a href="' . $item->getBibTOC() . '" target="blank">' . chunkText($item->getBibTOC(), 60) . '</a>';
         $formal_data1[] = $temp_array;
     }
     if ($item->issetBibURL()) {
         $temp_array = array();
         $temp_array[] = $this->_translator->getMessage('BELUGA_LINK');
         $temp_array[] = '<a href="' . $item->getBibURL() . '" target="blank">' . chunkText($item->getBibURL(), 60) . '</a>';
         $formal_data1[] = $temp_array;
     }
     if ($item->issetBibAvailibility()) {
         $temp_array = array();
         $temp_array[] = $this->_translator->getMessage('BELUGA_AVAILABILITY');
         $link = $item->getBibAvailibility();
         $temp_array[] = $link;
         $formal_data1[] = $temp_array;
     }
     if ($context_item->isWikiActive()) {
         if ($item->isExportToWiki()) {
             $temp_array = array();
             $temp_array[] = $this->_translator->getMessage('MATERIAL_EXPORT_TO_WIKI_LINK');
             $temp_array[] = $item->getExportToWikiLink();
             $formal_data1[] = $temp_array;
         }
     }
     if ($context_item->isWordpressActive()) {
         if ($item->isExportToWordpress()) {
             $temp_array = array();
             $temp_array[] = $this->_translator->getMessage('MATERIAL_EXPORT_TO_WORDPRESS_LINK');
             $temp_array[] = $item->getExportToWordpressLink();
             $formal_data1[] = $temp_array;
         }
     }
     // Sections
     $this->_section_list = $item->getSectionList();
     if (!$this->_section_list->isEmpty()) {
         $temp_array = array();
         $temp_array[] = $this->_translator->getMessage('MATERIAL_ABSTRACT');
         $description = $item->getDescription();
         if (!empty($description)) {
             $temp_string = $this->_text_as_html_long($this->_cleanDataFromTextArea($this->_compareWithSearchText($description)));
             $temp_array[] = '<div class="handle_width">' . $this->_show_images($temp_string, $this->_item, $with_links) . '</div>' . '<br/><br/>';
         } else {
             $temp_array[] = '<span class="disabled">' . $this->_translator->getMessage('COMMON_NONE') . '</span>';
         }
         $formal_data1[] = $temp_array;
         $sections = array();
         $i = 1;
         $section = $this->_section_list->getFirst();
         while ($section) {
             // files
             $fileicons = $this->_getItemFiles($section, true);
             if (!empty($fileicons)) {
                 $fileicons = '&nbsp;' . $fileicons;
             }
             $section_title = $this->_text_as_html_short($this->_compareWithSearchText($section->getTitle()));
             if ($with_links and !(isset($_GET['mode']) and $_GET['mode'] == 'print')) {
                 $section_title = '<a href="#anchor' . $section->getItemID() . '">' . $section_title . '</a>' . $fileicons . LF;
             }
             $sections[] = $section_title;
             $section = $this->_section_list->getNext();
             $i++;
         }
         $temp_array = array();
         $temp_array[] = $this->_translator->getMessage('MATERIAL_SECTIONS');
         $temp_array[] = implode(BRLF, $sections) . '<br/><br/>';
         $formal_data1[] = $temp_array;
     }
     // Files
     $files = $this->_getFilesForFormalData($item);
     if (!empty($files)) {
         $temp_array = array();
         $temp_array[] = $this->_translator->getMessage('MATERIAL_FILES');
         $temp_array[] = implode(BRLF, $files);
         $formal_data1[] = $temp_array;
     }
     // World-public status
     $current_context = $this->_environment->getCurrentContextItem();
     if ($current_context->isCommunityRoom() and $current_context->isOpenForGuests()) {
         $temp_array = array();
         $world_public = $item->getWorldPublic();
         if ($world_public == 0) {
             $public_info = $this->_translator->getMessage('MATERIAL_WORLD_PUBLISH_STATUS_0');
         } elseif ($world_public == 1) {
             $public_info = $this->_translator->getMessage('MATERIAL_WORLD_PUBLISH_STATUS_1');
         } elseif ($world_public == 2) {
             $public_info = $this->_translator->getMessage('MATERIAL_WORLD_PUBLISH_STATUS_2');
         }
         $temp_array[0] = $this->_translator->getMessage('MATERIAL_WORLD_PUBLISH');
         $temp_array[1] = $public_info;
         $formal_data1[] = $temp_array;
     }
     $version_mode = 'long';
     $iid = 0;
     $params = $this->_environment->getCurrentParameterArray();
     if (isset($params['iid'])) {
         $iid = $params['iid'];
     }
     $params = array();
     $params = array();
     $params = $this->_environment->getCurrentParameterArray();
     $show_versions = 'false';
     if (isset($params[$iid . 'version_mode']) and $params[$iid . 'version_mode'] == 'long') {
         $show_versions = 'true';
     }
     $params[$iid . 'version_mode'] = 'long';
     // Versions
     $versions = array();
     if (!$this->_version_list->isEmpty()) {
         $version = $this->_version_list->getFirst();
         if ($version->getVersionID() == $this->_item->getVersionID()) {
             $title = '&nbsp;&nbsp;' . $this->_translator->getMessage('MATERIAL_CURRENT_VERSION_DATE') . ' ' . getDateTimeInLang($version->getModificationDate());
         } else {
             $params = array();
             $params[$iid . 'version_mode'] = 'long';
             $params['iid'] = $version->getItemID();
             $title = '&nbsp;&nbsp;' . ahref_curl($this->_environment->getCurrentContextID(), 'material', 'detail', $params, $this->_translator->getMessage('MATERIAL_CURRENT_VERSION_DATE') . ' ' . getDateTimeInLang($version->getModificationDate()));
             unset($params);
         }
         $version = $this->_version_list->getNext();
         $current_user = $this->_environment->getCurrentUserItem();
         $is_user = $current_user->isUser();
         while ($version) {
             if (!$with_links or !$is_user and $this->_environment->inCommunityRoom() and !$version->isWorldPublic() or $item->getVersionID() == $version->getVersionID()) {
                 $versions[] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $this->_translator->getMessage('MATERIAL_VERSION_DATE') . ' ' . getDateTimeInLang($version->getModificationDate());
             } else {
                 $params = array();
                 $params[$iid . 'version_mode'] = 'long';
                 $params['iid'] = $version->getItemID();
                 $params['version_id'] = $version->getVersionID();
                 $versions[] = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . ahref_curl($this->_environment->getCurrentContextID(), 'material', 'detail', $params, $this->_translator->getMessage('MATERIAL_VERSION_DATE') . ' ' . getDateTimeInLang($version->getModificationDate()));
                 unset($params);
             }
             $version = $this->_version_list->getNext();
         }
         $count = $this->_version_list->getCount();
         if (!empty($versions) and $count > 1) {
             $temp_array = array();
             $temp_array[] = $this->_translator->getMessage('MATERIAL_VERSION');
             $html_string = '&nbsp;<img id="toggle' . $item->getItemID() . $item->getVersionID() . '" src="images/more.gif"/>';
             $html_string .= $title;
             $html_string .= '<div id="creator_information' . $item->getItemID() . $item->getVersionID() . '">' . LF;
             $html_string .= '<div class="creator_information_panel">     ' . LF;
             $html_string .= '<div>' . LF;
             if ($show_versions == 'true') {
                 $html_script = '<script type="text/javascript">initCreatorInformations("' . $item->getItemID() . $item->getVersionID() . '",true)</script>';
             } else {
                 $html_script = '<script type="text/javascript">initCreatorInformations("' . $item->getItemID() . $item->getVersionID() . '",false)</script>';
             }
             if ($with_links) {
                 $html_string .= implode(BRLF, $versions);
             } else {
                 $version_count = count($versions);
                 $html_string .= "{$version_count}. " . $versions[0];
             }
             $html_string .= '</div>' . LF;
             $html_string .= '</div>' . LF;
             $html_string .= '</div>' . LF;
             $temp_array[] = $html_string;
             $formal_data1[] = $temp_array;
         }
     }
     if (!empty($formal_data1)) {
         $html .= $this->_getFormalDataAsHTML($formal_data1);
         if (isset($html_script) and !empty($html_script)) {
             $html .= $html_script;
         }
     }
     if ($this->_section_list->isEmpty()) {
         // Description
         $desc = $item->getDescription();
         if (!empty($desc)) {
             $temp_string = $this->_text_as_html_long($this->_compareWithSearchText($this->_cleanDataFromTextArea($desc)));
             $html .= $this->getScrollableContent($temp_string, $item, '', $with_links);
         }
     }
     $html .= '<!-- END OF material ITEM DETAIL -->' . LF . LF;
     return $html;
 }
 function asHTML()
 {
     $html = LF . '<!-- BEGIN OF LIST VIEW -->' . LF;
     $html .= '<div id="profile_content" style="width:700px; background-color:#FFFFFF; text-align:left;">' . LF;
     $html .= '<script type="text/javascript"> ' . LF;
     $html .= 'function quark(elem) { ' . LF;
     $html .= 'var cookie_value = \'\'; ' . LF;
     $html .= 'if (elem.checked) ' . LF;
     $html .= 'cookie_value = elem.name + \'=1\' ' . LF;
     $html .= 'else ' . LF;
     $html .= 'cookie_value = elem.name + \'=0\'' . LF;
     $html .= 'document.cookie=cookie_value; ' . LF;
     $html .= '} ' . LF;
     $html .= '</script>' . LF;
     $params = $this->_environment->getCurrentParameterArray();
     unset($params['attach_view']);
     unset($params['attach_type']);
     unset($params['from']);
     unset($params['pos']);
     unset($params['mode']);
     $params['return_attach_item_list'] = 'true';
     $title = ahref_curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), $this->_environment->getCurrentFunction(), $params, 'X', '', '', '', '', '', '', 'class="titlelink"');
     $html .= '<form style="padding:0px; margin:0px;" action="';
     $params = $this->_environment->getCurrentParameterArray();
     $html .= curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), $this->_environment->getCurrentFunction(), $params) . '" name="item_list_form" id="item_list_form"';
     $html .= ' method="post">' . LF;
     # post values from real item
     $post_values_orig = array();
     foreach ($this->_hidden_field_array as $field_name => $value) {
         if ($field_name != 'from' and $field_name != 'count_all_shown' and $field_name != 'interval' and $field_name != 'iid') {
             if (is_array($value)) {
                 foreach ($value as $key2 => $value2) {
                     $html .= '<input type="hidden" name="' . $field_name . '[' . $key2 . ']" value="' . $this->_text_as_form($value2) . '"/>' . LF;
                 }
             } else {
                 $html .= '<input type="hidden" name="' . $field_name . '" value="' . $this->_text_as_form($value) . '"/>' . LF;
             }
             $post_values_orig[] = $field_name;
         }
     }
     if (!empty($post_values_orig)) {
         $html .= '<input type="hidden" name="orig_post_keys" value="' . $this->_text_as_form(implode('§', $post_values_orig)) . '" />' . LF;
     }
     $html .= '<div>' . LF;
     $html .= '<div class="profile_title" style="float:right">' . $title . '</div>';
     if (count($this->_checked_ids) > 0) {
         $desc = ' (' . count($this->_checked_ids) . ' ' . $this->_translator->getMessage('COMMON_ACTUAL_ATTACHED') . ')';
     } else {
         $desc = '';
     }
     $html .= '<h2 id="profile_title">' . $this->_translator->getMessage('COMMON_ITEM_NEW_ATTACH') . $desc . '</h2>';
     $html .= '</div>' . LF;
     $html .= '<div style="padding:5px;">' . LF;
     if ($this->_environment->getCurrentModule() != CS_USER_TYPE) {
         $html .= '<div id="right_boxes_area" style="float:right; width:28%; padding-top:5px; vertical-align:top; text-align:left;">' . LF;
         $html .= '<div style="width:180px;">' . LF;
         $current_context = $this->_environment->getCurrentContextItem();
         $list_box_conf = $current_context->getListBoxConf();
         $first_box = true;
         $title_string = '';
         $desc_string = '';
         $config_text = '';
         $size_string = '';
         $html .= $this->_getHiddenFieldsAsHTML();
         $html .= '<div>' . LF;
         $params = $this->_environment->getCurrentParameterArray();
         $html .= '<div class="commsy_no_panel" style="margin-bottom:1px;">' . LF;
         $tempMessage = getRubricMessageTageName($this->_environment->getCurrentModule(), true);
         $html .= $this->_getListInfosAsHTML();
         $html .= '</div>' . LF;
         $html .= '</div>' . LF;
         $context_item = $this->_environment->getCurrentContextItem();
         /*********Expert Search*******/
         if (!strstr($list_box_conf, 'search_nodisplay') and ($context_item->withActivatingContent() or $this->_environment->getCurrentModule() == CS_DATE_TYPE or $this->_environment->getCurrentModule() == CS_USER_TYPE or $this->_environment->getCurrentModule() == CS_MATERIAL_TYPE or $this->_environment->getCurrentModule() == CS_TODO_TYPE)) {
             if ($first_box) {
                 $first_box = false;
                 $additional_text = '';
             } else {
                 $additional_text = ',';
             }
             if ($this->_environment->getCurrentModule() != 'campus_search') {
                 $title_string .= $additional_text . '"' . $this->_translator->getMessage('COMMON_RESTRICTIONS') . '"';
             } else {
                 $title_string .= $additional_text . '"' . $this->_translator->getMessage('COMMON_RESTRICTION_SEARCH') . '"';
             }
             $desc_string .= $additional_text . '""';
             $size_string .= $additional_text . '"10"';
             $parameter_array = $this->_environment->getCurrentParameterArray();
             if (isset($parameter_array['attribute_limit']) and $parameter_array['attribute_limit'] != '0' or isset($parameter_array['selactivatingstatus']) and $parameter_array['selactivatingstatus'] != '0' or isset($parameter_array['selstatus']) and $parameter_array['selstatus'] != '0' or isset($parameter_array['selrubric']) and !empty($parameter_array['selrubric']) or isset($parameter_array['selrestriction']) and !empty($parameter_array['selrestriction']) or $this->_environment->getCurrentModule() == 'campus_search') {
                 if ($this->_environment->getCurrentModule() != CS_USER_TYPE or isset($parameter_array['selstatus']) and $parameter_array['selstatus'] == '3') {
                     $config_text .= $additional_text . 'true';
                 } else {
                     $config_text .= $additional_text . 'false';
                 }
             } else {
                 $config_text .= $additional_text . 'false';
             }
             #           $html .= $this->_getExpertSearchAsHTML();
         }
         $html .= '</div>' . LF;
         $html .= '</div>' . LF;
         $current_browser = mb_strtolower($this->_environment->getCurrentBrowser(), 'UTF-8');
         $current_browser_version = $this->_environment->getCurrentBrowserVersion();
         if ($current_browser == 'msie' and (strstr($current_browser_version, '5.') or strstr($current_browser_version, '6.'))) {
             $width = ' width:100%; padding-right:10px;';
         } else {
             $width = '';
         }
         if (!(isset($_GET['mode']) and $_GET['mode'] == 'print')) {
             $html .= '</div>' . LF;
             $html .= '<div class="index_content_display_width" style="' . $width . 'padding-top:5px; vertical-align:bottom;">' . LF;
         } else {
             $html .= '</div>' . LF;
             $html .= '<div style="width:100%; padding-top:5px; vertical-align:bottom;">' . LF;
         }
         $params = $this->_environment->getCurrentParameterArray();
         if ($this->hasCheckboxes() and $this->_has_checkboxes != 'list_actions') {
             $html .= '   <input type="hidden" name="ref_iid" value="' . $this->_text_as_form($this->getRefIID()) . '"/>' . LF;
         }
         $html .= '<table class="list" style="width: 100%; border-collapse: collapse;" summary="Layout">' . LF;
     } else {
         $html .= '</div>' . LF;
         $html .= '<div style="width:100%; vertical-align:bottom; padding:5px;">' . LF;
         $params = $this->_environment->getCurrentParameterArray();
         if ($this->hasCheckboxes() and $this->_has_checkboxes != 'list_actions') {
             $html .= '   <input type="hidden" name="ref_iid" value="' . $this->_text_as_form($this->getRefIID()) . '"/>' . LF;
         }
         $html .= '<table class="list" style="width: 690px; border-collapse: collapse;" summary="Layout">' . LF;
     }
     $html .= $this->_getTableheadAsHTML();
     if (!$this->_clipboard_mode) {
         $html .= $this->_getContentAsHTML();
     } else {
         $html .= $this->_getClipboardContentAsHTML();
     }
     if (!(isset($_GET['mode']) and $_GET['mode'] == 'print')) {
         $html .= $this->_getTablefootAsHTML();
     }
     $html .= '</table>' . LF;
     $html .= '</div>' . LF;
     $html .= '<div style="clear:both;">' . LF;
     $html .= '</div>' . LF;
     $html .= '</div>' . LF;
     $html .= '</form>' . LF;
     $html .= '</div>' . LF;
     $html .= '<!-- END OF PLAIN LIST VIEW -->' . LF . LF;
     return $html;
 }
 /** In case of mail server error the following page gets displayed.
  */
 function showMailFailure()
 {
     $this->_form = new cs_form();
     $moderation_link = ahref_curl($this->_environment->getCurrentPortalID(), 'mail', 'to_moderator', '', $this->_translator->getMessage('CONTEXT_MODERATOR'));
     $this->_form->addText('text', $this->_translator->getMessage('COMMON_HINTS'), $this->_translator->getMessage('ERROR_MAIL_SERVER', $moderation_link));
     $this->_form->addButtonBar('option', $this->_translator->getMessage('COMMON_FORWARD_BUTTON'));
 }
Beispiel #8
0
 function _getForwardLinkAsHTML()
 {
     // short names for easy reading
     $from = $this->_from;
     $interval = $this->_interval;
     $count_all_shown = $this->_count_all_shown;
     $params = $this->_environment->getCurrentParameterArray();
     if ($interval > 0) {
         if ($count_all_shown != 0) {
             $num_pages = ceil($count_all_shown / $interval);
         } else {
             $num_pages = 1;
         }
         $act_page = ceil(($from + $interval - 1) / $interval);
     } else {
         $num_pages = 1;
         $act_page = 1;
     }
     // prepare browsing
     if ($from > 1) {
         // can I browse to the left / start?
         $browse_left = $from - $interval;
         if ($browse_left < 1) {
             $browse_left = 1;
         }
         $browse_start = 1;
     } else {
         $browse_left = 0;
         // 0 means: do not browse
         $browse_start = 0;
         // 0 means: do not browse
     }
     if ($from + $interval <= $count_all_shown) {
         // can I browse to the right / end?
         $browse_right = $from + $interval;
         $browse_end = $count_all_shown - $interval + 1;
     } else {
         $browse_right = 0;
         // 0 means: do not browse
         $browse_end = 0;
         // 0 means: do not browse
     }
     // create HTML for browsing icons
     $html = '';
     if ($browse_start > 0) {
         $params['from'] = $browse_start;
         $image = '<span class="bold">&lt;&lt;</span>';
         $html .= '         ' . ahref_curl($this->_environment->getCurrentContextID(), $this->_module, $this->_function, $params, $image, $this->_translator->getMessage('COMMON_BROWSE_START_DESC'), '', '', '', '', '', 'class="portal_system_link"') . LF;
     } else {
         $html .= '         <span class="bold_disabled">&lt;&lt;</span>' . LF;
     }
     $html .= '|';
     if ($browse_left > 0) {
         $params['from'] = $browse_left;
         $image = '<span class="bold">&lt;</span>';
         $html .= '         ' . ahref_curl($this->_environment->getCurrentContextID(), $this->_module, $this->_function, $params, $image, $this->_translator->getMessage('COMMON_BROWSE_LEFT_DESC'), '', '', '', '', '', 'class="portal_system_link"') . LF;
     } else {
         $html .= '         <span class="bold_disabled">&lt;</span>' . LF;
     }
     $html .= '|';
     $html .= '<span class="bold">&nbsp;' . $this->_translator->getMessage('COMMON_PAGE') . ' ' . $act_page . ' / ' . $num_pages . '&nbsp;</span>' . LF;
     $html .= '|';
     if ($browse_right > 0) {
         $params['from'] = $browse_right;
         $image = '<span class="bold">&gt;</span>';
         $html .= '         ' . ahref_curl($this->_environment->getCurrentContextID(), $this->_module, $this->_function, $params, $image, $this->_translator->getMessage('COMMON_BROWSE_RIGHT_DESC'), '', '', '', '', '', 'class="portal_system_link"') . LF;
     } else {
         $html .= '         <span class="bold_disabled">&gt;</span>' . LF;
     }
     $html .= '|';
     if ($browse_end > 0) {
         $params['from'] = $browse_end;
         $image = '<span class="bold">&gt;&gt;</span>';
         $html .= '         ' . ahref_curl($this->_environment->getCurrentContextID(), $this->_module, $this->_function, $params, $image, $this->_translator->getMessage('COMMON_BROWSE_END_DESC'), '', '', '', '', '', 'class="portal_system_link"') . LF;
     } else {
         $html .= '         <span class="bold_disabled">&gt;&gt;</span>' . LF;
     }
     return $html;
 }
 /** get the title of the item
  * this method returns the item title in the right formatted style
  *
  * @return string title
  *
  * @author CommSy Development Group
  */
 function _getItemTitle($item)
 {
     $title = $item->getTitle();
     $title_text = $this->_compareWithSearchText($title);
     $params = array();
     $params['iid'] = $item->getItemID();
     $title = ahref_curl($this->_environment->getCurrentContextID(), CS_DISCUSSION_TYPE, 'detail', $params, $this->_text_as_html_short($title_text), '', '', '', '', '', '', '', '', CS_DISCUSSION_TYPE . $item->getItemID());
     unset($params);
     if ($item->isClosed()) {
         $title .= ' <span class="closed">(' . $this->_translator->getMessage('DISCUSSION_IS_CLOSED') . ')</span>';
     }
     if (!$this->_environment->inPrivateRoom() and !$item->isNotActivated()) {
         $title .= $this->_getItemChangeStatus($item);
     }
     return $title;
 }
Beispiel #10
0
 function _getLanguageConfigAsHTML()
 {
     $html = LF;
     $html .= BR . '<div class="myarea_frame">' . LF;
     $html .= '<div class="myarea_headline">' . LF;
     $html .= '<div class="myarea_headline_title" style="font-size:10pt;">' . LF;
     $html .= $this->_translator->getMessage('MESSAGE_BOX_TITLE');
     $html .= '</div>' . LF;
     $html .= '</div>' . LF;
     $html .= '<div class="myarea_section_title">' . $this->_translator->getMessage('MESSAGE_TITLE_LINK') . '</div>';
     $html .= '<div class="myarea_content" style="position:relative; padding-bottom:0em;">';
     $html .= '<span>> ' . ahref_curl($this->_environment->getCurrentContextID(), 'language', 'index', '', $this->_translator->getMessage('MESSAGE_INDEX_LINK'), '', '', '', '', '', '', 'style="color:#800000"') . '</span>' . BRLF;
     $html .= '<span>> ' . ahref_curl($this->_environment->getCurrentContextID(), 'language', 'edit', '', $this->_translator->getMessage('MESSAGE_EDIT_LINK'), '', '', '', '', '', '', 'style="color:#800000"') . '</span>' . BRLF;
     $html .= '<span>> ' . ahref_curl($this->_environment->getCurrentContextID(), 'language', 'unused', '', $this->_translator->getMessage('MESSAGE_UNUSED_LINK'), '', '', '', '', '', '', 'style="color:#800000"') . '</span>' . BRLF;
     $html .= BRLF;
     $html .= '</div>' . LF;
     $html .= '<div class="myarea_section_title">' . $this->_translator->getMessage('MESSAGE_LANGUAGE_TITLE_LINK') . '</div>';
     $html .= '<div class="myarea_content" style="position:relative; padding-bottom:0em;">' . LF;
     $session_language = '';
     $session_item = $this->_environment->getSessionItem();
     if ($session_item->issetValue('message_language_select')) {
         $session_language = $session_item->getValue('message_language_select');
     }
     unset($session_item);
     $languageArray = $this->_translator->getAvailableLanguages();
     $url = curl($this->_environment->getCurrentContextID(), 'language', 'change', array());
     $html .= '<form style="margin:0px; padding:0px;" method="post" action="' . $url . '" name="language_change">' . LF;
     // jQuery
     //$html .= '<select name="message_language_select" size="1" onChange="javascript:document.language_change.submit()">'.LF;
     $html .= '<select name="message_language_select" size="1" id="submit_form">' . LF;
     // jQuery
     $html .= '<option value="reset"';
     if (empty($session_language)) {
         $html .= ' selected="selected"';
     }
     $html .= '>';
     $html .= '*' . $this->_translator->getMessage('MESSAGE_LANGUAGE_DEFAULT_LINK');
     $html .= '</option>' . LF;
     $html .= '<option value="-1" class="disabled" disabled="disabled">';
     $html .= '----------';
     $html .= '</option>' . LF;
     foreach ($languageArray as $languageItem) {
         $html .= '<option value="' . $languageItem . '"';
         if (!empty($session_language) and $session_language == $languageItem) {
             $html .= ' selected="selected"';
         }
         $html .= '>';
         $html .= $this->_translator->getLanguageLabelOriginally($languageItem);
         $html .= '</option>' . LF;
     }
     unset($languageArray);
     $html .= '<option value="-1" class="disabled" disabled="disabled">';
     $html .= '----------';
     $html .= '</option>' . LF;
     $html .= '<option value="no_trans"' . LF;
     if (!empty($session_language) and $session_language == 'no_trans') {
         $html .= ' selected="selected"';
     }
     unset($session_language);
     $html .= '>' . $this->_translator->getMessage('MESSAGE_TITLE_LINK') . '</option>' . LF;
     $html .= '</select>' . LF;
     $html .= '</form>' . LF;
     $html .= BRLF;
     $html .= BRLF;
     $html .= '</div>' . LF;
     $html .= '</div>' . LF;
     return $html;
 }
 private function _getConfigurationRowAsHTML($list, $title, $sep = true)
 {
     $html = '';
     if (!empty($list) and $list->isNotEmpty()) {
         if ($sep) {
             $html .= '         <div class="listinfoborder">' . LF;
             $html .= '         </div>' . LF;
         }
         $html .= '         <table style="width:100%; border-collapse:collapse;" summary="Layout" >' . LF;
         $html .= '         <tr>' . LF;
         $html .= '         <td style="font-size:10pt; white-space:nowrap;" class="infocolor">' . LF;
         if (!empty($title)) {
             $html .= $title . ': ';
         }
         $html .= '         </td>' . LF;
         $html .= '         <td style="text-align:right; font-size:10pt;" class="right_box_main">' . LF;
         if ($list->isNotEmpty()) {
             $item = $list->getFirst();
             while ($item) {
                 $icon_path_for_navi = $item->getIconPathForNavigation();
                 if (!empty($icon_path_for_navi)) {
                     $image = '<img src="' . $item->getIconPathForNavigation() . '" style="vertical-align:bottom;" alt="' . $item->getTitle() . '"/>';
                     $params = array();
                     $html .= ahref_curl($item->getContextID(), $item->getModule(), $item->getFunction(), $params, $image, $item->getTitle()) . LF;
                 }
                 $item = $list->getNext();
             }
         }
         $html .= '         </td>' . LF;
         $html .= '         </tr>' . LF;
         $html .= '         </table>' . LF;
     }
     return $html;
 }
 function _getConfigurationOverviewAsHTML()
 {
     $html = '';
     $room = $this->_environment->getCurrentContextItem();
     $html .= '<div class="commsy_no_panel" style="margin-bottom:1px; padding:0px;">' . LF;
     $html .= '<div class="right_box">' . LF;
     $array = $this->_environment->getCurrentParameterArray();
     $html .= '<div class="right_box_title">' . $this->_translator->getMessage('COMMON_COMMSY_CONFIGURE_LINKS') . '</div>';
     $html .= '<div class="right_box_main" style="font-size:8pt;">' . LF;
     $html .= '         <table style="width:100%; border-collapse:collapse;" summary="Layout" >' . LF;
     $html .= '         <tr>' . LF;
     $html .= '         <td style="font-size:10pt;" class="infocolor">' . LF;
     $html .= $this->_translator->getMessage('COMMON_COMMSY_CONFIGURE') . ': ';
     $html .= '         </td>' . LF;
     $html .= '         <td style="text-align:right; font-size:10pt;" class="right_box_main">' . LF;
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image = '<img src="images/commsyicons_msie6/22x22/config.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_COMMSY_CONFIGURE') . '"/>';
     } else {
         $image = '<img src="images/commsyicons/22x22/config.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_COMMSY_CONFIGURE') . '"/>';
     }
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'index', '', $image, $this->_translator->getMessage('COMMON_COMMSY_CONFIGURE')) . LF;
     $html .= '         </td>' . LF;
     $html .= '         </tr>' . LF;
     $html .= '         </table>' . LF;
     $html .= '<div class="listinfoborder">' . LF;
     $html .= '</div>' . LF;
     $html .= '         <table style="width:100%; border-collapse:collapse;" summary="Layout" >' . LF;
     $html .= '         <tr>' . LF;
     $html .= '         <td style="font-size:10pt;" class="infocolor">' . LF;
     $html .= $this->_translator->getMessage('COMMON_CONFIGURATION_ROOM_OPTIONS') . ': ';
     $html .= '         </td>' . LF;
     $html .= '         <td style="text-align:right; font-size:10pt;" class="right_box_main">' . LF;
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image = '<img src="images/commsyicons_msie6/22x22/config/room_options.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_CONFIGURATION_ROOM_OPTIONS') . '"/>';
     } else {
         $image = '<img src="images/commsyicons/22x22/config/room_options.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_CONFIGURATION_ROOM_OPTIONS') . '"/>';
     }
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'room_options', '', $image, $this->_translator->getMessage('COMMON_CONFIGURATION_ROOM_OPTIONS')) . LF;
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image = '<img src="images/commsyicons_msie6/22x22/config/rubric_options.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_CONFIGURATION_RUBRIC_OPTIONS') . '"/>';
     } else {
         $image = '<img src="images/commsyicons/22x22/config/rubric_options.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_CONFIGURATION_RUBRIC_OPTIONS') . '"/>';
     }
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'rubric_options', '', $image, $this->_translator->getMessage('COMMON_CONFIGURATION_RUBRIC_OPTIONS')) . LF;
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image = '<img src="images/commsyicons_msie6/22x22/config/structure_options.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CONFIGURATION_STRUCTURE_OPTIONS_TITLE') . '"/>';
     } else {
         $image = '<img src="images/commsyicons/22x22/config/structure_options.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CONFIGURATION_STRUCTURE_OPTIONS_TITLE') . '"/>';
     }
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'structure_options', '', $image, $this->_translator->getMessage('CONFIGURATION_STRUCTURE_OPTIONS_TITLE')) . LF;
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image = '<img src="images/commsyicons_msie6/22x22/config/account_options.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CONFIGURATION_ACCOUNT_OPTIONS_TITLE') . '"/>';
     } else {
         $image = '<img src="images/commsyicons/22x22/config/account_options.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CONFIGURATION_ACCOUNT_OPTIONS_TITLE') . '"/>';
     }
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'account_options', '', $image, $this->_translator->getMessage('CONFIGURATION_ACCOUNT_OPTIONS_TITLE')) . LF;
     $html .= '         </td>' . LF;
     $html .= '         </tr>' . LF;
     $html .= '         </table>' . LF;
     $html .= '<div class="listinfoborder">' . LF;
     $html .= '</div>' . LF;
     $html .= '         <table style="width:100%; border-collapse:collapse;" summary="Layout" >' . LF;
     $html .= '         <tr>' . LF;
     $html .= '         <td style="font-size:10pt;" class="infocolor">' . LF;
     $html .= $this->_translator->getMessage('COMMON_CONFIGURATION_ADMIN_OPTIONS') . ': ';
     $html .= '         </td>' . LF;
     $html .= '         <td style="text-align:right; font-size:10pt;" class="right_box_main">' . LF;
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image = '<img src="images/commsyicons_msie6/22x22/config/account.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_PAGETITLE_ACCOUNT') . '"/>';
     } else {
         $image = '<img src="images/commsyicons/22x22/config/account.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_PAGETITLE_ACCOUNT') . '"/>';
     }
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'account', 'index', '', $image, $this->_translator->getMessage('COMMON_PAGETITLE_ACCOUNT')) . LF;
     $context_item = $this->_environment->getCurrentContextItem();
     if ($context_item->isCommunityRoom() and $context_item->isOpenForGuests() and $context_item->withRubric(CS_MATERIAL_TYPE)) {
         if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
             $image = '<img src="images/commsyicons_msie6/22x22/config/material_admin.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('MATERIAL_ADMIN_TINY_HEADER_CONFIGURATION') . '"/>';
         } else {
             $image = '<img src="images/commsyicons/22x22/config/material_admin.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('MATERIAL_ADMIN_TINY_HEADER_CONFIGURATION') . '"/>';
         }
         $html .= ahref_curl($this->_environment->getCurrentContextID(), 'material_admin', 'index', '', $image, $this->_translator->getMessage('MATERIAL_ADMIN_TINY_HEADER_CONFIGURATION')) . LF;
     }
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image = '<img src="images/commsyicons_msie6/22x22/config/informationbox.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_INFORMATION_BOX') . '"/>';
     } else {
         $image = '<img src="images/commsyicons/22x22/config/informationbox.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_INFORMATION_BOX') . '"/>';
     }
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'informationbox', '', $image, $this->_translator->getMessage('COMMON_INFORMATION_BOX')) . LF;
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image = '<img src="images/commsyicons_msie6/22x22/config/usage_info_options.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_CONFIGURATION_USAGEINFO_FORM_TITLE') . '"/>';
     } else {
         $image = '<img src="images/commsyicons/22x22/config/usage_info_options.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_CONFIGURATION_USAGEINFO_FORM_TITLE') . '"/>';
     }
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'usageinfo', '', $image, $this->_translator->getMessage('COMMON_CONFIGURATION_USAGEINFO_FORM_TITLE')) . LF;
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image = '<img src="images/commsyicons_msie6/22x22/config/mail_options.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_CONFIGURATION_MAIL_FORM_TITLE') . '"/>';
     } else {
         $image = '<img src="images/commsyicons/22x22/config/mail_options.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_CONFIGURATION_MAIL_FORM_TITLE') . '"/>';
     }
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'mail', '', $image, $this->_translator->getMessage('COMMON_CONFIGURATION_MAIL_FORM_TITLE')) . LF;
     $html .= '         </td>' . LF;
     $html .= '         </tr>' . LF;
     $html .= '         </table>' . LF;
     $html .= '<div class="listinfoborder">' . LF;
     $html .= '</div>' . LF;
     $html .= '         <table style="width:100%; border-collapse:collapse;" summary="Layout" >' . LF;
     $html .= '         <tr>' . LF;
     $html .= '         <td style="font-size:10pt; white-space:nowrap;" class="infocolor">' . LF;
     $html .= $this->_translator->getMessage('COMMON_CONFIGURATION_ADDON_OPTIONS') . ': ';
     $html .= '         </td>' . LF;
     $html .= '         <td style="text-align:right; font-size:10pt;" class="right_box_main">' . LF;
     global $c_html_textarea;
     if ($c_html_textarea) {
         if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
             $image = '<img src="images/commsyicons_msie6/22x22/config/htmltextarea.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CONFIGURATION_TEXTAREA_TITLE') . '"/>';
         } else {
             $image = '<img src="images/commsyicons/22x22/config/htmltextarea.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CONFIGURATION_TEXTAREA_TITLE') . '"/>';
         }
         $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'htmltextarea', '', $image, $this->_translator->getMessage('CONFIGURATION_TEXTAREA_TITLE')) . LF;
     }
     $context_item = $this->_environment->getCurrentContextItem();
     if ($context_item->withWikiFunctions() and !$context_item->isServer() and !$context_item->isGrouproom()) {
         if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
             $image = '<img src="images/commsyicons_msie6/22x22/config/pmwiki.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('WIKI_CONFIGURATION_LINK') . '"/>';
         } else {
             $image = '<img src="images/commsyicons/22x22/config/pmwiki.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('WIKI_CONFIGURATION_LINK') . '"/>';
         }
         $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'wiki', '', $image, $this->_translator->getMessage('WIKI_CONFIGURATION_LINK')) . LF;
     }
     if ($context_item->withChatLink() and !$context_item->isPortal() and !$context_item->isGrouproom()) {
         if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
             $image = '<img src="images/commsyicons_msie6/22x22/config/etchat.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CHAT_CONFIGURATION_LINK') . '"/>';
         } else {
             $image = '<img src="images/commsyicons/22x22/config/etchat.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CHAT_CONFIGURATION_LINK') . '"/>';
         }
         $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'chat', '', $image, $this->_translator->getMessage('CHAT_CONFIGURATION_LINK')) . LF;
     }
     if (!$context_item->isGrouproom()) {
         if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
             $image = '<img src="images/commsyicons_msie6/22x22/config/template_options.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CONFIGURATION_TEMPLATE_FORM_ELEMENT_TITLE') . '"/>';
         } else {
             $image = '<img src="images/commsyicons/22x22/config/template_options.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CONFIGURATION_TEMPLATE_FORM_ELEMENT_TITLE') . '"/>';
         }
         $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'template_options', '', $image, $this->_translator->getMessage('CONFIGURATION_TEMPLATE_FORM_ELEMENT_TITLE')) . LF;
     }
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image = '<img src="images/commsyicons_msie6/22x22/config/rubric_extras.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CONFIGURATION_RUBRIC_EXTRAS_TITLE') . '"/>';
     } else {
         $image = '<img src="images/commsyicons/22x22/config/rubric_extras.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('CONFIGURATION_RUBRIC_EXTRAS_TITLE') . '"/>';
     }
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'rubric_extras', '', $image, $this->_translator->getMessage('CONFIGURATION_RUBRIC_EXTRAS_TITLE')) . LF;
     $html .= '         </td>' . LF;
     $html .= '         </tr>' . LF;
     $html .= '         </table>' . LF;
     $html .= '</div>' . LF;
     $html .= '</div>' . LF;
     $html .= '</div>' . LF;
     return $html;
 }
Beispiel #13
0
 function _getSubItemDetailActionsAsHTML($subitem)
 {
     $user = $this->_environment->getCurrentUserItem();
     $item = $this->getItem();
     $html = '';
     $current_context = $this->_environment->getCurrentContextItem();
     $current_user = $this->_environment->getCurrentUserItem();
     $html = '';
     // edit
     $html .= $this->_getEditAction($subitem, $current_user, 'step');
     if ($subitem->mayEdit($user) and $this->_with_modifying_actions) {
         $params = $this->_environment->getCurrentParameterArray();
         $params['action'] = 'delete';
         $params['step_iid'] = $subitem->getItemID();
         $params['iid'] = $item->getItemID();
         $params['step_action'] = 'delete';
         if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
             $image = '<img src="images/commsyicons_msie6/22x22/delete.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_DELETE_ITEM') . '"/>';
         } else {
             $image = '<img src="images/commsyicons/22x22/delete.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_DELETE_ITEM') . '"/>';
         }
         $html .= ahref_curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), 'detail', $params, $image, '', '', 'anchor' . $subitem->getItemID(), '', '', '', '', '', 'delete_confirm_entry') . LF;
         unset($params);
     } else {
         if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
             $image = '<img src="images/commsyicons_msie6/22x22/delete_grey.gif" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_DELETE_ITEM') . '"/>';
         } else {
             $image = '<img src="images/commsyicons/22x22/delete_grey.png" style="vertical-align:bottom;" alt="' . $this->_translator->getMessage('COMMON_DELETE_ITEM') . '"/>';
         }
         $html .= '<a title="' . $this->_translator->getMessage('COMMON_NO_ACTION_NEW', $this->_translator->getMessage('COMMON_DELETE_ITEM')) . ' "class="disabled">' . $image . '</a>' . LF;
     }
     return $html;
 }
Beispiel #14
0
 /** init data for form, INTERNAL
  * this methods init the data for the form, for example groups
  */
 function _initForm()
 {
     // headline
     if (!empty($this->_item)) {
         $this->_headline = $this->_translator->getMessage('MATERIAL_EDIT');
     } elseif (!empty($this->_form_post)) {
         if (!empty($this->_form_post['iid'])) {
             $this->_headline = $this->_translator->getMessage('MATERIAL_EDIT');
         } else {
             $this->_headline = $this->_translator->getMessage('MATERIAL_ENTER_NEW');
         }
     } else {
         $this->_headline = $this->_translator->getMessage('MATERIAL_ENTER_NEW');
     }
     // files
     $file_array = array();
     if (!empty($this->_session_file_array)) {
         foreach ($this->_session_file_array as $file) {
             $temp_array['text'] = $file['name'];
             $temp_array['value'] = $file['file_id'];
             $file_array[] = $temp_array;
         }
     } elseif (isset($this->_item)) {
         $file_list = $this->_item->getFileList();
         if ($file_list->getCount() > 0) {
             $file_item = $file_list->getFirst();
             while ($file_item) {
                 $temp_array['text'] = $file_item->getDisplayname();
                 $temp_array['value'] = $file_item->getFileID();
                 $file_array[] = $temp_array;
                 $file_item = $file_list->getNext();
             }
         }
     }
     $this->_file_array = $file_array;
     $this->setHeadline($this->_headline);
     // bib kind
     if (isset($this->_item)) {
         $this->_bib_kind = $this->_item->getBibKind();
     } elseif (!empty($this->_form_post['bib_kind'])) {
         $this->_bib_kind = $this->_form_post['bib_kind'];
     }
     if (isset($this->_bib_kind) and empty($this->_bib_kind)) {
         if (isset($this->_item)) {
             $text = $this->_item->getBibliographicValues();
             if (!empty($text)) {
                 $this->_bib_kind = 'common';
             }
         }
     }
     if (empty($this->_bib_kind)) {
         $this->_bib_kind = 'none';
     }
     // public
     if (isset($this->_item)) {
         $creator_item = $this->_item->getCreatorItem();
         $fullname = $creator_item->getFullname();
     } elseif (!empty($this->_form_post['iid']) and mb_strtolower($this->_form_post['iid'], 'UTF-8') != 'new') {
         $manager = $this->_environment->getManager(CS_MATERIAL_TYPE);
         $item = $manager->getItem($this->_form_post['iid']);
         if (isset($item)) {
             $creator_item = $item->getCreatorItem();
             $fullname = $creator_item->getFullname();
         } else {
             $current_user = $this->_environment->getCurrentUser();
             $fullname = $current_user->getFullname();
         }
     } else {
         $current_user = $this->_environment->getCurrentUser();
         $fullname = $current_user->getFullname();
     }
     $public_array = array();
     $temp_array['text'] = $this->_translator->getMessage('RUBRIC_PUBLIC_YES');
     $temp_array['value'] = 1;
     $public_array[] = $temp_array;
     $temp_array['text'] = $this->_translator->getMessage('RUBRIC_PUBLIC_NO', $fullname);
     $temp_array['value'] = 0;
     $public_array[] = $temp_array;
     $this->_public_array = $public_array;
     $context_item = $this->_environment->getCurrentContextItem();
     $workflow_array = array();
     $temp_array['text'] = $this->_translator->getMessage('COMMON_WORKFLOW_TRAFFIC_LIGHT_TEXT_NONE');
     $temp_array['value'] = '3_none';
     $workflow_array[] = $temp_array;
     $description = $this->_translator->getMessage('COMMON_WORKFLOW_TRAFFIC_LIGHT_TEXT_GREEN_DEFAULT');
     if ($context_item->getWorkflowTrafficLightTextGreen() != '') {
         $description = $context_item->getWorkflowTrafficLightTextGreen();
     }
     $temp_array['text'] = '<img src="images/commsyicons/workflow_traffic_light_green.png" alt="' . $description . '" title="' . $description . '" style="height:10px;"> (' . $description . ')';
     $temp_array['value'] = '0_green';
     $workflow_array[] = $temp_array;
     $description = $this->_translator->getMessage('COMMON_WORKFLOW_TRAFFIC_LIGHT_TEXT_YELLOW_DEFAULT');
     if ($context_item->getWorkflowTrafficLightTextYellow() != '') {
         $description = $context_item->getWorkflowTrafficLightTextYellow();
     }
     $temp_array['text'] = '<img src="images/commsyicons/workflow_traffic_light_yellow.png" alt="' . $description . '" title="' . $description . '" style="height:10px;"> (' . $description . ')';
     $temp_array['value'] = '1_yellow';
     $workflow_array[] = $temp_array;
     $description = $this->_translator->getMessage('COMMON_WORKFLOW_TRAFFIC_LIGHT_TEXT_RED_DEFAULT');
     if ($context_item->getWorkflowTrafficLightTextRed() != '') {
         $description = $context_item->getWorkflowTrafficLightTextRed();
     }
     $temp_array['text'] = '<img src="images/commsyicons/workflow_traffic_light_red.png" alt="' . $description . '" title="' . $description . '" style="height:10px;"> (' . $description . ')';
     $temp_array['value'] = '2_red';
     $workflow_array[] = $temp_array;
     $this->_workflow_array = $workflow_array;
     $validity_array = array();
     $temp_array['text'] = $this->_translator->getMessage('COMMON_WORKFLOW_TRAFFIC_LIGHT_TEXT_NONE');
     $temp_array['value'] = '3_none';
     $validity_array[] = $temp_array;
     $description = $this->_translator->getMessage('COMMON_WORKFLOW_TRAFFIC_LIGHT_TEXT_GREEN_DEFAULT');
     if ($context_item->getWorkflowTrafficLightTextGreen() != '') {
         $description = $context_item->getWorkflowTrafficLightTextGreen();
     }
     $temp_array['text'] = '<img src="images/commsyicons/workflow_traffic_light_green.png" alt="' . $description . '" title="' . $description . '" style="height:10px;"> (' . $description . ')';
     $temp_array['value'] = '0_green';
     $validity_array[] = $temp_array;
     $description = $this->_translator->getMessage('COMMON_WORKFLOW_TRAFFIC_LIGHT_TEXT_YELLOW_DEFAULT');
     if ($context_item->getWorkflowTrafficLightTextYellow() != '') {
         $description = $context_item->getWorkflowTrafficLightTextYellow();
     }
     $temp_array['text'] = '<img src="images/commsyicons/workflow_traffic_light_yellow.png" alt="' . $description . '" title="' . $description . '" style="height:10px;"> (' . $description . ')';
     $temp_array['value'] = '1_yellow';
     $validity_array[] = $temp_array;
     $description = $this->_translator->getMessage('COMMON_WORKFLOW_TRAFFIC_LIGHT_TEXT_RED_DEFAULT');
     if ($context_item->getWorkflowTrafficLightTextRed() != '') {
         $description = $context_item->getWorkflowTrafficLightTextRed();
     }
     $temp_array['text'] = '<img src="images/commsyicons/workflow_traffic_light_red.png" alt="' . $description . '" title="' . $description . '" style="height:10px;"> (' . $description . ')';
     $temp_array['value'] = '2_red';
     $validity_array[] = $temp_array;
     $this->_validity_array = $validity_array;
     // Workflow resubmission
     // All users who ever edited this item
     $modifier_array = array();
     if (!empty($_GET['iid']) and mb_strtolower($_GET['iid'], 'UTF-8') != 'new') {
         $manager = $this->_environment->getManager(CS_MATERIAL_TYPE);
         $item = $manager->getItem($_GET['iid']);
         if (isset($item)) {
             $creator_item = $item->getCreatorItem();
             $fullname = $creator_item->getFullname();
         } else {
             $current_user = $this->_environment->getCurrentUser();
             $fullname = $current_user->getFullname();
         }
         $link_modifier_item_manager = $this->_environment->getLinkModifierItemManager();
         $user_manager = $this->_environment->getUserManager();
         $modifiers = $link_modifier_item_manager->getModifiersOfItem($item->getItemID());
         foreach ($modifiers as $modifier_id) {
             $modificator = $user_manager->getItem($modifier_id);
             //Links only at accessible contact pages
             if (isset($modificator) and $modificator->isRoot()) {
                 $temp_text = $modificator->getFullname();
                 $modifier_array[] = $temp_text;
             } elseif ($modificator->getContextID() == $item->getContextID()) {
                 $user = $this->_environment->getCurrentUserItem();
                 if ($this->_environment->inProjectRoom()) {
                     $params = array();
                     if (isset($modificator) and !empty($modificator) and $modificator->isUser() and !$modificator->isDeleted() and $modificator->maySee($user)) {
                         $params['iid'] = $modificator->getItemID();
                         $temp_text = ahref_curl($this->_environment->getCurrentContextID(), 'user', 'detail', $params, $modificator->getFullname());
                     } elseif (isset($modificator) and !$modificator->isDeleted()) {
                         $temp_text = '<span class="disabled">' . $modificator->getFullname() . '</span>';
                     } else {
                         $temp_text = '<span class="disabled">' . $this->_translator->getMessage('COMMON_DELETED_USER') . '</span>';
                     }
                     $modifier_array[] = $temp_text;
                 } elseif (($user->isUser() and isset($modificator) and $modificator->isVisibleForLoggedIn()) || (!$user->isUser() and isset($modificator) and $modificator->isVisibleForAll()) || (isset($modificator) and $this->_environment->getCurrentUserID() == $modificator->getItemID())) {
                     $params = array();
                     $params['iid'] = $modificator->getItemID();
                     if (!$modificator->isDeleted() and $modificator->maySee($user)) {
                         if (!$this->_environment->inPortal()) {
                             $text_converter = $this->_environment->getTextConverter();
                             $modifier_array[] = ahref_curl($this->_environment->getCurrentContextID(), 'user', 'detail', $params, $text_converter->encode(AS_HTML_SHORT, $modificator->getFullname()));
                         } else {
                             $modifier_array[] = '<span class="disabled">' . $modificator->getFullname() . '</span>';
                         }
                     } else {
                         $modifier_array[] = '<span class="disabled">' . $this->_translator->getMessage('COMMON_DELETED_USER') . '</span>';
                     }
                     unset($params);
                 } elseif ($item->mayExternalSee($this->_environment->getCurrentUserItem())) {
                     $modifier_array[] = $modificator->getFullname();
                 } else {
                     if (isset($modificator) and !$modificator->isDeleted()) {
                         $current_user_item = $this->_environment->getCurrentUserItem();
                         if ($current_user_item->isGuest()) {
                             $modifier_array[] = $this->_translator->getMessage('COMMON_USER_NOT_VISIBLE');
                         } else {
                             $modifier_array[] = $modificator->getFullname();
                         }
                         unset($current_user_item);
                     } else {
                         $modifier_array[] = '<span class="disabled">' . $this->_translator->getMessage('COMMON_DELETED_USER') . '</span>';
                     }
                 }
             }
         }
         $modifier_array = array_unique($modifier_array);
     }
     $workflow_resubmission_array = array();
     $workflow_validity_array = array();
     $current_user = $this->_environment->getCurrentUserItem();
     $params['iid'] = $current_user->getItemID();
     $creator_link = ahref_curl($this->_environment->getCurrentContextID(), 'user', 'detail', $params, $current_user->getFullname());
     $temp_array['text'] = $this->_translator->getMessage('COMMON_WORKFLOW_RESUBMISSION_CREATOR') . ' (' . $creator_link . ')';
     $temp_array['value'] = 'creator';
     $workflow_resubmission_array[] = $temp_array;
     $workflow_validity_array[] = $temp_array;
     $temp_array['text'] = $this->_translator->getMessage('COMMON_WORKFLOW_RESUBMISSION_MODIFIER');
     if (!empty($modifier_array)) {
         $temp_array['text'] .= ' (' . implode(', ', $modifier_array) . ')';
     }
     $temp_array['value'] = 'modifier';
     $workflow_resubmission_array[] = $temp_array;
     $workflow_validity_array[] = $temp_array;
     $this->_workflow_resubmission_array = $workflow_resubmission_array;
     $this->_workflow_validity_array = $workflow_validity_array;
 }
 private function _getDateSelectionsAsHTML()
 {
     $html = LF;
     $assignment = $this->getSelectedAssignment(CS_DATE_TYPE);
     $status = $this->getSelectedStatus(CS_DATE_TYPE);
     $room = $this->getSelectedRoom(CS_DATE_TYPE);
     $color = $this->getSelectedColor(CS_DATE_TYPE);
     $search = $this->getSearchText(CS_DATE_TYPE);
     if (!empty($assignment) and $assignment != 2 or !empty($status) and $status != 2 or !empty($room) and $room != 2 or !empty($color) and $color != 2 or !empty($search) and $search != $this->_translator->getMessage('COMMON_SEARCH_IN_ROOM') and $search != $this->_translator->getMessage('COMMON_SEARCH_IN_ENTRIES')) {
         $html .= '<div id="contentbox" class="portlet-content">' . LF;
         $html .= '<table class="description-background" style="width:100%;">' . LF;
         //         $html .= '<tr>'.LF;
         //         $html .= '<td style="vertical-align:top;">'.LF;
         //         $html .= $this->_translator->getMessage('COMMON_PAGETITLE_CONFIGURATION').': '.LF;
         //         $html .= '</td>'.LF;
         //         $html .= '</tr>'.LF;
         //         $current_context = $this->_environment->getCurrentContextItem();
         //         $mycalendar_conf = $current_context->getMyCalendarDisplayConfig();
         //         $room_manager = $this->_environment->getRoomManager();
         //         foreach($mycalendar_conf as $entry) {
         //            $exp_entry = explode('_', $entry);
         //            if(sizeof($exp_entry) == 2) {
         //               if($exp_entry[1] == 'dates') {
         //                  $room_id = $exp_entry[0];
         //                  $conf_room = $room_manager->getItem($room_id);
         //
         //                  $html .= '<tr>'.LF;
         //                  $html .= '<td style="text-align:right;">'.LF;
         //                  $html .= $conf_room->getTitle() . LF;
         //                  $html .= '</td>' . LF;
         //                  $html .= '</tr>' . LF;
         //               }
         //            }
         //         }
         //         unset($room_manager);
         $html .= '<tr>' . LF;
         $html .= '<td style="vertical-align:top;">' . LF;
         $html .= $this->_translator->getMessage('COMMON_RESTRICTIONS_SHORT') . ': ' . LF;
         $html .= '</td>' . LF;
         $html .= '</tr>' . LF;
         if (!empty($assignment) and $assignment != 2) {
             $html .= '<tr>' . LF;
             $html .= '<td style="text-align:right;">' . LF;
             if ($assignment == 3) {
                 $html .= $this->_translator->getMessage('PRIVATEROOM_ASSIGNED_TO_ME');
                 $new_aparams = $this->_environment->getCurrentParameterArray();
                 $new_aparams['selassignment'] = 2;
                 $image = '<img src="images/delete_restriction.gif" style="padding-top:3px;" alt="' . $this->_translator->getMessage('ENTRY_DELETE_RESTRICTION') . '"/>' . LF;
                 $html .= ' ' . ahref_curl($this->_environment->getCurrentContextID(), CS_DATE_TYPE, 'index', $new_aparams, $image, $this->_translator->getMessage('ENTRY_DELETE_RESTRICTION')) . LF;
             }
             $html .= '</td>' . LF;
             $html .= '</tr>' . LF;
         }
         if (!empty($room) and $room != 2) {
             $html .= '<tr>' . LF;
             $html .= '<td style="text-align:right;">' . LF;
             if ($this->_environment->getCurrentContextID() == $room) {
                 $html .= $this->_translator->getMessage('COMMON_FOREIGN_ROOM');
             } else {
                 $room_manager = $this->_environment->getRoomManager();
                 $room_item = $room_manager->getItem($room);
                 if (!empty($room_item)) {
                     $html .= encode(AS_HTML_SHORT, chunkText($room_item->getTitle(), 20));
                     unset($room_item);
                 }
                 unset($room_manager);
             }
             $new_aparams = $this->_environment->getCurrentParameterArray();
             $new_aparams['selroom'] = 2;
             $image = '<img src="images/delete_restriction.gif" style="padding-top:3px;" alt="' . $this->_translator->getMessage('ENTRY_DELETE_RESTRICTION') . '"/>' . LF;
             $html .= ' ' . ahref_curl($this->_environment->getCurrentContextID(), CS_DATE_TYPE, 'index', $new_aparams, $image, $this->_translator->getMessage('ENTRY_DELETE_RESTRICTION')) . LF;
             $html .= '</td>' . LF;
             $html .= '</tr>' . LF;
         }
         if (!empty($color) and $color != 2) {
             $html .= '<tr>' . LF;
             $html .= '<td style="text-align:right;">' . LF;
             $html .= $this->_translator->getMessage('COMMON_DATE_COLOR');
             $color_text = '';
             switch ('#' . $color) {
                 case '#999999':
                     $color_text = getMessage('DATE_COLOR_GREY');
                     break;
                 case '#CC0000':
                     $color_text = getMessage('DATE_COLOR_RED');
                     break;
                 case '#FF6600':
                     $color_text = getMessage('DATE_COLOR_ORANGE');
                     break;
                 case '#FFCC00':
                     $color_text = getMessage('DATE_COLOR_DEFAULT_YELLOW');
                     break;
                 case '#FFFF66':
                     $color_text = getMessage('DATE_COLOR_LIGHT_YELLOW');
                     break;
                 case '#33CC00':
                     $color_text = getMessage('DATE_COLOR_GREEN');
                     break;
                 case '#00CCCC':
                     $color_text = getMessage('DATE_COLOR_TURQUOISE');
                     break;
                 case '#3366FF':
                     $color_text = getMessage('DATE_COLOR_BLUE');
                     break;
                 case '#6633FF':
                     $color_text = getMessage('DATE_COLOR_DARK_BLUE');
                     break;
                 case '#CC33CC':
                     $color_text = getMessage('DATE_COLOR_PURPLE');
                     break;
                 default:
                     $color_text = getMessage('DATE_COLOR_UNKNOWN');
             }
             $html .= ' ' . $color_text . LF;
             $new_aparams = $this->_environment->getCurrentParameterArray();
             $new_aparams['selcolor'] = 2;
             $image = '<img src="images/delete_restriction.gif" style="padding-top:3px;" alt="' . $this->_translator->getMessage('ENTRY_DELETE_RESTRICTION') . '"/>' . LF;
             $html .= ' ' . ahref_curl($this->_environment->getCurrentContextID(), CS_DATE_TYPE, 'index', $new_aparams, $image, $this->_translator->getMessage('ENTRY_DELETE_RESTRICTION')) . LF;
             $html .= '</td>' . LF;
             $html .= '</tr>' . LF;
         }
         if (!empty($status) and $status != 2) {
             $html .= '<tr>' . LF;
             $html .= '<td style="text-align:right;">' . LF;
             if ($status == 3) {
                 $html .= $this->_translator->getMessage('DATES_PUBLIC');
             } elseif ($status == 4) {
                 $html .= $this->_translator->getMessage('DATES_NON_PUBLIC');
             }
             $new_aparams = $this->_environment->getCurrentParameterArray();
             $new_aparams['selstatus'] = 2;
             $image = '<img src="images/delete_restriction.gif" style="padding-top:3px;" alt="' . $this->_translator->getMessage('ENTRY_DELETE_RESTRICTION') . '"/>' . LF;
             $html .= ' ' . ahref_curl($this->_environment->getCurrentContextID(), CS_DATE_TYPE, 'index', $new_aparams, $image, $this->_translator->getMessage('ENTRY_DELETE_RESTRICTION')) . LF;
             $html .= '</td>' . LF;
             $html .= '</tr>' . LF;
         }
         if (!empty($search) and $search != $this->_translator->getMessage('COMMON_SEARCH_IN_ROOM') and $search != $this->_translator->getMessage('COMMON_SEARCH_IN_ENTRIES')) {
             $html .= '<tr>' . LF;
             $html .= '<td style="text-align:right;">' . LF;
             $html .= encode(AS_HTML_SHORT, $search);
             $new_aparams = $this->_environment->getCurrentParameterArray();
             unset($new_aparams['search']);
             $image = '<img src="images/delete_restriction.gif" style="padding-top:3px;" alt="' . $this->_translator->getMessage('ENTRY_DELETE_RESTRICTION') . '"/>' . LF;
             $html .= ' ' . ahref_curl($this->_environment->getCurrentContextID(), CS_DATE_TYPE, 'index', $new_aparams, $image, $this->_translator->getMessage('ENTRY_DELETE_RESTRICTION')) . LF;
             $html .= '</td>' . LF;
             $html .= '</tr>' . LF;
         }
         $html .= '</table>' . LF;
         $html .= '</div>' . LF;
     }
     return $html;
 }
Beispiel #16
0
 function _getNewestLinkedItemsAsHTML($item)
 {
     $current_context = $this->_environment->getCurrentContextItem();
     $path_shown = false;
     $html = '';
     if ($current_context->withPath() and $item->isPathActive()) {
         $item_list = $item->getPathItemList();
         if (!$item_list->isEmpty()) {
             $path_shown = true;
             $html .= '<h3 class="subitemtitle" style="margin-top:0px; margin-bottom:5px;">' . $this->_translator->getMessage('TOPIC_PATH');
             $html .= '</h3>' . LF;
             $i = 0;
             $html .= '<ul style="list-style-type: none; list-style-position:inside; font-size:8pt; padding-left:0px; margin-left:0px; margin-top:0px; margin-bottom:20px; padding-bottom:0px;">  ' . LF;
             $linked_item = $item_list->getFirst();
             while ($linked_item) {
                 $params = array();
                 $params['iid'] = $linked_item->getItemID();
                 $params['path'] = $item->getItemID();
                 $mod = type2Module($linked_item->getItemType());
                 $type = $linked_item->getItemType();
                 if ($type == 'date') {
                     $type .= 's';
                 }
                 $temp_type = mb_strtoupper($type, 'UTF-8');
                 switch ($temp_type) {
                     case 'ANNOUNCEMENT':
                         $type = $this->_translator->getMessage('COMMON_ANNOUNCEMENT');
                         break;
                     case 'DATES':
                         $type = $this->_translator->getMessage('COMMON_DATES');
                         break;
                     case 'DISCUSSION':
                         $type = $this->_translator->getMessage('COMMON_DISCUSSION');
                         break;
                     case 'GROUP':
                         $type = $this->_translator->getMessage('COMMON_GROUP');
                         break;
                     case 'INSTITUTION':
                         $type = $this->_translator->getMessage('COMMON_INSTITUTION');
                         break;
                     case 'MATERIAL':
                         $type = $this->_translator->getMessage('COMMON_MATERIAL');
                         break;
                     case 'PROJECT':
                         $type = $this->_translator->getMessage('COMMON_PROJECT');
                         break;
                     case 'TODO':
                         $type = $this->_translator->getMessage('COMMON_TODO');
                         break;
                     case 'TOPIC':
                         $type = $this->_translator->getMessage('COMMON_TOPIC');
                         break;
                     case 'USER':
                         $type = $this->_translator->getMessage('COMMON_USER');
                         break;
                     default:
                         $type = $this->_translator->getMessage('COMMON_MESSAGETAG_ERROR' . ' cs_topic_detail(' . __LINE__ . ') ');
                         break;
                 }
                 $user = $this->_environment->getCurrentUser();
                 if ($linked_item->isNotActivated() and !($linked_item->getCreatorID() == $user->getItemID() or $user->isModerator())) {
                     $activating_date = $linked_item->getActivatingDate();
                     if (strstr($activating_date, '9999-00-00')) {
                         $link_creator_text = $this->_translator->getMessage('COMMON_NOT_ACTIVATED');
                     } else {
                         $link_creator_text = $this->_translator->getMessage('COMMON_ACTIVATING_DATE') . ' ' . getDateInLang($linked_item->getActivatingDate());
                     }
                     $html_text = ahref_curl($this->_environment->getCurrentContextID(), $mod, 'detail', $params, $linked_item->getTitle(), $link_creator_text, '', '', '', '', '', 'class="disabled"', '', '', true) . LF;
                 } else {
                     $html_text = ahref_curl($this->_environment->getCurrentContextID(), $mod, 'detail', $params, $linked_item->getTitle(), $type . ' - ' . $linked_item->getTitle()) . LF;
                 }
                 $html .= '      <li style="font-size:10pt;">' . ($i + 1) . '. ' . $html_text . '</li>' . LF;
                 unset($params);
                 $linked_item = $item_list->getNext();
                 $i++;
             }
             $html .= '</ul>' . LF . LF;
         }
     }
     return $html;
 }
function getTagContentAsHTMLWithJavascript($item = NULL, $ebene = 0,$selected_id = 0, $father_id_array, $distance = 0, $with_div=false) {
	   global $environment;
	   $display_mode = '';
      // MUSEUM
      $html = '';
      #$params = $environment->getCurrentParameterArray();
      $params = array();
      unset($params['from']);
      $i = 0;
      while($i <= count($father_id_array)){
        if (isset($params['seltag_'.$i])){
           unset($params['seltag_'.$i]);
        }
        $i++;
      }
      $is_selected = false;
      if ( isset($item) ) {
         $list = $item->getChildrenList();
         if ( isset($list) and !$list->isEmpty() ) {
            if($with_div){
               if(isset($_GET['seltag'])){
                  $html .= '<div id="tag_tree_privateroom" name="tag_tree_detail">';
               } else {
                  $html .= '<div id="tag_tree_privateroom">';
               }
            }
            $html .= '<ul>';
            $current_item = $list->getFirst();
            $distance = $distance +1;
            $font_weight ='normal';
            $font_color = 30;
            $font_style = 'normal';
            while ( $current_item ) {
               $is_selected = false;
               $id = $current_item->getItemID();
               $link_name = '';
               if ( empty($selected_id) ){
                  $tag2tag_manager = $environment->getTag2TagManager();
                  $count = count($tag2tag_manager->getFatherItemIDArray($id));
                  $font_size = round(13 - (($count*0.2)+$count));
                  if ($font_size < 8){
                     $font_size = 8;
                  }
                  $font_color = 20 + getTagColorLogarithmic($count);
               }else{
                  if ( in_array($id,$father_id_array) ){
                     $tag2tag_manager = $environment->getTag2TagManager();
                     $id_array = $tag2tag_manager->getFatherItemIDArray($id);
                     $count = 0;
                     foreach($id_array as $temp_id){
                        if ( !in_array($temp_id,$father_id_array) ){
                           $count ++;
                        }
                     }
                     if( !isset($id_array[0]) and isset($father_id_array[0]) ){
                        $count = 1;
                     }
                     $font_size = round(13 - (($count*0.2)+$count));
                     if ($font_size < 8){
                        $font_size = 8;
                     }
                     $font_color = 20 + getTagColorLogarithmic($count);
                     $font_weight = 'bold';
                     $font_style = 'normal';
                  }else{
                     $tag2tag_manager = $environment->getTag2TagManager();
                     $id_array = $tag2tag_manager->getFatherItemIDArray($id);
                     $count = 0;
                     $found = false;
                     if ( isset($id_array[0]) ){
                        foreach($id_array as $temp_id){
                           if ( !in_array($temp_id,$father_id_array) ){
                              $count ++;
                           }else{
                             $found = true;
                           }
                        }
                        if (!$found){
                           $count = $count + count($father_id_array);
                        }
                     }elseif( !isset($id_array[0]) and isset($father_id_array[0]) ){
                        $count = count($father_id_array);
                     }
                     $font_size = round(13 - (($count*0.2)+$count));
                     if ($font_size < 8){
                        $font_size = 8;
                     }
                     $font_color = 20 + getTagColorLogarithmic($count);
                     $font_weight='normal';
                     $font_style = 'normal';
                  }
               }
               if ($current_item->getItemID() == $selected_id){
                  $is_selected = true;
                  $font_size = 14;
                  $font_color = 20;
                  #$font_style = 'normal';
                  $link_name = 'selected';
               }
               $color = 'rgb('.$font_color.'%,'.$font_color.'%,'.$font_color.'%);';
               $text_converter = $environment->getTextConverter();
               $title = $text_converter->text_as_html_short($current_item->getTitle());
               if (!$is_selected){
                  $params['seltag_'.$ebene] = $current_item->getItemID();
                  if( isset($params['seltag']) ){
                     $i = $ebene+1;
                     while( isset($params['seltag_'.$i]) ){
                        unset($params['seltag_'.$i]);
                        $i++;
                     }
                  }
                  $params['seltag'] = 'yes';
                  if ( $environment->inPrivateRoom()
                       and $environment->getCurrentModule() == CS_MATERIAL_TYPE
                       and $display_mode == 'flash'
                     ) {
                     $html .= '<li id="' . $current_item->getItemID() . '" data="StudyLog: \'' . $current_item->getItemID() . '\'" style="color:#545454; font-style:normal; font-size:9pt; font-weight:normal;">';
                     $html .= '<a href="javascript:callStudyLogSortByTagId('.$current_item->getItemID().')">'.$title.'</a>';
                  } else {
                     $link = curl($environment->getCurrentContextID(),
                                         'entry',
                                         'index',
                                         $params);
                     $html .= '<li id="' . $current_item->getItemID() . '" data="url: \'' . $link . '\'" style="color:#545454; font-style:normal; font-size:9pt; font-weight:normal;">';
                     $html .= ahref_curl($environment->getCurrentContextID(),
                                         'entry',
                                         'index',
                                         $params,
                                         $title,
                                         $title,'','','','','','style="color:#545454; font-size:9pt;"');
                  }
               }else{
                  $params['name'] = $link_name;
                  $link = curl($environment->getCurrentContextID(),
                                         'entry',
                                         'index',
                                         $params);
                  $html .= '<li id="' . $current_item->getItemID() . '" data="url: \'' . $link . '\'" style="color:#000000; font-style:normal; font-size:9pt; font-weight:bold;">';
                  $html .= $title;
               }
               $html .= getTagContentAsHTMLWithJavascript($current_item, $ebene+1, $selected_id, $father_id_array, $distance);
               $current_item = $list->getNext();
               $html.='</li>';
            }
            $html.='</ul>';
            if($with_div){
               $html .= '</div>';
            }
         }
      }
      return $html;
   }
Beispiel #18
0
 function asHTML()
 {
     $html = '';
     $current_context = $this->_environment->getCurrentContextItem();
     $current_user = $this->_environment->getCurrentUserItem();
     $html .= '<div class="right_box">' . LF;
     $html .= '         <noscript>';
     $html .= '<div class="right_box_title" style="font-weight:bold;">' . $this->_translator->getMessage('COMMON_ACTIONS') . '</div>';
     $html .= '         </noscript>';
     $html .= '<div class="right_box_main" style="padding-top:3px; font-size:10pt;">' . LF;
     $conf = $current_context->getHomeConf();
     if (!empty($conf)) {
         $rubrics = explode(',', $conf);
     } else {
         $rubrics = array();
     }
     foreach ($rubrics as $rubric) {
         $rubric_array = explode('_', $rubric);
         if ($rubric_array[1] != 'none' and $rubric_array[0] != 'user' and $rubric_array[0] != 'contact' and !($rubric_array[0] == 'myroom' and $this->_environment->InPrivateRoom())) {
             $params = array();
             $params['iid'] = 'NEW';
             $temp = mb_strtoupper($rubric_array[0], 'UTF-8');
             $tempMessage = "";
             switch ($temp) {
                 case 'ANNOUNCEMENT':
                     $tempMessage = $this->_translator->getMessage('HOME_ANNOUNCEMENT_ENTER_NEW');
                     break;
                 case 'DATE':
                     $tempMessage = $this->_translator->getMessage('HOME_DATE_ENTER_NEW');
                     break;
                 case 'DISCUSSION':
                     $tempMessage = $this->_translator->getMessage('HOME_DISCUSSION_ENTER_NEW');
                     break;
                 case 'GROUP':
                     $tempMessage = $this->_translator->getMessage('HOME_GROUP_ENTER_NEW');
                     break;
                 case 'INSTITUTION':
                     $tempMessage = $this->_translator->getMessage('HOME_INSTITUTION_ENTER_NEW');
                     break;
                 case 'MATERIAL':
                     $tempMessage = $this->_translator->getMessage('HOME_MATERIAL_ENTER_NEW');
                     break;
                 case 'MYROOM':
                     $tempMessage = $this->_translator->getMessage('HOME_MYROOM_ENTER_NEW');
                     break;
                 case 'PROJECT':
                     $tempMessage = $this->_translator->getMessage('HOME_PROJECT_ENTER_NEW');
                     break;
                 case 'TODO':
                     $tempMessage = $this->_translator->getMessage('HOME_TODO_ENTER_NEW');
                     break;
                 case 'TOPIC':
                     $tempMessage = $this->_translator->getMessage('HOME_TOPIC_ENTER_NEW');
                     break;
                 default:
                     global $c_plugin_array;
                     if (!empty($c_plugin_array) and in_array(strtolower($temp), $c_plugin_array)) {
                         // initiate class
                         // check if there is an methode "getActionforHomeasHTML"
                         break;
                     } else {
                         $tempMessage = $this->_translator->getMessage('COMMON_MESSAGETAG_ERROR' . ' cs_homepage_action_view(' . __LINE__ . ') ');
                         break;
                     }
             }
             if (!empty($tempMessage)) {
                 if ($current_user->isUser() and $this->_with_modifying_actions) {
                     $html .= '> ' . ahref_curl($this->_environment->getCurrentContextID(), $rubric_array[0], 'edit', $params, $tempMessage) . BRLF;
                 } else {
                     $html .= '<span class="disabled">' . '> ';
                     $html .= $tempMessage;
                     $html .= '</span>' . BRLF;
                 }
             }
             unset($params);
         }
     }
     $params = $this->_environment->getCurrentParameterArray();
     $params['mode'] = 'print';
     $html .= '> ' . ahref_curl($this->_environment->getCurrentContextID(), 'home', 'index', $params, $this->_translator->getMessage('COMMON_LIST_PRINTVIEW')) . BRLF;
     $html .= '</div>' . LF;
     $html .= '<div style="clear:both;">' . LF;
     $html .= '</div>' . LF;
     $html .= '</div>' . LF;
     return $html;
 }
Beispiel #19
0
 /** get the title of the item
  * this method returns the item title in the right formatted style
  *
  * @return string title
  *
  * @author CommSy Development Group
  */
 function _getItemTitle($item)
 {
     $title = $item->getTitle();
     $title = $this->_compareWithSearchText($title);
     $params = array();
     $params['iid'] = $item->getItemID();
     if ($item->issetPrivatDate()) {
         $title = '<i>' . $this->_text_as_html_short($title) . '</i>';
         $title = ahref_curl($this->_environment->getCurrentContextID(), CS_DATE_TYPE, 'detail', $params, $title, '', '', '', '', '', '', '', '', CS_DATE_TYPE . $item->getItemID());
         $title .= ' <span class="changed"><span style="color:black"><i>[' . $this->_translator->getMessage('DATE_PRIVATE_ENTRY') . ']</i></span></span>';
     } else {
         $title = ahref_curl($this->_environment->getCurrentContextID(), CS_DATE_TYPE, 'detail', $params, $this->_text_as_html_short($title), '', '', '', '', '', '', '', '', CS_DATE_TYPE . $item->getItemID());
         unset($params);
         if (!$this->_environment->inPrivateRoom() and !$item->isNotActivated()) {
             $title .= $this->_getItemChangeStatus($item);
             $title .= $this->_getItemAnnotationChangeStatus($item);
         }
     }
     return $title;
 }
Beispiel #20
0
 /** create the form, INTERNAL
  * this methods creates the form with the form definitions
  */
 function _createForm()
 {
     $this->_form->addHeadline('title', $this->_translator->getMessage('ACCOUNT_FORM_TITLE'));
     // auth source
     if ($this->_count_auth_source_list_enabled == 1 and $this->_count_auth_source_list_add_account == 1) {
         $this->_form->addHidden('auth_source', $this->_auth_source_array[0]['value']);
     } elseif ($this->_count_auth_source_list_enabled > 1) {
         $this->_form->addSelect('auth_source', $this->_auth_source_array, $this->_default_auth_source_entry, $this->_translator->getMessage('USER_AUTH_SOURCE'), '', 1, false, false, false, '', '', '', '', 13.4);
     }
     if ($this->_count_auth_source_list_enabled == 1 and $this->_count_auth_source_list_add_account == 0) {
         $this->_form->addText('auth_not_available', $this->_translator->getMessage('AUTH_NOT_AVAILABLE2'), '');
         // buttons
         $this->_form->addButtonBar('option', '', $this->_translator->getMessage('COMMON_CANCEL_BUTTON'), '', '', '', '', false, '', 13);
     } elseif ($this->_count_auth_source_list_add_account == 0) {
         $this->_form->addText('auth_not_available', $this->_translator->getMessage('AUTH_NOT_AVAILABLE'), '');
         // buttons
         $this->_form->addButtonBar('option', '', $this->_translator->getMessage('COMMON_CANCEL_BUTTON'), '', '', '', '', false, '', 13);
     } else {
         $this->_form->addTextField('firstname', '', $this->_translator->getMessage('USER_FIRSTNAME'), '', '', 21, true, '', '', '', 'left', '', 13);
         $this->_form->addTextField('lastname', '', $this->_translator->getMessage('USER_LASTNAME'), '', '', 21, true, '', '', '', 'left', '', 13);
         $this->_form->addTextField('email', '', $this->_translator->getMessage('USER_EMAIL'), '', '', 21, true, '', '', '', 'left', '', 13);
         $this->_form->addTextField('email_confirmation', '', $this->_translator->getMessage('USER_EMAIL_CONFIRMATION'), '', '', 21, true, '', '', '', 'left', '', 13);
         $this->_form->addHidden('language', '');
         $this->_form->addTextField('user_id', '', $this->_translator->getMessage('USER_USER_ID'), '', 100, 21, true, '', '', '', 'left', '', 13);
         // Hinweis für das bauen des Passwortes
         #$link_pw = ahref_curl($this->_environment->getCurrentContextID(), 'home', 'index', array('cs_modus' => 'portalmember'), $this->_translator->getMessage('USER_PASSWORD_GUIDELINE'),'','','','','title="test"');
         $auth_source_manager = $this->_environment->getAuthSourceManager();
         $auth_source_item = $auth_source_manager->getItem($this->_auth_source_array[0]['value']);
         if ($auth_source_item->getPasswordLength() > 0) {
             $password_length = $auth_source_item->getPasswordLength();
             $output_password = $this->_translator->getMessage('CONFIGURATION_AUTHENTICATION_PW_LENGTH') . ': ' . $password_length;
         }
         if ($auth_source_item->getPasswordSecureBigchar() == 1) {
             $output_password .= ', ' . $this->_translator->getMessage('CONFIGURATION_AUTHENTICATION_PW_BIGCHAR');
         }
         if ($auth_source_item->getPasswordSecureSpecialchar() == 1) {
             $output_password .= ', ' . $this->_translator->getMessage('CONFIGURATION_AUTHENTICATION_PW_SPECIALCHAR');
         }
         if ($auth_source_item->getPasswordSecureNumber() == 1) {
             $output_password .= ', ' . $this->_translator->getMessage('CONFIGURATION_AUTHENTICATION_PW_NUMBER');
         }
         if ($auth_source_item->getPasswordSecureSmallchar() == 1) {
             $output_password .= ', ' . $this->_translator->getMessage('CONFIGURATION_AUTHENTICATION_PW_SMALLCHAR');
         }
         if (!empty($output_password)) {
             $link_pw = ' (<a href="#" title="' . $output_password . '">' . $this->_translator->getMessage('USER_PASSWORD_GUIDELINE') . '</a>)';
         } else {
             $link_pw = '';
         }
         $this->_form->addPassword('password', '', $this->_translator->getMessage('USER_PASSWORD') . '' . $link_pw, '', '', 21, true, 13);
         $this->_form->addPassword('password2', '', $this->_translator->getMessage('USER_PASSWORD2'), '', '', 21, true, 13);
         // link which refers to the terms of use
         // Datenschutz
         if ($this->_environment->getCurrentContextItem()->withAGB() and $this->_environment->getCurrentContextItem()->withAGBDatasecurity()) {
             $link = ahref_curl($this->_environment->getCurrentContextID(), 'agb', 'index', '', $this->_translator->getMessage('CONFIGURATION_AGB_FORM_HEADLINE'), '', '_new', '', '', 'onClick="window.open(href,target,\'toolbar=no, location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=600,height=400\');"');
             #$link = ahref_curl($this->_environment->getCurrentContextID(), 'agb', 'index', '', $this->_translator->getMessage('CONFIGURATION_AGB_FORM_HEADLINE'),'','_new');
             $this->_form->addCheckbox('terms_of_use', '1', false, '', $this->_translator->getMessage('CONFIGURATION_AGB_ACCEPT') . $link);
         }
         // buttons
         $this->_form->addButtonBar('option', $this->_translator->getMessage('ACCOUNT_GET_BUTTON'), $this->_translator->getMessage('COMMON_CANCEL_BUTTON'), '', '', '', '', false, 6.5, 6.5);
     }
 }
Beispiel #21
0
 /** get the possible actions
  * this method returns the possible actions in the right formatted style
  *
  * @return string item date
  *
  * @author CommSy Development Group
  */
 function _getItemActions($item)
 {
     $actions = '';
     if (empty($item) or $item->isDeleted()) {
         // do nothing
     } elseif (!empty($item) and $item->isA('user')) {
         if ($this->_environment->inProjectRoom()) {
             $params = array();
             $params['iid'] = $item->getItemID();
             $params['status'] = 'user';
             $free_url_active = ahref_curl($this->_environment->getCurrentContextID(), 'account', 'automatic', $params, $this->_translator->getMessage('ADMIN_USER_FREE'));
             $params['status'] = 'reject';
             $reject_url_active = ahref_curl($this->_environment->getCurrentContextID(), 'account', 'automatic', $params, $this->_translator->getMessage('ADMIN_USER_LOCK'));
             unset($params);
             $free_url_not = '<span class="disabled">' . $this->_translator->getMessage('ADMIN_USER_FREE') . '</span>';
             $reject_url_not = '<span class="disabled">' . $this->_translator->getMessage('ADMIN_USER_LOCK') . '</span>';
             if ($item->isRequested() or $item->isRejected()) {
                 if ($this->_environment->inCommunityRoom()) {
                     $free_url = $free_url_active;
                     $reject_url = $reject_url_active;
                 } else {
                     $user_manager = $this->_environment->getUserManager();
                     $portal_user_item = $item->getRelatedCommSyUserItem();
                     if ($portal_user_item->isUser()) {
                         if ($item->isRejected()) {
                             $free_url = $free_url_active;
                             $reject_url = $reject_url_not;
                         } elseif ($item->isRequested()) {
                             $free_url = $free_url_active;
                             $reject_url = $reject_url_active;
                         } else {
                             $free_url = $free_url_not;
                             $reject_url = $reject_url_active;
                         }
                     } else {
                         $free_url = $free_url_not;
                         $reject_url = $reject_url_not;
                     }
                 }
                 $actions .= $free_url . ' - ' . $reject_url;
             } elseif ($item->isRejected()) {
                 $params = array();
                 $params['iid'] = $item->getItemID();
                 $params['status'] = 'user';
                 $free_url = ahref_curl($this->_environment->getCurrentContextID(), 'account', 'automatic', $params, $this->_translator->getMessage('ADMIN_USER_FREE'));
                 unset($params);
                 $reject_url = '<span class="disabled">' . $this->_translator->getMessage('ADMIN_USER_LOCK') . '</span>';
                 $actions .= $free_url . ' - ' . $reject_url;
             } else {
                 $free_url = '<span class="disabled">' . $this->_translator->getMessage('ADMIN_USER_FREE') . '</span>';
                 $params = array();
                 $params['iid'] = $item->getItemID();
                 $params['status'] = 'reject';
                 $reject_url = ahref_curl($this->_environment->getCurrentContextID(), 'account', 'automatic', $params, $this->_translator->getMessage('ADMIN_USER_LOCK'));
                 unset($params);
                 $actions .= $free_url . ' - ' . $reject_url;
             }
         }
     }
     return $actions;
 }
 private function _getChildrenAsHTML($item)
 {
     $retour = '';
     $homepage_manager = $this->_environment->getHomepageManager();
     if (isset($item)) {
         $item_id = $item->getItemID();
     } elseif (!empty($this->_form_values['iid'])) {
         $item_id = $this->_form_values['iid'];
     } else {
         $item_id = 'NEW';
     }
     if (!empty($item_id) and $item_id != 'NEW') {
         $child_list = $homepage_manager->getChildList($item_id);
         if (!$child_list->isEmpty()) {
             $retour .= '<span class="bold">' . $this->_translator->getMessage('HOMEPAGE_DETAIL_SUBNAVIGATION') . '</span>' . LF;
             $retour .= '<ul class="detail">' . LF;
             $child_item = $child_list->getFirst();
             while ($child_item) {
                 $params = array();
                 $params['iid'] = $child_item->getItemID();
                 $link = ahref_curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), $this->_environment->getCurrentFunction(), $params, $child_item->getTitle());
                 $retour .= '<li>' . $link . '</li>' . LF;
                 unset($params);
                 $child_item = $child_list->getNext();
             }
             $retour .= '</ul>' . LF;
         }
     }
     if (!empty($retour)) {
         $retour = '<td style="vertical-align: top;">' . LF . $retour;
         $retour .= '</td>' . LF;
     }
     return $retour;
 }
Beispiel #23
0
 function getTitle()
 {
     $retour = '';
     $retour .= $this->_form->getHeadline();
     $html = '';
     if (($this->_environment->inPortal() or $this->_environment->inServer()) and $this->_environment->getCurrentModule() == 'configuration') {
         // link to configuration index
         $html = '<div class="actions" style="font-size: small; font-weight: normal;">' . LF;
         $html .= ahref_curl($this->_environment->getCurrentContextID(), 'configuration', 'index', '', $this->_translator->getMessage('ADMIN_INDEX')) . LF;
         $html .= '</div>' . LF;
     }
     $this->_display_title = false;
     return $html . $retour;
 }
Beispiel #24
0
 /** get form view as HTML
  * this method returns the form view in HTML-Code
  *
  * @return string form view as HMTL
  */
 function asHTML()
 {
     $html = '';
     $netnavigation_array = array();
     $html .= '<div id="profile_content">' . LF;
     $params = $this->_environment->getCurrentParameterArray();
     unset($params['show_profile']);
     unset($params['is_saved']);
     $title = ahref_curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), $this->_environment->getCurrentFunction(), $params, 'X', '', '', '', '', '', '', 'class="titlelink"');
     $html .= '<div>' . LF;
     $html .= '<div class="profile_title" style="float:right">' . $title . '</div>';
     $html .= '<h2 id="profile_title">' . $this->_translator->getMessageInLang($this->_language, 'COMMON_PROFILE_EDIT') . '</h2>';
     $html .= '</div>' . LF;
     $html .= $this->_getLinkRowAsHTML();
     $html .= '<form style="font-size:10pt; margin:0px; padding:0px;" action="' . $this->_action . '" method="' . $this->_action_type . '" enctype="multipart/form-data" name="f">' . "\n";
     $html .= '<div style="width:95%; padding:10px;">' . LF;
     if ($this->_item_saved) {
         $html .= '<div style="width:100%; text-align:center; font-weight:bold; color:red; font-size:14pt;">' . LF;
         $html .= $this->_translator->getMessageInLang($this->_language, 'COMMON_ITEM_SAVED') . LF;
         $html .= '</div>' . LF;
     }
     #$html .= '<div class="formdate">'.$date_array[2].'. '.$month.' '.$date_array[0].'</div>';
     if (count($this->_error_array) > 0) {
         $html .= $this->_getErrorBoxAsHTML();
     }
     // prepare form elements, especially combine form fields
     $form_element_array = array();
     $form_element = $this->_form_elements->getFirst();
     $temp_array = array();
     $failure = false;
     $mandatory = false;
     $this->_count_form_elements = 0;
     while ($form_element) {
         if ($form_element['type'] != 'hidden') {
             if (!empty($form_element['combine']) and $form_element['combine']) {
                 $temp_array[] = $form_element;
                 if (!empty($form_element['failure']) and $form_element['failure']) {
                     $failure = true;
                 }
                 if (!empty($form_element['mandatory']) and $form_element['mandatory']) {
                     $mandatory = true;
                 }
             } else {
                 $temp_array[] = $form_element;
                 if (count($temp_array) == 1) {
                     $form_element_array[] = $temp_array[0];
                 } else {
                     if (!empty($form_element['failure']) and $form_element['failure']) {
                         $failure = true;
                     }
                     if (!empty($form_element['mandatory']) and $form_element['mandatory']) {
                         $mandatory = true;
                     }
                     if ($failure) {
                         $temp_array[0]['failure'] = true;
                         $failure = false;
                     }
                     if ($mandatory) {
                         $temp_array[0]['mandatory'] = true;
                         $mandatory = false;
                     }
                     $form_element_array[] = $temp_array;
                 }
                 $temp_array = array();
             }
         }
         $this->_count_form_elements++;
         $form_element = $this->_form_elements->getNext();
     }
     $temp_array = array();
     foreach ($form_element_array as $form_element) {
         $temp_array[] = $form_element;
     }
     //Berechnung der Buttonleiste
     $form_element_array = $temp_array;
     $temp_array = array();
     $buttonbar_counter = 0;
     $buttonbar_counter2 = 0;
     foreach ($form_element_array as $form_element) {
         if (isset($form_element['type']) and $form_element['type'] == 'buttonbar') {
             $buttonbar_counter++;
         }
     }
     foreach ($form_element_array as $form_element) {
         if (isset($form_element['type']) and $form_element['type'] == 'buttonbar') {
             $buttonbar_counter2++;
             $this->_count_form_elements = $this->_count_form_elements + 100;
             $buttonbartext = $this->_getButtonBarAsHTML($form_element);
             $this->_count_form_elements = $this->_count_form_elements - 100;
             if ($buttonbar_counter > 1 and $buttonbar_counter != $buttonbar_counter2) {
                 $temp_array[] = $form_element;
             }
         } else {
             $temp_array[] = $form_element;
         }
     }
     $form_element_array = $temp_array;
     $temp_array = array();
     $html .= '<div style="width: 100%;">' . LF;
     $funct = $this->_environment->getCurrentFunction();
     $html .= '<div style="width:100%; margin-top:5px; vertical-align:bottom;">' . LF;
     $html .= '<!-- BEGIN OF FORM-VIEW -->' . LF;
     $html .= '<div style="width:100%;">' . LF;
     foreach ($form_element_array as $form_element) {
         if (isset($form_element['type']) and $form_element['type'] == 'titlefield' and $form_element['display']) {
             $html .= '<div id="form_title">';
             if (isset($form_element_array[0]['label'])) {
                 if (isset($form_element_array[0]['failure'])) {
                     $label = '<span class="required">' . $form_element_array[0]['label'] . '</span>';
                 } else {
                     $label = $form_element_array[0]['label'];
                 }
                 $html .= '&nbsp;' . $label;
                 if (!empty($label)) {
                     $html .= ':';
                 }
                 if (!empty($form_element_array[0]['mandatory'])) {
                     $html .= '<span class="required">' . $this->_translator->getMessageInLang($this->_language, 'MARK') . '</span>';
                 }
             }
             $html .= '&nbsp;' . $this->_getTitleFieldAsHTML($form_element);
             $show_title_field = true;
             $html .= '</div>';
         } elseif (isset($form_element['type']) and $form_element['type'] == 'titletext') {
             $html .= '<div style="width:100%;">' . LF;
             $html .= $this->_getTitleTextAsHTML($form_element);
             $show_title_field = true;
             $html .= '</div>';
         } elseif (isset($form_element[0]['type']) and $form_element[0]['type'] == 'titlefield' and $form_element[0]['display']) {
             $html .= '<div style="padding-bottom:0px; ">';
             $html .= '<table summary="Layout">';
             $html .= '<tr>';
             $html .= '<td style="padding:0px;">';
             if (isset($form_element_array[0][0]['label'])) {
                 if (isset($form_element_array[0][0]['failure'])) {
                     $label = '<span class="required">' . $form_element_array[0][0]['label'] . '</span>';
                 } else {
                     $label = $form_element_array[0][0]['label'];
                 }
                 $html .= '<span class="key">' . $label . '</span>';
                 if (!empty($label)) {
                     $html .= ':';
                 }
                 if (!empty($form_element_array[0][0]['mandatory'])) {
                     $html .= '<span class="required">' . $this->_translator->getMessageInLang($this->_language, 'MARK') . '</span>';
                 }
             }
             $html .= '</td>';
             $html .= '<td style="padding:0px;">';
             $html .= '&nbsp;' . $this->_getTitleFieldAsHTML($form_element[0]);
             $show_title_field = true;
             if ($form_element[1]['type'] == 'checkbox') {
                 $html .= '</td>';
                 $html .= '</tr>';
                 $html .= '<tr>';
                 $html .= '<td style="padding:0px;">';
                 $html .= '</td>';
                 $html .= '<td style="padding:0px;">';
                 $html .= '         ' . $this->_getCheckboxAsHTML($form_element[1]) . "\n";
                 $html .= '</td>';
                 $html .= '</tr>';
             } elseif ($form_element[1]['type'] == 'textfield') {
                 $form_element[1]['display'] = true;
                 $html .= '         ' . $this->_getTitleFieldAsHTML($form_element[1]) . "\n";
                 $html .= '</td>';
                 $html .= '</tr>';
             }
             $html .= '</table>';
             $html .= '</div>';
         } elseif (isset($form_element['type']) and $form_element['type'] == 'titlefield' and !$form_element['display']) {
             $html .= $this->_getTitleFieldAsHTML($form_element);
             $show_title_field = true;
         } else {
             $temp_array[] = $form_element;
         }
     }
     $form_element_array = $temp_array;
     $html .= '<table summary="layout">' . LF;
     $form_element = $this->_form_elements->getFirst();
     $html .= '<tr>' . LF;
     $html .= '<td style="border:0px; padding:0px;" colspan="4">' . LF;
     while ($form_element) {
         if ($form_element['type'] == 'hidden') {
             $html .= $this->_getHiddenfieldAsHTML($form_element);
         }
         $form_element = $this->_form_elements->getNext();
     }
     $html .= '</td>' . LF;
     $html .= '</tr>' . LF;
     $temp_array = array();
     // now get the html code
     $first = true;
     $second = false;
     $temp_array = $form_element_array;
     $i = 0;
     $without_description = 0;
     foreach ($form_element_array as $form_element) {
         if (!isset($form_element[0]['type']) and $form_element['type'] == 'headline') {
             $headline_right = $this->_getHeadLineAsHTML($form_element, $form_element['size']);
         } else {
             if (!(isset($form_element['type']) and $form_element['type'] == 'netnavigation')) {
                 if (isset($form_element['type']) and $form_element['type'] == 'textarea') {
                     $text = '   <tr class="textarea">' . LF;
                 } elseif (isset($form_element['type']) and $form_element['type'] == 'radio') {
                     $text = '   <tr class="radio">' . LF;
                 } elseif (isset($form_element['type']) and $form_element['type'] == 'checkboxgroup') {
                     $text = '   <tr class="checkboxgroup">' . LF;
                 } else {
                     $text = '   <tr>' . "\n";
                 }
             }
             if (isset($form_element['type']) and $form_element['type'] == 'buttonbar') {
                 $html .= '<tr>' . LF;
                 $html .= '      <td>';
                 $html .= '      </td>';
                 if (!$this->_display_plain) {
                     if ($this->_special_color) {
                         $html .= '      <td>';
                     } else {
                         if ($this->_warn_changer) {
                             $html .= '      <td style="background-color:#FF0000;">';
                         } else {
                             $html .= '      <td class="buttonbar">';
                         }
                     }
                 } else {
                     if ($this->_special_color) {
                         $html .= '      <td style="border-bottom: none; xwhite-space:nowrap;">';
                     } else {
                         $html .= '      <td style="border-bottom: none; xwhite-space:nowrap;">';
                     }
                 }
                 $html .= $this->_getButtonBarAsHTML($form_element);
                 $html .= '</td>' . LF;
                 $html .= '</tr>' . LF;
             } elseif (!(isset($form_element['type']) and $form_element['type'] == 'netnavigation') and !(isset($form_element[0]['name']) and $form_element[0]['name'] == 'buzzwordlist') and !(isset($form_element[0]['name']) and $form_element[0]['name'] == 'buzzword') and !(isset($form_element[0]['name']) and $form_element[0]['name'] == 'taglist') and (!isset($form_element['type']) or $form_element['type'] != 'titlefield') and !(isset($form_element[0]['name']) and $form_element[0]['name'] == 'tag')) {
                 $html .= $text . $this->_getFormElementAsHTML($form_element) . '   </tr>' . LF;
             }
         }
         $i++;
     }
     if (isset($buttonbartext) and !empty($buttonbartext) and $this->_environment->getCurrentModule() != 'buzzwords' and $this->_environment->getCurrentModule() != 'labels') {
         $html .= '<tr>' . LF;
         $html .= '      <td>';
         $html .= '      </td>';
         if (!$this->_display_plain) {
             if ($this->_special_color) {
                 $html .= '      <td>';
             } else {
                 if ($this->_warn_changer) {
                     $html .= '      <td style="background-color:#FF0000;">';
                 } else {
                     $html .= '      <td class="buttonbar">';
                 }
             }
         } else {
             if ($this->_special_color) {
                 $html .= '      <td style="border-bottom: none; xwhite-space:nowrap;">';
             } else {
                 $html .= '      <td style="border-bottom: none; xwhite-space:nowrap;">';
             }
         }
         $html .= $buttonbartext;
         $html .= '</td>' . LF;
         $html .= '</tr>' . LF;
     }
     $html .= '</table>' . LF;
     $html .= '</div>' . LF;
     $html .= '</div>' . LF;
     $html .= '</div>' . LF;
     $html .= '</div>' . LF;
     $html .= '<div style="clear:both; width:100%;">&nbsp;' . LF;
     $html .= '</div>' . LF;
     $html .= '</form>' . BRLF;
     $html .= '</div>' . LF;
     return $html;
 }
 /**
  * returns the html link when list is shortened on home view
  * 
  * @return string $html		- the html link code
  */
 function _getListShortenedLink()
 {
     $html = '';
     $style = '';
     if ($this->getList()->getCount() % 2 == 0) {
         $style = 'class="odd"';
     } else {
         $style = 'class="even"';
     }
     $link = ahref_curl($this->_environment->getCurrentContextID(), CS_ANNOUNCEMENT_TYPE, 'index', array(), $this->_translator->getMessage("HOME_RUBRIC_LIST_SHORTENED"));
     $html .= '<tr class="list"><td ' . $style . ' colspan="4">' . $link . '</td></tr>';
     return $html;
 }
 function asHTML()
 {
     if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
         $image_new_material = '<img src="images/commsyicons_msie6/22x22/material.gif" style="vertical-align:bottom;"/>';
         $image_new_date = '<img src="images/commsyicons_msie6/22x22/date.gif" style="vertical-align:bottom;"/>';
         $image_new_discussion = '<img src="images/commsyicons_msie6/22x22/discussion.gif" style="vertical-align:bottom;"/>';
         $image_new_todo = '<img src="images/commsyicons_msie6/22x22/todo.gif" style="vertical-align:bottom;"/>';
     } else {
         $image_new_material = '<img src="images/commsyicons/22x22/material.png" style="vertical-align:bottom;"/>';
         $image_new_date = '<img src="images/commsyicons/22x22/date.png" style="vertical-align:bottom;"/>';
         $image_new_discussion = '<img src="images/commsyicons/22x22/discussion.png" style="vertical-align:bottom;"/>';
         $image_new_todo = '<img src="images/commsyicons/22x22/todo.png" style="vertical-align:bottom;"/>';
     }
     $html = '<div id="' . get_class($this) . '">' . LF;
     $html .= '<center>';
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'material', 'edit', array('iid' => 'NEW'), $image_new_material, $this->_translator->getMessage('COMMON_ENTER_NEW_MATERIAL'));
     $html .= '&nbsp;&nbsp;&nbsp;';
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'date', 'edit', array('iid' => 'NEW'), $image_new_date, $this->_translator->getMessage('COMMON_ENTER_NEW_DATE'));
     $html .= '&nbsp;&nbsp;&nbsp;';
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'discussion', 'edit', array('iid' => 'NEW'), $image_new_discussion, $this->_translator->getMessage('COMMON_ENTER_NEW_DISCUSSION'));
     $html .= '&nbsp;&nbsp;&nbsp;';
     $html .= ahref_curl($this->_environment->getCurrentContextID(), 'todo', 'edit', array('iid' => 'NEW'), $image_new_todo, $this->_translator->getMessage('COMMON_ENTER_NEW_TODO'));
     $html .= '</center>';
     $html .= '</div>' . LF;
     return $html;
 }
Beispiel #27
-1
 private function _getBackLink()
 {
     $retour = '';
     if (!empty($this->_back_link)) {
         include_once 'functions/curl_functions.php';
         $retour = ahref_curl2($this->_back_link, 'X', '', '', '', '', '', 'class="titlelink"');
     } else {
         $params = $this->_environment->getCurrentParameterArray();
         $retour = ahref_curl($this->_environment->getCurrentContextID(), $this->_environment->getCurrentModule(), $this->_environment->getCurrentFunction(), $params, 'X', '', '', '', '', '', '', 'class="titlelink"');
     }
     return $retour;
 }
Beispiel #28
-1
 /** create the form, INTERNAL
  * this methods creates the form with the form definitions
  */
 function _createForm()
 {
     $this->_form->addHeadline('title', $this->_translator->getMessage('ACCOUNT_FORM_TITLE2'));
     $this->_form->addText('desc', $this->_translator->getMessage('ACCOUNT_FORM_TITLE2_DESC'), '');
     $this->_form->addHidden('user_id', $this->_user_id);
     $this->_form->addHidden('auth_source', $this->_auth_source);
     $this->_form->addTextField('firstname', '', $this->_translator->getMessage('USER_FIRSTNAME'), '', '', 21, true, '', '', '', 'left', '', 13);
     $this->_form->addTextField('lastname', '', $this->_translator->getMessage('USER_LASTNAME'), '', '', 21, true, '', '', '', 'left', '', 13);
     $this->_form->addTextField('email', '', $this->_translator->getMessage('USER_EMAIL'), '', '', 21, true, '', '', '', 'left', '', 13);
     $this->_form->addTextField('email_confirmation', '', $this->_translator->getMessage('USER_EMAIL_CONFIRMATION'), '', '', 21, true, '', '', '', 'left', '', 13);
     $this->_form->addHidden('language', '');
     // Datenschutz
     if ($this->_environment->getCurrentContextItem()->withAGB() and $this->_environment->getCurrentContextItem()->withAGBDatasecurity()) {
         $link = ahref_curl($this->_environment->getCurrentContextID(), 'agb', 'index', '', $this->_translator->getMessage('CONFIGURATION_AGB_FORM_HEADLINE'), '', '_new');
         $this->_form->addCheckbox('terms_of_use', '1', false, '', $this->_translator->getMessage('CONFIGURATION_AGB_ACCEPT') . $link);
     }
     // buttons
     $this->_form->addButtonBar('option', $this->_translator->getMessage('ACCOUNT_GET_BUTTON'), $this->_translator->getMessage('COMMON_CANCEL_BUTTON'), '', '', '', '', false, 6.5, 6.5);
 }
Beispiel #29
-1
 /** constructor
  * the only available constructor, initial values for internal variables
  *
  * @param array params parameters in an array of this class
  */
 function cs_project_short_view($params)
 {
     $this->cs_context_short_view($params);
     $title = ahref_curl($this->_environment->getCurrentContextID(), CS_PROJECT_TYPE, 'index', '', $this->_translator->getMessage('COMMON_PROJECT_INDEX'), '', '', '', '', '', '', 'class="head"');
     $this->setViewTitle($title);
     $this->_room_type = CS_PROJECT_TYPE;
     $manager = $this->_environment->getProjectManager();
     if ($this->_environment->inCommunityRoom()) {
         $manager->setContextLimit($this->_environment->getCurrentPortalID());
     }
     global $c_cache_cr_pr;
     if (!isset($c_cache_cr_pr) or !$c_cache_cr_pr) {
         $this->_max_activity = $manager->getMaxActivityPointsInCommunityRoom($this->_environment->getCurrentContextID());
     } else {
         $current_context_item = $this->_environment->getCurrentContextItem();
         $this->_max_activity = $manager->getMaxActivityPointsInCommunityRoomInternal($current_context_item->getInternalProjectIDArray());
         unset($current_context_item);
     }
 }
Beispiel #30
-1
 /** get text view as HTML
  * this method returns the text view in HTML-Code
  *
  * @return string text view as HMTL
  */
 function asHTML()
 {
     $html = '';
     $html .= '<!-- BEGIN OF TEXTVIEW -->' . LF;
     if (!empty($this->_anchor)) {
         $html .= '<a name="' . $this->_anchor . '"></a>' . LF;
     }
     $params = $this->_environment->getCurrentParameterArray();
     if (!empty($params['root_login']) && $params['root_login'] == 1) {
         $params['target_cid'] = $this->_environment->getCurrentContextID();
         $html .= '<form style="margin:0px; padding:0px;" method="post" action="' . curl($this->_environment->getCurrentContextID(), 'context', 'login', $params) . '" name="login">' . LF;
         $html .= '<table summary="Layout">' . LF;
         $html .= '<tr><td style="padding:0px;margin:0px;">' . LF;
         $html .= $this->_translator->getMessage('MYAREA_ACCOUNT') . ':' . LF . '</td><td>';
         $html .= '<input type="text" name="user_id" size="100" style="font-size:10pt; width:6.2em;" tabindex="1"/>' . LF;
         $html .= '</td></tr>' . LF . '<tr><td>' . LF;
         $html .= $this->_translator->getMessage('MYAREA_PASSWORD') . ':' . '</td>' . LF . '<td>';
         $html .= '<input type="password" name="password" size="10" style="font-size:10pt; width:6.2em;" tabindex="2"/>' . '</td></tr>' . LF;
         $html .= '<tr>' . LF . '<td></td>' . LF . '<td>' . LF;
         $html .= '<input type="submit" name="option" style="width: 6.6em;" value="' . $this->_translator->getMessage('MYAREA_LOGIN_BUTTON') . '" tabindex="4"/>' . LF;
         $html .= '</td></tr>' . LF;
         $html .= '</table>' . LF;
         $html .= '</form>' . LF;
     } else {
         $html .= '<table border="0" cellspacing="1" cellpadding="3" width="100%" summary="Layout">' . LF;
         $html .= '   <tr>' . LF;
         $html .= '	  <td style="text-align:right;">';
         $params['root_login'] = 1;
         $html .= ahref_curl($this->_environment->getCurrentContextID(), 'home', 'outofservice', $params, $this->_translator->getMessage("SERVER_OUTOFSERVICE_ROOT_LOGIN"));
         $html .= '	  </td>' . LF;
         $html .= '   </tr>' . LF;
         $html .= '   <tr>' . LF;
         $html .= '      <td>' . $this->_text_as_html_long($this->_text) . '</td>' . LF;
         $html .= '   </tr>' . LF;
         $html .= '</table>' . LF;
     }
     $html .= '<!-- END OF TEXTVIEW -->' . LF . LF;
     return $html;
 }