示例#1
0
        /// <summary> Writes the HTML generated to browse the results of a search directly to the response stream </summary>
        /// <param name="Output"> Stream to which to write the HTML for this subwriter </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        /// <returns> TRUE -- Value indicating if html writer should finish the page immediately after this, or if there are other controls or routines which need to be called first </returns>
        public override bool Write_HTML(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("Search_Results_HtmlSubwriter.Write_HTML", "Rendering HTML");

            // If this skin has top-level navigation suppressed, skip the top tabs
            if (htmlSkin.Suppress_Top_Navigation)
            {
                Output.WriteLine("<br />");
            }
            else
            {
                // Add the main aggrgeation menu here
                MainMenus_Helper_HtmlSubWriter.Add_Aggregation_Search_Results_Menu(Output, currentMode, currentUser, Current_Aggregation, translations, codeManager, false);
            }

            if (resultsStatistics != null)
            {
                if (writeResult == null)
                {
                    Tracer.Add_Trace("Search_Results_HtmlSubwriter.Write_HTML", "Building Result DataSet Writer");
                    writeResult = new PagedResults_HtmlSubwriter(resultsStatistics, pagedResults, codeManager, translations, allItemsTable, currentUser, currentMode, Tracer)
                    {
                        Current_Aggregation = Current_Aggregation, Skin = htmlSkin, Mode = currentMode
                    };
                }
                writeResult.Write_HTML(Output, Tracer);
            }

            return(true);
        }
        /// <summary> Writes the HTML generated to browse the results of a search directly to the response stream </summary>
        /// <param name="Output"> Stream to which to write the HTML for this subwriter </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        /// <returns> TRUE -- Value indicating if html writer should finish the page immediately after this, or if there are other controls or routines which need to be called first </returns>
        public override bool Write_HTML(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("Search_Results_HtmlSubwriter.Write_HTML", "Rendering HTML");

            // If this skin has top-level navigation suppressed, skip the top tabs
            if ((RequestSpecificValues.HTML_Skin.Suppress_Top_Navigation.HasValue) && (RequestSpecificValues.HTML_Skin.Suppress_Top_Navigation.Value))
            {
                Output.WriteLine("<br />");
            }
            else
            {
                // Add the main aggrgeation menu here
                MainMenus_Helper_HtmlSubWriter.Add_Aggregation_Search_Results_Menu(Output, RequestSpecificValues, hierarchyObject, false);
            }

            if (RequestSpecificValues.Results_Statistics != null)
            {
                if (writeResult == null)
                {
                    Tracer.Add_Trace("Search_Results_HtmlSubwriter.Write_HTML", "Building Result DataSet Writer");
                    writeResult = new PagedResults_HtmlSubwriter(RequestSpecificValues, RequestSpecificValues.Results_Statistics, RequestSpecificValues.Paged_Results);
                }
                writeResult.Write_HTML(Output, Tracer);
            }

            return(true);
        }
