private static string Menu_HTML_Helper(string SkinCode, Search_Type_Enum Search_Type, string Display_Text, Navigation_Object Current_Mode) { if (Current_Mode.Is_Robot) { if ((Current_Mode.Mode == Display_Mode_Enum.Search) && (Current_Mode.Search_Type == Search_Type)) { return("<li class=\"selected-sf-menu-item-link\"><a href=\"\">" + Display_Text + "</a></li>" + Environment.NewLine); } else { return("<li><a href=\"\">" + Display_Text + "</a></li>" + Environment.NewLine); } } if ((Current_Mode.Mode == Display_Mode_Enum.Search) && (Current_Mode.Search_Type == Search_Type)) { return("<li class=\"selected-sf-menu-item-link\"><a href=\"" + UrlWriterHelper.Redirect_URL(Current_Mode) + "\">" + Display_Text + "</a></li>" + Environment.NewLine); } // else... Search_Type_Enum currentSearchType2 = Current_Mode.Search_Type; Display_Mode_Enum currentMode2 = Current_Mode.Mode; Current_Mode.Search_Type = Search_Type; Current_Mode.Mode = Display_Mode_Enum.Search; string toReturn2 = "<li><a href=\"" + UrlWriterHelper.Redirect_URL(Current_Mode) + "\">" + Display_Text + "</a></li>" + Environment.NewLine; Current_Mode.Search_Type = currentSearchType2; Current_Mode.Mode = currentMode2; return(toReturn2); }
/// <summary> Gets the menu items related to this viewer that should be included on the main item (digital resource) menu </summary> /// <param name="CurrentItem"> Digital resource object, which can be used to ensure if and how this viewer should appear /// in the main item (digital resource) menu </param> /// <param name="CurrentUser"> Current user, who may or may not be logged on </param> /// <param name="CurrentRequest"> Information about the current request </param> /// <param name="MenuItems"> List of menu items, to which this method may add one or more menu items </param> /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param> public void Add_Menu_items(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, List <Item_MenuItem> MenuItems, bool IpRestricted) { // Get the URL for this string previous_code = CurrentRequest.ViewerCode; CurrentRequest.ViewerCode = ViewerCode; string url = UrlWriterHelper.Redirect_URL(CurrentRequest); CurrentRequest.ViewerCode = previous_code; // Start with the default label on the menu string label = "Page Turner"; // Allow the label to be implemented for this viewer BriefItem_BehaviorViewer thisViewerInfo = CurrentItem.Behaviors.Get_Viewer(ViewerCode); // If this is found, and has a custom label, use that if ((thisViewerInfo != null) && (!String.IsNullOrWhiteSpace(thisViewerInfo.Label))) { label = thisViewerInfo.Label; } // Add the item menu information Item_MenuItem menuItem = new Item_MenuItem(label, null, null, url, ViewerCode); MenuItems.Add(menuItem); }
/// <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); }
/// <summary> Gets the menu items related to this viewer that should be included on the main item (digital resource) menu </summary> /// <param name="CurrentItem"> Digital resource object, which can be used to ensure if and how this viewer should appear /// in the main item (digital resource) menu </param> /// <param name="CurrentUser"> Current user, who may or may not be logged on </param> /// <param name="CurrentRequest"> Information about the current request </param> /// <param name="MenuItems"> List of menu items, to which this method may add one or more menu items </param> /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param> public void Add_Menu_items(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, List <Item_MenuItem> MenuItems, bool IpRestricted) { // Get the URL for this string previous_code = CurrentRequest.ViewerCode; CurrentRequest.ViewerCode = ViewerCode; string url = UrlWriterHelper.Redirect_URL(CurrentRequest); CurrentRequest.ViewerCode = previous_code; // Allow the label to be implemented for this viewer BriefItem_BehaviorViewer thisViewerInfo = CurrentItem.Behaviors.Get_Viewer(ViewerCode); // If this is null, or no label, use the default if ((thisViewerInfo == null) || (String.IsNullOrWhiteSpace(thisViewerInfo.Label))) { // Add the item menu information using the default label Item_MenuItem menuItem = new Item_MenuItem("Video", null, null, url, ViewerCode); MenuItems.Add(menuItem); } else { // Add the item menu information using the custom level Item_MenuItem menuItem = new Item_MenuItem(thisViewerInfo.Label, null, null, url, ViewerCode); MenuItems.Add(menuItem); } }
private static string Tabs_HTML_Helper(string SkinCode, Search_Type_Enum Search_Type, string Display_Text, Navigation_Object Current_Mode, bool Downward_Tabs) { if (Downward_Tabs) { if ((Current_Mode.Mode == Display_Mode_Enum.Search) && (Current_Mode.Search_Type == Search_Type)) { return("<img src=\"" + Current_Mode.Base_URL + "design/skins/" + SkinCode + "/tabs/cLD_s.gif\" border=\"0\" class=\"tab_image\" alt=\"\" /><span class=\"tab_s\"> " + Display_Text + " </span><img src=\"" + Current_Mode.Base_URL + "design/skins/" + SkinCode + "/tabs/cRD_s.gif\" border=\"0\" class=\"tab_image\" alt=\"\" />" + Environment.NewLine); } Search_Type_Enum currentSearchType = Current_Mode.Search_Type; Display_Mode_Enum currentMode = Current_Mode.Mode; Current_Mode.Search_Type = Search_Type; Current_Mode.Mode = Display_Mode_Enum.Search; string toReturn = "<a href=\"" + UrlWriterHelper.Redirect_URL(Current_Mode) + "\"> " + "<img src=\"" + Current_Mode.Base_URL + "design/skins/" + SkinCode + "/tabs/cLD.gif\" border=\"0\" class=\"tab_image\" alt=\"\" /><span class=\"tab\"> " + Display_Text + " </span><img src=\"" + Current_Mode.Base_URL + "design/skins/" + SkinCode + "/tabs/cRD.gif\" border=\"0\" class=\"tab_image\" alt=\"\" /></a>" + Environment.NewLine; Current_Mode.Search_Type = currentSearchType; Current_Mode.Mode = currentMode; return(toReturn); } if ((Current_Mode.Mode == Display_Mode_Enum.Search) && (Current_Mode.Search_Type == Search_Type)) { return("<img src=\"" + Current_Mode.Base_URL + "design/skins/" + SkinCode + "/tabs/cL_s.gif\" border=\"0\" class=\"tab_image\" alt=\"\" /><span class=\"tab_s\"> " + Display_Text + " </span><img src=\"" + Current_Mode.Base_URL + "design/skins/" + SkinCode + "/tabs/cR_s.gif\" border=\"0\" class=\"tab_image\" alt=\"\" />" + Environment.NewLine); } // else... Search_Type_Enum currentSearchType2 = Current_Mode.Search_Type; Display_Mode_Enum currentMode2 = Current_Mode.Mode; Current_Mode.Search_Type = Search_Type; Current_Mode.Mode = Display_Mode_Enum.Search; string toReturn2 = "<a href=\"" + UrlWriterHelper.Redirect_URL(Current_Mode) + "\"> <img src=\"" + Current_Mode.Base_URL + "design/skins/" + SkinCode + "/tabs/cL.gif\" border=\"0\" class=\"tab_image\" alt=\"\" /><span class=\"tab\"> " + Display_Text + " </span><img src=\"" + Current_Mode.Base_URL + "design/skins/" + SkinCode + "/tabs/cR.gif\" border=\"0\" class=\"tab_image\" alt=\"\" /> </a>" + Environment.NewLine; Current_Mode.Search_Type = currentSearchType2; Current_Mode.Mode = currentMode2; return(toReturn2); }
/// <summary> Gets the menu items related to this viewer that should be included on the main item (digital resource) menu </summary> /// <param name="CurrentItem"> Digital resource object, which can be used to ensure if and how this viewer should appear /// in the main item (digital resource) menu </param> /// <param name="CurrentUser"> Current user, who may or may not be logged on </param> /// <param name="CurrentRequest"> Information about the current request </param> /// <param name="MenuItems"> List of menu items, to which this method may add one or more menu items </param> /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param> public void Add_Menu_items(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, List <Item_MenuItem> MenuItems, bool IpRestricted) { // Try to get the TEI file name string tei_file = CurrentItem.Behaviors.Get_Setting("TEI.Source_File"); if (tei_file == null) { // Ensure the TEI file really exists return; } // Ensure the TEI file really exists if (!SobekFileSystem.FileExists(CurrentItem, tei_file)) { return; } // Look for the label in the METS structure map string first_label = "TEI"; if (CurrentItem.Downloads != null) { foreach (BriefItem_FileGrouping thisPage in CurrentItem.Downloads) { // Look for a flash file on each page foreach (BriefItem_File thisFile in thisPage.Files) { if (String.Compare(thisFile.Name, tei_file, StringComparison.OrdinalIgnoreCase) == 0) { first_label = thisPage.Label.Replace(".xml", "").Replace(".XML", ""); break; } } } } // Allow the label to be implemented for this viewer from the database as well BriefItem_BehaviorViewer thisViewerInfo = CurrentItem.Behaviors.Get_Viewer(ViewerCode); // If this is found, and has a custom label, use that if ((thisViewerInfo != null) && (!String.IsNullOrWhiteSpace(thisViewerInfo.Label))) { first_label = thisViewerInfo.Label; } // Get the URL for this string previous_code = CurrentRequest.ViewerCode; CurrentRequest.ViewerCode = ViewerCode; string url = UrlWriterHelper.Redirect_URL(CurrentRequest); CurrentRequest.ViewerCode = previous_code; // Add the item menu information Item_MenuItem menuItem = new Item_MenuItem(first_label, null, null, url, ViewerCode); MenuItems.Add(menuItem); }
/// <summary> Constructor for a new instance of the Full_Text_Search_AggregationViewer class </summary> /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param> /// <param name="ViewBag"> Aggregation-specific request information, such as aggregation object and any browse object requested </param> public Full_Text_Search_AggregationViewer(RequestCache RequestSpecificValues, AggregationViewBag ViewBag) : base(RequestSpecificValues, ViewBag) { // Determine the sub text to use const string SUB_CODE = "s="; // Save the search term if (RequestSpecificValues.Current_Mode.Search_String.Length > 0) { textBoxValue = RequestSpecificValues.Current_Mode.Search_String; } // Determine the complete script action name Display_Mode_Enum displayMode = RequestSpecificValues.Current_Mode.Mode; Search_Type_Enum searchType = RequestSpecificValues.Current_Mode.Search_Type; Aggregation_Type_Enum aggrType = RequestSpecificValues.Current_Mode.Aggregation_Type; RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Results; RequestSpecificValues.Current_Mode.Search_Type = Search_Type_Enum.Full_Text; string search_string = RequestSpecificValues.Current_Mode.Search_String; RequestSpecificValues.Current_Mode.Search_String = String.Empty; RequestSpecificValues.Current_Mode.Search_Fields = String.Empty; RequestSpecificValues.Current_Mode.Search_Precision = Search_Precision_Type_Enum.Inflectional_Form; arg2 = String.Empty; arg1 = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); // Get the browse all url, if enabled browse_url = String.Empty; if (ViewBag.Hierarchy_Object.Can_Browse_Items) { RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Aggregation; RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Browse_Info; RequestSpecificValues.Current_Mode.Info_Browse_Mode = "all"; browse_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); } RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Search; if ((!RequestSpecificValues.Current_Mode.Show_Selection_Panel.HasValue) || (!RequestSpecificValues.Current_Mode.Show_Selection_Panel.Value) || (ViewBag.Hierarchy_Object.Children_Count == 0)) { Search_Script_Action = "fulltext_search_sobekcm('" + arg1 + "', '" + browse_url + "');"; } else { Search_Script_Action = "fulltext_select_search_sobekcm('" + arg1 + "', '" + SUB_CODE + "')"; arg2 = SUB_CODE; } RequestSpecificValues.Current_Mode.Mode = displayMode; RequestSpecificValues.Current_Mode.Aggregation_Type = aggrType; RequestSpecificValues.Current_Mode.Search_Type = searchType; RequestSpecificValues.Current_Mode.Search_String = search_string; RequestSpecificValues.Current_Mode.Info_Browse_Mode = String.Empty; }
/// <summary> Constructor for a new instance of the Newspaper_Search_AggregationViewer class </summary> /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param> /// <param name="ViewBag"> Aggregation-specific request information, such as aggregation object and any browse object requested </param> public Newspaper_Search_AggregationViewer(RequestCache RequestSpecificValues, AggregationViewBag ViewBag) : base(RequestSpecificValues, ViewBag) { // Determine the sub text to use const string SUB_CODE = "s="; // Save the search term if (RequestSpecificValues.Current_Mode.Search_String.Length > 0) { textBoxValue = RequestSpecificValues.Current_Mode.Search_String; } // Compute the redirect stem to use string fields = RequestSpecificValues.Current_Mode.Search_Fields; string search_string = RequestSpecificValues.Current_Mode.Search_String; Aggregation_Type_Enum aggrType = RequestSpecificValues.Current_Mode.Aggregation_Type; RequestSpecificValues.Current_Mode.Search_String = String.Empty; RequestSpecificValues.Current_Mode.Search_Fields = String.Empty; RequestSpecificValues.Current_Mode.Home_Type = Home_Type_Enum.List; RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Results; RequestSpecificValues.Current_Mode.Search_Precision = Search_Precision_Type_Enum.Inflectional_Form; string redirect_stem = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode).Replace("&m=hhh", "").Replace("m=hht", "").Replace("&m=lhh", "").Replace("m=lht", ""); // Get the browse all url, if enabled browse_url = String.Empty; if (ViewBag.Hierarchy_Object.Can_Browse_Items) { RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Aggregation; RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Browse_Info; RequestSpecificValues.Current_Mode.Info_Browse_Mode = "all"; browse_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); } RequestSpecificValues.Current_Mode.Search_String = search_string; RequestSpecificValues.Current_Mode.Search_Fields = fields; RequestSpecificValues.Current_Mode.Aggregation_Type = aggrType; RequestSpecificValues.Current_Mode.Info_Browse_Mode = String.Empty; // Write the advanced search box arg2 = String.Empty; arg1 = redirect_stem; if ((ViewBag.Hierarchy_Object.Children_Count > 0) && ((RequestSpecificValues.Current_Mode.Show_Selection_Panel.HasValue) && (RequestSpecificValues.Current_Mode.Show_Selection_Panel.Value))) { Search_Script_Action = "newspaper_select_search_sobekcm('" + arg1 + "', '" + SUB_CODE + "', '" + browse_url + "');"; arg2 = SUB_CODE; } else { Search_Script_Action = "newspaper_search_sobekcm('" + arg1 + "');"; } }
/// <summary> Constructor for a new instance of the Rotating_Highlight_MimeType_AggregationViewer class </summary> /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param> /// <param name="ViewBag"> Aggregation-specific request information, such as aggregation object and any browse object requested </param> public Rotating_Highlight_MimeType_AggregationViewer(RequestCache RequestSpecificValues, AggregationViewBag ViewBag) : base(RequestSpecificValues, ViewBag) { // Determine the sub text to use const string SUB_CODE = "s="; Sharing_Buttons_HTML = String.Empty; // Save the search term if (RequestSpecificValues.Current_Mode.Search_String.Length > 0) { textBoxValue = RequestSpecificValues.Current_Mode.Search_String; } // Determine the complete script action name Display_Mode_Enum displayMode = RequestSpecificValues.Current_Mode.Mode; Aggregation_Type_Enum aggrType = RequestSpecificValues.Current_Mode.Aggregation_Type; Search_Type_Enum searchType = RequestSpecificValues.Current_Mode.Search_Type; RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Results; RequestSpecificValues.Current_Mode.Search_Type = Search_Type_Enum.Basic; RequestSpecificValues.Current_Mode.Search_Precision = Search_Precision_Type_Enum.Inflectional_Form; string search_string = RequestSpecificValues.Current_Mode.Search_String; RequestSpecificValues.Current_Mode.Search_String = String.Empty; RequestSpecificValues.Current_Mode.Search_Fields = String.Empty; arg2 = String.Empty; arg1 = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Aggregation; RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Browse_Info; RequestSpecificValues.Current_Mode.Info_Browse_Mode = "all"; browse_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); RequestSpecificValues.Current_Mode.Info_Browse_Mode = String.Empty; RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Home; if ((!RequestSpecificValues.Current_Mode.Show_Selection_Panel.HasValue) || (!RequestSpecificValues.Current_Mode.Show_Selection_Panel.Value) || (ViewBag.Hierarchy_Object.Children_Count == 0)) { Search_Script_Action = "basic_search_sobekcm('" + arg1 + "', '" + browse_url + "')"; } else { Search_Script_Action = "basic_select_search_sobekcm('" + arg1 + "', '" + SUB_CODE + "')"; arg2 = SUB_CODE; } RequestSpecificValues.Current_Mode.Mode = displayMode; RequestSpecificValues.Current_Mode.Aggregation_Type = aggrType; RequestSpecificValues.Current_Mode.Search_Type = searchType; RequestSpecificValues.Current_Mode.Search_String = search_string; // Get the front banner frontBannerInfo = ViewBag.Hierarchy_Object.FrontBannerObj; }
/// <summary> Insert the HTML for a single street column into the Stringbuilder </summary> /// <param name="streets"> Dataset containig all of the streets linked to this item </param> /// <param name="Output"> Response stream to write directly to </param> /// <param name="startRow"> Row of the set of streets to begin on </param> /// <param name="endRow"> Last row in the set of streets </param> protected internal void Insert_One_Street_Column(TextWriter Output, Map_Streets_DataSet streets, int startRow, int endRow) { // Declare some variables for looping string lastStreetName = "%"; // Start the table for this row Output.WriteLine("\t\t\t<table width=\"100%\"> <!-- Table to display a single column of street information -->"); // Now, loop through all the results int i = startRow; while (i < endRow) { // Get this street Map_Streets_DataSet.StreetsRow thisStreet = streets.Streets[i++]; // If this street name starts with a new letter, add the letter now if (thisStreet.StreetName.Trim()[0] != lastStreetName[0]) { // Add a row for the letter Output.WriteLine("\t\t\t\t<tr> <td colspan=\"3\" class=\"bigletter\" align=\"center\">" + (thisStreet.StreetName.Trim())[0] + "</td> </tr>"); lastStreetName = thisStreet.StreetName.Trim(); } // Start this row Output.WriteLine("\t\t\t\t<tr class=\"index\">"); // Add the street name and direction if ((!thisStreet.IsStreetDirectionNull()) && (thisStreet.StreetDirection.Length > 0)) { Output.WriteLine("\t\t\t\t\t<td>" + thisStreet.StreetName + ", " + thisStreet.StreetDirection + "<td>"); } else { Output.WriteLine("\t\t\t\t\t<td>" + thisStreet.StreetName + "<td>"); } // Determine the second column of data and add it Output.WriteLine("\t\t\t\t\t<td align=\"right\">" + street_display(thisStreet) + "</td>"); // Add the link to the sheet CurrentMode.ViewerCode = thisStreet.PageSequence.ToString(); Output.WriteLine("\t\t\t\t\t<td><a href=\"" + UrlWriterHelper.Redirect_URL(CurrentMode) + "\">" + thisStreet.PageName.Replace("Sheet", "").Trim() + "</a></td>"); // End this row Output.WriteLine("\t\t\t\t</tr>"); } // End this table Output.WriteLine("\t\t\t</table>"); }
/// <summary> Write the item viewer main section as HTML directly to the HTTP output stream </summary> /// <param name="Output"> Response stream for the item viewer to write directly to </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> public override void Write_Main_Viewer_Section(TextWriter Output, Custom_Tracer Tracer) { if (Tracer != null) { Tracer.Add_Trace("Video_ItemViewer.Add_Main_Viewer_Section", ""); } // Add the HTML for the image Output.WriteLine(" <!-- VIDEO VIEWER OUTPUT -->"); Output.WriteLine(" <td><div id=\"sbkFiv_ViewerTitle\">" + videoLabels[video - 1] + "</div></td>"); Output.WriteLine(" </tr>"); if (videoFileNames.Count > 1) { Output.WriteLine(" <tr>"); Output.WriteLine(" <td style=\"text-align:center;\">"); string url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine(" <select id=\"sbkViv_VideoSelect\" name=\"sbkViv_VideoSelect\" onchange=\"item_jump_video('" + url + "');\">"); for (int i = 0; i < videoFileNames.Count; i++) { if (video == i + 1) { Output.WriteLine(" <option value=\"" + (i + 1) + "\" selected=\"selected\">" + videoFileNames[i] + "</option>"); } else { Output.WriteLine(" <option value=\"" + (i + 1) + "\">" + videoFileNames[i] + "</option>"); } } Output.WriteLine(" </select>"); Output.WriteLine(" </td>"); Output.WriteLine(" </tr>"); } string video_url = SobekFileSystem.Resource_Web_Uri(BriefItem, videoFileNames[video - 1]); // MAKE THIS USE THE FILES.ASPX WEB PAGE if this is restricted (or dark) if ((BriefItem.Behaviors.Dark_Flag) || (BriefItem.Behaviors.IP_Restriction_Membership > 0)) { video_url = CurrentRequest.Base_URL + "files/" + BriefItem.BibID + "/" + BriefItem.VID + "/" + videoFileNames[video - 1]; } Output.WriteLine(" <tr>"); Output.WriteLine(" <td id=\"sbkFiv_MainArea\">"); Output.WriteLine(" <video id=\"sbkViv_Movie\" src=\"" + video_url + "\" controls autoplay></video>"); Output.WriteLine(" </td>"); Output.WriteLine(" <!-- END VIDEO VIEWER OUTPUT -->"); }
private void add_items_by_collection(TextWriter Output, string Collection, Custom_Tracer Tracer) { DataSet itemsListSet = SobekCM_Database.Statistics_Aggregation_Titles(Collection, Tracer); DataTable itemsList = itemsListSet.Tables[0]; Tracer.Add_Trace("Usage_Statistics_AggregationViewer.add_items_by_collection", "Rendering HTML"); Output.WriteLine("<div class=\"SobekText\">"); Output.WriteLine("<p>The most commonly utilized items for this collection appear below.</p>"); RequestSpecificValues.Current_Mode.Info_Browse_Mode = "definitions"; Output.WriteLine("<p>The <a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode) + "\">Definitions page</a> provides more details about the statistics and words used below.</p>"); Output.WriteLine(); Output.WriteLine("<center>"); Output.WriteLine("<table border=\"0px\" cellspacing=\"0px\" class=\"statsTable\">"); Output.WriteLine(" <tr align=\"left\" bgcolor=\"#0022a7\" >"); Output.WriteLine(" <th width=\"90px\" align=\"left\"><span style=\"color: White\">BIBID</span></th>"); Output.WriteLine(" <th width=\"50px\" align=\"left\"><span style=\"color: White\">VID</span></th>"); Output.WriteLine(" <th width=\"430px\" align=\"left\"><span style=\"color: White\">TITLE</span></th>"); Output.WriteLine(" <th width=\"90px\" align=\"right\"><span style=\"color: White\">VIEWS</span></th>"); Output.WriteLine(" </tr>"); if (itemsList != null) { int itemCount = 0; foreach (DataRow thisRow in itemsList.Rows) { if (itemCount == 100) { break; } Output.WriteLine(" <tr align=\"left\" >"); Output.WriteLine(" <td>" + thisRow[0] + "</td>"); Output.WriteLine(" <td>" + thisRow[1] + "</td>"); Output.WriteLine(" <td><a href=\"" + RequestSpecificValues.Current_Mode.Base_URL + thisRow[0] + "/" + thisRow[1] + "\">" + thisRow[2] + "</a></td>"); Output.WriteLine(" <td align=\"right\">" + thisRow[3] + "</td>"); Output.WriteLine(" </tr>"); Output.WriteLine(" <tr><td bgcolor=\"#e7e7e7\" colspan=\"4\"></td></tr>"); itemCount++; } } Output.WriteLine("</table>"); Output.WriteLine("</center>"); Output.WriteLine("<br /> <br />"); Output.WriteLine("</div>"); }
/// <summary> Build the HTML for the feature index for this item </summary> /// <param name="Output"> HTML output stream </param> /// <param name="Features"> Dataset containig all of the features linked to this item </param> protected internal void Create_Feature_Index(TextWriter Output, Map_Features_DataSet Features) { if (Features == null) { Output.WriteLine("<br />"); Output.WriteLine("<center><b>UNABLE TO LOAD FEATURES FROM DATABASE</b></center>"); Output.WriteLine("<br />"); CurrentMode.Mode = Display_Mode_Enum.Contact; Output.WriteLine("<center>Click <a href=\"" + UrlWriterHelper.Redirect_URL(CurrentMode) + "\">here</a> to report this issue.</center>"); Output.WriteLine("<br />"); CurrentMode.Mode = Display_Mode_Enum.Item_Display; return; } string currentView = CurrentMode.ViewerCode; // This will be presented in a table, so start the table Output.WriteLine("<table width=\"100%\">"); // Determine (roughly) how many rows for each side // of the column int rows_per_column = Features.Features.Count / 2; if ((Features.Features.Count % 2) > 0) { rows_per_column++; } // Start the large table for each section Output.WriteLine("\t<tr>"); Output.WriteLine("\t\t<td width=\"46%\" valign=\"top\">"); // Create the first column of feature information Insert_One_Feature_Column(Output, Features, 0, rows_per_column); // Move to second column of large table, after making a small margin column Output.WriteLine("\t\t</td>"); Output.WriteLine("\t\t<td width=\"8%\"></td> <!-- Spacer Column -->"); Output.WriteLine("\t\t<td width=\"46%\" valign=\"top\">"); // Create the second column of feature information Insert_One_Feature_Column(Output, Features, rows_per_column, Features.Features.Count); // Finish off the large table Output.WriteLine("\t\t</td>\n\t</tr>\n</table>"); Output.WriteLine("<!-- End output from GEMS_Map_Object.Feature_Index -->"); CurrentMode.ViewerCode = currentView; }
/// <summary> Gets the menu items related to this viewer that should be included on the main item (digital resource) menu </summary> /// <param name="CurrentItem"> Digital resource object, which can be used to ensure if and how this viewer should appear /// in the main item (digital resource) menu </param> /// <param name="CurrentUser"> Current user, who may or may not be logged on </param> /// <param name="CurrentRequest"> Information about the current request </param> /// <param name="MenuItems"> List of menu items, to which this method may add one or more menu items </param> /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param> public override void Add_Menu_items(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, List <Item_MenuItem> MenuItems, bool IpRestricted) { // Get the URL for this string previous_code = CurrentRequest.ViewerCode; CurrentRequest.ViewerCode = ViewerCode.Replace("#", "1"); string url = UrlWriterHelper.Redirect_URL(CurrentRequest); CurrentRequest.ViewerCode = previous_code; // Add the item menu information Item_MenuItem menuItem = new Item_MenuItem("Page Images", "Standard", null, url, ViewerCode); MenuItems.Add(menuItem); }
/// <summary> Gets the menu items related to this viewer that should be included on the main item (digital resource) menu </summary> /// <param name="CurrentItem"> Digital resource object, which can be used to ensure if and how this viewer should appear /// in the main item (digital resource) menu </param> /// <param name="CurrentUser"> Current user, who may or may not be logged on </param> /// <param name="CurrentRequest"> Information about the current request </param> /// <param name="MenuItems"> List of menu items, to which this method may add one or more menu items </param> /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param> public void Add_Menu_items(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, List <Item_MenuItem> MenuItems, bool IpRestricted) { // Get the URL for this string previous_code = CurrentRequest.ViewerCode; CurrentRequest.ViewerCode = ViewerCode; string url = UrlWriterHelper.Redirect_URL(CurrentRequest); CurrentRequest.ViewerCode = previous_code; // Add the item menu information Item_MenuItem menuItem = new Item_MenuItem("Description", "Metadata", null, url, ViewerCode); MenuItems.Add(menuItem); }
/// <summary> Write the item viewer main section as HTML directly to the HTTP output stream </summary> /// <param name="Output"> Response stream for the item viewer to write directly to </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> public override void Write_Main_Viewer_Section(TextWriter Output, Custom_Tracer Tracer) { if (Tracer != null) { Tracer.Add_Trace("Restricted_ItemViewer.Write_Main_Viewer_Section", ""); } // Check to see if this is IP restricted string restriction_message = "This item is not restricted"; if (BriefItem.Behaviors.Dark_Flag) { restriction_message = "<table style=\"width:100%;\"> <tr style=\"text-align:center\"><td style=\"font-size:1.8em; font-weight: bold; color:white\"><br />This item is set to be DARK and resource files cannot be displayed<br /><br /></td></tr></table>"; } else if (BriefItem.Behaviors.IP_Restriction_Membership > 0) { if (HttpContext.Current != null) { int user_mask = (int)HttpContext.Current.Session["IP_Range_Membership"]; int comparison = BriefItem.Behaviors.IP_Restriction_Membership & user_mask; if (comparison == 0) { int restriction = BriefItem.Behaviors.IP_Restriction_Membership; int restriction_counter = 1; while (restriction % 2 != 1) { restriction = restriction >> 1; restriction_counter++; } if (Engine_ApplicationCache_Gateway.IP_Restrictions[restriction_counter] != null) { restriction_message = Engine_ApplicationCache_Gateway.IP_Restrictions[restriction_counter].Item_Restricted_Statement; } else { restriction_message = "Restricted Item"; } } } } // Replace item URL in the restricted message CurrentRequest.ViewerCode = string.Empty; string msg = restriction_message.Replace("<%ITEMURL%>", UrlWriterHelper.Redirect_URL(CurrentRequest)); Output.WriteLine("<td style=\"text-align:left;\" id=\"sbkRes_MainArea\">" + msg + "</td>"); }
/// <summary> Gets the menu items related to this viewer that should be included on the main item (digital resource) menu </summary> /// <param name="CurrentItem"> Digital resource object, which can be used to ensure if and how this viewer should appear /// in the main item (digital resource) menu </param> /// <param name="CurrentUser"> Current user, who may or may not be logged on </param> /// <param name="CurrentRequest"> Information about the current request </param> /// <param name="MenuItems"> List of menu items, to which this method may add one or more menu items </param> /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param> public void Add_Menu_items(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, List <Item_MenuItem> MenuItems, bool IpRestricted) { // Determine the label to show on the menu string label = "Map It!"; if (!String.IsNullOrEmpty(CurrentRequest.Coordinates)) { if (CurrentRequest.ViewerCode == "mapsearch") { label = "Map Search"; } else { if (((CurrentItem.Images != null) && (CurrentItem.Images.Count > 1)) || (String.Compare(CurrentItem.Type, "map", StringComparison.OrdinalIgnoreCase) != 0)) { label = "Search Results"; } else { label = "Map Coverage"; } } } // Get the URL for this string previous_code = CurrentRequest.ViewerCode; CurrentRequest.ViewerCode = ViewerCode; string url = UrlWriterHelper.Redirect_URL(CurrentRequest); CurrentRequest.ViewerCode = previous_code; // Allow the label to be implemented for this viewer from the database as an override BriefItem_BehaviorViewer thisViewerInfo = CurrentItem.Behaviors.Get_Viewer(ViewerCode); // If this is found, and has a custom label, use that if ((thisViewerInfo != null) && (!String.IsNullOrWhiteSpace(thisViewerInfo.Label))) { label = thisViewerInfo.Label; } // Add the item menu information Item_MenuItem menuItem = new Item_MenuItem(label, null, null, url, ViewerCode); MenuItems.Add(menuItem); }
/// <summary> Constructor for a new instance of the dLOC_Search_AggregationViewer class </summary> /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param> /// <param name="ViewBag"> Aggregation-specific request information, such as aggregation object and any browse object requested </param> public dLOC_Search_AggregationViewer(RequestCache RequestSpecificValues, AggregationViewBag ViewBag) : base(RequestSpecificValues, ViewBag) { textBoxValue = String.Empty; if (RequestSpecificValues.Current_Mode.Search_String.Length > 0) { textBoxValue = RequestSpecificValues.Current_Mode.Search_String.Replace(",newspaper", ""); } // Determine the complete script action name Display_Mode_Enum displayMode = RequestSpecificValues.Current_Mode.Mode; Aggregation_Type_Enum aggrType = RequestSpecificValues.Current_Mode.Aggregation_Type; Search_Type_Enum searchType = RequestSpecificValues.Current_Mode.Search_Type; RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Results; RequestSpecificValues.Current_Mode.Search_Type = Search_Type_Enum.Full_Text; string search_string = RequestSpecificValues.Current_Mode.Search_String; RequestSpecificValues.Current_Mode.Search_String = String.Empty; RequestSpecificValues.Current_Mode.Search_Fields = String.Empty; arg2 = String.Empty; RequestSpecificValues.Current_Mode.Search_Precision = Search_Precision_Type_Enum.Inflectional_Form; arg1 = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); // Get the browse all url, if enabled browse_url = String.Empty; if (ViewBag.Hierarchy_Object.Can_Browse_Items) { RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Aggregation; RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Browse_Info; RequestSpecificValues.Current_Mode.Info_Browse_Mode = "all"; browse_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); } Search_Script_Action = "dloc_search_sobekcm('" + arg1 + "', '" + browse_url + "');"; RequestSpecificValues.Current_Mode.Mode = displayMode; RequestSpecificValues.Current_Mode.Aggregation_Type = aggrType; RequestSpecificValues.Current_Mode.Search_Type = searchType; RequestSpecificValues.Current_Mode.Search_String = search_string; RequestSpecificValues.Current_Mode.Info_Browse_Mode = String.Empty; }
/// <summary> Gets the menu items related to this viewer that should be included on the main item (digital resource) menu </summary> /// <param name="CurrentItem"> Digital resource object, which can be used to ensure if and how this viewer should appear /// in the main item (digital resource) menu </param> /// <param name="CurrentUser"> Current user, who may or may not be logged on </param> /// <param name="CurrentRequest"> Information about the current request </param> /// <param name="MenuItems"> List of menu items, to which this method may add one or more menu items </param> /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param> public virtual void Add_Menu_Items(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, List <Item_MenuItem> MenuItems, bool IpRestricted) { // If not IP restricted, then do nothing if (!IpRestricted) { return; } // Get the URL for this string previous_code = CurrentRequest.ViewerCode; CurrentRequest.ViewerCode = ViewerCode; string url = UrlWriterHelper.Redirect_URL(CurrentRequest); CurrentRequest.ViewerCode = previous_code; // Add the item menu information Item_MenuItem menuItem = new Item_MenuItem("Restricted", null, null, url, ViewerCode); MenuItems.Add(menuItem); }
/// <summary> Gets the menu items related to this viewer that should be included on the main item (digital resource) menu </summary> /// <param name="CurrentItem"> Digital resource object, which can be used to ensure if and how this viewer should appear /// in the main item (digital resource) menu </param> /// <param name="CurrentUser"> Current user, who may or may not be logged on </param> /// <param name="CurrentRequest"> Information about the current request </param> /// <param name="MenuItems"> List of menu items, to which this method may add one or more menu items </param> /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param> public virtual void Add_Menu_Items(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, List <Item_MenuItem> MenuItems, bool IpRestricted) { // Get the URL for this string previous_code = CurrentRequest.ViewerCode.Replace("x", "").Replace("j", ""); int current_page; if (!int.TryParse(previous_code, out current_page)) { current_page = 1; } CurrentRequest.ViewerCode = ViewerCode.Replace("#", current_page.ToString()); string url = UrlWriterHelper.Redirect_URL(CurrentRequest); CurrentRequest.ViewerCode = previous_code; // Add the item menu information Item_MenuItem menuItem = new Item_MenuItem("Page Images", "Zoomable", null, url, ViewerCode); MenuItems.Add(menuItem); }
/// <summary> Gets the menu items related to this viewer that should be included on the main item (digital resource) menu </summary> /// <param name="CurrentItem"> Digital resource object, which can be used to ensure if and how this viewer should appear /// in the main item (digital resource) menu </param> /// <param name="CurrentUser"> Current user, who may or may not be logged on </param> /// <param name="CurrentRequest"> Information about the current request </param> /// <param name="MenuItems"> List of menu items, to which this method may add one or more menu items </param> /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param> public void Add_Menu_items(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, List <Item_MenuItem> MenuItems, bool IpRestricted) { // Get the label string first_label = "FLASH"; foreach (BriefItem_FileGrouping thisPage in CurrentItem.Downloads) { // Look for a flash file on each page foreach (BriefItem_File thisFile in thisPage.Files) { if (String.Compare(thisFile.File_Extension, ".SWF", StringComparison.OrdinalIgnoreCase) == 0) { first_label = thisPage.Label; break; } } } // Allow the label to be implemented for this viewer from the database as well BriefItem_BehaviorViewer thisViewerInfo = CurrentItem.Behaviors.Get_Viewer(ViewerCode); // If this is found, and has a custom label, use that if ((thisViewerInfo != null) && (!String.IsNullOrWhiteSpace(thisViewerInfo.Label))) { first_label = thisViewerInfo.Label; } // Get the URL for this string previous_code = CurrentRequest.ViewerCode; CurrentRequest.ViewerCode = ViewerCode; string url = UrlWriterHelper.Redirect_URL(CurrentRequest); CurrentRequest.ViewerCode = previous_code; // Add the item menu information Item_MenuItem menuItem = new Item_MenuItem(first_label, null, null, url, ViewerCode); MenuItems.Add(menuItem); }
/// <summary> Constructor for a new instance of the Advanced_Search_YearRange_AggregationViewer class </summary> /// <param name="RequestSpecificValues"> All the necessary, non-global data specific to the current request </param> /// <param name="ViewBag"> Aggregation-specific request information, such as aggregation object and any browse object requested </param> public Advanced_Search_YearRange_AggregationViewer(RequestCache RequestSpecificValues, AggregationViewBag ViewBag) : base(RequestSpecificValues, ViewBag) { // Compute the redirect stem to use string fields = RequestSpecificValues.Current_Mode.Search_Fields; string searchCollections = RequestSpecificValues.Current_Mode.SubAggregation; Display_Mode_Enum lastMode = RequestSpecificValues.Current_Mode.Mode; Aggregation_Type_Enum aggrType = RequestSpecificValues.Current_Mode.Aggregation_Type; RequestSpecificValues.Current_Mode.SubAggregation = String.Empty; string searchString = RequestSpecificValues.Current_Mode.Search_String; RequestSpecificValues.Current_Mode.Search_String = String.Empty; RequestSpecificValues.Current_Mode.Search_Fields = String.Empty; RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Results; RequestSpecificValues.Current_Mode.Search_Precision = Search_Precision_Type_Enum.Inflectional_Form; string redirectStem = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); // Get the browse all url, if enabled string browse_url = String.Empty; if (ViewBag.Hierarchy_Object.Can_Browse_Items) { RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Aggregation; RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Browse_Info; RequestSpecificValues.Current_Mode.Info_Browse_Mode = "all"; browse_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); } RequestSpecificValues.Current_Mode.Search_String = searchString; RequestSpecificValues.Current_Mode.Search_Fields = fields; RequestSpecificValues.Current_Mode.SubAggregation = searchCollections; RequestSpecificValues.Current_Mode.Mode = lastMode; RequestSpecificValues.Current_Mode.Aggregation_Type = aggrType; Search_Script_Action = "advanced_search_years_sobekcm('" + redirectStem + "','" + browse_url + "')"; }
/// <summary> Add the HTML to be displayed in the main SobekCM viewer area </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 template HTML for step 2 and the congratulations text for step 4 </remarks> public override void Write_HTML(TextWriter Output, Custom_Tracer Tracer) { Tracer.Add_Trace("File_Management_MySobekViewer.Write_HTML", "Add instructions"); Output.WriteLine("<script src=\"" + Static_Resources_Gateway.Sobekcm_Metadata_Js + "\" type=\"text/javascript\"></script>"); // Write the top currentItem mimic html portion Write_Item_Type_Top(Output, currentItem); Output.WriteLine("<div id=\"container-inner1000\">"); Output.WriteLine("<div id=\"pagecontainer\">"); Output.WriteLine("<div class=\"sbkMySobek_HomeText\">"); Output.WriteLine(" <br />"); Output.WriteLine(" <h2>Manage Downloads</h2>"); Output.WriteLine(" <p>Upload the download files for your item. You can also provide labels for each file, once they are uploaded.</p>"); RequestSpecificValues.Current_Mode.My_Sobek_Type = My_Sobek_Type_Enum.Page_Images_Management; Output.WriteLine(" <p><a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode) + "\">Click here to upload page images instead.</a></p>"); RequestSpecificValues.Current_Mode.My_Sobek_Type = My_Sobek_Type_Enum.File_Management; Output.WriteLine(" <br />"); }
/// <summary> Add the HTML to be displayed in the main SobekCM viewer area </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 template HTML for step 2 and the congratulations text for step 4 </remarks> public override void Write_HTML(TextWriter Output, Custom_Tracer Tracer) { Tracer.Add_Trace("File_Management_MySobekViewer.Write_HTML", "Add instructions"); Output.WriteLine("<script src=\"" + Static_Resources_Gateway.Sobekcm_Metadata_Js + "\" type=\"text/javascript\"></script>"); // Write the top currentItem mimic html portion Write_Item_Type_Top(Output, currentItem); Output.WriteLine("<div id=\"container-inner1000\">"); Output.WriteLine("<div id=\"pagecontainer\">"); Output.WriteLine("<div class=\"sbkMySobek_HomeText\">"); Output.WriteLine(" <br />"); Output.WriteLine(" <h2>Upload Page Images</h2>"); Output.WriteLine(" <p>Upload the page images for your item. You will then be directed to manage the pages and divisions to ensure the new page images appear in the correct order and are reflected in the table of contents.</p>"); RequestSpecificValues.Current_Mode.My_Sobek_Type = My_Sobek_Type_Enum.File_Management; Output.WriteLine(" <p><a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode) + "\">Click here to add download files instead.</a></p>"); RequestSpecificValues.Current_Mode.My_Sobek_Type = My_Sobek_Type_Enum.Page_Images_Management; Output.WriteLine(" <br />"); }
/// <summary> Adds the controls for this result viewer to the place holder on the main form </summary> /// <param name="placeHolder"> Main place holder ( "mainPlaceHolder" ) in the itemNavForm form into which the the bulk of the result viewer's output is displayed</param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> /// <returns> Sorted tree with the results in hierarchical structure with volumes and issues under the titles and sorted by serial hierarchy </returns> public override void Add_HTML(PlaceHolder placeHolder, Custom_Tracer Tracer) { if (Tracer != null) { Tracer.Add_Trace("Export_File_ResultsViewer.Add_HTML", "Rendering results in text view"); } //// Sort this by BIbID //resultTable.Sort("BibID"); //// Determine which rows to display //int lastRow = base.LastRow; //int startRow = base.StartRow(lastRow); //// prepare to step through each title to display //List<SobekCM_Item_Collection.SobekCM_Item_Row> itemRows = new List<SobekCM_Item_Collection.SobekCM_Item_Row>(); // Prepare to build an output StringBuilder resultsBldr = new StringBuilder(5000); int currentPage = RequestSpecificValues.Current_Mode.Page.HasValue ? RequestSpecificValues.Current_Mode.Page.Value : 1; if (currentPage < 2) { resultsBldr.Append("<br />" + Environment.NewLine + "<div class=\"SobekHomeText\">" + Environment.NewLine + "<blockquote>" + Environment.NewLine); resultsBldr.Append("This option allows you to export the list of results which match your search or browse to an excel document or CSV file for download.<br /><br />"); resultsBldr.Append("Select the file type below to create the report:"); resultsBldr.Append("<blockquote>"); //currentMode.Page = 2; //resultsBldr.Append("<a href=\"" + currentMode.Redirect_URL() + "\">Excel Spreadsheet file (XLSX)</a><br /><br />"); RequestSpecificValues.Current_Mode.Page = 3; resultsBldr.Append("<a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode) + "\">Excel Spreadsheet file (XLS)</a><br /><br />"); RequestSpecificValues.Current_Mode.Page = 4; resultsBldr.Append("<a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode) + "\">Comma-seperated value text file (CSV)</a><br /><br />"); //currentMode.Page = 5; //resultsBldr.Append("<a href=\"" + currentMode.Redirect_URL() + "\">HTML Table (HTML)</a><br /><br />"); resultsBldr.Append("</blockquote>"); resultsBldr.Append("</blockquote>"); resultsBldr.Append("<br /><br />"); resultsBldr.Append("</div>"); // Add this to the page Literal mainLiteral = new Literal { Text = resultsBldr.ToString() }; placeHolder.Controls.Add(mainLiteral); } else { string filename = RequestSpecificValues.Current_Mode.Instance_Name; // Set the Gembox spreadsheet license key string from_db = String.Empty; string key = String.Empty; if (UI_ApplicationCache_Gateway.Settings.Contains_Additional_Setting("Spreadsheet Library License")) { try { key = UI_ApplicationCache_Gateway.Settings.Get_Additional_Setting("Spreadsheet Library License"); SecurityInfo thisDecryptor = new SecurityInfo(); string encryptedPassword = thisDecryptor.DecryptString(from_db, "*h3kj(83", "unsalted"); } catch (Exception) { } } SpreadsheetInfo.SetLicense(key); // Create the excel file and worksheet ExcelFile excelFile = new ExcelFile(); ExcelWorksheet excelSheet = excelFile.Worksheets.Add(RequestSpecificValues.Current_Mode.Instance_Name); excelFile.Worksheets.ActiveWorksheet = excelSheet; // Create the header cell style CellStyle headerStyle = new CellStyle { HorizontalAlignment = HorizontalAlignmentStyle.Left, Font = { Weight = ExcelFont.BoldWeight } }; headerStyle.FillPattern.SetSolid(Color.Yellow); headerStyle.Borders.SetBorders(MultipleBorders.Outside, Color.Black, LineStyle.Thin); // Create the title cell style CellStyle titleStyle = new CellStyle { HorizontalAlignment = HorizontalAlignmentStyle.Left, Font = { Weight = ExcelFont.BoldWeight, Size = 12 * 20 } }; // Set the default style CellStyle defaultStyle = new CellStyle(); defaultStyle.Borders.SetBorders(MultipleBorders.Outside, Color.Black, LineStyle.Thin); const int columnSelector = 0; int row = 0; if (RequestSpecificValues.Current_Mode.Page != 4) { // Add the title excelSheet.Cells[1, columnSelector].Value = "Search or browse result list"; excelSheet.Cells[1, columnSelector].Style = titleStyle; row = 3; } // Add the column headers excelSheet.Cells[row, columnSelector].Value = "System ID"; excelSheet.Cells[row, columnSelector].Style = headerStyle; excelSheet.Cells[row, columnSelector + 1].Value = "Link"; excelSheet.Cells[row, columnSelector + 1].Style = headerStyle; excelSheet.Cells[row, columnSelector + 2].Value = "Group Title"; excelSheet.Cells[row, columnSelector + 2].Style = headerStyle; excelSheet.Cells[row, columnSelector + 3].Value = "Item Title"; excelSheet.Cells[row, columnSelector + 3].Style = headerStyle; excelSheet.Cells[row, columnSelector + 4].Value = "Date"; excelSheet.Cells[row, columnSelector + 4].Style = headerStyle; excelSheet.Cells[row, columnSelector + 5].Value = "Author"; excelSheet.Cells[row, columnSelector + 5].Style = headerStyle; excelSheet.Cells[row, columnSelector + 6].Value = "Publisher"; excelSheet.Cells[row, columnSelector + 6].Style = headerStyle; excelSheet.Cells[row, columnSelector + 7].Value = "Format"; excelSheet.Cells[row, columnSelector + 7].Style = headerStyle; excelSheet.Cells[row, columnSelector + 8].Value = "Edition"; excelSheet.Cells[row, columnSelector + 8].Style = headerStyle; excelSheet.Cells[row, columnSelector + 9].Value = "Subjects"; excelSheet.Cells[row, columnSelector + 9].Style = headerStyle; excelSheet.Cells[row, columnSelector + 10].Value = "Measurement"; excelSheet.Cells[row, columnSelector + 10].Style = headerStyle; excelSheet.Cells[row, columnSelector + 11].Value = "Style / Period"; excelSheet.Cells[row, columnSelector + 11].Style = headerStyle; excelSheet.Cells[row, columnSelector + 12].Value = "Technique"; excelSheet.Cells[row, columnSelector + 12].Style = headerStyle; excelSheet.Cells[row, columnSelector + 13].Value = "Institution"; excelSheet.Cells[row, columnSelector + 13].Style = headerStyle; excelSheet.Cells[row, columnSelector + 14].Value = "Donor"; excelSheet.Cells[row, columnSelector + 14].Style = headerStyle; excelSheet.Cells[row, columnSelector + 15].Value = "OCLC"; excelSheet.Cells[row, columnSelector + 15].Style = headerStyle; excelSheet.Cells[row, columnSelector + 16].Value = "ALEPH"; excelSheet.Cells[row, columnSelector + 16].Style = headerStyle; excelSheet.Cells[row, columnSelector + 17].Value = "Serial1"; excelSheet.Cells[row, columnSelector + 17].Style = headerStyle; excelSheet.Cells[row, columnSelector + 18].Value = "Serial2"; excelSheet.Cells[row, columnSelector + 18].Style = headerStyle; excelSheet.Cells[row, columnSelector + 19].Value = "Serial3"; excelSheet.Cells[row, columnSelector + 19].Style = headerStyle; // Set the correct widths excelSheet.Columns[columnSelector].Width = 12 * 256; excelSheet.Columns[columnSelector + 1].Width = 8 * 256; excelSheet.Columns[columnSelector + 2].Width = 40 * 256; excelSheet.Columns[columnSelector + 3].Width = 40 * 256; excelSheet.Columns[columnSelector + 4].Width = 20 * 256; excelSheet.Columns[columnSelector + 5].Width = 14 * 256; excelSheet.Columns[columnSelector + 6].Width = 14 * 256; excelSheet.Columns[columnSelector + 7].Width = 20 * 256; excelSheet.Columns[columnSelector + 8].Width = 20 * 256; excelSheet.Columns[columnSelector + 9].Width = 20 * 256; excelSheet.Columns[columnSelector + 10].Width = 20 * 256; excelSheet.Columns[columnSelector + 11].Width = 20 * 256; excelSheet.Columns[columnSelector + 12].Width = 20 * 256; excelSheet.Columns[columnSelector + 13].Width = 20 * 256; excelSheet.Columns[columnSelector + 14].Width = 20 * 256; excelSheet.Columns[columnSelector + 15].Width = 20 * 256; excelSheet.Columns[columnSelector + 16].Width = 20 * 256; excelSheet.Columns[columnSelector + 17].Width = 20 * 256; excelSheet.Columns[columnSelector + 18].Width = 20 * 256; excelSheet.Columns[columnSelector + 19].Width = 20 * 256; row++; // Add each row foreach (iSearch_Title_Result titleResult in PagedResults) { for (int item_count = 0; item_count < titleResult.Item_Count; item_count++) { iSearch_Item_Result itemResult = titleResult.Get_Item(item_count); excelSheet.Cells[row, columnSelector].Value = titleResult.BibID + "_" + itemResult.VID; excelSheet.Cells[row, columnSelector + 1].Value = RequestSpecificValues.Current_Mode.Base_URL + titleResult.BibID + "/" + itemResult.VID; excelSheet.Cells[row, columnSelector + 2].Value = titleResult.GroupTitle.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); excelSheet.Cells[row, columnSelector + 3].Value = itemResult.Title.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 4].Value = itemResult.PubDate.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 5].Value = titleResult.Author.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 6].Value = titleResult.Publisher.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 7].Value = titleResult.Format.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 8].Value = titleResult.Edition.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 9].Value = titleResult.Subjects.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 10].Value = titleResult.Measurement.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 11].Value = titleResult.Style_Period.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 12].Value = titleResult.Technique.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 13].Value = titleResult.Institution.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 14].Value = titleResult.Donor.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //if (titleResult.OCLC_Number > 1) // excelSheet.Cells[row, columnSelector + 15].Value = titleResult.OCLC_Number.ToString(); //if (titleResult.ALEPH_Number > 1) // excelSheet.Cells[row, columnSelector + 16].Value = titleResult.ALEPH_Number.ToString(); //excelSheet.Cells[row, columnSelector + 17].Value = itemResult.Level1_Text.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 18].Value = itemResult.Level2_Text.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); //excelSheet.Cells[row, columnSelector + 19].Value = itemResult.Level3_Text.Replace("<i>", "").Replace("</i>", "").Replace("&", "&"); row++; } } // Set the border excelSheet.Cells.GetSubrange("A4", "T" + row).SetBorders(MultipleBorders.Outside, Color.Black, LineStyle.Medium); excelSheet.Cells.GetSubrange("A4", "t4").SetBorders(MultipleBorders.Outside, Color.Black, LineStyle.Medium); if (Tracer != null) { Tracer.Add_Trace("Export_File_ResultsViewer.Add_HTML", "Clearing response"); } // Clear any response until now HttpContext.Current.Response.Clear(); // Output in proper format to the user switch (RequestSpecificValues.Current_Mode.Page) { //case 2: // System.Web.HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats"; // System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ".xlsx"); // // With XLSX it is a bit more complicated as MS Packaging API can't write // // directly to Response.OutputStream. Therefore we use temporary MemoryStream. // System.IO.MemoryStream ms = new System.IO.MemoryStream(); // excelFile.SaveXlsx(ms); // ms.WriteTo(System.Web.HttpContext.Current.Response.OutputStream); // break; case 3: HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"; HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ".xls"); excelFile.SaveXls(HttpContext.Current.Response.OutputStream); break; case 4: HttpContext.Current.Response.ContentType = "text/csv"; HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ".csv"); excelFile.SaveCsv(HttpContext.Current.Response.OutputStream, CsvType.CommaDelimited); break; //case 5: // System.Web.HttpContext.Current.Response.ContentType = "text/html"; // System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + "Report18.html"); // System.Xml.XmlTextWriter writer = new System.Xml.XmlTextWriter(System.Web.HttpContext.Current.Response.OutputStream, new UTF8Encoding(false)); // excelFile.SaveHtml(writer, null, true); // writer.Close(); // break; } if (Tracer != null) { Tracer.Add_Trace("Export_File_ResultsViewer.Add_HTML", "Ending response"); } HttpContext.Current.Response.End(); } }
/// <summary> Adds the controls for this result viewer to the place holder on the main form </summary> /// <param name="MainPlaceHolder"> Main place holder ( "mainPlaceHolder" ) in the itemNavForm form into which the the bulk of the result viewer's output is displayed</param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> /// <returns> Sorted tree with the results in hierarchical structure with volumes and issues under the titles and sorted by serial hierarchy </returns> public override void Add_HTML(PlaceHolder MainPlaceHolder, Custom_Tracer Tracer) { if (Tracer != null) { Tracer.Add_Trace("No_Results_ResultsWriter.Add_HTML", "Adding no result text"); } // Get the no results text string noResultsText = Get_NoResults_Text(); Literal thisLiteral = new Literal(); // Get the list of search terms string terms = RequestSpecificValues.Current_Mode.Search_String.Replace(",", " ").Trim(); // Try to search out into the Union catalog int union_catalog_matches = 0; string susMangoSearchQuery = String.Empty; if ((noResultsText.Contains("[%SusMangoSpanDisplay%]")) && (UI_ApplicationCache_Gateway.Settings.Florida != null) && (!String.IsNullOrEmpty(UI_ApplicationCache_Gateway.Settings.Florida.Mango_Union_Search_Base_URL))) { try { // the html retrieved from the page String strResult; WebRequest objRequest = WebRequest.Create(UI_ApplicationCache_Gateway.Settings.Florida.Mango_Union_Search_Base_URL + "&term=" + terms); objRequest.Timeout = 2000; WebResponse objResponse = objRequest.GetResponse(); // the using keyword will automatically dispose the object once complete using (StreamReader sr = new StreamReader(objResponse.GetResponseStream())) { strResult = sr.ReadToEnd().Trim(); // Close and clean up the StreamReader sr.Close(); } if (strResult.Length > 0) { bool isNumber = strResult.All(Char.IsNumber); if (isNumber) { union_catalog_matches = Convert.ToInt32(strResult); } } } catch (Exception) { if (Tracer != null) { Tracer.Add_Trace("No_Results_ResultsWriter.Add_HTML", "Exception caught while querying Mango state union catalog", Custom_Trace_Type_Enum.Error); } } } // Show or hide the links if ((union_catalog_matches > 0) || ((RequestSpecificValues.Current_Mode.Aggregation.Length > 0) && (RequestSpecificValues.Current_Mode.Aggregation.ToUpper() != "ALL") && (ResultsStats.All_Collections_Items > 0) && (RequestSpecificValues.Current_Mode.Default_Aggregation == "all"))) { noResultsText = noResultsText.Replace("[%MatchesFoundDivDisplay%]", "block"); if ((RequestSpecificValues.Current_Mode.Aggregation.Length > 0) && (RequestSpecificValues.Current_Mode.Aggregation.ToUpper() != "ALL") && (ResultsStats.All_Collections_Items.HasValue) && (ResultsStats.All_Collections_Items.Value > 0) && (RequestSpecificValues.Current_Mode.Default_Aggregation == "all")) { string aggregation = RequestSpecificValues.Current_Mode.Aggregation; RequestSpecificValues.Current_Mode.Aggregation = String.Empty; string instance_search_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); RequestSpecificValues.Current_Mode.Aggregation = aggregation; noResultsText = noResultsText.Replace("[%WithinInstanceSpanDisplay%]", "inline-block").Replace("[%WithinInstanceUrl%]", instance_search_url).Replace("[%WithinInstanceCount%]", number_to_string(ResultsStats.All_Collections_Items)); } else { noResultsText = noResultsText.Replace("[%WithinInstanceSpanDisplay%]", "none"); } if (union_catalog_matches > 0) { susMangoSearchQuery = "?st=" + HttpUtility.HtmlEncode(terms) + "&ix=kw"; noResultsText = noResultsText.Replace("[%SusMangoSpanDisplay%]", "inline-block").Replace("[%SusMangoSearchEnding%]", susMangoSearchQuery).Replace("[%SusMangoCount%]", number_to_string(union_catalog_matches)); } else { noResultsText = noResultsText.Replace("[%SusMangoSpanDisplay%]", "none").Replace("[%SusMangoSearchEnding%]", String.Empty); } } else { noResultsText = noResultsText.Replace("[%MatchesFoundDivDisplay%]", "none").Replace("[%SusMangoSearchEnding%]", String.Empty); } // Show the final data StringBuilder noResultsTextBuilder = new StringBuilder(noResultsText.Replace("[%SusMangoSearchEnding%]", String.Empty).Replace("[%BaseName%]", RequestSpecificValues.Current_Mode.Instance_Name)); noResultsTextBuilder.AppendLine("</td></tr></table>"); noResultsTextBuilder.AppendLine(); noResultsTextBuilder.AppendLine("<!-- place holder for the load() event in the body -->"); noResultsTextBuilder.AppendLine("<script type=\"text/javascript\"> "); noResultsTextBuilder.AppendLine(" //<![CDATA["); noResultsTextBuilder.AppendLine(" function load() { } "); noResultsTextBuilder.AppendLine(" //]]>"); noResultsTextBuilder.AppendLine("</script>"); noResultsTextBuilder.AppendLine(); thisLiteral.Text = noResultsTextBuilder.ToString(); MainPlaceHolder.Controls.Add(thisLiteral); }
/// <summary> Add the HTML to be displayed below 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 writes the HTML from the static browse or info page here </remarks> public override void Add_Secondary_HTML(TextWriter Output, Custom_Tracer Tracer) { if (Tracer != null) { Tracer.Add_Trace("Metadata_Browse_AggregationViewer.Add_Secondary_HTML", "Adding HTML"); } // Get collection of (public) browse bys linked to this aggregation ReadOnlyCollection <Item_Aggregation_Child_Page> public_browses = ViewBag.Hierarchy_Object.Browse_By_Pages; // Determine if this is an internal user and create list of internal user browses List <string> internal_browses = new List <string>(); if ((RequestSpecificValues.Current_User != null) && ((RequestSpecificValues.Current_User.Is_Internal_User) || (RequestSpecificValues.Current_User.Is_Aggregation_Curator(RequestSpecificValues.Current_Mode.Aggregation)))) { // Just add every metadata field here foreach (Item_Aggregation_Metadata_Type field in ViewBag.Hierarchy_Object.Browseable_Fields) { internal_browses.Add(field.DisplayTerm); } } // Retain the original short code (or the first public code) string original_browse_mode = RequestSpecificValues.Current_Mode.Info_Browse_Mode.ToLower(); // Get any paging URL and retain original page int current_page = RequestSpecificValues.Current_Mode.Page.HasValue ? RequestSpecificValues.Current_Mode.Page.Value : 1; RequestSpecificValues.Current_Mode.Page = 1; string page_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode, false); string url_options = UrlWriterHelper.URL_Options(RequestSpecificValues.Current_Mode); if (url_options.Length > 0) { url_options = "?" + url_options.Replace("&", "&"); } if ((public_browses.Count > 1) || (internal_browses.Count > 0)) { Output.WriteLine("<table>"); Output.WriteLine("<tr style=\"vertical-align:top;\">"); Output.WriteLine("<td id=\"sbkMebv_FacetOuterColumn\">"); Output.WriteLine("<div class=\"sbkMebv_FacetColumn\">"); Output.WriteLine("<div class=\"sbkMebv_FacetColumnTitle\">BROWSE BY:</div>"); Output.WriteLine("<br />"); if (public_browses.Count > 0) { // Sort these by title SortedList <string, Item_Aggregation_Child_Page> sortedBrowses = new SortedList <string, Item_Aggregation_Child_Page>(); foreach (Item_Aggregation_Child_Page thisBrowse in public_browses) { if (thisBrowse.Source_Data_Type == Item_Aggregation_Child_Source_Data_Enum.Static_HTML) { sortedBrowses[thisBrowse.Code.ToLower()] = thisBrowse; } else { Metadata_Search_Field facetField = UI_ApplicationCache_Gateway.Settings.Metadata_Search_Field_By_Name(thisBrowse.Code); if (facetField != null) { string facetName = facetField.Display_Term; if (internal_browses.Contains(facetName)) { internal_browses.Remove(facetName); } sortedBrowses[facetName.ToLower()] = thisBrowse; } } } Output.WriteLine(internal_browses.Count > 0 ? "<b> Public Browses</b><br />" : "<b> Browses</b><br />"); Output.WriteLine("<div class=\"sbkMebv_FacetBox\">"); foreach (Item_Aggregation_Child_Page thisBrowse in sortedBrowses.Values) { // Static HTML or metadata browse by? if (thisBrowse.Source_Data_Type == Item_Aggregation_Child_Source_Data_Enum.Static_HTML) { if (original_browse_mode != thisBrowse.Code) { RequestSpecificValues.Current_Mode.Info_Browse_Mode = thisBrowse.Code; Output.WriteLine("<a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode).Replace("&", "&") + "\">" + thisBrowse.Label + "</a><br />"); } else { Output.WriteLine(thisBrowse.Label + "<br />"); } } else { Metadata_Search_Field facetField = UI_ApplicationCache_Gateway.Settings.Metadata_Search_Field_By_Display_Name(thisBrowse.Code); if (thisBrowse.Code.ToLower().Replace("_", " ") != original_browse_mode.Replace("_", " ")) { RequestSpecificValues.Current_Mode.Info_Browse_Mode = thisBrowse.Code.ToLower().Replace(" ", "_"); Output.WriteLine("<a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode).Replace("&", "&") + "\">" + facetField.Display_Term + "</a><br />"); } else { Output.WriteLine(facetField.Display_Term + "<br />"); } } } Output.WriteLine("</div>"); Output.WriteLine("<br />"); } if (internal_browses.Count > 0) { Output.WriteLine("<b> Internal Browses</b><br />"); Output.WriteLine("<div class=\"sbkMebv_FacetBox\">"); foreach (string thisShort in internal_browses) { Metadata_Search_Field facetField = UI_ApplicationCache_Gateway.Settings.Metadata_Search_Field_By_Facet_Name(thisShort); if (facetField != null) { if (thisShort.ToLower() != original_browse_mode) { RequestSpecificValues.Current_Mode.Info_Browse_Mode = thisShort.ToLower().Replace(" ", "_"); Output.WriteLine("<a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode).Replace("&", "&") + "\">" + facetField.Display_Term + "</a><br />"); } else { Output.WriteLine(facetField.Display_Term + "<br />"); } } } Output.WriteLine("</div>"); Output.WriteLine("<br />"); } Output.WriteLine("<br />"); Output.WriteLine("<br />"); Output.WriteLine("<br />"); Output.WriteLine("<br />"); Output.WriteLine("<br />"); Output.WriteLine("</div>"); Output.WriteLine("</td>"); Output.WriteLine("<td>"); } Output.WriteLine("<div class=\"sbkMebv_ResultsPanel\" id=\"main-content\" role=\"main\">"); RequestSpecificValues.Current_Mode.Info_Browse_Mode = original_browse_mode; // Was this static or metadata browse by? if ((browseObject != null) && (browseObject.Source_Data_Type == Item_Aggregation_Child_Source_Data_Enum.Static_HTML)) { // Read the content file for this browse string source_file = UI_ApplicationCache_Gateway.Settings.Servers.Base_Design_Location + ViewBag.Hierarchy_Object.ObjDirectory.Replace("/", "\\") + browseObject.Source; HTML_Based_Content staticBrowseContent = HTML_Based_Content_Reader.Read_HTML_File(source_file, true, Tracer); if (staticBrowseContent == null) { staticBrowseContent = new HTML_Based_Content("Unable to find source file!\n\n" + ViewBag.Hierarchy_Object.ObjDirectory.Replace("/", "\\") + browseObject.Source, browseObject.Code); } // Apply current user settings for this string browseInfoDisplayText = staticBrowseContent.Apply_Settings_To_Static_Text(staticBrowseContent.Content, ViewBag.Hierarchy_Object, RequestSpecificValues.HTML_Skin.Skin_Code, RequestSpecificValues.HTML_Skin.Base_Skin_Code, RequestSpecificValues.Current_Mode.Base_URL, UrlWriterHelper.URL_Options(RequestSpecificValues.Current_Mode), Tracer); // Is this an admin? bool isAdmin = (RequestSpecificValues.Current_User != null) && (RequestSpecificValues.Current_User.Is_Aggregation_Admin(ViewBag.Hierarchy_Object.Code)); Aggregation_Type_Enum aggrType = RequestSpecificValues.Current_Mode.Aggregation_Type; // Output the adjusted home html if (isAdmin) { Output.WriteLine("<div id=\"sbkSbia_MainTextEditable\">"); Output.WriteLine(browseInfoDisplayText); RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Child_Page_Edit; Output.WriteLine(" <div id=\"sbkSbia_EditableTextLink\"><a href=\"" + UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode) + "\" title=\"Edit this page's text\"><img src=\"" + Static_Resources_Gateway.Edit_Gif + "\" alt=\"\" />edit content</a></div>"); RequestSpecificValues.Current_Mode.Aggregation_Type = aggrType; Output.WriteLine("</div>"); Output.WriteLine(); Output.WriteLine("<script>"); Output.WriteLine(" $(\"#sbkSbia_MainTextEditable\").mouseover(function() { $(\"#sbkSbia_EditableTextLink\").css(\"display\",\"inline-block\"); });"); Output.WriteLine(" $(\"#sbkSbia_MainTextEditable\").mouseout(function() { $(\"#sbkSbia_EditableTextLink\").css(\"display\",\"none\"); });"); Output.WriteLine("</script>"); Output.WriteLine(); } else { Output.WriteLine("<div id=\"sbkSbia_MainText\">"); Output.WriteLine(browseInfoDisplayText); Output.WriteLine("</div>"); } } else { //Output the results if ((results != null) && (results.Count > 0)) { // Determine which letters appear List <char> letters_appearing = new List <char>(); char last_char = '\n'; if (results.Count > 100) { foreach (string thisValue in results) { if (thisValue.Length > 0) { char this_first_char = Char.ToLower(thisValue[0]); int ascii = this_first_char; if (ascii < 97) { this_first_char = 'a'; } if (ascii > 122) { this_first_char = 'z'; } if (this_first_char != last_char) { if (!letters_appearing.Contains(this_first_char)) { letters_appearing.Add(this_first_char); } last_char = this_first_char; } } } } // Get the search URL RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Results; RequestSpecificValues.Current_Mode.Search_Precision = Search_Precision_Type_Enum.Exact_Match; RequestSpecificValues.Current_Mode.Search_Type = Search_Type_Enum.Advanced; Metadata_Search_Field facetField = UI_ApplicationCache_Gateway.Settings.Metadata_Search_Field_By_Display_Name(original_browse_mode); RequestSpecificValues.Current_Mode.Search_Fields = facetField.Web_Code; RequestSpecificValues.Current_Mode.Search_String = "\"<%TERM%>\""; string search_url = UrlWriterHelper.Redirect_URL(RequestSpecificValues.Current_Mode); Output.WriteLine("<br />"); if (results.Count < 100) { foreach (string thisResult in results) { Output.WriteLine("<a href=\"" + search_url.Replace("%3c%25TERM%25%3e", thisResult.Trim().Replace(",", "%2C").Replace("&", "%26").Replace("\"", "%22").Replace("&", "&")) + "\">" + thisResult.Replace("\"", """).Replace("&", "&") + "</a><br />"); } } else if (results.Count < 500) { // Determine the actual page first int first_valid_page = -1; if ((letters_appearing.Contains('a')) || (letters_appearing.Contains('b'))) { first_valid_page = 1; } if ((letters_appearing.Contains('c')) || (letters_appearing.Contains('d')) || (letters_appearing.Contains('e'))) { if (first_valid_page < 0) { first_valid_page = 2; } } if ((letters_appearing.Contains('f')) || (letters_appearing.Contains('g')) || (letters_appearing.Contains('h'))) { if (first_valid_page < 0) { first_valid_page = 3; } } if ((letters_appearing.Contains('i')) || (letters_appearing.Contains('j')) || (letters_appearing.Contains('k'))) { if (first_valid_page < 0) { first_valid_page = 4; } } if ((letters_appearing.Contains('l')) || (letters_appearing.Contains('m')) || (letters_appearing.Contains('n'))) { if (first_valid_page < 0) { first_valid_page = 5; } } if ((letters_appearing.Contains('o')) || (letters_appearing.Contains('p')) || (letters_appearing.Contains('q'))) { if (first_valid_page < 0) { first_valid_page = 6; } } if ((letters_appearing.Contains('r')) || (letters_appearing.Contains('s')) || (letters_appearing.Contains('t'))) { if (first_valid_page < 0) { first_valid_page = 7; } } if ((letters_appearing.Contains('u')) || (letters_appearing.Contains('v')) || (letters_appearing.Contains('w'))) { if (first_valid_page < 0) { first_valid_page = 8; } } if ((letters_appearing.Contains('x')) || (letters_appearing.Contains('y')) || (letters_appearing.Contains('z'))) { if (first_valid_page < 0) { first_valid_page = 9; } } // Define the limits of the page value if ((current_page < first_valid_page) || (current_page > 9)) { current_page = first_valid_page; } // Add the links for paging through results Output.WriteLine("<div class=\"sbkMebv_NavRow\">"); if ((letters_appearing.Contains('a')) || (letters_appearing.Contains('b'))) { if (current_page == 1) { Output.WriteLine("<span class=\"sbkMebv_NavRowCurrent\">AB</span> "); } else { Output.WriteLine("<a href=\"" + page_url + "/1" + url_options + "\" class=\"mbb1\">AB</a> "); } } else { Output.WriteLine("<span class=\"sbkMebv_NavRowDisabled\">AB</span> "); } if ((letters_appearing.Contains('c')) || (letters_appearing.Contains('d')) || (letters_appearing.Contains('e'))) { if (current_page == 2) { Output.WriteLine("<span class=\"sbkMebv_NavRowCurrent\">CDE</span> "); } else { Output.WriteLine("<a href=\"" + page_url + "/2" + url_options + "\">CDE</a> "); } } else { Output.WriteLine("<span class=\"sbkMebv_NavRowDisabled\">CDE</span> "); } if ((letters_appearing.Contains('f')) || (letters_appearing.Contains('g')) || (letters_appearing.Contains('h'))) { if (current_page == 3) { Output.WriteLine("<span class=\"sbkMebv_NavRowCurrent\">FGH</span> "); } else { Output.WriteLine("<a href=\"" + page_url + "/3" + url_options + "\">FGH</a> "); } } else { Output.WriteLine("<span class=\"sbkMebv_NavRowDisabled\">FGH</span> "); } if ((letters_appearing.Contains('i')) || (letters_appearing.Contains('j')) || (letters_appearing.Contains('k'))) { if (current_page == 4) { Output.WriteLine("<span class=\"sbkMebv_NavRowCurrent\">IJK</span> "); } else { Output.WriteLine("<a href=\"" + page_url + "/4" + url_options + "\">IJK</a> "); } } else { Output.WriteLine("<span class=\"sbkMebv_NavRowDisabled\">IJK</span> "); } if ((letters_appearing.Contains('l')) || (letters_appearing.Contains('m')) || (letters_appearing.Contains('n'))) { if (current_page == 5) { Output.WriteLine("<span class=\"sbkMebv_NavRowCurrent\">LMN</span> "); } else { Output.WriteLine("<a href=\"" + page_url + "/5" + url_options + "\">LMN</a> "); } } else { Output.WriteLine("<span class=\"sbkMebv_NavRowDisabled\">LMN</span> "); } if ((letters_appearing.Contains('o')) || (letters_appearing.Contains('p')) || (letters_appearing.Contains('q'))) { if (current_page == 6) { Output.WriteLine("<span class=\"sbkMebv_NavRowCurrent\">OPQ</span> "); } else { Output.WriteLine("<a href=\"" + page_url + "/6" + url_options + "\">OPQ</a> "); } } else { Output.WriteLine("<span class=\"sbkMebv_NavRowDisabled\">OPQ</span> "); } if ((letters_appearing.Contains('r')) || (letters_appearing.Contains('s')) || (letters_appearing.Contains('t'))) { if (current_page == 7) { Output.WriteLine("<span class=\"sbkMebv_NavRowCurrent\">RST</span> "); } else { Output.WriteLine("<a href=\"" + page_url + "/7" + url_options + "\">RST</a> "); } } else { Output.WriteLine("<span class=\"sbkMebv_NavRowDisabled\">RST</span> "); } if ((letters_appearing.Contains('u')) || (letters_appearing.Contains('v')) || (letters_appearing.Contains('w'))) { if (current_page == 8) { Output.WriteLine("<span class=\"sbkMebv_NavRowCurrent\">UVW</span> "); } else { Output.WriteLine("<a href=\"" + page_url + "/8" + url_options + "\">UVW</a> "); } } else { Output.WriteLine("<span class=\"sbkMebv_NavRowDisabled\">UVW</span> "); } if ((letters_appearing.Contains('x')) || (letters_appearing.Contains('y')) || (letters_appearing.Contains('z'))) { if (current_page == 9) { Output.WriteLine("<span class=\"sbkMebv_NavRowCurrent\">XYZ</span> "); } else { Output.WriteLine("<a href=\"" + page_url + "/9" + url_options + "\">XYZ</a> "); } } else { Output.WriteLine("<span class=\"sbkMebv_NavRowDisabled\" >XYZ</span> "); } Output.WriteLine("</div>"); Output.WriteLine("<br />"); Output.WriteLine("<br />"); // Find the start character and last character, per the page char first_char = ' '; char stop_char = 'c'; switch (current_page) { case 2: first_char = 'c'; stop_char = 'f'; break; case 3: first_char = 'f'; stop_char = 'i'; break; case 4: first_char = 'i'; stop_char = 'l'; break; case 5: first_char = 'l'; stop_char = 'o'; break; case 6: first_char = 'o'; stop_char = 'r'; break; case 7: first_char = 'r'; stop_char = 'u'; break; case 8: first_char = 'u'; stop_char = 'x'; break; case 9: first_char = 'x'; stop_char = '}'; break; } // Add the pertinent rows foreach (string thisValue in results) { if (thisValue.Length > 0) { char this_first_char = Char.ToLower(thisValue[0]); if ((this_first_char >= first_char) && (this_first_char < stop_char)) { Output.WriteLine("<a href=\"" + search_url.Replace("%3c%25TERM%25%3e", thisValue.Trim().Replace(",", "%2C").Replace("&", "%26").Replace("\"", "%22")).Replace("&", "&") + "\">" + thisValue.Replace("\"", """).Replace("&", "&") + "</a><br />"); } } } } else { // Determine the first valid page char label_char = 'a'; int first_valid_page = -1; int counter = 1; while (label_char <= 'z') { if (letters_appearing.Contains(label_char)) { if (first_valid_page < 0) { first_valid_page = counter; } } counter++; label_char = (char)((label_char) + 1); } // Define the limits of the page value if ((current_page < first_valid_page) || (current_page > 26)) { current_page = first_valid_page; } // Add the links for paging through results label_char = 'a'; counter = 1; Output.WriteLine("<div class=\"sbkMebv_NavRow\">"); while (label_char <= 'z') { if (letters_appearing.Contains(label_char)) { if (current_page == counter) { Output.WriteLine("<span class=\"sbkMebv_NavRowCurrent\">" + Char.ToUpper(label_char) + "</span> "); } else { Output.WriteLine("<a href=\"" + page_url + "/" + counter + url_options + "\" >" + Char.ToUpper(label_char) + "</a> "); } } else { Output.WriteLine("<span class=\"sbkMebv_NavRowDisabled\" >" + Char.ToUpper(label_char) + "</span> "); } counter++; label_char = (char)((label_char) + 1); } Output.WriteLine("</div>"); Output.WriteLine("<br />"); Output.WriteLine("<br />"); // Find the start character and last character, per the page char first_char = ' '; char stop_char = 'b'; if (current_page > 1) { first_char = (char)(96 + current_page); stop_char = (char)(97 + current_page); } // Add the pertinent rows foreach (string thisValue in results) { if (thisValue.Length > 0) { char this_first_char = Char.ToLower(thisValue[0]); if ((this_first_char >= first_char) && (this_first_char < stop_char)) { Output.WriteLine("<a href=\"" + search_url.Replace("%3c%25TERM%25%3e", thisValue.Trim().Replace(",", "%2C").Replace("&", "%26").Replace("\"", "%22")).Replace("&", "&") + "\">" + thisValue.Replace("\"", """).Replace("&", "&") + "</a><br />"); } } } } } else { Output.WriteLine("<br /><br /><br /><br />"); Output.WriteLine(RequestSpecificValues.Current_Mode.Info_Browse_Mode.Length == 0 ? "<center>Select a metadata field to browse by from the list on the left</center>" : "<center>NO MATCHING VALUES</center>"); Output.WriteLine("<br /><br />"); } } // Set the current mode back RequestSpecificValues.Current_Mode.Mode = Display_Mode_Enum.Aggregation; RequestSpecificValues.Current_Mode.Aggregation_Type = Aggregation_Type_Enum.Browse_By; Output.WriteLine("</div>"); Output.WriteLine("<br />"); if ((public_browses.Count > 1) || (internal_browses.Count > 0)) { Output.WriteLine("</td>"); Output.WriteLine("</tr>"); Output.WriteLine("</table>"); } Output.WriteLine(); }
/// <summary> Gets the menu items related to this viewer that should be included on the main item (digital resource) menu </summary> /// <param name="CurrentItem"> Digital resource object, which can be used to ensure if and how this viewer should appear /// in the main item (digital resource) menu </param> /// <param name="CurrentUser"> Current user, who may or may not be logged on </param> /// <param name="CurrentRequest"> Information about the current request </param> /// <param name="MenuItems"> List of menu items, to which this method may add one or more menu items </param> /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param> public virtual void Add_Menu_Items(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, List <Item_MenuItem> MenuItems, bool IpRestricted) { // Again, ensure access if (!Has_Access(CurrentItem, CurrentUser, false)) { return; } // Get the URL for this string previous_code = CurrentRequest.ViewerCode; CurrentRequest.ViewerCode = ViewerCode; string url = UrlWriterHelper.Redirect_URL(CurrentRequest); CurrentRequest.ViewerCode = previous_code; MenuItems.Add(new Item_MenuItem("Manage", "Management Menu", null, url, "manage")); bool is_bib_level = (String.Compare(CurrentItem.Type, "BIB_LEVEL", StringComparison.OrdinalIgnoreCase) == 0); if (!is_bib_level) { // Look for TEI-type item bool is_tei = false; if ((UI_ApplicationCache_Gateway.Configuration.Extensions != null) && (UI_ApplicationCache_Gateway.Configuration.Extensions.Get_Extension("TEI") != null) && (UI_ApplicationCache_Gateway.Configuration.Extensions.Get_Extension("TEI").Enabled)) { string tei_file = CurrentItem.Behaviors.Get_Setting("TEI.Source_File"); string xslt_file = CurrentItem.Behaviors.Get_Setting("TEI.XSLT"); if ((tei_file != null) && (xslt_file != null)) { is_tei = true; } } if (!is_tei) { // Add the menu item for editing metadatga CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Edit_Item_Metadata; string edit_metadata_url = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "Edit Metadata", null, edit_metadata_url, "nevermatchthis")); } else { // Add the menu item for editing metadatga CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Edit_TEI_Item; string edit_tei_url = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "Edit TEI", null, edit_tei_url, "nevermatchthis")); } // Add the menu item for editing item behaviors CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Edit_Item_Behaviors; string edit_behaviors_url = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "Edit Item Behaviors", null, edit_behaviors_url, "nevermatchthis")); // Add the menu item for managing download files CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.File_Management; string manage_downloads = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "Manage Download Files", null, manage_downloads, "nevermatchthis")); // Add the menu item for managing pages and divisions if ((CurrentItem.Images == null) || (CurrentItem.Images.Count == 0)) { CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Page_Images_Management; string page_images_url = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "Manage Pages and Divisions", null, page_images_url, "nevermatchthis")); } else { CurrentRequest.Mode = Display_Mode_Enum.Item_Display; CurrentRequest.ViewerCode = "qc"; string qc_url = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "Manage Pages and Divisions", null, qc_url, "nevermatchthis")); } // Add the manage geo-spatial data option CurrentRequest.Mode = Display_Mode_Enum.Item_Display; CurrentRequest.ViewerCode = "mapedit"; string mapedit_url = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "Manage Geo-Spatial Data (beta)", null, mapedit_url, "mapedit")); // Add the tracking sheet menu option CurrentRequest.ViewerCode = "ts"; string tracking_url = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "View Tracking Sheet", null, tracking_url, "ts")); } else { // Get all the mySObek URLs CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; // Add the group behavior edit CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Edit_Group_Behaviors; string edit_behaviors_url = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "Edit Item Group Behaviors", null, edit_behaviors_url, "nevermatchthis")); // Add the option to add a new volume CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Group_Add_Volume; string add_volume_url = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "Add New Volume", null, add_volume_url, "nevermatchthis")); // Add the option for group mass update CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Group_Mass_Update_Items; string mass_update_url = UrlWriterHelper.Redirect_URL(CurrentRequest); MenuItems.Add(new Item_MenuItem("Manage", "Mass Update Item Behaviors", null, mass_update_url, "nevermatchthis")); } CurrentRequest.Mode = Display_Mode_Enum.Item_Display; CurrentRequest.ViewerCode = previous_code; }
/// <summary> Write the item viewer main section as HTML directly to the HTTP output stream </summary> /// <param name="Output"> Response stream for the item viewer to write directly to </param> /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param> public override void Write_Main_Viewer_Section(TextWriter Output, Custom_Tracer Tracer) { if (Tracer != null) { Tracer.Add_Trace("ManageMenu_ItemViewer.Write_Main_Viewer_Section", ""); } string currentViewerCode = CurrentRequest.ViewerCode; // Add the HTML for the image Output.WriteLine("<!-- MANAGE MENU ITEM VIEWER OUTPUT -->"); bool is_bib_level = (String.Compare(BriefItem.Type, "BIB_LEVEL", StringComparison.OrdinalIgnoreCase) == 0); if (!is_bib_level) { // Look for TEI-type item bool is_tei = false; if ((UI_ApplicationCache_Gateway.Configuration.Extensions != null) && (UI_ApplicationCache_Gateway.Configuration.Extensions.Get_Extension("TEI") != null) && (UI_ApplicationCache_Gateway.Configuration.Extensions.Get_Extension("TEI").Enabled)) { string tei_file = BriefItem.Behaviors.Get_Setting("TEI.Source_File"); string xslt_file = BriefItem.Behaviors.Get_Setting("TEI.XSLT"); if ((tei_file != null) && (xslt_file != null)) { is_tei = true; } } // Start the citation table Output.WriteLine(" <td align=\"left\"><div class=\"sbkMmiv_ViewerTitle\">Manage this Item</div></td>"); Output.WriteLine("</tr>"); Output.WriteLine("<tr>"); Output.WriteLine(" <td class=\"sbkMmiv_MainArea\">"); Output.WriteLine("\t\t\t<table id=\"sbkMmiv_MainTable\">"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_HeaderRow\"><td colspan=\"3\">How would you like to manage this item today?</td></tr>"); string url; if (!is_tei) { // Add ability to edit metadata for this item CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Edit_Item_Metadata; CurrentRequest.My_Sobek_SubMode = "1"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Edit_Metadata_Icon_Png + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Edit Item Metadata</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">Edit the information about this item which appears in the citation/description. This is basic information about the original item and this digital manifestation.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); } else { // Add ability to edit metadata for this item CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Edit_TEI_Item; CurrentRequest.My_Sobek_SubMode = "1"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"http://cdn.sobekrepository.org/images/misc/add_tei.png\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Edit TEI</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">Edit this TEI object, including the XSLT and CSS file used as well as uploading a new TEI file or editing the existing TEI file online.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); } // Add ability to edit behaviors for this item CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Edit_Item_Behaviors; CurrentRequest.My_Sobek_SubMode = "1"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Edit_Behaviors_Icon_Png + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Edit Item Behaviors</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">Change the way this item behaves in this library, including which aggregations it appears under, the wordmarks to the left, and which viewer types are publicly accessible.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); // Add ability to perform QC ( manage pages and divisions) for this item CurrentRequest.Mode = Display_Mode_Enum.Item_Display; CurrentRequest.ViewerCode = "qc"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Qc_Button_Img_Large + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Manage Pages and Divisions (Quality Control)</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">Reorder page images, name pages, assign divisions, and delete and add new page images to this item.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); // Add ability to view work history for this item CurrentRequest.Mode = Display_Mode_Enum.Item_Display; CurrentRequest.ViewerCode = "tracking"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.View_Work_Log_Img_Large + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">View Work History</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">View the history of all work performed on this item. From this view, you can also see any digitization milestones and digital resource file information.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); // Add ability to upload new download files for this item CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.File_Management; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.File_Management_Icon_Png + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Manage Download Files</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">Upload new files for download or remove existing files that are attached to this item for download. This generally includes everything except for the page images.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); // Add ability to edit geo-spatial information for this item CurrentRequest.Mode = Display_Mode_Enum.Item_Display; CurrentRequest.ViewerCode = "mapedit"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Add_Geospatial_Img + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Manage Geo-Spatial Data (beta)</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">Add geo-spatial information for this item. This can be as simple as a location for a photograph or can be an overlay for a map. Points, lines, and polygons of interest can also be drawn.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); // Add ability to edit geo-spatial information for this item CurrentRequest.Mode = Display_Mode_Enum.Item_Display; CurrentRequest.ViewerCode = "ts"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Track2_Gif + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">View Tracking Sheet</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">This can be used for printing the tracking sheet for this item, which can be used as part of the built-in digitization workflow.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_HeaderRow\"><td colspan=\"3\">In addition, the following changes can be made at the item group level:</td></tr>"); // Add ability to edit GROUP behaviors for this group CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Edit_Group_Behaviors; CurrentRequest.My_Sobek_SubMode = "1"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Edit_Behaviors_Icon_Png + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Edit Item Group Behaviors</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">Set the title under which all of these items appear in search results and set the web skins under which all these items should appear.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); // Add ability to add new volume for this group CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Group_Add_Volume; CurrentRequest.My_Sobek_SubMode = "1"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Add_Volume_Img + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Add New Volume</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">Add a new, related volume to this item group.<br /><br /></div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); if ((BriefItem.Web != null) && (BriefItem.Web.Siblings.HasValue) && (BriefItem.Web.Siblings > 1)) { // Add ability to mass update all items for this group CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Group_Mass_Update_Items; CurrentRequest.My_Sobek_SubMode = "1"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Mass_Update_Icon_Png + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Mass Update Item Behaviors</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">This allows item-level behaviors to be set for all items within this item group, including which aggregations it appears under, the wordmarks to the left, and which viewer types are publicly accessible.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); } Output.WriteLine("\t\t\t</table>"); Output.WriteLine("\t\t</td>"); } else { // Start the citation table Output.WriteLine(" <td align=\"left\"><div class=\"sbkMmiv_ViewerTitle\">Manage this Item Group</div></td>"); Output.WriteLine("</tr>"); Output.WriteLine("<tr>"); Output.WriteLine(" <td class=\"sbkMmiv_MainArea\">"); Output.WriteLine("\t\t\t<table id=\"sbkMmiv_MainTable\">"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_HeaderRow\"><td colspan=\"3\">How would you like to manage this item group today?</td></tr>"); // Add ability to edit GROUP behaviors for this group CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Edit_Group_Behaviors; CurrentRequest.My_Sobek_SubMode = "1"; string url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Edit_Behaviors_Icon_Png + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Edit Item Group Behaviors</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">Set the title under which all of these items appear in search results and set the web skins under which all these items should appear.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); // Add ability to add new volume for this group CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Group_Add_Volume; CurrentRequest.My_Sobek_SubMode = "1"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Add_Volume_Img + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Add New Volume</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">Add a new, related volume to this item group.<br /><br /></div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); // Add ability to mass update all items for this group CurrentRequest.Mode = Display_Mode_Enum.My_Sobek; CurrentRequest.My_Sobek_Type = My_Sobek_Type_Enum.Group_Mass_Update_Items; CurrentRequest.My_Sobek_SubMode = "1"; url = UrlWriterHelper.Redirect_URL(CurrentRequest); Output.WriteLine("\t\t\t\t<tr>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:50px\"> </td>"); Output.WriteLine("\t\t\t\t\t<td style=\"width:60px\"><a href=\"" + url + "\"><img src=\"" + Static_Resources_Gateway.Mass_Update_Icon_Png + "\" /></a></td>"); Output.WriteLine("\t\t\t\t\t<td>"); Output.WriteLine("\t\t\t\t\t\t<a href=\"" + url + "\">Mass Update Item Behaviors</a>"); Output.WriteLine("\t\t\t\t\t\t<div class=\"sbkMmiv_Desc\">This allows item-level behaviors to be set for all items within this item group, including which aggregations it appears under, the wordmarks to the left, and which viewer types are publicly accessible.</div>"); Output.WriteLine("\t\t\t\t\t</td>"); Output.WriteLine("\t\t\t\t</tr>"); Output.WriteLine("\t\t\t\t<tr class=\"sbkMmiv_SpacerRow\"><td colspan=\"3\"></td></tr>"); Output.WriteLine("\t\t\t</table>"); Output.WriteLine("\t\t</td>"); } // Reset the value CurrentRequest.Mode = Display_Mode_Enum.Item_Display; CurrentRequest.ViewerCode = currentViewerCode; }
/// <summary> Returns the string which contains the metadata links and basic information about the types of metadata</summary> /// <returns> Sttring with the metadata links and basic information about the types of metadata</returns> protected string Metadata_String(Custom_Tracer Tracer) { // Get the links for the METS and GSA string resourceURL = BriefItem.Web.Source_URL + "/"; string complete_mets = resourceURL + BriefItem.BibID + "_" + BriefItem.VID + ".mets.xml"; string marc_xml = resourceURL + "marc.xml"; // MAKE THIS USE THE FILES.ASPX WEB PAGE if this is restricted (or dark) if ((BriefItem.Behaviors.Dark_Flag) || (BriefItem.Behaviors.IP_Restriction_Membership > 0)) { resourceURL = CurrentRequest.Base_URL + "files/" + BriefItem.BibID + "/" + BriefItem.VID + "/"; complete_mets = resourceURL + BriefItem.BibID + "_" + BriefItem.VID + ".mets.xml"; marc_xml = resourceURL + "marc.xml"; } StringBuilder builder = new StringBuilder(3000); builder.AppendLine("<blockquote>"); builder.AppendLine("<p>The data (or metadata) about this digital resource is available in a variety of metadata formats. For more information about these formats, see the <a href=\"http://ufdc.ufl.edu/sobekcm/metadata\">Metadata Section</a> of the <a href=\"http://ufdc.ufl.edu/sobekcm/\">Technical Aspects</a> information.</p>"); builder.AppendLine("<br />"); if (BriefItem.Type == "EAD") { string ead_file = String.Empty; foreach (BriefItem_FileGrouping downloadPage in BriefItem.Downloads) { // Was this an EAD page? if ((downloadPage.Label == "EAD") && (downloadPage.Files.Count == 1)) { if (downloadPage.Files[0].Name.ToLower().IndexOf(".xml") > 0) { ead_file = downloadPage.Files[0].Name; break; } } } if (ead_file.Length > 0) { builder.AppendLine("<div id=\"sbkCiv_EadDownload\" class=\"sbCiv_DownloadSection\">"); builder.AppendLine(" <a href=\"" + resourceURL + ead_file + "\" target=\"_blank\">View Finding Aid (EAD)</a>"); builder.AppendLine(" <p>This archival collection is described with an electronic finding aid. This metadata file contains all of the archival description and container list for this archival material. This file follows the established <a href=\"http://www.loc.gov/ead/\">Encoded Archival Description</a> (EAD) standard.</p>"); builder.AppendLine("</div>"); } } builder.AppendLine("<div id=\"sbkCiv_MetsDownload\" class=\"sbCiv_DownloadSection\">"); builder.AppendLine(" <a href=\"" + complete_mets + "\" target=\"_blank\">View Complete METS/MODS</a>"); builder.AppendLine(" <p>This metadata file is the source metadata file submitted along with all the digital resource files. This contains all of the citation and processing information used to build this resource. This file follows the established <a href=\"http://www.loc.gov/standards/mets/\">Metadata Encoding and Transmission Standard</a> (METS) and <a href=\"http://www.loc.gov/standards/mods/\">Metadata Object Description Schema</a> (MODS). This METS/MODS file was just read when this item was loaded into memory and used to display all the information in the standard view and marc view within the citation.</p>"); builder.AppendLine("</div>"); string baseLocationUrl = String.IsNullOrEmpty(UI_ApplicationCache_Gateway.Settings.Servers.Base_SobekCM_Location_Relative) ? String.Empty : UI_ApplicationCache_Gateway.Settings.Servers.Base_SobekCM_Location_Relative; builder.AppendLine("<div id=\"sbkCiv_MarcXmlDownload\" class=\"sbCiv_DownloadSection\">"); builder.AppendLine(" <a href=\"" + marc_xml + "\" target=\"_blank\">View MARC XML File</a>"); builder.AppendLine(" <p>The entered metadata is also converted to MARC XML format, for interoperability with other library catalog systems. This represents the same data available in the <a href=\"" + baseLocationUrl + UrlWriterHelper.Redirect_URL(CurrentRequest, "FC2") + "\">MARC VIEW</a> except this is a static XML file. This file follows the <a href=\"http://www.loc.gov/standards/marcxml/\">MarcXML Schema</a>.</p>"); builder.AppendLine("</div>"); // Should the TEI be added here? if (BriefItem.Behaviors.Get_Viewer("TEI") != null) { // Does a TEI file exist? //string tei_filename = BriefItem.BibID + "_" + BriefItem.VID + ".tei.xml"; // This code previously created the TEI at this point... before it was retrieved // This should go into engine endpoint code or somethin //if (!SobekFileSystem.FileExists(BriefItem, tei_filename)) //{ // if (Tracer != null) // { // Tracer.Add_Trace("Citation_ItemViewer.Metadata_String", "Building default TEI file"); // } // TEI_File_ReaderWriter writer = new TEI_File_ReaderWriter(); // Dictionary<string, object> options = new Dictionary<string, object>(); // string error_message; // writer.Write_Metadata(tei_filename, CurrentItem, options, out error_message); //} // Add the HTML for this builder.AppendLine("<div id=\"sbkCiv_TeiDownload\" class=\"sbCiv_DownloadSection\">"); builder.AppendLine(" <a href=\"" + resourceURL + BriefItem.BibID + "_" + BriefItem.VID + ".tei.xml\" target=\"_blank\">View TEI/Text File</a>"); builder.AppendLine(" <p>The full-text of this item is also available in the established standard <a href=\"http://www.tei-c.org/index.xml\">Text Encoding Initiative</a> (TEI) downloadable file.</p>"); builder.AppendLine("</div>"); } builder.AppendLine("</blockquote><br />"); builder.AppendLine("</div>"); return(builder.ToString()); }