diff options
author | ivan <ivan> | 2009-07-08 11:12:46 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-07-08 11:12:46 +0000 |
commit | 70569273833d91085c6c562865a78a08ddde49a1 (patch) | |
tree | ef853bbd0cf52b644d124df7286582d8a2bda3d9 /rt | |
parent | 0cc20c3d66e50d640422c2d587d97ddf7768493b (diff) |
borg RT menus, RT#1169
Diffstat (limited to 'rt')
-rw-r--r-- | rt/FREESIDE_MODIFIED | 3 | ||||
-rw-r--r-- | rt/html/Elements/Header | 143 | ||||
-rw-r--r-- | rt/html/Elements/PageLayout | 31 | ||||
-rw-r--r-- | rt/html/Elements/Tabs | 17 | ||||
-rw-r--r-- | rt/html/Prefs/SearchOptions.html | 2 | ||||
-rw-r--r-- | rt/html/User/Prefs.html | 2 |
6 files changed, 55 insertions, 143 deletions
diff --git a/rt/FREESIDE_MODIFIED b/rt/FREESIDE_MODIFIED index 66917795c..948eeab66 100644 --- a/rt/FREESIDE_MODIFIED +++ b/rt/FREESIDE_MODIFIED @@ -31,4 +31,5 @@ html/Elements/FreesideNewCust html/Elements/FreesideSearch html/Elements/FreesideSvcSearch - + html/User/Prefs.html + html/Prefs/SearchOptions.html diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index bf6fa46fa..ffe653666 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -45,102 +45,16 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<% include( '/elements/header.html', { + 'title' => $Title, + 'head' => $head, + 'nobr' => 1, + }) |n +%> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> - -<title><%$Title%></title> - -% if ($Refresh && $Refresh > 0) { - <meta http-equiv="refresh" content="<%$Refresh%>" /> -% } - -<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png" /> -<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/<% $RT::WebDefaultStylesheet %>/main-squished.css" type="text/css" media="all" /> -<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/print.css" type="text/css" media="print" /> - -% if ( $RSSAutoDiscovery ) { - <link rel="alternate" href="<%$RSSAutoDiscovery%>" type="application/rss+xml" title="RSS RT Search" /> -% } - -<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/util.js"></script> -<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/ahah.js"></script> -<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/titlebox-state.js"></script> -<script type="text/javascript"><!-- - onLoadHook("loadTitleBoxStates()"); -% if ( $Focus ) { - onLoadHook("focusElementById('<% $Focus %>')"); -% } -% if ( $onload ) { - onLoadHook("<% $onload |n %>"); -% } ---></script> - -<& /Elements/Callback, _CallbackName => 'Head', %ARGS &> - -</head> - <body NOTBACKGROUND="<% $RT::URI::freeside::URL %>/images/background-cheat.png" - STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0" - <% $id && qq[ id="comp-$id"] |n %> - > - -% if ($ShowBar) { - -<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" STYLE="padding-left:0; padding-right:4"> - <tr> - <td colspan=2 rowspan=2><img border=0 alt="freeside" src="<%$RT::WebImagesURL%>/small-logo.png" width="92" height="62"></td> - <td align="left" rowspan=2><font size=6><% &RT::URI::freeside::FreesideGetConfig('company_name') || 'ExampleCo' %></font></td> - <td align="right" valign="top"> - -<div id="quickbar"> - <div id="quick-personal"> - <span class="hide"><a href="#skipnav"><&|/l&>Skip Menu</&></a> | </span> -% if ($session{'CurrentUser'}->Name) { - <&|/l, "<span>".$session{'CurrentUser'}->Name."</span>" &>Logged in as [_1]</&> -% if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) { - | <a href="<%$RT::WebPath%><%$Prefs%>"><&|/l&>Preferences</&></a> -% } -% } else { - <&|/l&>Not logged in.</&> -% } - <& /Elements/Callback, %ARGS &> -% unless (!$session{'CurrentUser'}->Name -% or ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth)) { - | <a href="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL ? "?URL=".$URL : ''%>"><&|/l&>Logout</&></a> -% } - </div> -% } - - </td> - - </tr> - <tr> - - <td align=right valign=bottom> - <table> - <tr> - <td align=right> - <FONT SIZE="-3"> - <A HREF="http://www.sisd.com/freeside">Freeside</A> v<% &RT::URI::freeside::FreesideVersion() %><BR> - <A HREF="<% FS::Conf->new->config('support-key') ? "http://www.sisd.com/mediawiki/index.php/Supported:Documentation" : "http://www.sisd.com/mediawiki/index.php/Freeside:1.9:Documentation" %>">Documentation</A><BR> - </FONT> - </td> - <td bgcolor=#000000></td> - <td align=left> - <FONT SIZE="-3"> - <A HREF="http://www.bestpractical.com/rt">RT</A> v<% $RT::VERSION %><BR> - <A HREF="http://wiki.bestpractical.com/">Documentation</A><BR> - </FONT> - </td> - - </tr> - </table> - </td> - - </tr> -</table> +%# if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) { +%# | <a href="<%$RT::WebPath%><%$Prefs%>"><&|/l&>Preferences</&></a> +%# } <%INIT> $r->headers_out->{'Pragma'} = 'no-cache'; @@ -155,6 +69,45 @@ $id =~ s|\.html$||g; $id =~ s|index$||g if $id ne 'index'; $id =~ s|-$||g; + +my $head = ''; + +if ($Refresh && $Refresh > 0) { + $head .= '<meta http-equiv="refresh" content="$Refresh" />'; +} + +$head .= <<END; +<link rel="shortcut icon" href="$RT::WebImagesURL/favicon.png" type="image/png" /> +<link rel="stylesheet" href="$RT::WebPath/NoAuth/css/$RT::WebDefaultStylesheet/main-squished.css" type="text/css" media="all" /> +<link rel="stylesheet" href="RT::WebPath/NoAuth/css/print.css" type="text/css" media="print" /> +END + +if ( $RSSAutoDiscovery ) { + $head .= qq(<link rel="alternate" href="$RSSAutoDiscovery" type="application/rss+xml" title="RSS RT Search" />); +} + +$head .= <<END; +<script type="text/javascript" src="$RT::WebPath/NoAuth/js/util.js"></script> +<script type="text/javascript" src="$RT::WebPath/NoAuth/js/ahah.js"></script> +<script type="text/javascript" src="$RT::WebPath/NoAuth/js/titlebox-state.js"></script> +<script type="text/javascript"><!-- + onLoadHook("loadTitleBoxStates()"); +END + +if ( $Focus ) { + $head .= onLoadHook("focusElementById('$Focus')"); +} +if ( $onload ) { + $head .= onLoadHook("$onload"); +} + +$head .= '--></script>'; + +$head .= $m->scomp( '/Elements/Callback', _CallbackName => 'Head', %ARGS ); + +my $etc = ''; +$etc .= qq[ id="comp-$id"] if $id; + </%INIT> <%ARGS> diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout index b9fd31f71..6a392270c 100644 --- a/rt/html/Elements/PageLayout +++ b/rt/html/Elements/PageLayout @@ -45,44 +45,19 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - -<table class="black" border=0 cellspacing=0 cellpadding=0 width="100%"> -<tr> - <TD colspan=5 WIDTH="100%" STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<% $RT::URI::freeside::URL %>/images/black-gradient.png" HEIGHT="13" WIDTH="100%"></TD> -</tr> -<tr> - - <div id="topactions"> -% my $notfirst = 0; foreach my $action (sort keys %{$topactions}) { - <span class="topaction"> - <td class="blackright" ALIGN="right" VALIGN="center"> -% $m->out($topactions->{"$action"}->{'html'}); - </td> - </span> -% } - </div> - -</tr> -</table> - -%# End of div#quickbar from /Elements/Header -</div> - <table border=0 cellspacing=0 cellpadding=0 width="100%" height="100%"> - <TR> - <TD STYLE="padding:0" WIDTH="100%"><IMG BORDER=0 ALT="" SRC="<% $RT::URI::freeside::URL %>/images/black-gray-top.png" HEIGHT="13" WIDTH="100%"></TD> - </TR> <TR HEIGHT="100%"> <TD> -% if ( $show_menu ) { +% if (0) { ##FREESIDE MENUS INSTEAD## if ( $show_menu ) { +%# if ( $show_menu ) { <div id="nav"> <& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &> </div> % } <div id="header"> - <h1><%$title%></h1> +%#already shown <h1><%$title%></h1> % my $sep = 0; % my $postsep = 0; diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs index 9d1eea602..36ecfa5a6 100644 --- a/rt/html/Elements/Tabs +++ b/rt/html/Elements/Tabs @@ -59,20 +59,6 @@ <a name="skipnav" id="skipnav" accesskey="8"></a> <%INIT> my $action; -my $basetopactions = { -# A => { html => $m->scomp('/Elements/CreateTicket') -# }, - A => { html => $m->scomp('/Elements/FreesideNewCust') - }, - B => { html => $m->scomp('/Elements/FreesideSearch') - }, - C => { html => $m->scomp('/Elements/FreesideInvoiceSearch') - }, - D => { html => $m->scomp('/Elements/FreesideSvcSearch') - }, - E => { html => $m->scomp('/Elements/SimpleSearch') - } - }; my $basetabs = { ' A'=> { title => 'Billing Main', path => &RT::URI::freeside::FreesideURL(), @@ -112,9 +98,6 @@ if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', if (!defined $toptabs) { $toptabs = $basetabs; } -if (!defined $topactions) { - $topactions = $basetopactions; -} require RT::URI::freeside; diff --git a/rt/html/Prefs/SearchOptions.html b/rt/html/Prefs/SearchOptions.html index 7cc71b0cd..fd292d8eb 100644 --- a/rt/html/Prefs/SearchOptions.html +++ b/rt/html/Prefs/SearchOptions.html @@ -46,7 +46,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/Header, Title => loc("Search Preferences") &> +<& /Elements/Header, Title => loc("Ticketing Search Preferences") &> <& /User/Elements/Tabs, current_tab => "Prefs/SearchOptions.html", Title => loc("Search Preferences") diff --git a/rt/html/User/Prefs.html b/rt/html/User/Prefs.html index 8c6d5f18e..bb38760da 100644 --- a/rt/html/User/Prefs.html +++ b/rt/html/User/Prefs.html @@ -45,7 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/Header, Title=>loc("Preferences") &> +<& /Elements/Header, Title=>loc("Ticketing Preferences") &> <& /User/Elements/Tabs, current_tab => 'User/Prefs.html', Title=>loc("Preferences") &> |