示例#3
0
        /// <summary> Writes the HTML generated to browse a public folder  directly to the response stream </summary>
        /// <param name="Output"> Stream to which to write the HTML for this subwriter </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        /// <returns> TRUE -- Value indicating if html writer should finish the page immediately after this, or if there are other controls or routines which need to be called first </returns>
        public override bool Write_HTML(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("Public_Folder_HtmlSubwriter.Write_HTML", "Rendering HTML");

            const string publicFolderText = "PUBLIC BOOKSHELF";

            if (RequestSpecificValues.Current_Mode.Language == Web_Language_Enum.French)
            {
            }

            if (RequestSpecificValues.Current_Mode.Language == Web_Language_Enum.Spanish)
            {
            }

            // Add the item views
            Output.WriteLine("<!-- Add the menu -->");
            Output.WriteLine("<div id=\"sbkPfm_MenuBar\" class=\"sbkMenu_Bar\">");
            Output.WriteLine("<ul class=\"sf-menu\">");

            // Get ready to draw the tabs
            string sobek_home_text = RequestSpecificValues.Current_Mode.Instance_Abbreviation + " Home";

            // Add the 'SOBEK HOME' first menu option and suboptions
            RequestSpecificValues.Current_Mode.Mode             = Display_Mode_Enum.Aggregation;
            RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Home;
            RequestSpecificValues.Current_Mode.Home_Type        = Home_Type_Enum.List;
            Output.WriteLine("\t\t<li class=\"sbkMenu_Home\"><a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode) + "\" class=\"sbkMenu_NoPadding\"><img src=\"" + Static_Resources_Gateway.Home_Png + "\" /> <div class=\"sbkMenu_HomeText\">" + sobek_home_text + "</div></a></li>");

            RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Public_Folder;
            Output.WriteLine("\t\t<li class=\"selected-sf-menu-item-link\"><a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode) + "\">" + publicFolderText + "</a></li>");
            Output.WriteLine("\t</ul></div>");

            Output.WriteLine("<!-- Initialize the main user menu -->");
            Output.WriteLine("<script>");
            Output.WriteLine("  jQuery(document).ready(function () {");
            Output.WriteLine("     jQuery('ul.sf-menu').superfish();");
            Output.WriteLine("  });");
            Output.WriteLine("</script>");
            Output.WriteLine();

            Output.WriteLine("<br />");
            Output.WriteLine();

            if ((RequestSpecificValues.Paged_Results != null) && (RequestSpecificValues.Results_Statistics != null))
            {
                if (writeResult == null)
                {
                    Tracer.Add_Trace("Public_Folder_HtmlSubwriter.Write_HTML", "Building Result DataSet Writer");
                    writeResult = new PagedResults_HtmlSubwriter(RequestSpecificValues, RequestSpecificValues.Results_Statistics, RequestSpecificValues.Paged_Results)
                    {
                        Browse_Title       = RequestSpecificValues.Public_Folder.FolderName,
                        Folder_Owner_Name  = RequestSpecificValues.Public_Folder.Name,
                        Folder_Owner_Email = RequestSpecificValues.Public_Folder.Email
                    };
                }
                writeResult.Write_HTML(Output, Tracer);
            }

            return(true);
        }
