Esempio n. 1
0
        /// <summary> Add controls to the placeholder below the search box </summary>
        /// <param name="placeHolder"> Placeholder into which to place controls to be rendered</param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering</param>
        /// <remarks> This adds the results from the dataset into the space below the search box.<br /><br />
        /// This creates and uses a <see cref="PagedResults_HtmlSubwriter"/> to write the results. </remarks>
        public override void Add_Secondary_Controls(PlaceHolder placeHolder, Custom_Tracer Tracer)
        {
            if (Tracer != null)
            {
                Tracer.Add_Trace("DataSet_Browse_Info_AggregationViewer.Add_Secondary_Controls", "Adding HTML");
            }

            writeResult = new PagedResults_HtmlSubwriter(resultsStatistics, pagedResults, codeManager, translator, itemList, currentUser, currentMode, Tracer)
            {
                Skin             = htmlSkin,
                Mode             = currentMode,
                Hierarchy_Object = currentCollection,
                Browse_Title     = browseObject.Get_Label(currentMode.Language)
            };
            writeResult.Add_Controls(placeHolder, Tracer);


            if (resultsStatistics.Total_Items > 0)
            {
                Literal literal = new Literal
                {
                    Text = "<div class=\"SobekResultsNavBar\">" + Environment.NewLine + "  " + writeResult.Buttons + "" + Environment.NewLine + "  " + writeResult.Showing_Text + Environment.NewLine + "</div>" + Environment.NewLine + "<br />" + Environment.NewLine
                };
                placeHolder.Controls.Add(literal);
            }
        }
Esempio n. 2
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>
        /// <remarks> This adds the title of the static browse or info into the box </remarks>
        public override void Add_Search_Box_HTML(TextWriter Output, Custom_Tracer Tracer)
        {
            if (Tracer != null)
            {
                Tracer.Add_Trace("Static_Browse_Info_AggregationViewer.Add_Search_Box_HTML", "Adding HTML");
            }

            Output.WriteLine("  <h1>" + browseObject.Get_Label(currentMode.Language) + "</h1>");
        }
        /// <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>
        /// <remarks> This adds the title of the static browse or info into the box </remarks>
        public override void Add_Search_Box_HTML(TextWriter Output, Custom_Tracer Tracer)
        {
            if (Tracer != null)
            {
                Tracer.Add_Trace("Metadata_Browse_AggregationViewer.Add_Search_Box_HTML", "Adding HTML");
            }

            if ((browseObject != null) && (browseObject.Source == Item_Aggregation_Browse_Info.Source_Type.Static_HTML))
            {
                Output.WriteLine("  <h1>" + browseObject.Get_Label(currentMode.Language) + "</h1>");
            }
            else
            {
                if ((results != null) && (currentMode.Info_Browse_Mode.Length > 0))
                {
                    Output.WriteLine("  <h1>Browse by " + translator.Get_Translation(currentMode.Info_Browse_Mode, currentMode.Language) + "</h1>");
                }
                else
                {
                    Output.WriteLine("  <h1>" + translator.Get_Translation("Browse by...", currentMode.Language) + "</h1>");
                }
            }
        }