public override void Write_ItemNavForm_Opening(TextWriter Output, Custom_Tracer Tracer)
{
Tracer.Add_Trace("Item_HtmlSubwriter.Write_ItemNavForm_Opening", "Start the left navigational bar");
// Add the divs for loading the pop-up forms
Output.WriteLine("<!-- Place holders for pop-up forms which load dynamically if required -->");
Output.WriteLine("<div class=\"print_popup_div\" id=\"form_print\" style=\"display:none;\"></div>");
Output.WriteLine("<div class=\"email_popup_div\" id=\"form_email\" style=\"display:none;\"></div>");
Output.WriteLine("<div class=\"add_popup_div\" id=\"add_item_form\" style=\"display:none;\"></div>");
Output.WriteLine("<div class=\"share_popup_div\" id=\"share_form\" style=\"display:none;\"></div>");
Output.WriteLine();
if (ShouldLeftNavigationBarBeShown)
{
// Show the entire item viewer in a presentation table. Tried using divs, but continued to have problems
// especially with smaller screens
Output.WriteLine("<!-- Presentation table to enforce layout -->");
Output.WriteLine("<table role=\"presentation\" id=\"sbkIsw_PresentationTable\">");
Output.WriteLine("<tr style=\"vertical-align:top;\">");
if (pageViewerBehaviors.Contains(HtmlSubwriter_Behaviors_Enum.Item_Subwriter_Requires_Left_Navigation_Bar) || showToc)
{
Output.WriteLine("<td id=\"sbkIsw_LeftnavbarTd_hack\">");
Output.WriteLine("<!-- Begin the left navigational bar -->");
Output.WriteLine("<nav id=\"sbkIsw_Leftnavbar_hack\" role=\"complementary\">");
}
else
{
Output.WriteLine("<td id=\"sbkIsw_LeftnavbarTd\">");
Output.WriteLine("<!-- Begin the left navigational bar -->");
Output.WriteLine("<nav id=\"sbkIsw_Leftnavbar\" role=\"complementary\">");
}
// Start the item viewer
//// Compute the URL options which may be needed
//string url_options = currentMode.URL_Options();
//string urlOptions1 = String.Empty;
//string urlOptions2 = String.Empty;
//if (url_options.Length > 0)
//{
// urlOptions1 = "?" + url_options;
// urlOptions2 = "&" + url_options;
//}
//// Show search results if there is a saved result
//if (searchResultsCount > 0)
//{
// Output.WriteLine("\t<ul class=\"SobekNavBarMenu\">");
// Output.WriteLine(currentMode.Text_Search.Length > 0
// ? "\t\t<li class=\"SobekNavBarHeader\">MATCHING PAGES</li>"
// : "\t\t<li class=\"SobekNavBarHeader\">MATCHING TILES</li>");
// foreach (string thisMatch in searchResultsString)
// {
// Output.WriteLine("\t\t<li>" + thisMatch.Replace("<%URLOPTS%>", url_options).Replace("<%?URLOPTS%>", urlOptions1).Replace("<%&URLOPTS%>", urlOptions2) + "</li>");
// }
// Output.WriteLine("\t</ul>");
// Output.WriteLine();
//}
// Provide way to expand TOC
if ((!showToc) && (currentItem.Images_TOC != null ) && ( currentItem.Images_TOC.Count > 0 ))
{
string show_toc_text = "SHOW TABLE OF CONTENTS";
if (RequestSpecificValues.Current_Mode.Language == Web_Language_Enum.French)
{
show_toc_text = "VOIR L'INDEX";
}
if (RequestSpecificValues.Current_Mode.Language == Web_Language_Enum.Spanish)
{
show_toc_text = "MOSTRAR INDICE";
}
Output.WriteLine("\t<div class=\"sbkIsw_ShowTocRow\">");
string redirect_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode).Replace("&", "&");
if (redirect_url.IndexOf("?") < 0)
redirect_url = redirect_url + "?toc=y";
else
redirect_url = redirect_url + "&toc=y";
Output.WriteLine("\t\t<div class=\"sbkIsw_DownTOC\"><a href=\"" + redirect_url + "\">" + show_toc_text + "<img src=\"" + Static_Resources_Gateway.Button_Down_Arrow_Png + "\" alt=\"\" /></a></div>");
// Output.WriteLine("\t\t<a href=\"" + redirect_url + "\">" + show_toc_text + "<div class=\"downarrow\"></div></a>");
Output.WriteLine("\t</div>");
}
// Allow the item/page viewer to show anything in the left navigational menu
if (pageViewer != null)
pageViewer.Write_Left_Nav_Menu_Section(Output, Tracer);
}
}