当前位置: 首页>>代码示例>>PHP>>正文


PHP CommonGLPI::isLayoutWithMain方法代码示例

本文整理汇总了PHP中CommonGLPI::isLayoutWithMain方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonGLPI::isLayoutWithMain方法的具体用法?PHP CommonGLPI::isLayoutWithMain怎么用?PHP CommonGLPI::isLayoutWithMain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CommonGLPI的用法示例。


在下文中一共展示了CommonGLPI::isLayoutWithMain方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: includeHeader

 /**
  * Include common HTML headers
  *
  * @param $title title used for the page (default '')
  *
  * @return nothing
  **/
 static function includeHeader($title = '')
 {
     global $CFG_GLPI, $PLUGIN_HOOKS;
     // Send UTF8 Headers
     header("Content-Type: text/html; charset=UTF-8");
     // Allow only frame from same server to prevent click-jacking
     header('x-frame-options:SAMEORIGIN');
     // Send extra expires header
     self::header_nocache();
     // Start the page
     echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n             \"http://www.w3.org/TR/html4/loose.dtd\">";
     echo "\n<html><head><title>GLPI - " . $title . "</title>";
     echo "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";
     // Send extra expires header
     echo "<meta http-equiv='Expires' content='Fri, Jun 12 1981 08:20:00 GMT'>\n";
     echo "<meta http-equiv='Pragma' content='no-cache'>\n";
     echo "<meta http-equiv='Cache-Control' content='no-cache'>\n";
     echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n";
     // auto desktop / mobile viewport
     echo "<meta name='viewport' content='width=device-width, initial-scale=1'>";
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jquery/css/smoothness/jquery-ui-1.10.4.custom.min.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/css/jstree/style.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/rateit/rateit.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/select2/select2.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/qtip2/jquery.qtip.min.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jcrop/jquery.Jcrop.min.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/spectrum-colorpicker/spectrum.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-gantt/css/style.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/css/jquery-glpi.css");
     //  CSS link
     echo Html::css($CFG_GLPI["root_doc"] . "/css/styles.css");
     // CSS theme link
     if (isset($_SESSION["glpipalette"])) {
         echo Html::css($CFG_GLPI["root_doc"] . "/css/palettes/" . $_SESSION["glpipalette"] . ".css");
     }
     // surcharge CSS hack for IE
     echo "<!--[if lte IE 6]>";
     echo Html::css($CFG_GLPI["root_doc"] . "/css/styles_ie.css");
     echo "<![endif]-->";
     echo Html::css($CFG_GLPI["root_doc"] . "/css/print.css", array('media' => 'print'));
     echo "<link rel='shortcut icon' type='images/x-icon' href='" . $CFG_GLPI["root_doc"] . "/pics/favicon.ico' >\n";
     // Add specific css for plugins
     if (isset($PLUGIN_HOOKS['add_css']) && count($PLUGIN_HOOKS['add_css'])) {
         foreach ($PLUGIN_HOOKS["add_css"] as $plugin => $files) {
             if (is_array($files)) {
                 foreach ($files as $file) {
                     if (file_exists(GLPI_ROOT . "/plugins/{$plugin}/{$file}")) {
                         echo Html::css($CFG_GLPI["root_doc"] . "/plugins/{$plugin}/{$file}");
                     }
                 }
             } else {
                 if (file_exists(GLPI_ROOT . "/plugins/{$plugin}/{$files}")) {
                     echo Html::css($CFG_GLPI["root_doc"] . "/plugins/{$plugin}/{$files}");
                 }
             }
         }
     }
     // AJAX library
     if ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) {
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jquery/js/jquery-1.10.2.js");
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jquery/js/jquery-ui-1.10.4.custom.js");
     } else {
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jquery/js/jquery-1.10.2.min.js");
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jquery/js/jquery-ui-1.10.4.custom.min.js");
     }
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/tiny_mce/tiny_mce.js");
     // PLugins jquery
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/backtotop/BackToTop.min.jquery.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/select2/select2.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/qtip2/jquery.qtip.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jstree/jquery.jstree.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/rateit/jquery.rateit.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-ui-timepicker-addon/jquery-ui-timepicker-addon.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-file-upload/js/jquery.iframe-transport.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-file-upload/js/jquery.fileupload.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jcrop/jquery.Jcrop.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/imagepaste/jquery.image_paste.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/spectrum-colorpicker/spectrum-min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-gantt/js/jquery.fn.gantt.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/autogrow/jquery.autogrow-textarea.js");
     // layout
     if (CommonGLPI::isLayoutWithMain() && !CommonGLPI::isLayoutExcludedPage()) {
         echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-ui-scrollable-tabs/css/jquery.scrollabletab.css");
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-ui-scrollable-tabs/js/jquery.mousewheel.js");
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-ui-scrollable-tabs/js/jquery.scrollabletab.js");
     }
     if (isset($_SESSION['glpilanguage'])) {
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jquery/i18n/jquery.ui.datepicker-" . $CFG_GLPI["languages"][$_SESSION['glpilanguage']][2] . ".js");
         $filename = "/lib/jqueryplugins/jquery-ui-timepicker-addon/i18n/jquery-ui-timepicker-" . $CFG_GLPI["languages"][$_SESSION['glpilanguage']][2] . ".js";
         if (file_exists(GLPI_ROOT . $filename)) {
             echo Html::script($CFG_GLPI["root_doc"] . $filename);
         }
         $filename = "/lib/jqueryplugins/select2/select2_locale_" . $CFG_GLPI["languages"][$_SESSION['glpilanguage']][2] . ".js";
//.........这里部分代码省略.........
开发者ID:OlivierLM,项目名称:glpi,代码行数:101,代码来源:html.class.php

示例2: showTimeline


//.........这里部分代码省略.........
         // show "is_private" icon
         if (isset($item_i['is_private']) && $item_i['is_private']) {
             echo "<div class='private'>" . __('Private') . "</div>";
         }
         echo "</div>";
         // b_right
         if ($item['type'] == 'Document_Item') {
             $filename = $item_i['filename'];
             $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
             echo "<img src='";
             if (empty($filename)) {
                 $filename = $item_i['name'];
             }
             if (file_exists(GLPI_ROOT . "/pics/icones/{$ext}-dist.png")) {
                 echo $CFG_GLPI['root_doc'] . "/pics/icones/{$ext}-dist.png";
             } else {
                 echo "{$pics_url}/file.png";
             }
             echo "' title='file' />&nbsp;";
             echo "<a href='" . $CFG_GLPI['root_doc'] . "/front/document.send.php?docid=" . $item_i['id'] . "&tickets_id=" . $this->getID() . "' target='_blank'>{$filename}";
             if (in_array($ext, array('jpg', 'jpeg', 'png', 'bmp'))) {
                 echo "<div class='timeline_img_preview'>";
                 echo "<img src='" . $CFG_GLPI['root_doc'] . "/front/document.send.php?docid=" . $item_i['id'] . "&tickets_id=" . $this->getID() . "'/>";
                 echo "</div>";
             }
             echo "</a>";
             if (!empty($item_i['mime'])) {
                 echo "&nbsp;(" . $item_i['mime'] . ")";
             }
             echo "<a href='" . $CFG_GLPI['root_doc'] . "/front/document.form.php?id=" . $item_i['id'] . "' class='edit_document' title='" . _sx("button", "Update") . "'>";
             echo "<img src='{$pics_url}/edit.png' /></a>";
             echo "<a href='" . $CFG_GLPI['root_doc'] . "/front/ticket.form.php?delete_document&documents_id=" . $item_i['id'] . "&tickets_id=" . $this->getID() . "' class='delete_document' title='" . _sx("button", "Delete permanently") . "'>";
             echo "<img src='{$pics_url}/delete.png' /></a>";
         }
         echo "</div>";
         // displayed_content
         echo "</div>";
         //end h_content
         echo "</div>";
         //end  h_info
         $timeline_index++;
         Plugin::doHook('post_show_item', array('item' => $obj, 'options' => $options));
     }
     // end foreach timeline
     echo "<div class='break'></div>";
     // recall ticket content (not needed in classic and splitted layout)
     if (!CommonGLPI::isLayoutWithMain()) {
         echo "<div class='h_item middle'>";
         echo "<div class='h_info'>";
         echo "<div class='h_date'>" . Html::convDateTime($this->fields['date']) . "</div>";
         echo "<div class='h_user'>";
         $dem = '0';
         foreach ($DB->request("glpi_tickets_users", "`tickets_id` = " . $this->fields['id'] . " AND `type` = 1") as $req) {
             $dem = $req['users_id'];
         }
         if ((!isset($item_i['users_id_recipient']) || $item_i['users_id_recipient'] == 0) && $dem == 0) {
             _e("Requester");
         } else {
             if (isset($item_i['users_id_recipient']) && $item_i['users_id_recipient'] != 0) {
                 $user->getFromDB($this->fields['users_id_recipient']);
             } else {
                 if ($dem > 0) {
                     $requester = new User();
                     if ($requester->getFromDB($dem)) {
                         $user = $requester;
                     }
                 }
             }
             echo "<div class='tooltip_picture_border'>";
             $picture = "";
             if (isset($user->fields['picture'])) {
                 $picture = $user->fields['picture'];
             }
             echo "<img class='user_picture' alt=\"" . __s('Picture') . "\" src='" . User::getThumbnailURLForPicture($picture) . "'>";
             echo "</div>";
             echo $user->getLink();
         }
         echo "</div>";
         // h_user
         echo "</div>";
         //h_info
         echo "<div class='h_content TicketContent'>";
         echo "<div class='b_right'>" . __("Ticket recall") . "</div>";
         echo "<div class='ticket_title'>";
         echo html_entity_decode($this->fields['name']);
         echo "</div>";
         echo "<div class='ticket_description'>";
         echo $this->setSimpleTextContent($this->fields['content']);
         echo "</div>";
         echo "</div>";
         // h_content TicketContent
         echo "</div>";
         // h_item middle
         echo "<div class='break'></div>";
     }
     // end timeline
     echo "</div>";
     // h_item $user_position
     echo "<script type='text/javascript'>read_more();</script>";
 }