示例#4
0
        /// <summary> Add the HTML to be displayed in the search box </summary>
        /// <param name="Output"> Textwriter to write the HTML for this viewer</param>
        /// <param name="Tracer">Trace object keeps a list of each method executed and important milestones in rendering</param>
        public override void Add_Search_Box_HTML(TextWriter Output, Custom_Tracer Tracer)
        {
            if (Tracer != null)
            {
                Tracer.Add_Trace("DataSet_Browse_Info_AggregationViewer.Write_HTML", "Writing HTML from result_dataset_html_subwriter ");
            }

            writeResult.Write_HTML(Output, Tracer);
        }
        /// <summary> Writes the HTML generated to browse a public folder  directly to the response stream </summary>
        /// <param name="Output"> Stream to which to write the HTML for this subwriter </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        /// <returns> TRUE -- Value indicating if html writer should finish the page immediately after this, or if there are other controls or routines which need to be called first </returns>
        public override bool Write_HTML(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("Public_Folder_HtmlSubwriter.Write_HTML", "Rendering HTML");

            const string publicFolderText = "PUBLIC BOOKSHELF";
            string       homeText         = "HOME";

            if (currentMode.Language == Web_Language_Enum.French)
            {
                homeText = "PAGE D'ACCUEIL";
            }

            if (currentMode.Language == Web_Language_Enum.Spanish)
            {
                homeText = "INICIO";
            }

            Output.WriteLine("<div class=\"ViewsBrowsesRow\">");

            currentMode.Mode = Display_Mode_Enum.Aggregation_Home;
            Output.WriteLine("  <a href=\"" + currentMode.Redirect_URL() + "\">" + Unselected_Tab_Start + homeText + Unselected_Tab_End + "</a>");
            currentMode.Mode = Display_Mode_Enum.Public_Folder;

            Output.WriteLine("  " + Selected_Tab_Start + publicFolderText + Selected_Tab_End);
            Output.WriteLine("</div>");
            Output.WriteLine();

            if ((pagedResults != null) && (resultsStatistics != null))
            {
                if (writeResult == null)
                {
                    Tracer.Add_Trace("Public_Folder_HtmlSubwriter.Write_HTML", "Building Result DataSet Writer");
                    writeResult = new PagedResults_HtmlSubwriter(null, null, codeManager, translations, allItemsTable, currentUser, currentMode, Tracer)
                    {
                        Hierarchy_Object   = Hierarchy_Object,
                        Skin               = htmlSkin,
                        Mode               = currentMode,
                        Browse_Title       = publicFolder.FolderName,
                        Folder_Owner_Name  = publicFolder.Name,
                        Folder_Owner_Email = publicFolder.Email
                    };
                }
                writeResult.Write_HTML(Output, Tracer);
            }

            return(true);
        }
        /// <summary> Writes the HTML generated to browse the results of a search directly to the response stream </summary>
        /// <param name="Output"> Stream to which to write the HTML for this subwriter </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        /// <returns> TRUE -- Value indicating if html writer should finish the page immediately after this, or if there are other controls or routines which need to be called first </returns>
        public override bool Write_HTML(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("Search_Results_HtmlSubwriter.Write_HTML", "Rendering HTML");

            // If this skin has top-level navigation suppressed, skip the top tabs
            if (htmlSkin.Suppress_Top_Navigation)
            {
                Output.WriteLine("<br />");
            }
            else
            {
                string refine_search = "MODIFY YOUR SEARCH";
                string new_search    = "NEW SEARCH";
                string home_text     = "HOME";

                if (currentMode.Language == Web_Language_Enum.French)
                {
                    refine_search = "MODIFIER LA RECHERCHE";
                    new_search    = "RELANCEZ LA RECHERCHE";
                    home_text     = "PAGE D'ACCUEIL";
                }

                if (currentMode.Language == Web_Language_Enum.Spanish)
                {
                    refine_search = "REDUZCA SU BÚSQUEDA";
                    new_search    = "BÚSQUEDA NUEVA";
                    home_text     = "INICIO";
                }

                // Add the reference to the script for sorting
                Output.WriteLine("<div class=\"ViewsBrowsesRow\">");

                string           fields            = currentMode.Search_Fields;
                string           search_string     = currentMode.Search_String;
                Search_Type_Enum currentSearchType = currentMode.Search_Type;
                currentMode.Mode = Display_Mode_Enum.Search;
                string refine_redirect_url;
                if ((currentMode.Search_Type == Search_Type_Enum.Basic) || (currentMode.Search_Type == Search_Type_Enum.Newspaper) || (currentMode.Search_Type == Search_Type_Enum.Advanced))
                {
                    currentMode.Search_Type = Search_Type_Enum.Advanced;
                    refine_redirect_url     = currentMode.Redirect_URL();
                    if (refine_redirect_url.IndexOf("?") > 0)
                    {
                        refine_redirect_url = refine_redirect_url + "&t=" + System.Web.HttpUtility.UrlEncode(currentMode.Search_String).Replace("%2c", ",") + "&f=" + currentMode.Search_Fields;
                    }
                    else
                    {
                        refine_redirect_url = refine_redirect_url + "?t=" + System.Web.HttpUtility.UrlEncode(currentMode.Search_String).Replace("%2c", ",") + "&f=" + currentMode.Search_Fields;
                    }

                    currentMode.Search_Type = currentSearchType;
                }
                else
                {
                    refine_redirect_url = currentMode.Redirect_URL();
                }

                if (currentMode.Search_Type == Search_Type_Enum.Map)
                {
                    currentMode.Search_String = String.Empty;
                }

                currentMode.Mode = Display_Mode_Enum.Aggregation_Home;
                Output.WriteLine("  <a href=\"" + currentMode.Redirect_URL() + "\">" + Unselected_Tab_Start + home_text + Unselected_Tab_End + "</a>");
                currentMode.Mode = Display_Mode_Enum.Search;



                Output.WriteLine("  <a href=\"" + refine_redirect_url + "\">" + Unselected_Tab_Start + refine_search + Unselected_Tab_End + "</a>");


                currentMode.Search_String = String.Empty;
                currentMode.Search_Fields = String.Empty;
                if (currentMode.Aggregation == ".all")
                {
                    currentMode.Mode        = Display_Mode_Enum.Aggregation_Home;
                    currentMode.Aggregation = "";
                    Output.WriteLine("  <a href=\"" + currentMode.Redirect_URL() + "\">" + Unselected_Tab_Start + new_search + Unselected_Tab_End + "</a>");
                    currentMode.Aggregation = ".all";
                }
                else
                {
                    currentMode.Mode = Display_Mode_Enum.Aggregation_Home;
                    Output.WriteLine("  <a href=\"" + currentMode.Redirect_URL() + "\">" + Unselected_Tab_Start + new_search + Unselected_Tab_End + "</a>");
                }
                currentMode.Mode          = Display_Mode_Enum.Results;
                currentMode.Search_String = search_string;
                currentMode.Search_Fields = fields;
                Output.WriteLine("</div>");
                Output.WriteLine();
            }

            if (resultsStatistics != null)
            {
                if (writeResult == null)
                {
                    Tracer.Add_Trace("Search_Results_HtmlSubwriter.Write_HTML", "Building Result DataSet Writer");
                    writeResult = new PagedResults_HtmlSubwriter(resultsStatistics, pagedResults, codeManager, translations, allItemsTable, currentUser, currentMode, Tracer)
                    {
                        Hierarchy_Object = Hierarchy_Object, Skin = htmlSkin, Mode = currentMode
                    };
                }
                writeResult.Write_HTML(Output, Tracer);
            }

            return(true);
        }
