summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0c3016a)
raw | patch | inline | side by side (parent: 0c3016a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Mar 2010 10:56:01 +0000 (10:56 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Mar 2010 10:56:01 +0000 (10:56 +0000) |
-Encreases readability -> let us find misplaced <tag> much faster.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15792 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15792 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/ihtml/themes/modern/framework.tpl b/gosa-core/ihtml/themes/modern/framework.tpl
index ad40fc5bedc1df008d68d43f31904a9e107fae76..70f319002e0a1a9c350f7603bd367afb79f79df5 100644 (file)
- <!-- Headline -->
<body>
- {$php_errors}
-
- <!-- Title bar including logout button -->
- <div class='title-bar'>
- <ul>
- <li>{$logo}</li>
- <li class='right table-wrapper'>
- <div class='logout-label'>
- <form action='logout.php' name='logoutframe' method='post' enctype='multipart/form-data'>
- <input type='submit' name='log-out' id='log-out' title='Log out' value=''>
- <input type='hidden' name='forcedlogout' value='1'>
- <input type="hidden" name="php_c_check" value="1">
- </form>
+ {$php_errors}
+ <div class='title-bar'>
+ <ul>
+ <li>{$logo}</li>
+ <li class='right table-wrapper'>
+ <div class='logout-label'>
+ <form action='logout.php' name='logoutframe' method='post' enctype='multipart/form-data'>
+ <input type='submit' name='log-out' id='log-out' title='Log out' value=''>
+ <input type='hidden' name='forcedlogout' value='1'>
+ <input type="hidden" name="php_c_check" value="1">
+ </form>
+ </div>
+ </li>
+ <li class='right table-wrapper'>
+ <div class='logged-in-label'>{$loggedin}</div>
+ </li>
+ </ul>
+ </div>
+ <form action='main.php{$plug}' name='mainform' method='post' enctype='multipart/form-data'>
+ {$menu}
+ {$msg_dialogs}
+ <div class='plugin-area'>
+ {$pathMenu}
+ {$contents}
</div>
- </li>
- <li class='right table-wrapper'>
- <div class='logged-in-label'>{$loggedin}</div>
- </li>
- </ul>
- </div>
- <!-- {$go_home} -->
-
- <form action='main.php{$plug}' name='mainform' method='post' enctype='multipart/form-data'>
- {$menu}
-
-
- {$msg_dialogs}
- <!-- Plugin area -->
- <div class='plugin-area'>
- {$pathMenu}
- {$contents}
- </div>
+ {if $channel != ""}
+ <input type="hidden" name="_channel_" value="{$channel}">
+ {/if}
- {if $channel != ""}
- <input type="hidden" name="_channel_" value="{$channel}">
- {/if}
- {$errors}
- {$focus}
- <input type="hidden" name="php_c_check" value="1">
- </form>
- </body>
+ {$errors}
+ {$focus}
+ <input type="hidden" name="php_c_check" value="1">
+ </form>
+ </body>
</html>
index c40aabcccc39e37fe843a7e89a88bffacbb415db..3edac053a2764a8df4d8fd63de79c56515c34e1f 100644 (file)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/transitional.dtd">
<html>
-
-<head>
- <title>{if isset($title)}{$title}{else}GOsa{/if}</title>
-
- <meta name="generator" content="my hands">
- <meta name="description" content="GOsa - Login">
- <meta name="author" lang="de" content="Cajus Pollmeier">
-
- <meta http-equiv="Expires" content="Mon, 26 Jul 1997 05:00:00 GMT">
- <meta http-equiv="Last-Modified" content="{$date} GMT">
- <meta http-equiv="Cache-Control" content="no-cache">
- <meta http-equiv="Pragma" content="no-cache">
- <meta http-equiv="Cache-Control" content="post-check=0, pre-check=0">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-
- <style type="text/css">@import url('themes/modern/style.css');</style>
- <link rel="stylesheet" type="text/css" href="themes/modern/printer.css" media="print">
-
- <!--[if IE]>
- <style type="text/css">
- div.listContainer { height: 121px; overflow-x:hidden; overflow-y:auto; }
- </style>
- <![endif]-->
-
- <!-- Include correct theme icon sets -->
- <style type="text/css">
- div.img{
- background-image:url(themes/modern/img.png);
- }
-
- div.img div {
- background-image:url(themes/modern/img.png);
- }
- </style>
-
- <link rel="shortcut icon" href="favicon.ico">
-
+ <head>
+ <title>{if isset($title)}{$title}{else}GOsa{/if}</title>
+ <meta name="generator" content="my hands">
+ <meta name="description" content="GOsa - Login">
+ <meta name="author" lang="de" content="Cajus Pollmeier">
+ <meta http-equiv="Expires" content="Mon, 26 Jul 1997 05:00:00 GMT">
+ <meta http-equiv="Last-Modified" content="{$date} GMT">
+ <meta http-equiv="Cache-Control" content="no-cache">
+ <meta http-equiv="Pragma" content="no-cache">
+ <meta http-equiv="Cache-Control" content="post-check=0, pre-check=0">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+ <style type="text/css">@import url('themes/modern/style.css');</style>
+ <link rel="stylesheet" type="text/css" href="themes/modern/printer.css" media="print">
+
+ <!--[if IE]>
+ <style type="text/css">
+ div.listContainer { height: 121px; overflow-x:hidden; overflow-y:auto; }
+ </style>
+ <![endif]-->
+
+ <!-- Include correct theme icon sets -->
+ <style type="text/css">
+ div.img{
+ background-image:url(themes/modern/img.png);
+ }
+ div.img div {
+ background-image:url(themes/modern/img.png);
+ }
+ </style>
+ <link rel="shortcut icon" href="favicon.ico">
{if $iePngWorkaround}
- <script language="javascript" src="include/png.js" type="text/javascript"></script>
+ <script language="javascript" src="include/png.js" type="text/javascript"></script>
{/if}
- <script language="javascript" src="include/prototype.js" type="text/javascript"></script>
- <script language="javascript" src="include/gosa.js" type="text/javascript"></script>
+ <script language="javascript" src="include/prototype.js" type="text/javascript"></script>
+ <script language="javascript" src="include/gosa.js" type="text/javascript"></script>
{if $usePrototype == 'true'}
- <script language="javascript" src="include/scriptaculous.js" type="text/javascript"></script>
- <script language="javascript" src="include/effects.js" type="text/javascript"></script>
- <script language="javascript" src="include/dragdrop.js" type="text/javascript"></script>
- <script language="javascript" src="include/controls.js" type="text/javascript"></script>
- <script language="javascript" src="include/pulldown.js" type="text/javascript"></script>
- <script language="javascript" src="include/datepicker.js" type="text/javascript"></script>
+ <script language="javascript" src="include/scriptaculous.js" type="text/javascript"></script>
+ <script language="javascript" src="include/effects.js" type="text/javascript"></script>
+ <script language="javascript" src="include/dragdrop.js" type="text/javascript"></script>
+ <script language="javascript" src="include/controls.js" type="text/javascript"></script>
+ <script language="javascript" src="include/pulldown.js" type="text/javascript"></script>
+ <script language="javascript" src="include/datepicker.js" type="text/javascript"></script>
{/if}
-</head>
-
+ </head>
index b0ce5a2cb548a372e1085a617171a6a29e776e32..9166656b5df3bd153c4477e2ecf7404fcf0cdb94 100644 (file)
*/
function gen_menu()
{
- if ($this->menu == ""){
+ if (1 || $this->menu == ""){
$cfg= $this->config->data['MENU'];
- $menu = "\n<div class='navigation'>";
+ $menu = "\n <div class='navigation'>";
foreach ($cfg as $headline => $plug){
if(!count($plug)) continue;
- $menu.= "\n<div class='menu'>";
- $menu.= "\n <ul>";
- $menu.= "\n <li class='menu-header'>"._($headline)."</li>";
+ $menu.= "\n <div class='menu'>";
+ $menu.= "\n <ul>";
+ $menu.= "\n <li class='menu-header'>"._($headline)."</li>";
$id = 0;
foreach ($plug as $info){
list($index, $title, $desc, $icon) = $this->getPlugData($info['CLASS']);
$class= "";
- if($id == count($plug)) $class=" class='menu-last' \n ";
- $menu .= "\n <li id='plugMenuId_{$index}' $class onClick='return openPlugin({$index});'>".$title."</li>";
+ if($id == count($plug)) $class=" class='menu-last' ";
+ $menu .= "\n <li id='plugMenuId_{$index}' $class onClick='return openPlugin({$index});'>".$title."</li>";
}
- $menu.= "\n </ul>";
- $menu.= "\n <div></div>\n";
- $menu.= "\n</div>\n";
- $menu.= "\n<div></div>\n";
- $menu.= "\n<div class='v-spacer'></div>\n";
+ $menu.= "\n </ul>";
+ $menu.= "\n <div></div>";
+ $menu.= "\n </div>\n";
+ $menu.= "\n <div></div>";
+ $menu.= "\n <div class='v-spacer'></div>\n";
}
- $menu.= "\n</div>";
+ $menu.= "\n </div>\n";
$this->menu = $menu;
// Add javascript method to print out warning messages while leaving an unsaved form.
// We do it in here to get the string translated.
- $this->menu .= "
- <script language='javascript' type='text/javascript'>
- function openPlugin(id){
- return question(\""._("You are currently editing a database entry. Do you want to dismiss the changes?")."\",
- \"main.php?plug=\" + id + \"&reset=1\");
- }
- </script>
- ";
+ $this->menu .=
+ "\n <script language='javascript' type='text/javascript'>".
+ "\n function openPlugin(id){".
+ "\n return question(\""._("You are currently editing a database entry. Do you want to dismiss the changes?")."\",".
+ "\n \"main.php?plug=\" + id + \"&reset=1\");".
+ "\n }".
+ "\n </script>\n";
}
// Use javascript to mark the currently selected plugin.
$menu = $this->menu;
if(isset($_GET['plug'])){
- $menu.= "
- <script language='javascript' type='text/javascript'>
- if($('plugMenuId_".$_GET['plug']."')){
- $('plugMenuId_".$_GET['plug']."').className= 'current'
- }
- </script>
- ";
+ $menu.=
+ "\n <script language='javascript' type='text/javascript'>".
+ "\n if($('plugMenuId_".$_GET['plug']."')){".
+ "\n $('plugMenuId_".$_GET['plug']."').className= 'current'".
+ "\n }".
+ "\n </script>\n";
}
// Return the generated/cached gosa menu.
function genPathMenu()
{
- if(empty($this->pathMenu)){
+ if(1 || empty($this->pathMenu)){
$this->pathMenu =
- "\n <div class='plugin-path'>".
- "\n <ul class='path-navigation'>".
- "\n <li class='left right-border' onClick=\"openPlugin('');\">".
- "\n <div class='nav-home'></div>".
- "\n </li>".
- "\n <li class='left'>Welcome to GOsa</li>";
+ "\n <div class='plugin-path'>".
+ "\n <ul class='path-navigation'>".
+ "\n <li class='left right-border' onClick=\"openPlugin('');\">".
+ "\n <div class='nav-home'></div>".
+ "\n </li>".
+ "\n <li class='left'>Welcome to GOsa</li>";
if(isset($this->config->data['PATHMENU'])){
$cfg= &$this->config->data['PATHMENU'];
$rcfg = array_reverse($cfg);
foreach($rcfg as $id => $plug){
list($index, $title, $desc, $icon) = $this->getPlugData($plug['CLASS']);
- $this->pathMenu.= "\n <li class='right left-border' onClick='openPlugin({$index})'>{$title}</li>";
+ $this->pathMenu.= "\n <li class='right left-border' onClick='openPlugin({$index})'>{$title}</li>";
}
}
- $this->pathMenu.= "\n </ul>";
- $this->pathMenu.= "\n </div>";
+ $this->pathMenu.= "\n </ul>";
+ $this->pathMenu.= "\n </div>";
}
return($this->pathMenu);
}
index 36cad26d20b0a41c11096795ffed9b1fe30e7af3..4acf067649f3737517e669a5aa7aa02b940498c3 100644 (file)
foreach ($data as &$tab){
if (!plugin_available($tab['CLASS'])){
+ trigger_error(sprintf("Unknown class '%s'!", $tab['CLASS']));
continue;
}
+ if ($this->current == "") $this->current= $tab['CLASS'];
$this->by_name[$tab['CLASS']]= $tab['NAME'];
$this->read_only |= $this->by_object[$tab['CLASS']]->read_only;
$this->by_object[$tab['CLASS']]->parent= &$this;
$this->by_object[$tab['CLASS']]->set_acl_category($this->acl_category);
-
- /* Initialize current */
- if ($this->current == ""){
- $this->current= $tab['CLASS'];
- }
}
}
function execute()
{
-
-
- echo "Do not render TABS while a sub-dialog is opened!<br>";
-
// Ensure that the currently selected tab is valid.
if(!isset($this->by_name[$this->current])) {
$this->current = key($this->by_name);
$display= $this->by_object[$this->current]->multiple_execute();
}
$tabs= $this->gen_tabs();
-
- $display = "{$tabs}
- <input type='hidden' name='arg' value=''>
- <div class='tab-content'>{$display}
- </div>";
+ $display =
+ "\n {$tabs}".
+ "\n <input type='hidden' name='arg' value=''>".
+ "\n <div class='tab-content'>".
+ "\n {$display}".
+ "\n </div>";
return ($display);
}
function save_object($save_current= FALSE)
{
+
+
+
/* Save last tab */
if ($this->last != ""){
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,
function gen_tabs()
{
+ if($this->by_object[$this->current]->is_modal_dialog()) return("");
+
$display = "\n <div class='tabs'>";
$display.= "\n <ul>";
}
$tabClass = ($this->current == $class) ? "class='current'" :"";
$onClick = "document.mainform.arg.value='{$class}'; document.mainform.submit();";
- $display.= "<li {$tabClass} onClick=\"{$onClick}\"><a href='#'>$title{$notify}</a></li>";
+ $display.= "\n <li {$tabClass} onClick=\"{$onClick}\"><a href='#'>$title{$notify}</a></li>";
}
$display.="\n </ul>";
$display.="\n </div>";