开发者ID:glpi-project,项目名称:glpi,代码行数:101,代码来源:ticket.class.php

示例3: createTabs

 /**
  *  Create Ajax Tabs apply to 'tabspanel' div. Content is displayed in 'tabcontent'
  *
  * @param $tabdiv_id                ID of the div containing the tabs (default 'tabspanel')
  * @param $tabdivcontent_id         ID of the div containing the content loaded by tabs
  *                                  (default 'tabcontent')
  * @param $tabs               array of tabs to create :
  *                                  tabs is array('key' => array('title'=> 'x',
  *                                                                url    => 'url_toload',
  *                                                                params => 'url_params')...
  * @param $type                     itemtype for active tab
  * @param $ID                       ID of element for active tab (default 0)
  * @param $orientation              orientation of tabs (default vertical may also be horizontal)
  *
  * @return nothing
  **/
 static function createTabs($tabdiv_id = 'tabspanel', $tabdivcontent_id = 'tabcontent', $tabs = array(), $type, $ID = 0, $orientation = 'vertical')
 {
     global $CFG_GLPI;
     /// TODO need to clean params !!
     $active_tabs = Session::getActiveTab($type);
     $rand = mt_rand();
     if (count($tabs) > 0) {
         echo "<div id='tabs{$rand}' class='center {$orientation}'>";
         if (CommonGLPI::isLayoutWithMain() && !CommonGLPI::isLayoutExcludedPage()) {
             $orientation = 'horizontal';
         }
         echo "<ul>";
         $current = 0;
         $selected_tab = 0;
         foreach ($tabs as $key => $val) {
             if ($key == $active_tabs) {
                 $selected_tab = $current;
             }
             echo "<li><a title=\"" . str_replace(array("<sup class='tab_nb'>", '</sup>'), '', $val['title']) . "\" ";
             echo " href='" . $val['url'] . (isset($val['params']) ? '?' . $val['params'] : '') . "'>";
             // extract sup information
             // $title = '';
             // $limit = 16;
             // No title strip for horizontal menu
             $title = $val['title'];
             echo $title . "</a></li>";
             $current++;
         }
         echo "</ul>";
         echo "</div>";
         echo "<div id='loadingtabs{$rand}' class='invisible'>" . "<div class='loadingindicator'>" . __s('Loading...') . "</div></div>";
         $js = "\n         forceReload{$rand} = false;\n         \$('#tabs{$rand}').tabs({\n            active: {$selected_tab},\n            // Loading indicator\n            beforeLoad: function (event, ui) {\n               if (\$(ui.panel).html()\n                   && !forceReload{$rand}) {\n                  event.preventDefault();\n               } else {\n                  ui.panel.html(\$('#loadingtabs{$rand}').html());\n                  forceReload{$rand} = false;\n                }\n            },\n            ajaxOptions: {type: 'POST'},\n            activate : function( event, ui ) {\n               // Get future value\n               var newIndex = ui.newTab.parent().children().index(ui.newTab);\n               \$.get('" . $CFG_GLPI['root_doc'] . "/ajax/updatecurrenttab.php',\n                  { itemtype: '{$type}', id: '{$ID}', tab: newIndex });\n            }\n         });";
         if ($orientation == 'vertical') {
             $js .= "\$('#tabs{$rand}').tabs().addClass( 'ui-tabs-vertical ui-helper-clearfix' );";
         }
         if (CommonGLPI::isLayoutWithMain() && !CommonGLPI::isLayoutExcludedPage()) {
             $js .= "\$('#tabs{$rand}').scrollabletabs();";
         } else {
             $js .= "\$('#tabs{$rand}').removeClass( 'ui-corner-top' ).addClass( 'ui-corner-left' );";
         }
         $js .= "// force reload\n            function reloadTab(add) {\n               forceReload{$rand} = true;\n               var current_index = \$('#tabs{$rand}').tabs('option','active');\n               // Save tab\n               currenthref = \$('#tabs{$rand} ul>li a').eq(current_index).attr('href');\n               \$('#tabs{$rand} ul>li a').eq(current_index).attr('href',currenthref+'&'+add);\n               \$('#tabs{$rand}').tabs( 'load' , current_index);\n               // Restore tab\n               \$('#tabs{$rand} ul>li a').eq(current_index).attr('href',currenthref);\n            };";
         echo Html::scriptBlock($js);
     }
 }