示例#7
0
        /// <summary> Writes the HTML generated to browse a public folder  directly to the response stream </summary>
        /// <param name="Output"> Stream to which to write the HTML for this subwriter </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        /// <returns> TRUE -- Value indicating if html writer should finish the page immediately after this, or if there are other controls or routines which need to be called first </returns>
        public override bool Write_HTML(TextWriter Output, Custom_Tracer Tracer)
        {
            Tracer.Add_Trace("Public_Folder_HtmlSubwriter.Write_HTML", "Rendering HTML");

            const string publicFolderText = "PUBLIC BOOKSHELF";
            string       homeText         = "HOME";

            if (currentMode.Language == Web_Language_Enum.French)
            {
                homeText = "PAGE D'ACCUEIL";
            }

            if (currentMode.Language == Web_Language_Enum.Spanish)
            {
                homeText = "INICIO";
            }

            // Add the item views
            Output.WriteLine("<!-- Add the menu -->");
            Output.WriteLine("<div id=\"sbkPfm_MenuBar\" class=\"sbkMenu_Bar\">");
            Output.WriteLine("<ul class=\"sf-menu\">");

            // Get ready to draw the tabs
            string sobek_home_text = Mode.SobekCM_Instance_Abbreviation + " Home";

            // Add the 'SOBEK HOME' first menu option and suboptions
            Mode.Mode             = Display_Mode_Enum.Aggregation;
            Mode.Aggregation_Type = Aggregation_Type_Enum.Home;
            Mode.Home_Type        = Home_Type_Enum.List;
            Output.WriteLine("\t\t<li class=\"sbkMenu_Home\"><a href=\"" + Mode.Redirect_URL() + "\" class=\"sbkMenu_NoPadding\"><img src=\"" + Mode.Default_Images_URL + "home.png\" /> <div class=\"sbkMenu_HomeText\">" + sobek_home_text + "</div></a></li>");

            Mode.Mode = Display_Mode_Enum.Public_Folder;
            Output.WriteLine("\t\t<li class=\"selected-sf-menu-item-link\"><a href=\"" + Mode.Redirect_URL() + "\">" + publicFolderText + "</a></li>");
            Output.WriteLine("\t</ul></div>");

            Output.WriteLine("<!-- Initialize the main user menu -->");
            Output.WriteLine("<script>");
            Output.WriteLine("  jQuery(document).ready(function () {");
            Output.WriteLine("     jQuery('ul.sf-menu').superfish();");
            Output.WriteLine("  });");
            Output.WriteLine("</script>");
            Output.WriteLine();

            Output.WriteLine("<br />");
            Output.WriteLine();

            if ((pagedResults != null) && (resultsStatistics != null))
            {
                if (writeResult == null)
                {
                    Tracer.Add_Trace("Public_Folder_HtmlSubwriter.Write_HTML", "Building Result DataSet Writer");
                    writeResult = new PagedResults_HtmlSubwriter(null, null, codeManager, translations, allItemsTable, currentUser, currentMode, Tracer)
                    {
                        Current_Aggregation = Current_Aggregation,
                        Skin               = htmlSkin,
                        Mode               = currentMode,
                        Browse_Title       = publicFolder.FolderName,
                        Folder_Owner_Name  = publicFolder.Name,
                        Folder_Owner_Email = publicFolder.Email
                    };
                }
                writeResult.Write_HTML(Output, Tracer);
            }

            return(true);
        }