开发者ID:btry,项目名称:glpi,代码行数:60,代码来源:ajax.class.php

示例4: includeHeader

 /**
  * Include common HTML headers
  *
  * @param $title title used for the page (default '')
  *
  * @return nothing
  **/
 static function includeHeader($title = '')
 {
     global $CFG_GLPI, $PLUGIN_HOOKS;
     // complete title with id if exist
     if (isset($_GET['id']) && $_GET['id']) {
         $title = sprintf(__('%1$s - %2$s'), $title, $_GET['id']);
     }
     // Send UTF8 Headers
     header("Content-Type: text/html; charset=UTF-8");
     // Allow only frame from same server to prevent click-jacking
     header('x-frame-options:SAMEORIGIN');
     // Send extra expires header
     self::header_nocache();
     // Start the page
     echo "<!DOCTYPE html>\n";
     echo "<html lang=\"{$CFG_GLPI["languages"][$_SESSION['glpilanguage']][3]}\">";
     echo "<head><title>GLPI - " . $title . "</title>";
     echo "<meta charset=\"utf-8\">";
     //prevent IE to turn into compatible mode...
     echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n";
     // auto desktop / mobile viewport
     echo "<meta name='viewport' content='width=device-width, initial-scale=1'>";
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jquery/css/smoothness/jquery-ui-1.10.4.custom.min.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/css/jstree/style.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/rateit/rateit.min.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/select2/select2.min.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/qtip2/jquery.qtip.min.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jcrop/jquery.Jcrop.min.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/spectrum-colorpicker/spectrum.min.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-gantt/css/style.css");
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/fullcalendar/fullcalendar.min.css", array('media' => ''));
     echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/fullcalendar/fullcalendar.print.min.css", array('media' => 'print'));
     echo Html::css($CFG_GLPI["root_doc"] . "/css/jquery-glpi.css");
     if (CommonGLPI::isLayoutWithMain() && !CommonGLPI::isLayoutExcludedPage()) {
         echo Html::css($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-ui-scrollable-tabs/css/jquery.scrollabletab.min.css");
     }
     //  CSS link
     echo Html::css($CFG_GLPI["root_doc"] . "/css/styles.css");
     // High constrast CSS link
     if (isset($_SESSION['glpihighcontrast_css']) && $_SESSION['glpihighcontrast_css']) {
         echo Html::css($CFG_GLPI["root_doc"] . "/css/highcontrast.css");
     }
     // CSS theme link
     if (isset($_SESSION["glpipalette"])) {
         echo Html::css($CFG_GLPI["root_doc"] . "/css/palettes/" . $_SESSION["glpipalette"] . ".css");
     }
     // surcharge CSS hack for IE
     echo "<!--[if lte IE 6]>";
     echo Html::css($CFG_GLPI["root_doc"] . "/css/styles_ie.css");
     echo "<![endif]-->";
     echo Html::css($CFG_GLPI["root_doc"] . "/css/print.css", array('media' => 'print'));
     echo "<link rel='shortcut icon' type='images/x-icon' href='" . $CFG_GLPI["root_doc"] . "/pics/favicon.ico' >\n";
     // Add specific css for plugins
     if (isset($PLUGIN_HOOKS['add_css']) && count($PLUGIN_HOOKS['add_css'])) {
         foreach ($PLUGIN_HOOKS["add_css"] as $plugin => $files) {
             if (is_array($files)) {
                 foreach ($files as $file) {
                     if (file_exists(GLPI_ROOT . "/plugins/{$plugin}/{$file}")) {
                         echo Html::css($CFG_GLPI["root_doc"] . "/plugins/{$plugin}/{$file}");
                     }
                 }
             } else {
                 if (file_exists(GLPI_ROOT . "/plugins/{$plugin}/{$files}")) {
                     echo Html::css($CFG_GLPI["root_doc"] . "/plugins/{$plugin}/{$files}");
                 }
             }
         }
     }
     // AJAX library
     if (isset($_SESSION['glpi_use_mode']) && $_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) {
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jquery/js/jquery-1.10.2.js");
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jquery/js/jquery-ui-1.10.4.custom.js");
     } else {
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jquery/js/jquery-1.10.2.min.js");
         echo Html::script($CFG_GLPI["root_doc"] . "/lib/jquery/js/jquery-ui-1.10.4.custom.min.js");
     }
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/tiny_mce/tinymce.min.js");
     // PLugins jquery
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/backtotop/BackToTop.min.jquery.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/select2/select2.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/qtip2/jquery.qtip.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jstree/jquery.jstree.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/rateit/jquery.rateit.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-ui-timepicker-addon/jquery-ui-timepicker-addon.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-file-upload/js/jquery.iframe-transport.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-file-upload/js/jquery.fileupload.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jcrop/jquery.Jcrop.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/imagepaste/jquery.image_paste.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/spectrum-colorpicker/spectrum-min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/jquery-gantt/js/jquery.fn.gantt.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/autogrow/jquery.autogrow-textarea.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/fullcalendar/lib/moment.min.js");
     echo Html::script($CFG_GLPI["root_doc"] . "/lib/jqueryplugins/fullcalendar/fullcalendar.min.js");
//.........这里部分代码省略.........
开发者ID:glpi-project,项目名称:glpi,代码行数:101,代码来源:html.class.php

示例5: showTimeline


//.........这里部分代码省略.........
         if (isset($item_i['begin'])) {
             echo "<span class='planification'>";
             echo Html::convDateTime($item_i["begin"]);
             echo " &rArr; ";
             echo Html::convDateTime($item_i["end"]);
             echo "</span>";
         }
         if (isset($item_i['users_id_tech'])) {
             echo "<div class='users_id_tech'>";
             $user->getFromDB($item_i['users_id_tech']);
             echo "<div class='tooltip_picture_border'>";
             echo "<img class='user_picture' alt=\"" . __s('Picture') . "\" src='" . User::getThumbnailURLForPicture($user->fields['picture']) . "'>";
             echo "</div>";
             echo $user->getLink();
             echo "</div>";
         }
         // show "is_private" icon
         if (isset($item_i['is_private']) && $item_i['is_private']) {
             echo "<div class='private'>" . __('Private') . "</div>";
         }
         echo "</div>";
         // b_right
         if ($item['type'] == 'Document_Item') {
             $filename = $item_i['filename'];
             $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
             echo "<img src='";
             if (empty($filename)) {
                 $filename = $item_i['name'];
             }
             if (file_exists(GLPI_ROOT . "/pics/icones/{$ext}-dist.png")) {
                 echo $CFG_GLPI['root_doc'] . "/pics/icones/{$ext}-dist.png";
             } else {
                 echo "{$pics_url}/file.png";
             }
             echo "' title='file' />&nbsp;";
             echo "<a href='" . $CFG_GLPI['root_doc'] . "/front/document.send.php?docid=" . $item_i['id'] . "&tickets_id=" . $this->getID() . "' target='_blank'>{$filename}";
             if (in_array($ext, array('jpg', 'jpeg', 'png', 'bmp'))) {
                 echo "<div class='timeline_img_preview'>";
                 echo "<img src='" . $CFG_GLPI['root_doc'] . "/front/document.send.php?docid=" . $item_i['id'] . "&tickets_id=" . $this->getID() . "'/>";
                 echo "</div>";
             }
             echo "</a>";
             if (!empty($item_i['mime'])) {
                 echo "&nbsp;(" . $item_i['mime'] . ")";
             }
             echo "<a href='" . $CFG_GLPI['root_doc'] . "/front/document.form.php?id=" . $item_i['id'] . "' class='edit_document' title='" . _sx("button", "Update") . "'>";
             echo "<img src='{$pics_url}/edit.png' /></a>";
             echo "<a href='" . $CFG_GLPI['root_doc'] . "/front/ticket.form.php?delete_document&documents_id=" . $item_i['id'] . "&tickets_id=" . $this->getID() . "' class='delete_document' title='" . _sx("button", "Delete permanently") . "'>";
             echo "<img src='{$pics_url}/delete.png' /></a>";
         }
         echo "</div>";
         //end h_content
         echo "</div>";
         //end  h_info
         $timeline_index++;
     }
     // end foreach timeline
     echo "<div class='break'></div>";
     // recall ticket content (not needed in classic and splitted layout)
     if (!CommonGLPI::isLayoutWithMain()) {
         echo "<div class='h_item middle'>";
         echo "<div class='h_info'>";
         echo "<div class='h_date'>" . Html::convDateTime($this->fields['date']) . "</div>";
         echo "<div class='h_user'>";
         if (isset($item_i['users_id_recipient']) && $item_i['users_id_recipient'] != 0) {
             $user->getFromDB($this->fields['users_id_recipient']);
             echo "<div class='tooltip_picture_border'>";
             $picture = "";
             if (isset($user->fields['picture'])) {
                 $picture = $user->fields['picture'];
             }
             echo "<img class='user_picture' alt=\"" . __s('Picture') . "\" src='" . User::getThumbnailURLForPicture($picture) . "'>";
             echo "</div>";
             echo $user->getLink();
         } else {
             _e("Requester");
         }
         echo "</div>";
         // h_user
         echo "</div>";
         //h_info
         echo "<div class='h_content TicketContent'>";
         echo "<div class='b_right'>" . __("Ticket recall") . "</div>";
         echo "<div class='ticket_title'>";
         echo html_entity_decode($this->fields['name']);
         echo "</div>";
         echo "<div class='ticket_description'>";
         echo Toolbox::unclean_cross_side_scripting_deep(Html::entity_decode_deep($this->fields['content']));
         echo "</div>";
         echo "</div>";
         // h_content TicketContent
         echo "</div>";
         // h_item middle
         echo "<div class='break'></div>";
     }
     // end timeline
     echo "</div>";
     // h_item $user_position
     echo "<script type='text/javascript'>read_more();</script>";
 }
开发者ID:jose-martins,项目名称:glpi,代码行数:101,代码来源:ticket.class.php


注:本文中的CommonGLPI::isLayoutWithMain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。