/// <summary> Method helps to render all simple text area based elements </summary>
        /// <param name="Output"> Output for the generated html for this element </param>
        /// <param name="instance_value"> Value for the current digital resource to display </param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="isMozilla"> Flag indicates if the browser is Mozilla Firefox</param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        protected void render_helper(TextWriter Output, string instance_value, string Skin_Code, bool isMozilla, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            string id_name = html_element_name.Replace("_", "");

            int actual_cols = cols;

            if (isMozilla)
            {
                actual_cols = cols_mozilla;
            }

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Read_Only)
            {
                Output.WriteLine("    <td class=\"metadata_label\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</td>");
            }
            else
            {
                if (Acronym.Length > 0)
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
                }
                else
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
                }
            }
            Output.WriteLine("    <td>");
            const int i = 1;

            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");
            Output.WriteLine("              <textarea rows=\"" + rows + "\" cols=\"" + actual_cols + "\" name=\"" + id_name + i + "\" id=\"" + id_name + i + "\" class=\"" + html_element_name + "_input sbk_Focusable\">" + HttpUtility.HtmlEncode(instance_value) + "</textarea></div>");
            Output.WriteLine("            </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td valign=\"bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add another " + Title.ToLower(), CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return " + html_element_name + "_add_new_item();\"><img class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" /></a>");
            }

            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");

            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
示例#2
0
        /// <summary> Returns the HTML for one element within tab which appears over the search box in the collection view </summary>
        /// <param name="ThisView"> Collection view type for this tab </param>
        /// <param name="Current_Mode"> Mode / navigation information for the current request, to see if the tab is currently selected or not and determine current skin language </param>
        /// <param name="Translations"> Language support object for writing the name of the view in the appropriate interface language </param>
        /// <returns> HTML to display the tab, including the link if it is not currently selected </returns>
        public static string Menu_Get_Nav_Bar_HTML(Item_Aggregation.CollectionViewsAndSearchesEnum ThisView, SobekCM_Navigation_Object Current_Mode, Language_Support_Info Translations)
        {
            string skinCode = Current_Mode.Base_Skin;

            switch (ThisView)
            {
            case Item_Aggregation.CollectionViewsAndSearchesEnum.Advanced_Search:
            case Item_Aggregation.CollectionViewsAndSearchesEnum.Advanced_Search_YearRange:
                return(Menu_HTML_Helper(skinCode, Search_Type_Enum.Advanced, Translations.Get_Translation("ADVANCED SEARCH", Current_Mode.Language), Current_Mode));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.Basic_Search:
            case Item_Aggregation.CollectionViewsAndSearchesEnum.Basic_Search_YearRange:
                return(Menu_HTML_Helper(skinCode, Search_Type_Enum.Basic, Translations.Get_Translation("BASIC SEARCH", Current_Mode.Language), Current_Mode));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.Map_Search:
                return(Menu_HTML_Helper(skinCode, Search_Type_Enum.Map, Translations.Get_Translation("MAP SEARCH", Current_Mode.Language), Current_Mode));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.Map_Search_Beta:
                return(Menu_HTML_Helper(skinCode, Search_Type_Enum.Map_Beta, Translations.Get_Translation("MAP SEARCH", Current_Mode.Language), Current_Mode));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.Newspaper_Search:
                return(Menu_HTML_Helper(skinCode, Search_Type_Enum.Newspaper, Translations.Get_Translation("NEWSPAPER SEARCH", Current_Mode.Language), Current_Mode));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.Admin_View:
                return(String.Empty);                        // HTML_Helper(Skin_Code, SobekCM.Library.Navigation.Search_Type_Enum.Admin_View, Translations.Get_Translation("ADMIN", Current_Mode.Language), Current_Mode, Downward_Tabs);

            case Item_Aggregation.CollectionViewsAndSearchesEnum.DLOC_FullText_Search:
                return(Menu_HTML_Helper(skinCode, Search_Type_Enum.dLOC_Full_Text, Translations.Get_Translation("TEXT SEARCH", Current_Mode.Language), Current_Mode));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.FullText_Search:
                return(Menu_HTML_Helper(skinCode, Search_Type_Enum.Full_Text, Translations.Get_Translation("TEXT SEARCH", Current_Mode.Language), Current_Mode));
            }

            return(String.Empty);
        }
        /// <summary> Returns the HTML for one tab which appears over the search box in the collection view </summary>
        /// <param name="thisView"> Collection view type for this tab </param>
        /// <param name="Current_Mode"> Mode / navigation information for the current request, to see if the tab is currently selected or not and determine current skin language </param>
        /// <param name="Translations"> Language support object for writing the name of the view in the appropriate interface language </param>
        /// <param name="Downward_Tabs"> Flag indicates if this tab faces downward, rather than the default upward </param>
        /// <returns> HTML to display the tab, including the link if it is not currently selected </returns>
        public static string Get_Nav_Bar_HTML(Item_Aggregation.CollectionViewsAndSearchesEnum thisView, SobekCM_Navigation_Object Current_Mode, Language_Support_Info Translations, bool Downward_Tabs)
        {
            string skinCode = Current_Mode.Base_Skin;

            switch (thisView)
            {
            case Item_Aggregation.CollectionViewsAndSearchesEnum.Advanced_Search:
                if (Current_Mode.Is_Robot)
                {
                    return("<img src=\"" + Current_Mode.Base_URL + "design/skins/" + skinCode + "/tabs/cL.gif\" border=\"0\" class=\"tab_image\" alt=\"\" /><span class=\"tab\"> ADVANCED SEARCH </span><img src=\"" + Current_Mode.Base_URL + "design/skins/" + skinCode + "/tabs/cR.gif\" border=\"0\" class=\"tab_image\" alt=\"\" />" + Environment.NewLine);
                }
                return(HTML_Helper(skinCode, Search_Type_Enum.Advanced, Translations.Get_Translation("ADVANCED SEARCH", Current_Mode.Language), Current_Mode, Downward_Tabs));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.Basic_Search:
                return(HTML_Helper(skinCode, Search_Type_Enum.Basic, Translations.Get_Translation("BASIC SEARCH", Current_Mode.Language), Current_Mode, Downward_Tabs));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.Map_Search:
                return(HTML_Helper(skinCode, Search_Type_Enum.Map, Translations.Get_Translation("MAP SEARCH", Current_Mode.Language), Current_Mode, Downward_Tabs));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.Newspaper_Search:
                return(HTML_Helper(skinCode, Search_Type_Enum.Newspaper, Translations.Get_Translation("NEWSPAPER SEARCH", Current_Mode.Language), Current_Mode, Downward_Tabs));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.Admin_View:
                return(String.Empty);    // HTML_Helper(Skin_Code, SobekCM.Library.Navigation.Search_Type_Enum.Admin_View, Translations.Get_Translation("ADMIN", Current_Mode.Language), Current_Mode, Downward_Tabs);

            case Item_Aggregation.CollectionViewsAndSearchesEnum.dLOC_FullText_Search:
                return(HTML_Helper(skinCode, Search_Type_Enum.dLOC_Full_Text, Translations.Get_Translation("TEXT SEARCH", Current_Mode.Language), Current_Mode, Downward_Tabs));

            case Item_Aggregation.CollectionViewsAndSearchesEnum.FullText_Search:
                return(HTML_Helper(skinCode, Search_Type_Enum.Full_Text, Translations.Get_Translation("TEXT SEARCH", Current_Mode.Language), Current_Mode, Downward_Tabs));
            }

            return(String.Empty);
        }
示例#4
0
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="IsMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="PopupFormBuilder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This simple element does not append any popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool IsMozilla, StringBuilder PopupFormBuilder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Enter the rights you give for sharing, repurposing, or remixing your item to other users.  You may also select a creative commons license below.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            // render_helper(Output, Bib.Bib_Info.Access_Condition.Text, Skin_Code, isMozilla, Current_User, CurrentLanguage, Translator);

            string id_name = html_element_name.Replace("_", "");

            int actual_cols = Cols;

            if (IsMozilla)
            {
                actual_cols = ColsMozilla;
            }

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Read_Only)
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\">" + Title + ":</b></td>");
            }
            else
            {
                if (Acronym.Length > 0)
                {
                    Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Title + ":</acronym></a></td>");
                }
                else
                {
                    Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Title + ":</a></td>");
                }
            }
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");
            Output.WriteLine("              <textarea rows=\"" + Rows + "\" cols=\"" + actual_cols + "\" name=\"" + id_name + "1\" id=\"" + id_name + "1\" class=\"" + html_element_name + "_input\" onfocus=\"javascript:textbox_enter('" + id_name + "1','" + html_element_name + "_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "1','" + html_element_name + "_input')\">" + HttpUtility.HtmlEncode(Bib.Bib_Info.Access_Condition.Text.Trim()) + "</textarea>");
            Output.WriteLine("              <div class=\"ShowOptionsRow\">");
            Output.WriteLine("                <ul class=\"sbk_FauxDownwardTabsList\">");
            Output.WriteLine("                  <li><a href=\"\" onclick=\"return open_cc_rights();\">CREATIVE COMMONS</a></li>");
            Output.WriteLine("                  <li><a href=\"\" onclick=\"return open_uf_rights();\">UF RIGHTS STATEMENTS</a></li>");
            Output.WriteLine("                </ul>");
            Output.WriteLine("              </div>");
            Output.WriteLine("            </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td valign=\"bottom\" >");
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button_rightsmgmt\" src=\"" + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();


            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td colspan=\"2\">&nbsp;</td>");
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table id=\"cc_rights\" cellpadding=\"3px\" cellspacing=\"3px\" style=\"display:none;\">");
            Output.WriteLine("        <tr><td colspan=\"2\">You may also select a <a title=\"Explanation of different creative commons licenses.\" href=\"http://creativecommons.org/about/licenses/\">Creative Commons License</a> option below.<br /></td></tr>");
            Output.WriteLine("        <tr><td> &nbsp; <a href=\"\" onclick=\"return set_cc_rights('rightsmgmt1','[cc0] The author dedicated the work to the Commons by waiving all of his or her rights to the work worldwide under copyright law and all related or neighboring legal rights he or she had in the work, to the extent allowable by law.');\"><img title=\"You dedicate the work to the Commons by waiving all of your rights to the work worldwide under copyright law and all related or neighboring legal rights you had in the work, to the extent allowable by law.\" src=\"" + Static_Resources_Gateway.Cc_Zero_Img + "\" /></a></td><td><b>No Copyright</b><br /><i>cc0</i></td></tr>");
            Output.WriteLine("        <tr><td> &nbsp; <a href=\"\" onclick=\"return set_cc_rights('rightsmgmt1','[cc by] This item is licensed with the Creative Commons Attribution License.  This license lets others distribute, remix, tweak, and build upon this work, even commercially, as long as they credit the author for the original creation.');\"><img title=\"This license lets others distribute, remix, tweak, and build upon your work, even commercially, as long as they credit you for the original creation.\" src=\"" + Static_Resources_Gateway.Cc_By_Img + "\" /></a></td><td><b>Attribution</b><br /><i>cc by</i></td></tr>");
            Output.WriteLine("        <tr><td> &nbsp; <a href=\"\" onclick=\"return set_cc_rights('rightsmgmt1','[cc by-sa] This item is licensed with the Creative Commons Attribution Share Alike License.  This license lets others remix, tweak, and build upon this work even for commercial reasons, as long as they credit the author and license their new creations under the identical terms.');\"><img title=\"This license lets others remix, tweak, and build upon your work even for commercial reasons, as long as they credit you and license their new creations under the identical terms.\" src=\"" + Static_Resources_Gateway.Cc_By_Sa_Img + "\" /></a></td><td><b>Attribution Share Alike</b><br /><i>cc by-sa</i></td></tr>");
            Output.WriteLine("        <tr><td> &nbsp; <a href=\"\" onclick=\"return set_cc_rights('rightsmgmt1','[cc by-nd] This item is licensed with the Creative Commons Attribution No Derivatives License.  This license allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to the author.');\"><img title=\"This license allows for redistribution, commercial and non-commercial, as long as it is passed along unchanged and in whole, with credit to you.\" src=\"" + Static_Resources_Gateway.Cc_By_Nd_Img + "\" /></a></td><td><b>Attribution No Derivatives</b><br /><i>cc by-nd</i></td></tr>");
            Output.WriteLine("        <tr><td> &nbsp; <a href=\"\" onclick=\"return set_cc_rights('rightsmgmt1','[cc by-nc] This item is licensed with the Creative Commons Attribution Non-Commerical License.  This license lets others remix, tweak, and build upon this work non-commercially, and although their new works must also acknowledge the author and be non-commercial, they don’t have to license their derivative works on the same terms.');\"><img title=\"This license lets others remix, tweak, and build upon your work non-commercially, and although their new works must also acknowledge you and be non-commercial, they don’t have to license their derivative works on the same terms.\" src=\"" + Static_Resources_Gateway.Cc_By_Nc_Img + "\" /></a></td><td><b>Attribution Non-Commercial</b><br /><i>cc by-nc</i></td></tr>");
            Output.WriteLine("        <tr><td> &nbsp; <a href=\"\" onclick=\"return set_cc_rights('rightsmgmt1','[cc by-nc-sa] This item is licensed with the Creative Commons Attribution Non-Commercial Share Alike License.  This license lets others remix, tweak, and build upon this work non-commercially, as long as they credit the author and license their new creations under the identical terms.');\"><img title=\"This license lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under the identical terms.\" src=\"" + Static_Resources_Gateway.Cc_By_Nc_Sa_Img + "\" /></a></td><td><b>Attribution Non-Commercial Share Alike</b><br /><i>cc by-nc-sa</i></td></tr>");
            Output.WriteLine("        <tr><td> &nbsp; <a href=\"\" onclick=\"return set_cc_rights('rightsmgmt1','[cc by-nc-nd] This item is licensed with the Creative Commons Attribution Non-Commercial No Derivative License.  This license allows others to download this work and share them with others as long as they mention the author and link back to the author, but they can’t change them in any way or use them commercially.');\"><img title=\"This license allows others to download your works and share them with others as long as they mention you and link back to you, but they can’t change them in any way or use them commercially.\" src=\"" + Static_Resources_Gateway.Cc_By_Nc_Nd_Img + "\" /></a></td><td><b>Attribution Non-Commercial No Derivatives</b><br /><i>cc by-nc-nd</i></td></tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");

            //Add the table for the UF rights statements

            Output.WriteLine("<tr align=\"left\">");
            Output.WriteLine("<td colspan=\"2\">&nbsp;</td>");
            Output.WriteLine("<td>");
            Output.WriteLine("        <table id=\"uf_rights\" cellpadding=\"3pc\" cellspacing=\"3pc\" style=\"display:none;\">");
            Output.WriteLine("          <tr><td colspan=\"2\">You may also select a UF Rights Statement option below.<br/></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"Copyright Board of Trustees of the University of Florida\" style=\"color:#333;\" onclick=\"return set_uf_rights('rightsmgmt1','Copyright Board of Trustees of the University of Florida');\" ><b>UF Copyright</b></span></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"Copyright [name of copyright holder or Creator or Publisher as appropriate]. Permission granted to University of Florida to digitize and display this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.\"  style=\"color:#333;\" onclick=\"return set_uf_rights('rightsmgmt1','Copyright [name of copyright holder or Creator or Publisher as appropriate]. Permission granted to University of Florida to digitize and display this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.');\"><b>With Permission</b></span></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"The University of Florida George A. Smathers Libraries respect the intellectual property rights of others and do not claim any copyright interest in this item. This item may be protected by copyright but is made available here under a claim of fair use (17 U.S.C. §107) for non-profit research and educational purposes. Users of this work have responsibility for determining copyright status prior to reusing, publishing or reproducing this item for purposes other than what is allowed by fair use or other copyright exemptions. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder. The Smathers Libraries would like to learn more about this item and invite individuals or organizations to contact Digital Services ([email protected]) with any additional information they can provide.\" style=\"color:#333;\" onclick=\"return set_uf_rights('rightsmgmt1','The University of Florida George A. Smathers Libraries respect the intellectual property rights of others and do not claim any copyright interest in this item. This item may be protected by copyright but is made available here under a claim of fair use (17 U.S.C. §107) for non-profit research and educational purposes. Users of this work have responsibility for determining copyright status prior to reusing, publishing or reproducing this item for purposes other than what is allowed by fair use or other copyright exemptions. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder. The Smathers Libraries would like to learn more about this item and invite individuals or organizations to contact Digital Services ([email protected]) with any additional information they can provide.');\"><b>Fair Use</b></span></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"This item is a work of the U.S. federal government and not subject to copyright pursuant to 17 U.S.C. §105.\" style=\"color:#333;\" onclick=\"return set_uf_rights('rightsmgmt1','This item is a work of the U.S. federal government and not subject to copyright pursuant to 17 U.S.C. §105.');\"><b>Federal Government Document</b></span></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"This item is presumed to be in the public domain.  The University of Florida George A. Smathers Libraries respect the intellectual property rights of others and do not claim any copyright interest in this item. Users of this work have responsibility for determining copyright status prior to reusing, publishing or reproducing this item for purposes other than what is allowed by fair use or other copyright exemptions. Any reuse of this item in excess of fair use or other copyright exemptions may require permission of the copyright holder. The Smathers Libraries would like to learn more about this item and invite individuals or organizations to contact Digital Services ([email protected]) with any additional information they can provide.\" style=\"color:#333;\" onclick=\"return set_uf_rights('rightsmgmt1','This item is presumed to be in the public domain.  The University of Florida George A. Smathers Libraries respect the intellectual property rights of others and do not claim any copyright interest in this item. Users of this work have responsibility for determining copyright status prior to reusing, publishing or reproducing this item for purposes other than what is allowed by fair use or other copyright exemptions. Any reuse of this item in excess of fair use or other copyright exemptions may require permission of the copyright holder. The Smathers Libraries would like to learn more about this item and invite individuals or organizations to contact Digital Services ([email protected]) with any additional information they can provide.');\"><b>Public Domain Presumed</b></span></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"Copyright [name of dissertation author]. Permission granted to the University of Florida to digitize, archive and distribute this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.\" style=\"color:#333\" onclick=\"return set_uf_rights('rightsmgmt1','Copyright [name of dissertation author]. Permission granted to the University of Florida to digitize, archive and distribute this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.');\"><b>RDS Permission</b></span></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"The University of Florida George A. Smathers Libraries respect the intellectual property rights of others and do not claim any copyright interest in this item. This item may be protected by copyright but is made available here under a claim of fair use (17 U.S.C. §107) for non-profit research and educational purposes. Users of this work have responsibility for determining copyright status prior to reusing, publishing or reproducing this item for purposes other than what is allowed by fair use or other copyright exemptions. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder. The Smathers Libraries would like to learn more about this item and invite individuals or organizations to contact the RDS coordinator ([email protected]) with any additional information they can provide.\" style=\"color:#333\" onclick=\"return set_uf_rights('rightsmgmt1','The University of Florida George A. Smathers Libraries respect the intellectual property rights of others and do not claim any copyright interest in this item. This item may be protected by copyright but is made available here under a claim of fair use (17 U.S.C. §107) for non-profit research and educational purposes. Users of this work have responsibility for determining copyright status prior to reusing, publishing or reproducing this item for purposes other than what is allowed by fair use or other copyright exemptions. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder. The Smathers Libraries would like to learn more about this item and invite individuals or organizations to contact the RDS coordinator ([email protected]) with any additional information they can provide.');\"><b>RDS No Response</b></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"This item is presumed in the public domain according to the terms of the Retrospective Dissertation Scanning (RDS) policy, which may be viewed at http://ufdc.ufl.edu/AA00007596/00001. The University of Florida George A. Smathers Libraries respect the intellectual property rights of others and do not claim any copyright interest in this item. Users of this work have responsibility for determining copyright status prior to reusing, publishing or reproducing this item for purposes other than what is allowed by fair use or other copyright exemptions. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder. The Smathers Libraries would like to learn more about this item and invite individuals or organizations to contact the RDS coordinator ([email protected]) with any additional information they can provide.\" style=\"color:#333\" onclick=\"return set_uf_rights('rightsmgmt1','This item is presumed in the public domain according to the terms of the Retrospective Dissertation Scanning (RDS) policy, which may be viewed at http://ufdc.ufl.edu/AA00007596/00001. The University of Florida George A. Smathers Libraries respect the intellectual property rights of others and do not claim any copyright interest in this item. Users of this work have responsibility for determining copyright status prior to reusing, publishing or reproducing this item for purposes other than what is allowed by fair use or other copyright exemptions. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder. The Smathers Libraries would like to learn more about this item and invite individuals or organizations to contact the RDS coordinator ([email protected]) with any additional information they can provide.');\"><b>RDS Public Domain</b></span></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"Copyright [name of dissertation author]. Permission granted to the University of Florida to digitize, archive and distribute this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.\" style=\"color:#333\" onclick=\"return set_uf_rights('rightsmgmt1','Copyright [name of dissertation author]. Permission granted to the University of Florida to digitize, archive and distribute this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.');\"><b>Dissertation/Thesis Permission</b></span></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"This document is copyrighted by the University of Florida, Institute of Food and Agricultural Sciences (UF/IFAS) for the people of the State of Florida. UF/IFAS retains all rights under all conventions, but permits free reproduction by all agents and offices of the Cooperative Extension Service and the people of the State of Florida. Permission is granted to others to use these materials in part or in full for educational purposes, provided that full credit is given to the UF/IFAS, citing the publication, its source, and date of publication.\" style=\"color:#333\" onclick=\"return set_uf_rights('rightsmgmt1','This document is copyrighted by the University of Florida, Institute of Food and Agricultural Sciences (UF/IFAS) for the people of the State of Florida. UF/IFAS retains all rights under all conventions, but permits free reproduction by all agents and offices of the Cooperative Extension Service and the people of the State of Florida. Permission is granted to others to use these materials in part or in full for educational purposes, provided that full credit is given to the UF/IFAS, citing the publication, its source, and date of publication.');\"><b>IFAS Extension Documents</b></span></td></tr>");
            Output.WriteLine("          <tr><td  class=\"uf_rights_column\" colspan=\"2\">&#8226; &nbsp;&nbsp;<span title=\"This item was contributed to the Digital Library of the Caribbean (dLOC) by the source institution listed in the metadata. This item may or may not be protected by copyright in the country where it was produced. Users of this work have responsibility for determining copyright status prior to reusing, publishing or reproducing this item for purposes other than what is allowed by applicable law, including any applicable international copyright treaty or fair use or fair dealing statutes, which dLOC partners have explicitly supported and endorsed. Any reuse of this item in excess of applicable copyright exceptions may require permission. dLOC would encourage users to contact the source institution directly or [email protected] to request more information about copyright status or to provide additional information about the item.\" style=\"color:#333\" onclick=\"return set_uf_rights('rightsmgmt1','This item was contributed to the Digital Library of the Caribbean (dLOC) by the source institution listed in the metadata. This item may or may not be protected by copyright in the country where it was produced. Users of this work have responsibility for determining copyright status prior to reusing, publishing or reproducing this item for purposes other than what is allowed by applicable law, including any applicable international copyright treaty or fair use or fair dealing statutes, which dLOC partners have explicitly supported and endorsed. Any reuse of this item in excess of applicable copyright exceptions may require permission. dLOC would encourage users to contact the source institution directly or [email protected] to request more information about copyright status or to provide additional information about the item.');\"><b>dLOC</b></span></td></tr>");

            Output.WriteLine("         </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine("");
        }
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="IsMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="PopupFormBuilder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This element appends a popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool IsMozilla, StringBuilder PopupFormBuilder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string DEFAULT_ACRONYM = "Enter each person or group which created this material. Personal names should be entered as [Family Name], [Given Name].";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.French:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                default:
                    Acronym = DEFAULT_ACRONYM;
                    break;
                }
            }

            // Render this in HTML
            Output.WriteLine("  <!-- " + Title + " Form Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }

            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div class=\"form_name_div\">");

            // Collect all the names
            int              name_count    = 1;
            bool             first_is_main = false;
            List <Name_Info> names         = new List <Name_Info>();

            if ((Bib.Bib_Info.hasMainEntityName) && (Bib.Bib_Info.Main_Entity_Name.hasData))
            {
                names.Add(Bib.Bib_Info.Main_Entity_Name);
                first_is_main = true;
            }
            if (Bib.Bib_Info.Names_Count > 0)
            {
                names.AddRange(Bib.Bib_Info.Names);
            }

            // There should always be one name at least
            if (names.Count == 0)
            {
                names.Add(new Name_Info());
            }

            // Step through and create the popup forms and inks
            foreach (Name_Info thisName in names)
            {
                // Add the link for the other title
                string thisNameText = thisName.ToString();
                if (!thisName.hasData)
                {
                    thisNameText = "<i>Empty Name</i>";
                    Output.WriteLine("              <a title=\"Click to edit this named entity\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_name_line_" + name_count + "')\" onblur=\"link_blurred2('form_name_line_" + name_count + "')\" onkeypress=\"return popup_keypress_focus('form_name_" + name_count + "', 'form_name_full_" + name_count + "', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_name_" + name_count + "', 'form_name_full_" + name_count + "' );\"><div class=\"form_linkline_empty form_name_line\" id=\"form_name_line_" + name_count + "\">" + thisNameText + "</div></a>");
                }
                else
                {
                    Output.WriteLine("              <a title=\"Click to edit this named entity\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_name_line_" + name_count + "')\" onblur=\"link_blurred2('form_name_line_" + name_count + "')\" onkeypress=\"return popup_keypress_focus('form_name_" + name_count + "', 'form_name_full_" + name_count + "', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_name_" + name_count + "', 'form_name_full_" + name_count + "' );\"><div class=\"form_linkline form_name_line\" id=\"form_name_line_" + name_count + "\">" + thisNameText + "</div></a>");
                }

                // Determine if this is a personal name
                string personal_values_display      = "none";
                string description_location_display = "Location";
                string form_class = "name_popup_div";
                if ((thisName.Name_Type == Name_Info_Type_Enum.Personal) || (thisName.Name_Type == Name_Info_Type_Enum.UNKNOWN))
                {
                    personal_values_display      = "inline";
                    description_location_display = "Description";
                    form_class = "name_popup_div_personal";
                }

                // Add the popup form
                PopupFormBuilder.AppendLine("<!-- Name Form " + name_count + " -->");
                PopupFormBuilder.AppendLine("<div class=\"" + form_class + " sbkMetadata_PopupDiv\" id=\"form_name_" + name_count + "\" style=\"display:none;\">");
                PopupFormBuilder.AppendLine("  <div class=\"sbkMetadata_PopupTitle\"><table style=\"width:100%\"><tr><td style=\"text-align:left\">Edit Named Entity</td><td style=\"text-align:right\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" alt=\"HELP\" target=\"_" + html_element_name.ToUpper() + "\" >?</a> &nbsp; <a href=\"#template\" alt=\"CLOSE\" onclick=\"close_name_form('form_name_" + name_count + "')\">X</a> &nbsp; </td></tr></table></div>");
                PopupFormBuilder.AppendLine("  <br />");
                PopupFormBuilder.AppendLine("  <table class=\"sbkMetadata_PopupTable\">");

                // Add the name type combo box and radio buttons
                PopupFormBuilder.AppendLine("    <tr>");
                PopupFormBuilder.AppendLine("      <td>Name Type:</td>");
                PopupFormBuilder.AppendLine("      <td>");
                PopupFormBuilder.AppendLine("        <select class=\"form_name_select\" id=\"form_name_type_" + name_count + "\" name=\"form_name_type_" + name_count + "\" onChange=\"name_type_changed('" + name_count + "');\" >");
                PopupFormBuilder.AppendLine(thisName.Name_Type == Name_Info_Type_Enum.Conference
                                                  ? "          <option value=\"conference\" selected=\"selected\" >Conference</option>"
                                                  : "          <option value=\"conference\">Conference</option>");

                PopupFormBuilder.AppendLine(thisName.Name_Type == Name_Info_Type_Enum.Corporate
                                                  ? "          <option value=\"corporate\" selected=\"selected\" >Corporate</option>"
                                                  : "          <option value=\"corporate\">Corporate</option>");

                if ((thisName.Name_Type == Name_Info_Type_Enum.Personal) || (thisName.Name_Type == Name_Info_Type_Enum.UNKNOWN))
                {
                    PopupFormBuilder.AppendLine("          <option value=\"personal\" selected=\"selected\" >Personal</option>");
                }
                else
                {
                    PopupFormBuilder.AppendLine("          <option value=\"personal\">Personal</option>");
                }

                PopupFormBuilder.AppendLine("        </select>");
                PopupFormBuilder.AppendLine("      </td>");
                if ((name_count == 1) && (first_is_main))
                {
                    PopupFormBuilder.Append("      <td><input type=\"radio\" name=\"form_name_main_" + name_count + "\" id=\"form_name_main_main_" + name_count + "\" value=\"main\" checked=\"checked\" onclick=\"focus_element( 'form_name_full_" + name_count + "');\" /><label for=\"form_name_main_main_" + name_count + "\">Principal Author</label> &nbsp; &nbsp; &nbsp; &nbsp; ");
                    PopupFormBuilder.AppendLine("<input type=\"radio\" name=\"form_name_main_" + name_count + "\" id=\"form_name_main_added_" + name_count + "\" value=\"added\" onclick=\"focus_element( 'form_name_full_" + name_count + "');\" /><label for=\"form_name_main_added_" + name_count + "\">Other Author</label></td>");
                }
                else
                {
                    PopupFormBuilder.Append("      <td><input type=\"radio\" name=\"form_name_main_" + name_count + "\" id=\"form_name_main_main_" + name_count + "\" value=\"main\" onclick=\"focus_element( 'form_name_full_" + name_count + "');\" /><label for=\"form_name_main_main_" + name_count + "\">Main Entry</label> &nbsp; &nbsp; &nbsp; &nbsp; ");
                    PopupFormBuilder.AppendLine("<input type=\"radio\" name=\"form_name_main_" + name_count + "\" id=\"form_name_main_added_" + name_count + "\" value=\"added\" checked=\"checked\" onclick=\"focus_element( 'form_name_full_" + name_count + "');\" /><label for=\"form_name_main_added_" + name_count + "\">Added Entry</label></td>");
                }
                PopupFormBuilder.AppendLine("    </tr>");

                // Add the full name box
                PopupFormBuilder.AppendLine("    <tr><td>Full Name:</td><td colspan=\"2\"><input type=\"text\" class=\"form_name_large_input sbk_Focusable\" id=\"form_name_full_" + name_count + "\" name=\"form_name_full_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(thisName.Full_Name) + "\" /></td></tr>");

                // Add the given name and family name(s)
                PopupFormBuilder.Append("    <tr><td><span  id=\"name_personallabel1_" + name_count + "\" style=\"display:" + personal_values_display + ";\" >Given Names:</span></td><td><input type=\"text\" class=\"form_name_medium_input sbk_Focusable\" id=\"form_name_given_" + name_count + "\" name=\"form_name_given_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(thisName.Given_Name) + "\" style=\"display:" + personal_values_display + ";\" /></td>");
                PopupFormBuilder.AppendLine("<td><span  id=\"name_personallabel2_" + name_count + "\" style=\"display:" + personal_values_display + ";\" >Family Name:</span><input type=\"text\" class=\"form_name_medium_input sbk_Focusable\" id=\"form_name_family_" + name_count + "\" name=\"form_name_family_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(thisName.Family_Name) + "\" style=\"display:" + personal_values_display + ";\" /></td></tr>");

                // Add the display form and terms of address
                PopupFormBuilder.Append("    <tr><td><span  id=\"name_personallabel3_" + name_count + "\" style=\"display:" + personal_values_display + ";\" >Display Form:</span></td><td><input type=\"text\" class=\"form_name_medium_input sbk_Focusable\" id=\"form_name_display_" + name_count + "\" name=\"form_name_display_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(thisName.Display_Form) + "\" style=\"display:" + personal_values_display + ";\" /></td>");
                PopupFormBuilder.AppendLine("<td><span  id=\"name_personallabel4_" + name_count + "\" style=\"display:" + personal_values_display + ";\" >Terms of Address:</span><input type=\"text\" class=\"form_name_small_input sbk_Focusable\" id=\"form_name_terms_" + name_count + "\" name=\"form_name_terms_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(thisName.Terms_Of_Address) + "\" style=\"display:" + personal_values_display + ";\" /></td></tr>");

                // Add the dates
                PopupFormBuilder.AppendLine("    <tr><td>Dates:</td><td colspan=\"2\"><input type=\"text\" class=\"form_name_medium_input sbk_Focusable\" id=\"form_name_dates_" + name_count + "\" name=\"form_name_dates_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(thisName.Dates) + "\" /></td></tr>");

                // Add the description
                PopupFormBuilder.AppendLine("    <tr><td><span id=\"name_desc_location_span_" + name_count + "\">" + description_location_display + ":</span></td><td colspan=\"2\"><input type=\"text\" class=\"form_name_large_input sbk_Focusable\" id=\"form_name_desc_" + name_count + "\" name=\"form_name_desc_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(thisName.Description) + "\" /></td></tr>");

                // Add the affiliation
                PopupFormBuilder.AppendLine("    <tr><td>Affiliation:</td><td colspan=\"2\"><input type=\"text\" class=\"form_name_large_input sbk_Focusable\" id=\"form_name_affiliation_" + name_count + "\" name=\"form_name_affiliation_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(thisName.Affiliation) + "\" /></td></tr>");

                // Determine the roles to display
                string role1      = String.Empty;
                string role2      = String.Empty;
                string role3      = String.Empty;
                int    role_index = 1;
                foreach (Name_Info_Role thisRole in thisName.Roles)
                {
                    if ((thisRole.Role.Length > 0) && (thisRole.Role_Type == Name_Info_Role_Type_Enum.Text))
                    {
                        switch (role_index)
                        {
                        case 1:
                            role1 = thisRole.Role;
                            break;

                        case 2:
                            role2 = thisRole.Role;
                            break;

                        case 3:
                            role3 = thisRole.Role;
                            break;
                        }
                        role_index++;
                    }
                }

                // Add the roles
                PopupFormBuilder.Append("    <tr><td>Roles:</td><td colspan=\"2\">");
                PopupFormBuilder.Append("<input type=\"text\" class=\"form_name_small_input sbk_Focusable\" id=\"form_name_role1_" + name_count + "\" name=\"form_name_role1_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(role1) + "\" />");
                PopupFormBuilder.Append("<input type=\"text\" class=\"form_name_small_input sbk_Focusable\" id=\"form_name_role2_" + name_count + "\" name=\"form_name_role2_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(role2) + "\" />");
                PopupFormBuilder.Append("<input type=\"text\" class=\"form_name_small_input sbk_Focusable\" id=\"form_name_role3_" + name_count + "\" name=\"form_name_role3_" + name_count + "\" value=\"" + HttpUtility.HtmlEncode(role3) + "\" />");
                PopupFormBuilder.AppendLine("</td></tr>");

                // Close the form and add the button
                PopupFormBuilder.AppendLine("    <tr style=\"height:35px; text-align: center; vertical-align: bottom;\">");
                PopupFormBuilder.AppendLine("      <td colspan=\"3\"><button title=\"Close\" class=\"sbkMetadata_RoundButton\" onclick=\"return close_name_form('form_name_" + name_count + "');\">CLOSE</button></td>");
                PopupFormBuilder.AppendLine("    </tr>");
                PopupFormBuilder.AppendLine("  </table>");
                PopupFormBuilder.AppendLine("</div>");
                PopupFormBuilder.AppendLine();

                name_count++;
            }

            // Add the link to add a new name
            //<span class=\"add_new_link\"><a href=\"#template\" onclick=\"new_creator_link_clicked('" + Template_Page + "')\">Add New Creator</a></span>");

            Output.WriteLine("            </div>");
            Output.WriteLine("          </td>");

            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <img title=\"" + Translator.Get_Translation("Click to add a new named object to this resource", CurrentLanguage) + ".\" alt=\"+\" class=\"repeat_button\" src=\"" + REPEAT_BUTTON_URL + "\" onmousedown=\"return new_creator_link_clicked('" + Template_Page + "');return false;\" />");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");

            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
示例#6
0
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="isMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="popup_form_builder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This element appends a popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool isMozilla, StringBuilder popup_form_builder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Enter spatial information about this material hierarchically.  This can either be the source or the subject of the material.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            Output.WriteLine("  <!-- " + Title + " Form Element -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }

            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.Write("      <div id=\"" + html_element_name + "_div\">");

            // Ensure there is at least one spatial subject
            bool found_spatial = false;

            if (Bib.Bib_Info.Subjects_Count > 0)
            {
                if (Bib.Bib_Info.Subjects.Any(thisSubject => thisSubject.Class_Type == Subject_Info_Type.Hierarchical_Spatial))
                {
                    found_spatial = true;
                }
            }
            if (!found_spatial)
            {
                Bib.Bib_Info.Add_Hierarchical_Geographic_Subject();
            }

            int subject_index = 1;

            if (Bib.Bib_Info.Subjects_Count > 0)
            {
                foreach (Subject_Info thisSubject in Bib.Bib_Info.Subjects)
                {
                    if (thisSubject.Class_Type == Subject_Info_Type.Hierarchical_Spatial)
                    {
                        Subject_Info_HierarchicalGeographic hieroSubject = (Subject_Info_HierarchicalGeographic)thisSubject;

                        // Add this subject linke
                        if (hieroSubject.hasData)
                        {
                            Output.Write("\n        <a title=\"Click to edit this hierarchical spatial information\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_spatial_term_" + subject_index + "')\" onblur=\"link_blurred2('form_spatial_term_" + subject_index + "')\" onkeypress=\"return popup_keypress_focus('form_spatial_" + subject_index + "', 'form_spatial_term_" + subject_index + "', 'formspatialcontinent_" + subject_index + "', 490, 550, '" + isMozilla.ToString() + "' );\"  onclick=\"return popup_focus('form_spatial_" + subject_index + "', 'form_spatial_term_" + subject_index + "', 'formspatialcontinent_" + subject_index + "', 490, 550 );\"><div class=\"form_linkline form_spatial_line\" id=\"form_spatial_term_" + subject_index + "\">" + hieroSubject + "</div></a>");
                        }
                        else
                        {
                            Output.Write("\n        <a title=\"Click to edit this hierarchical spatial information\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_spatial_term_" + subject_index + "')\" onblur=\"link_blurred2('form_spatial_term_" + subject_index + "')\" onkeypress=\"return popup_keypress_focus('form_spatial_" + subject_index + "', 'form_spatial_term_" + subject_index + "', 'formspatialcontinent_" + subject_index + "', 490, 550, '" + isMozilla.ToString() + "' );\"  onclick=\"return popup_focus('form_spatial_" + subject_index + "', 'form_spatial_term_" + subject_index + "', 'formspatialcontinent_" + subject_index + "', 490, 550 );\"><div class=\"form_linkline_empty form_spatial_line\" id=\"form_spatial_term_" + subject_index + "\"><i>Empty Spatial Coverage</i></div></a>");
                        }

                        // Add the popup form
                        popup_form_builder.AppendLine("<!-- Hierarchical Spatial Form " + subject_index + " -->");
                        popup_form_builder.AppendLine("<div class=\"spatial_popup_div\" id=\"form_spatial_" + subject_index + "\" style=\"display:none;\">");
                        popup_form_builder.AppendLine("  <div class=\"popup_title\"><table width=\"100%\"><tr><td align=\"left\">EDIT HIERARCHICAL SPATIAL</td><td align=\"right\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" alt=\"HELP\" target=\"_" + html_element_name.ToUpper() + "\" >?</a> &nbsp; <a href=\"#template\" alt=\"CLOSE\" onclick=\"close_spatial_form('form_spatial_" + subject_index + "')\">X</a> &nbsp; </td></tr></table></div>");
                        popup_form_builder.AppendLine("  <br />");
                        popup_form_builder.AppendLine("  <table class=\"popup_table\">");

                        // Add the rows of data
                        popup_form_builder.AppendLine("    <tr><td width=\"100px\">Continent:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialcontinent_" + subject_index + "\" id=\"formspatialcontinent_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.Continent) + "\" onfocus=\"javascript:textbox_enter('formspatialcontinent_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialcontinent_" + subject_index + "', 'formspatial_input')\" /></td></tr>");
                        popup_form_builder.AppendLine("    <tr><td>Country:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialcountry_" + subject_index + "\" id=\"formspatialcountry_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.Country) + "\" onfocus=\"javascript:textbox_enter('formspatialcountry_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialcountry_" + subject_index + "', 'formspatial_input')\" /></td></tr>");
                        popup_form_builder.AppendLine("    <tr><td>Province:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialprovince_" + subject_index + "\" id=\"formspatialprovince_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.Province) + "\" onfocus=\"javascript:textbox_enter('formspatialprovince_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialprovince_" + subject_index + "', 'formspatial_input')\" /></td></tr>");
                        popup_form_builder.AppendLine("    <tr><td>Region:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialregion_" + subject_index + "\" id=\"formspatialregion_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.Region) + "\" onfocus=\"javascript:textbox_enter('formspatialregion_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialregion_" + subject_index + "', 'formspatial_input')\" /></td></tr>");
                        popup_form_builder.AppendLine("    <tr><td>State:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialstate_" + subject_index + "\" id=\"formspatialstate_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.State) + "\" onfocus=\"javascript:textbox_enter('formspatialstate_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialstate_" + subject_index + "', 'formspatial_input')\" /></td></tr>");
                        popup_form_builder.AppendLine("    <tr><td>Territory:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialterritory_" + subject_index + "\" id=\"formspatialterritory_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.Territory) + "\" onfocus=\"javascript:textbox_enter('formspatialterritory_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialterritory_" + subject_index + "', 'formspatial_input')\" /></td></tr>");
                        popup_form_builder.AppendLine("    <tr><td>County:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialcounty_" + subject_index + "\" id=\"formspatialcounty_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.County) + "\" onfocus=\"javascript:textbox_enter('formspatialcounty_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialcounty_" + subject_index + "', 'formspatial_input')\" /></td></tr>");
                        popup_form_builder.AppendLine("    <tr><td>City:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialcity_" + subject_index + "\" id=\"formspatialcity_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.City) + "\" onfocus=\"javascript:textbox_enter('formspatialcity_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialcity_" + subject_index + "', 'formspatial_input')\" /></td></tr>");
                        popup_form_builder.AppendLine("    <tr><td>City Section:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialsectioncity_" + subject_index + "\" id=\"formspatialsectioncity_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.CitySection) + "\" onfocus=\"javascript:textbox_enter('formspatialsectioncity_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialsectioncity_" + subject_index + "', 'formspatial_input')\" /></td></tr>");
                        popup_form_builder.AppendLine("    <tr><td>Island:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialisland_" + subject_index + "\" id=\"formspatialisland_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.Island) + "\" onfocus=\"javascript:textbox_enter('formspatialisland_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialisland_" + subject_index + "', 'formspatial_input')\" /></td></tr>");
                        popup_form_builder.AppendLine("    <tr><td>Area:</td><td colspan=\"2\"><input class=\"formspatial_input\" name=\"formspatialarea_" + subject_index + "\" id=\"formspatialarea_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.Area) + "\" onfocus=\"javascript:textbox_enter('formspatialarea_" + subject_index + "', 'formspatial_input_focused')\" onblur=\"javascript:textbox_leave('formspatialarea_" + subject_index + "', 'formspatial_input')\" /></td></tr>");


                        // Add the authority and language text boxes
                        popup_form_builder.Append("    <tr><td>Authority:</td><td>");
                        popup_form_builder.Append("<input class=\"formspatial_small_input\" name=\"formspatialauthority_" + subject_index + "\" id=\"formspatialauthority_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.Authority) + "\"  onfocus=\"javascript:textbox_enter('formspatialauthority_" + subject_index + "', 'formspatial_small_input_focused')\" onblur=\"javascript:textbox_leave('formspatialauthority_" + subject_index + "', 'formspatial_small_input')\" />");
                        popup_form_builder.Append("</td><td width=\"255px\" > &nbsp; Language: &nbsp; ");
                        popup_form_builder.Append("<input class=\"formspatial_small_input\" name=\"formspatiallanguage_" + subject_index + "\" id=\"formspatiallanguage_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(hieroSubject.Language) + "\" onfocus=\"javascript:textbox_enter('formspatiallanguage_" + subject_index + "', 'formspatial_small_input_focused')\" onblur=\"javascript:textbox_leave('formspatiallanguage_" + subject_index + "', 'formspatial_small_input')\" />");
                        popup_form_builder.AppendLine("</td></tr>");
                        popup_form_builder.AppendLine("    <tr height=\"30px\" valign=\"bottom\" ><td colspan=\"3\">");
                        popup_form_builder.AppendLine("      <center>");

                        if (hieroSubject.ID.IndexOf("SUBJ752") >= 0)
                        {
                            popup_form_builder.AppendLine("        <input type=\"radio\" name=\"formspatialtype_" + subject_index + "\" id=\"formspatialtype_subj_" + subject_index + "\" value=\"subject\" /><label for=\"formspatialtype_subj_" + subject_index + "\">Hierarchical Subject</label> &nbsp; &nbsp; ");
                            popup_form_builder.AppendLine("        <input type=\"radio\" name=\"formspatialtype_" + subject_index + "\" id=\"formspatialtype_added_" + subject_index + "\" value=\"addedentry\" checked=\"checked\" /><label for=\"formspatialtype_added_" + subject_index + "\">Added Hierarchical Entry</label>");
                        }
                        else
                        {
                            popup_form_builder.AppendLine("        <input type=\"radio\" name=\"formspatialtype_" + subject_index + "\" id=\"formspatialtype_subj_" + subject_index + "\" value=\"subject\" checked=\"checked\" /><label for=\"formspatialtype_subj_" + subject_index + "\">Hierarchical Subject</label> &nbsp; &nbsp; ");
                            popup_form_builder.AppendLine("        <input type=\"radio\" name=\"formspatialtype_" + subject_index + "\" id=\"formspatialtype_added_" + subject_index + "\" value=\"addedentry\" /><label for=\"formspatialtype_added_" + subject_index + "\">Added Hierarchical Entry</label>");
                        }
                        popup_form_builder.AppendLine("      </center>");
                        popup_form_builder.AppendLine("    </td></tr>");
                        popup_form_builder.AppendLine("  </table>");
                        popup_form_builder.AppendLine("  <br />");
                        popup_form_builder.AppendLine("  <center><a href=\"#template\" onclick=\"return close_spatial_form('form_spatial_" + subject_index + "');\"><img border=\"0\" src=\"" + Close_Button_URL(Skin_Code, Base_URL) + "\" alt=\"CLOSE\" /></a></center>");
                        popup_form_builder.AppendLine("</div>");
                        popup_form_builder.AppendLine();

                        subject_index++;
                    }
                }
            }

            // Add the link to add a new other subject and close the main element
            Output.WriteLine("\n            </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td valign=\"bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add a new spatial coverage object", CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return new_spatial_link_clicked('" + Template_Page + "');\"><img border=\"0px\" class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" /></a>");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");

            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="IsMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="PopupFormBuilder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This element appends a popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool IsMozilla, StringBuilder PopupFormBuilder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Enter any other titles which relate to this material";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            // Render this in HTML
            Output.WriteLine("  <!-- " + Title + " Form Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }

            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("      <div class=\"form_title_div\">");

            int title_count = 1;

            if ((Bib.Bib_Info.hasSeriesTitle) && (Bib.Bib_Info.SeriesTitle.Title.Length > 0))
            {
                Title_Info thisTitle = Bib.Bib_Info.SeriesTitle;

                // Add the link for the series title
                Output.Write("        <a title=\"Click to edit this other title\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_othertitle_line_" + title_count + "')\" onblur=\"link_blurred2('form_othertitle_line_" + title_count + "')\" onkeypress=\"return popup_keypress_focus('form_othertitle_" + title_count + "', 'formothertitletitle_" + title_count + "', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_othertitle_" + title_count + "', 'formothertitletitle_" + title_count + "' );\"><div class=\"form_linkline form_title_main_line\" id=\"form_othertitle_line_" + title_count + "\">" + thisTitle.NonSort + thisTitle.Title);
                if (thisTitle.Subtitle.Length > 0)
                {
                    Output.Write(" : " + thisTitle.Subtitle);
                }

                Output.WriteLine(" ( <i>Series Title</i> )</div></a>");

                // Add the popup form
                PopupFormBuilder.AppendLine("<!-- Other Title Form " + title_count + " -->");
                PopupFormBuilder.AppendLine("<div class=\"title_other_popup_div sbkMetadata_PopupDiv\" id=\"form_othertitle_" + title_count + "\" style=\"display:none;\">");
                PopupFormBuilder.AppendLine("  <div class=\"sbkMetadata_PopupTitle\"><table style=\"width:100%\"><tr><td style=\"text-align:left\">Edit Other Title</td><td style=\"text-align:right\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" alt=\"HELP\" target=\"_" + html_element_name.ToUpper() + "\" >?</a> &nbsp; <a href=\"#template\" alt=\"CLOSE\" onclick=\"close_othertitle_form('form_othertitle_" + title_count + "')\">X</a> &nbsp; </td></tr></table></div>");
                PopupFormBuilder.AppendLine("  <br />");
                PopupFormBuilder.AppendLine("  <table class=\"sbkMetadata_PopupTable\">");

                // Add the title type (and optionally display label)
                PopupFormBuilder.Append("    <tr><td style=\"width:90px\">Title Type:</td><td colspan=\"2\"><select class=\"formtitle_type_select\" name=\"formothertitletype_" + title_count + "\" id=\"formothertitletype_" + title_count + "\" onchange=\"other_title_type_change(" + title_count + ")\" >");
                PopupFormBuilder.Append("<option value=\"abbreviated\">Abbreviated Title</option>");
                PopupFormBuilder.Append("<option value=\"alternate\">Alternative Title</option>");
                PopupFormBuilder.Append("<option value=\"series\"  selected=\"selected\" >Series Title</option>");
                PopupFormBuilder.Append("<option value=\"translated\">Translated Title</option>");
                PopupFormBuilder.Append("<option value=\"uniform\">Uniform Title</option>");


                PopupFormBuilder.AppendLine("</select>");
                PopupFormBuilder.AppendLine("        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;");
                PopupFormBuilder.AppendLine("        <span id=\"formothertitlesubtype_" + title_count + "\" style=\"display:none;\">Display Label: ");
                PopupFormBuilder.Append("        <select class=\"formtitle_display_select\" name=\"formothertitledisplay_" + title_count + "\" id=\"formothertitledisplay_" + title_count + "\" >");
                //popup_form_builder.Append("<option value=\"added\">Added title page title</option>");
                //popup_form_builder.Append("<option value=\"alternate\" selected=\"selected\" >Alternate title</option>");
                //popup_form_builder.Append("<option value=\"caption\">Caption title</option>");
                //popup_form_builder.Append("<option value=\"cover\">Cover title</option>");
                //popup_form_builder.Append("<option value=\"distinctive\">Distinctive title</option>");
                //popup_form_builder.Append("<option value=\"other\">Other title</option>");
                //popup_form_builder.Append("<option value=\"portion\">Portion of title</option>");
                //popup_form_builder.Append("<option value=\"parallel\">Parallel title</option>");
                //popup_form_builder.Append("<option value=\"running\">Running title</option>");
                //popup_form_builder.Append("<option value=\"spine\">Spine title</option>");
                PopupFormBuilder.AppendLine("</select></span></td></tr>");

                // Add the nonsort and language text boxes
                PopupFormBuilder.Append("    <tr><td>Non Sort:</td><td>");
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlenonsort_" + title_count + "\" id=\"formothertitlenonsort_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.NonSort) + "\" />");
                PopupFormBuilder.Append("</td><td width=\"255px\" >Language: &nbsp; ");
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlelanguage_" + title_count + "\" id=\"formothertitlelanguage_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Language) + "\" />");
                PopupFormBuilder.AppendLine("</td></tr>");

                // Add the title and subtitle
                PopupFormBuilder.AppendLine("    <tr><td>Title:</td><td colspan=\"2\"><input class=\"formtitle_large_input sbk_Focusable\" name=\"formothertitletitle_" + title_count + "\" id=\"formothertitletitle_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Title) + "\" /></td></tr>");
                PopupFormBuilder.AppendLine("    <tr><td>Sub Title:</td><td colspan=\"2\"><input class=\"formtitle_large_input sbk_Focusable\" name=\"formothertitlesubtitle_" + title_count + "\" id=\"formothertitlesubtitle_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Subtitle) + "\" /></td></tr>");

                // Add the part numbers
                PopupFormBuilder.Append("    <tr><td>Part Numbers:</td><td colspan=\"2\">");
                if (thisTitle.Part_Numbers_Count > 0)
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartnum1_" + title_count + "\" id=\"formothertitlepartnum1_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Part_Numbers[0]) + "\" />");
                }
                else
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartnum1_" + title_count + "\" id=\"formothertitlepartnum1_" + title_count + "\" type=\"text\" value=\"\" />");
                }
                if (thisTitle.Part_Numbers_Count > 1)
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartnum2_" + title_count + "\" id=\"formothertitlepartnum2_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Part_Numbers[1]) + "\" />");
                }
                else
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartnum2_" + title_count + "\" id=\"formothertitlepartnum2_" + title_count + "\" type=\"text\" value=\"\" />");
                }
                PopupFormBuilder.AppendLine("</td></tr>");

                // Add the part names and authority
                PopupFormBuilder.Append("    <tr><td>Part Names:</td><td>");
                if (thisTitle.Part_Names_Count > 0)
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartname1_" + title_count + "\" id=\"formothertitlepartname1_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Part_Names[0]) + "\" />");
                }
                else
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartname1_" + title_count + "\" id=\"formothertitlepartname1_" + title_count + "\" type=\"text\" value=\"\" />");
                }
                if (thisTitle.Part_Names_Count > 1)
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartname2_" + title_count + "\" id=\"formothertitlepartname2_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Part_Names[1]) + "\" />");
                }
                else
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartname2_" + title_count + "\" id=\"formothertitlepartname2_" + title_count + "\" type=\"text\" value=\"\" />");
                }
                PopupFormBuilder.Append("<td>Authority: &nbsp; <input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitleauthority_" + title_count + "\" id=\"formothertitleauthority_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Authority) + "\" />");
                PopupFormBuilder.AppendLine("</td></tr>");

                // Finish the popup form and add the close button
                PopupFormBuilder.AppendLine("    <tr style=\"height:35px; text-align: center; vertical-align: bottom;\">");
                PopupFormBuilder.AppendLine("      <td colspan=\"3\"><button title=\"Close\" class=\"sbkMetadata_RoundButton\" onclick=\"close_othertitle_form('form_othertitle_" + title_count + "');\">CLOSE</button></td>");
                PopupFormBuilder.AppendLine("    </tr>");
                PopupFormBuilder.AppendLine("  </table>");
                PopupFormBuilder.AppendLine("</div>");
                PopupFormBuilder.AppendLine();

                title_count++;
            }

            // Always have one empty other title
            if ((title_count == 1) && (Bib.Bib_Info.Other_Titles_Count == 0))
            {
                Bib.Bib_Info.Add_Other_Title(String.Empty, Title_Type_Enum.alternative);
            }

            foreach (Title_Info thisTitle in Bib.Bib_Info.Other_Titles)
            {
                // Add the link for the other title
                if ((thisTitle.Title.Trim().Length > 0) || (thisTitle.NonSort.Trim().Length > 0))
                {
                    Output.Write("        <a title=\"Click to edit this other title\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_othertitle_line_" + title_count + "')\" onblur=\"link_blurred2('form_othertitle_line_" + title_count + "')\" onkeypress=\"return popup_keypress_focus('form_othertitle_" + title_count + "', 'formothertitletitle_" + title_count + "', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_othertitle_" + title_count + "', 'formothertitletitle_" + title_count + "' );\"><div class=\"form_linkline form_title_main_line\" id=\"form_othertitle_line_" + title_count + "\">" + thisTitle.NonSort + thisTitle.Title);
                    if (thisTitle.Subtitle.Length > 0)
                    {
                        Output.Write(" : " + thisTitle.Subtitle);
                    }
                    switch (thisTitle.Title_Type)
                    {
                    case Title_Type_Enum.abbreviated:
                        Output.Write(" ( <i>Abbreviated Title</i> )");
                        break;

                    case Title_Type_Enum.translated:
                        Output.Write(" ( <i>Translated Title</i> )");
                        break;

                    case Title_Type_Enum.uniform:
                        Output.Write(" ( <i>Uniform Title</i> )");
                        break;

                    default:
                        Output.Write(" ( <i>Alternative Title</i> )");
                        break;
                    }
                }
                else
                {
                    Output.Write("        <a title=\"Click to edit this other title\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_othertitle_line_" + title_count + "')\" onblur=\"link_blurred2('form_othertitle_line_" + title_count + "')\" onkeypress=\"return popup_keypress_focus('form_othertitle_" + title_count + "', 'formothertitletitle_" + title_count + "', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_othertitle_" + title_count + "', 'formothertitletitle_" + title_count + "' );\"><div class=\"form_linkline_empty form_title_main_line\" id=\"form_othertitle_line_" + title_count + "\"><i>Empty Other Title</i>");
                }

                Output.Write("</div></a>");

                // Add the popup form
                PopupFormBuilder.AppendLine("<!-- Other Title Form " + title_count + " -->");

                PopupFormBuilder.AppendLine("<div class=\"title_other_popup_div sbkMetadata_PopupDiv\" id=\"form_othertitle_" + title_count + "\" style=\"display:none;\">");
                PopupFormBuilder.AppendLine("  <div class=\"sbkMetadata_PopupTitle\"><table style=\"width:100%\"><tr><td style=\"text-align:left\">Edit Other Title</td><td style=\"text-align:right\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" alt=\"HELP\" target=\"_" + html_element_name.ToUpper() + "\" >?</a> &nbsp; <a href=\"#template\" alt=\"CLOSE\" onclick=\"close_othertitle_form('form_othertitle_" + title_count + "')\">X</a> &nbsp; </td></tr></table></div>");
                PopupFormBuilder.AppendLine("  <br />");
                PopupFormBuilder.AppendLine("  <table class=\"sbkMetadata_PopupTable\">");

                // Add the title type (and optionally display label)
                PopupFormBuilder.Append("    <tr><td style=\"width:90px\">Title Type:</td><td colspan=\"2\"><select class=\"formtitle_type_select\" name=\"formothertitletype_" + title_count + "\" id=\"formothertitletype_" + title_count + "\" onchange=\"other_title_type_change(" + title_count + ")\" >");
                PopupFormBuilder.Append(thisTitle.Title_Type == Title_Type_Enum.abbreviated
                                              ? "<option value=\"abbreviated\" selected=\"selected\" >Abbreviated Title</option>"
                                              : "<option value=\"abbreviated\">Abbreviated Title</option>");

                if ((thisTitle.Title_Type == Title_Type_Enum.alternative) || (thisTitle.Title_Type == Title_Type_Enum.UNSPECIFIED))
                {
                    PopupFormBuilder.Append("<option value=\"alternate\" selected=\"selected\" >Alternative Title</option>");
                }
                else
                {
                    PopupFormBuilder.Append("<option value=\"alternate\">Alternative Title</option>");
                }
                PopupFormBuilder.Append("<option value=\"series\">Series Title</option>");

                PopupFormBuilder.Append(thisTitle.Title_Type == Title_Type_Enum.translated
                                              ? "<option value=\"translated\" selected=\"selected\" >Translated Title</option>"
                                              : "<option value=\"translated\">Translated Title</option>");

                PopupFormBuilder.Append(thisTitle.Title_Type == Title_Type_Enum.uniform
                                              ? "<option value=\"uniform\" selected=\"selected\" >Uniform Title</option>"
                                              : "<option value=\"uniform\">Uniform Title</option>");

                PopupFormBuilder.AppendLine("</select>");

                // Should the SELECT options be pre-established?
                if ((thisTitle.Title_Type == Title_Type_Enum.alternative) || (thisTitle.Title_Type == Title_Type_Enum.uniform))
                {
                    PopupFormBuilder.AppendLine("        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;");
                    PopupFormBuilder.AppendLine("        <span id=\"formothertitlesubtype_" + title_count + "\">Display Label: ");
                    PopupFormBuilder.Append(" <select class=\"formtitle_display_select\" name=\"formothertitledisplay_" + title_count + "\" id=\"formothertitledisplay_" + title_count + "\" >");

                    if (thisTitle.Title_Type == Title_Type_Enum.alternative)
                    {
                        PopupFormBuilder.Append(thisTitle.Display_Label == "Added title page title"
                                                      ? "<option value=\"added\" selected=\"selected\" >Added title page title</option>"
                                                      : "<option value=\"added\">Added title page title</option>");

                        PopupFormBuilder.Append(thisTitle.Display_Label == "Alternate title"
                                                      ? "<option value=\"alternate\" selected=\"selected\">Alternate title</option>"
                                                      : "<option value=\"alternate\">Alternate title</option>");

                        PopupFormBuilder.Append(thisTitle.Display_Label == "Caption title"
                                                      ? "<option value=\"caption\" selected=\"selected\">Caption title</option>"
                                                      : "<option value=\"caption\">Caption title</option>");

                        PopupFormBuilder.Append(thisTitle.Display_Label == "Cover title"
                                                      ? "<option value=\"cover\" selected=\"selected\">Cover title</option>"
                                                      : "<option value=\"cover\">Cover title</option>");

                        PopupFormBuilder.Append(thisTitle.Display_Label == "Distinctive title"
                                                      ? "<option value=\"distinctive\" selected=\"selected\">Distinctive title</option>"
                                                      : "<option value=\"distinctive\">Distinctive title</option>");

                        PopupFormBuilder.Append(thisTitle.Display_Label == "Other title"
                                                      ? "<option value=\"other\" selected=\"selected\">Other title</option>"
                                                      : "<option value=\"other\">Other title</option>");

                        PopupFormBuilder.Append(thisTitle.Display_Label == "Portion of title"
                                                      ? "<option value=\"portion\" selected=\"selected\">Portion of title</option>"
                                                      : "<option value=\"portion\">Portion of title</option>");

                        PopupFormBuilder.Append(thisTitle.Display_Label == "Parallel title"
                                                      ? "<option value=\"parallel\" selected=\"selected\">Parallel title</option>"
                                                      : "<option value=\"parallel\">Parallel title</option>");

                        PopupFormBuilder.Append(thisTitle.Display_Label == "Running title"
                                                      ? "<option value=\"running\" selected=\"selected\">Running title</option>"
                                                      : "<option value=\"running\">Running title</option>");

                        PopupFormBuilder.Append(thisTitle.Display_Label == "Spine title"
                                                      ? "<option value=\"spine\" selected=\"selected\">Spine title</option>"
                                                      : "<option value=\"spine\">Spine title</option>");
                    }
                    else
                    {
                        PopupFormBuilder.Append(thisTitle.Display_Label == "Main Entry"
                                                      ? "<option value=\"main\" selected=\"selected\">Main Entry</option>"
                                                      : "<option value=\"main\">Main Entry</option>");

                        PopupFormBuilder.Append(thisTitle.Display_Label == "Uncontrolled Added Entry"
                                                      ? "<option value=\"uncontrolled\" selected=\"selected\">Uncontrolled Added Entry</option>"
                                                      : "<option value=\"uncontrolled\">Uncontrolled Added Entry</option>");

                        if ((thisTitle.Display_Label != "Main Entry") && (thisTitle.Display_Label != "Uncontrolled Added Entry"))
                        {
                            PopupFormBuilder.Append("<option value=\"uniform\" selected=\"selected\">Uniform Title</option>");
                        }
                        else
                        {
                            PopupFormBuilder.Append("<option value=\"uniform\">Uniform Title</option>");
                        }
                    }


                    PopupFormBuilder.AppendLine("</select></span></td></tr>");
                }
                else
                {
                    PopupFormBuilder.AppendLine("        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;");
                    PopupFormBuilder.AppendLine("        <span id=\"formothertitlesubtype_" + title_count + "\" style=\"display:none;\">Display Label: ");
                    PopupFormBuilder.Append("        <select class=\"formtitle_display_select\" name=\"formothertitledisplay_" + title_count + "\" id=\"formothertitledisplay_" + title_count + "\" >");
                    //popup_form_builder.Append("<option value=\"added\">Added title page title</option>");
                    //popup_form_builder.Append("<option value=\"alternate\">Alternate title</option>");
                    //popup_form_builder.Append("<option value=\"caption\">Caption title</option>");
                    //popup_form_builder.Append("<option value=\"cover\">Cover title</option>");
                    //popup_form_builder.Append("<option value=\"distinctive\">Distinctive title</option>");
                    //popup_form_builder.Append("<option value=\"other\">Other title</option>");
                    //popup_form_builder.Append("<option value=\"portion\">Portion of title</option>");
                    //popup_form_builder.Append("<option value=\"parallel\">Parallel title</option>");
                    //popup_form_builder.Append("<option value=\"running\">Running title</option>");
                    //popup_form_builder.Append("<option value=\"spine\">Spine title</option>");
                    PopupFormBuilder.AppendLine("</select></span></td></tr>");
                }

                // Add the nonsort and language text boxes
                PopupFormBuilder.Append("    <tr><td>Non Sort:</td><td>");
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlenonsort_" + title_count + "\" id=\"formothertitlenonsort_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.NonSort) + "\" />");
                PopupFormBuilder.Append("</td><td width=\"255px\" >Language: &nbsp; ");
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlelanguage_" + title_count + "\" id=\"formothertitlelanguage_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Language) + "\" />");
                PopupFormBuilder.AppendLine("</td></tr>");

                // Add the title and subtitle
                PopupFormBuilder.AppendLine("    <tr><td>Title:</td><td colspan=\"2\"><input class=\"formtitle_large_input sbk_Focusable\" name=\"formothertitletitle_" + title_count + "\" id=\"formothertitletitle_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Title) + "\"  /></td></tr>");
                PopupFormBuilder.AppendLine("    <tr><td>Sub Title:</td><td colspan=\"2\"><input class=\"formtitle_large_input sbk_Focusable\" name=\"formothertitlesubtitle_" + title_count + "\" id=\"formothertitlesubtitle_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Subtitle) + "\" /></td></tr>");

                // Add the part numbers
                PopupFormBuilder.Append("    <tr><td>Part Numbers:</td><td colspan=\"2\">");
                if (thisTitle.Part_Numbers_Count > 0)
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartnum1_" + title_count + "\" id=\"formothertitlepartnum1_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Part_Numbers[0]) + "\" />");
                }
                else
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartnum1_" + title_count + "\" id=\"formothertitlepartnum1_" + title_count + "\" type=\"text\" value=\"\" />");
                }
                if (thisTitle.Part_Numbers_Count > 1)
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartnum2_" + title_count + "\" id=\"formothertitlepartnum2_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Part_Numbers[1]) + "\" />");
                }
                else
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartnum2_" + title_count + "\" id=\"formothertitlepartnum2_" + title_count + "\" type=\"text\" value=\"\" />");
                }
                PopupFormBuilder.AppendLine("</td></tr>");

                // Add the part names and authority
                PopupFormBuilder.Append("    <tr><td>Part Names:</td><td>");
                if (thisTitle.Part_Names_Count > 0)
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartname1_" + title_count + "\" id=\"formothertitlepartname1_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Part_Names[0]) + "\" />");
                }
                else
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartname1_" + title_count + "\" id=\"formothertitlepartname1_" + title_count + "\" type=\"text\" value=\"\" />");
                }
                if (thisTitle.Part_Names_Count > 1)
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartname2_" + title_count + "\" id=\"formothertitlepartname2_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Part_Names[1]) + "\" />");
                }
                else
                {
                    PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitlepartname2_" + title_count + "\" id=\"formothertitlepartname2_" + title_count + "\" type=\"text\" value=\"\" />");
                }
                PopupFormBuilder.Append("<td>Authority: &nbsp; <input class=\"formtitle_small_input sbk_Focusable\" name=\"formothertitleauthority_" + title_count + "\" id=\"formothertitleauthority_" + title_count + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisTitle.Authority) + "\" />");
                PopupFormBuilder.AppendLine("</td></tr>");

                // Finish the popup form and add the close button
                PopupFormBuilder.AppendLine("    <tr style=\"height:35px; text-align: center; vertical-align: bottom;\">");
                PopupFormBuilder.AppendLine("      <td colspan=\"3\"><button title=\"Close\" class=\"sbkMetadata_RoundButton\" onclick=\"close_othertitle_form('form_othertitle_" + title_count + "');\">CLOSE</button></td>");
                PopupFormBuilder.AppendLine("    </tr>");
                PopupFormBuilder.AppendLine("  </table>");
                PopupFormBuilder.AppendLine("</div>");
                PopupFormBuilder.AppendLine();

                title_count++;
            }


            // Add the link to add a new other title
            Output.WriteLine("      </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <img title=\"" + Translator.Get_Translation("Click to add a new other title", CurrentLanguage) + ".\" alt=\"+\" class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" onmousedown=\"new_title_link_clicked('" + Template_Page + "');return false;\" />");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
        /// <summary> Method helps to render all multiple text box based elements </summary>
        /// <param name="Output"> Output for the generated html for this element </param>
        /// <param name="instance_values"> Value(s) for the current digital resource to display</param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        protected void render_helper(TextWriter Output, ReadOnlyCollection <string> instance_values, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            List <string> allValues = new List <string>();

            allValues.AddRange(instance_values);

            if (allValues.Count == 0)
            {
                render_helper(Output, String.Empty, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
                return;
            }

            if (allValues.Count == 1)
            {
                render_helper(Output, allValues[0], Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
                return;
            }


            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");

            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }


            if (Read_Only)
            {
                Output.Write("    <td>");
                for (int i = 0; i < instance_values.Count; i++)
                {
                    Output.Write(instance_values[i]);
                    if (i < (instance_values.Count - 1))
                    {
                        Output.Write("<br />");
                    }
                }
                Output.WriteLine("</td>");
            }
            else
            {
                Output.WriteLine("    <td>");
                Output.WriteLine("      <table>");
                Output.WriteLine("        <tr>");
                Output.WriteLine("          <td>");
                Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");
                for (int i = 1; i <= allValues.Count; i++)
                {
                    if (i == allValues.Count)
                    {
                        Output.WriteLine("              <input name=\"" + id_name + i + "\" id=\"" + id_name + i + "\" class=\"" + html_element_name + "_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(allValues[i - 1].Replace("<i>", "").Replace("</i>", "")) + "\" onfocus=\"javascript:textbox_enter('" + id_name + i + "', '" + html_element_name + "_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + i + "', '" + html_element_name + "_input')\" /></div>");
                    }
                    else
                    {
                        Output.WriteLine("              <input name=\"" + id_name + i + "\" id=\"" + id_name + i + "\" class=\"" + html_element_name + "_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(allValues[i - 1].Replace("<i>", "").Replace("</i>", "")) + "\" onfocus=\"javascript:textbox_enter('" + id_name + i + "', '" + html_element_name + "_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + i + "', '" + html_element_name + "_input')\" />");
                    }
                }

                Output.WriteLine("          </td>");
                Output.WriteLine("          <td valign=\"bottom\" >");

                if (view_choices_string.Length > 0)
                {
                    Output.WriteLine("            " + view_choices_string.Replace("<%WEBSKIN%>", Skin_Code).Replace("<%?URLOPTS%>", "") + "&nbsp; ");
                }

                if ((Repeatable) && ((max_boxes < 0) || (allValues.Count < max_boxes)))
                {
                    Output.WriteLine("          <span id=\"" + html_element_name + "_repeaticon\" name=\"" + html_element_name + "_repeaticon\"><img title=\"" + Translator.Get_Translation("Click to add another " + Title.ToLower(), CurrentLanguage) + ".\" alt=\"+\" border=\"0px\" class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" onmousedown=\"add_new_multi_element('" + html_element_name + "', " + instance_values.Count + "," + max_boxes + "," + boxes_per_line + "); return false;\" /></span>");
                }

                Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");

                Output.WriteLine("          </td>");
                Output.WriteLine("        </tr>");
                Output.WriteLine("      </table>");
                Output.WriteLine("    </td>");
            }



            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
        /// <summary> Method helps to render all simple text area based elements </summary>
        /// <param name="Output"> Output for the generated html for this element </param>
        /// <param name="InstanceValues"> Value(s) for the current digital resource to display </param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="IsMozilla"> Flag indicates if the browser is Mozilla Firefox</param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        protected void render_helper(TextWriter Output, List <string> InstanceValues, string Skin_Code, bool IsMozilla, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            List <string> allValues = new List <string>();

            allValues.AddRange(DefaultValues);
            allValues.AddRange(InstanceValues);

            if (allValues.Count == 0)
            {
                render_helper(Output, String.Empty, Skin_Code, IsMozilla, Current_User, CurrentLanguage, Translator, Base_URL);
                return;
            }

            if (allValues.Count == 1)
            {
                render_helper(Output, allValues[0], Skin_Code, IsMozilla, Current_User, CurrentLanguage, Translator, Base_URL);
                return;
            }

            // Determine the columns for this text area, based on browser
            int actual_cols = Cols;

            if (IsMozilla)
            {
                actual_cols = ColsMozilla;
            }


            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }
            Output.WriteLine("    <td>");

            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");
            for (int i = 0; i < allValues.Count; i++)
            {
                if (i == allValues.Count - 1)
                {
                    Output.Write("              <textarea rows=\"" + Rows + "\" cols=\"" + actual_cols + "\" name=\"" + id_name + i + "\" id=\"" + id_name + i + "\" class=\"" + html_element_name + "_input sbk_Focusable\" ");
                    if (textAreaEvents != null)
                    {
                        textAreaEvents.Add_Events_HTML(Output);
                    }
                    Output.WriteLine(" >" + HttpUtility.HtmlEncode(allValues[i]) + "</textarea></div>");
                }
                else
                {
                    Output.Write("              <textarea rows=\"" + Rows + "\" cols=\"" + actual_cols + "\" name=\"" + id_name + i + "\" id=\"" + id_name + i + "\" class=\"" + html_element_name + "_input sbk_Focusable\" ");
                    if (textAreaEvents != null)
                    {
                        textAreaEvents.Add_Events_HTML(Output);
                    }
                    Output.WriteLine(" >" + HttpUtility.HtmlEncode(allValues[i]) + "</textarea><br />");
                }
            }
            Output.WriteLine("            </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add another " + Title.ToLower(), CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return " + html_element_name + "_add_new_item();\"><img class=\"repeat_button\" src=\"" + REPEAT_BUTTON_URL + "\" /></a>");
            }

            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + HELP_BUTTON_URL + "\" /></a>");

            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");

            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
        /// <summary> Method helps to render the html for all elements based on comboBox_TextBox_Element class </summary>
        /// <param name="Output"> Output for the generate html for this element </param>
        /// <param name="SelectValue"> Value for the current digital resource to display in the combo box</param>
        /// <param name="UserdefinedPossible"> List of possible select values, set by the user </param>
        /// <param name="TextValue"> Value for the current digital resource to display in the text box</param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <param name="InitialValue"> Flag indicates if the value in the select_value param is actually instructional text, and not a true value</param>
        protected void render_helper(TextWriter Output, string SelectValue, List <string> UserdefinedPossible, string TextValue, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL, bool InitialValue)
        {
            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }
            Output.WriteLine("    <td>");

            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            const int i = 1;

            // Determine if the code --> statement linking should be present
            bool codeStatementMappingPresent = !((CodeToStatementDictionary == null) || (CodeToStatementDictionary.Count == 0));

            // Determine the javascript to append
            string javascript = String.Empty;

            if (comboBoxEvents != null)
            {
                string currentOnChange = comboBoxEvents.OnChange ?? String.Empty;
                string newOnChange     = (currentOnChange.Length > 0) ? currentOnChange.Trim() + ";" : String.Empty;
                if (ClearTextboxOnComboboxChange)
                {
                    if (codeStatementMappingPresent)
                    {
                        newOnChange = newOnChange + "\"combo_text_element_onchange('" + id_name + "_select" + i + "', '" + id_name + "_text" + i + "',true)\"";
                    }
                    else
                    {
                        newOnChange = newOnChange + "\"clear_textbox('" + id_name + "_text" + i + "')\"";
                    }
                }
                else if (codeStatementMappingPresent)
                {
                    newOnChange = newOnChange + "\"combo_text_element_onchange('" + id_name + "_select" + i + "', '" + id_name + "_text" + i + "',false)\"";
                }
                comboBoxEvents.OnChange = newOnChange;
                javascript = comboBoxEvents.ToString();
                comboBoxEvents.OnChange = currentOnChange;
            }
            else
            {
                if (ClearTextboxOnComboboxChange)
                {
                    if (codeStatementMappingPresent)
                    {
                        javascript = "onchange=\"combo_text_element_onchange('" + id_name + "_select" + i + "', '" + id_name + "_text" + i + "',true)\" ";
                    }
                    else
                    {
                        javascript = "onchange=\"clear_textbox('" + id_name + "_text" + i + "')\" ";
                    }
                }
                else if (codeStatementMappingPresent)
                {
                    javascript = "onchange=\"combo_text_element_onchange('" + id_name + "_select" + i + "', '" + id_name + "_text" + i + "',false)\" ";
                }
            }

            // Start the select box
            Output.Write("            <select class=\"" + html_element_name + "_select\" name=\"" + id_name + "_select" + i + "\" id=\"" + id_name + "_select" + i + "\" onblur=\"javascript:selectbox_leave('" + id_name + "_select" + i + "','" + html_element_name + "_select', '" + html_element_name + "_select_init')\"" + javascript + " >");



            bool found_option = false;

            foreach (string thisOption in PossibleSelectItems)
            {
                // Determine the value
                string value = thisOption;
                if ((codeStatementMappingPresent) && (CodeToStatementDictionary.ContainsKey(thisOption)))
                {
                    value = thisOption + "|" + CodeToStatementDictionary[thisOption];
                }

                if ((i < PossibleSelectItems.Count) && (thisOption == SelectValue))
                {
                    Output.Write("<option value=\"" + HttpUtility.HtmlEncode(value) + "\" selected=\"selected=\">" + thisOption + "</option>");
                    found_option = true;
                }
                else
                {
                    Output.Write("<option value=\"" + HttpUtility.HtmlEncode(value) + "\" >" + thisOption + "</option>");
                }
            }

            if ((SelectValue.Length > 0) && (!Restrict_Values) && (!found_option))
            {
                // Get this option
                string option = SelectValue;

                // Determine the value
                string value = option;
                if ((codeStatementMappingPresent) && (CodeToStatementDictionary.ContainsKey(option)))
                {
                    value = option + "|" + CodeToStatementDictionary[option];
                }

                Output.Write("<option value=\"" + HttpUtility.HtmlEncode(value) + "\" selected=\"selected=\">" + option + "</option>");
            }
            Output.Write("</select>");

            // Write the second text
            if (SecondLabel.Length > 0)
            {
                Output.Write("<span class=\"metadata_sublabel\">" + SecondLabel + ":</span>");
            }

            // Write the text box
            Output.Write("<input name=\"" + id_name + "_text" + i + "\" id=\"" + id_name + "_text" + i + "\" class=\"" + html_element_name + "_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(TextValue) + "\" ");
            if (textBoxEvents != null)
            {
                textBoxEvents.Add_Events_HTML(Output);
            }
            Output.Write(" />");

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


            Output.WriteLine("        </td>");
            Output.WriteLine("        <td style=\"vertical-align:bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("          <a title=\"" + Translator.Get_Translation("Click to add another " + Title.ToLower(), CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return " + html_element_name + "_add_new_item();\"><img class=\"repeat_button\" src=\"" + REPEAT_BUTTON_URL + "\" /></a>");
            }

            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + HELP_BUTTON_URL + "\" /></a>");

            Output.WriteLine("        </td>");
            Output.WriteLine("      </tr>");
            Output.WriteLine("    </table>");

            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
示例#11
0
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="IsMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="PopupFormBuilder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This element appends a popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool IsMozilla, StringBuilder PopupFormBuilder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string DEFAULT_ACRONYM = "Enter the title of this material here.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.French:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                default:
                    Acronym = DEFAULT_ACRONYM;
                    break;
                }
            }

            // Determine the statement of responsibility
            string statement_responsibility = String.Empty;

            if (Bib.Bib_Info.Notes_Count > 0)
            {
                foreach (Note_Info thisNote in Bib.Bib_Info.Notes)
                {
                    if (thisNote.Note_Type == Note_Type_Enum.StatementOfResponsibility)
                    {
                        statement_responsibility = HttpUtility.HtmlEncode(thisNote.Note);
                        break;
                    }
                }
            }

            // Render this in HTML
            Output.WriteLine("  <!-- " + Title + " Form Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }

            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div class=\"form_title_div\">");

            // Add the link for the main title
            if (Bib.Bib_Info.Main_Title.Title.Length == 0)
            {
                Output.Write("              <a title=\"Click to edit the main title\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_maintitle_term')\" onblur=\"link_blurred2('form_maintitle_term')\" onkeypress=\"return popup_keypress_focus('form_maintitle', 'formmaintitletitle', '" + IsMozilla.ToString() + "');\" onclick=\"return popup_focus('form_maintitle', 'formmaintitletitle');\"><div class=\"form_linkline_empty form_title_main_line\" id=\"form_maintitle_term\"><i>Empty Main Title</i>");
            }
            else
            {
                Output.Write("              <a title=\"Click to edit the main title\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_maintitle_term')\" onblur=\"link_blurred2('form_maintitle_term')\" onkeypress=\"return popup_keypress_focus('form_maintitle', 'formmaintitletitle', '" + IsMozilla.ToString() + "');\" onclick=\"return popup_focus('form_maintitle', 'formmaintitletitle');\"><div class=\"form_linkline form_title_main_line\" id=\"form_maintitle_term\">" + Bib.Bib_Info.Main_Title.NonSort + Bib.Bib_Info.Main_Title.Title);
                if (Bib.Bib_Info.Main_Title.Subtitle.Length > 0)
                {
                    Output.Write(" : " + Bib.Bib_Info.Main_Title.Subtitle);
                }
            }
            Output.WriteLine("</div></a> ");

            Output.WriteLine("            </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();

            // Add the popup form
            PopupFormBuilder.AppendLine("<!-- Main Title Form -->");
            PopupFormBuilder.AppendLine("<div class=\"title_main_popup_div sbkMetadata_PopupDiv\" id=\"form_maintitle\" style=\"display:none;\">");
            PopupFormBuilder.AppendLine("  <div class=\"sbkMetadata_PopupTitle\"><table style=\"width:100%\"><tr><td style=\"text-align:left\">Edit Main Title</td><td style=\"text-align:right\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" alt=\"HELP\" target=\"_" + html_element_name.ToUpper() + "\" >?</a> &nbsp; <a href=\"#template\" alt=\"CLOSE\" onclick=\"close_maintitle_form('form_maintitle')\">X</a> &nbsp; </td></tr></table></div>");
            PopupFormBuilder.AppendLine("  <br />");
            PopupFormBuilder.AppendLine("  <table class=\"sbkMetadata_PopupTable\">");

            // Add the title type (and optionally display label)
            PopupFormBuilder.AppendLine("    <tr><td style=\"width:90px\">Title Type:</td><td colspan=\"2\"><span style=\"color: Blue; padding-bottom: 7px;\" >Main Title</span></td></tr>");

            // Add the nonsort and language text boxes
            PopupFormBuilder.Append("    <tr><td>Non Sort:</td><td>");
            PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitlenonsort\" id=\"formmainttitlenonsort\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Main_Title.NonSort) + "\" />");
            PopupFormBuilder.Append("</td><td style=\"width:255px\" >Language: &nbsp; ");
            PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitlelanguage\" id=\"formmainttitlelanguage\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Main_Title.Language) + "\" />");
            PopupFormBuilder.AppendLine("</td></tr>");

            // Add the title, subtitle, and statement of responsibility
            PopupFormBuilder.AppendLine("    <tr><td>Title:</td><td colspan=\"2\"><input class=\"formtitle_large_input sbk_Focusable\" name=\"formmaintitletitle\" id=\"formmaintitletitle\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Main_Title.Title) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td>Sub Title:</td><td colspan=\"2\"><input class=\"formtitle_large_input sbk_Focusable\" name=\"formmaintitlesubtitle\" id=\"formmaintitlesubtitle\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Main_Title.Subtitle) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td colspan=\"3\">Statement of Responsibility: &nbsp; &nbsp; <input class=\"formtitle_medium_input sbk_Focusable\" name=\"formmaintitlestatement\" id=\"formmaintitlestatement\" type=\"text\" value=\"" + statement_responsibility + "\" /></td></tr>");

            // Add the part numbers
            PopupFormBuilder.Append("    <tr><td>Part Numbers:</td><td colspan=\"2\">");
            if (Bib.Bib_Info.Main_Title.Part_Numbers_Count > 0)
            {
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitlepartnum1\" id=\"formmaintitlepartnum1\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Main_Title.Part_Numbers[0]) + "\" />");
            }
            else
            {
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitlepartnum1\" id=\"formmaintitlepartnum1\" type=\"text\" value=\"\" />");
            }
            if (Bib.Bib_Info.Main_Title.Part_Numbers_Count > 1)
            {
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitlepartnum2\" id=\"formmaintitlepartnum2\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Main_Title.Part_Numbers[1]) + "\" />");
            }
            else
            {
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitlepartnum2\" id=\"formmaintitlepartnum2\" type=\"text\" value=\"\" />");
            }
            PopupFormBuilder.AppendLine("</td></tr>");

            // Add the part names and authority
            PopupFormBuilder.Append("    <tr><td>Part Names:</td><td>");
            if (Bib.Bib_Info.Main_Title.Part_Names_Count > 0)
            {
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitlepartname1\" id=\"formmaintitlepartname1\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Main_Title.Part_Names[0]) + "\" />");
            }
            else
            {
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitlepartname1\" id=\"formmaintitlepartname1\" type=\"text\" value=\"\" />");
            }
            if (Bib.Bib_Info.Main_Title.Part_Names_Count > 1)
            {
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitlepartname2\" id=\"formmaintitlepartname2\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Main_Title.Part_Names[1]) + "\" />");
            }
            else
            {
                PopupFormBuilder.Append("<input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitlepartname2\" id=\"formmaintitlepartname2\" type=\"text\" value=\"\" />");
            }
            PopupFormBuilder.Append("<td>Authority: &nbsp; <input class=\"formtitle_small_input sbk_Focusable\" name=\"formmaintitleauthority\" id=\"formmaintitleauthority\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Main_Title.Authority) + "\" />");
            PopupFormBuilder.AppendLine("</td></tr>");

            // Finish the popup form and add the CLOSE button
            PopupFormBuilder.AppendLine("    <tr style=\"height:35px; text-align: center; vertical-align: bottom;\">");
            PopupFormBuilder.AppendLine("      <td colspan=\"3\"><button title=\"Close\" class=\"sbkMetadata_RoundButton\" onclick=\"return close_maintitle_form('form_maintitle');\">CLOSE</button></td>");
            PopupFormBuilder.AppendLine("    </tr>");
            PopupFormBuilder.AppendLine("  </table>");
            PopupFormBuilder.AppendLine("</div>");
            PopupFormBuilder.AppendLine();
        }
示例#12
0
        /// <summary> Method helps to render all simple text box based elements </summary>
        /// <param name="Output"> Output for the generated html for this element </param>
        /// <param name="instance_value"> Value for the current digital resource to display</param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        protected void render_helper(TextWriter Output, bool instance_value, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");

            // Get the label to show
            string label_to_show = Title.Replace(":", "");

            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(label_to_show, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(label_to_show, CurrentLanguage) + ":</a></td>");
            }

            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            if (!instance_value)
            {
                Output.WriteLine("            <input type=\"checkbox\" name=\"" + html_element_name + "\" id=\"" + html_element_name + "\"><label for=\"" + html_element_name + "\">" + checkBoxText + "</label>");
            }
            else
            {
                Output.WriteLine("            <input type=\"checkbox\" name=\"" + html_element_name + "\" id=\"" + html_element_name + "\" checked=\"checked\"><label for=\"" + html_element_name + "\">" + checkBoxText + "</label>");
            }
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td valign=\"bottom\" >");


            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");

            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");

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

            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
示例#13
0
        /// <summary> Method helps to render the html for all elements based on textBox_TextBox_Element class </summary>
        /// <param name="Output"> Output for the generate html for this element </param>
        /// <param name="instance_value_text1"> Value for the current digital resource to display in the first text box</param>
        /// <param name="instance_value_text2" >Value for the current digital resource to display in the second text box</param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        protected void render_helper(TextWriter Output, string instance_value_text1, string instance_value_text2, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Title.IndexOf(":") < 0)
            {
                if (Read_Only)
                {
                    Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\">" + Title + ":</b></td>");
                }
                else
                {
                    if (Acronym.Length > 0)
                    {
                        Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Title + ":</acronym></a></td>");
                    }
                    else
                    {
                        Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Title + ":</a></td>");
                    }
                }
            }
            else
            {
                if (Read_Only)
                {
                    Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\">" + Title + "</b></td>");
                }
                else
                {
                    if (Acronym.Length > 0)
                    {
                        Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Title + "</acronym></a></td>");
                    }
                    else
                    {
                        Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Title + "</a></td>");
                    }
                }
            }
            Output.WriteLine("    <td>");

            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            const int i = 1;

            // Write the first text
            if (first_label.Length > 0)
            {
                Output.Write("              <span class=\"metadata_sublabel2\">" + first_label + ":</span>");
            }

            // Write the first text box
            Output.Write("<input name=\"" + id_name + "_first" + i + "\" id=\"" + id_name + "_first" + i + "\" class=\"" + html_element_name + "_first_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(instance_value_text1) + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_first" + i + "', '" + html_element_name + "_first_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_first" + i + "', '" + html_element_name + "_first_input')\" />");

            // Write the second text
            if (second_label.Length > 0)
            {
                Output.Write("<span class=\"metadata_sublabel\">" + second_label + ":</span>");
            }

            // Write the second text box
            Output.Write("<input name=\"" + id_name + "_second" + i + "\" id=\"" + id_name + "_second" + i + "\" class=\"" + html_element_name + "_second_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(instance_value_text2) + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_second" + i + "', '" + html_element_name + "_second_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_second" + i + "', '" + html_element_name + "_second_input')\" />");
            Output.WriteLine("</div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td valign=\"bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add another " + Title.ToLower(), CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_two_text_box_element('" + html_element_name + "','" + first_label + "','" + second_label + "');\"><img border=\"0px\" class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" /></a>");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");

            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="IsMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="PopupFormBuilder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This simple element does not append any popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool IsMozilla, StringBuilder PopupFormBuilder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Enter the information about the manufacturer of the original item.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            if (Bib.Bib_Info.Manufacturers_Count == 0)
            {
                const int i = 1;
                Output.WriteLine("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Name", CurrentLanguage) + ":</span>");
                Output.WriteLine("              <input name=\"" + id_name + "_name" + i + "\" id=\"" + id_name + "_name" + i + "\" class=\"" + html_element_name + "_name_input sbk_Focusable\" type=\"text\" value=\"\" /><br />");
                Output.WriteLine("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Location(s)", CurrentLanguage) + ":</span>");
                Output.WriteLine("              <input name=\"" + id_name + "_firstloc" + i + "\" id=\"" + id_name + "_firstloc" + i + "\" class=\"" + html_element_name + "_location_input sbk_Focusable\" type=\"text\" value=\"\" />");
                Output.WriteLine("              <input name=\"" + id_name + "_secondloc" + i + "\" id=\"" + id_name + "_secondloc" + i + "\" class=\"" + html_element_name + "_location_input sbk_Focusable\" type=\"text\" value=\"\" />");
                Output.Write("              <input name=\"" + id_name + "_thirdloc" + i + "\" id=\"" + id_name + "_thirdloc" + i + "\" class=\"" + html_element_name + "_location_input sbk_Focusable\" type=\"text\" value=\"\" />");
                Output.WriteLine("</div>");
                Output.WriteLine("          </td>");
            }
            else
            {
                ReadOnlyCollection <Publisher_Info> manufacturers = Bib.Bib_Info.Manufacturers;
                for (int i = 1; i <= manufacturers.Count; i++)
                {
                    Output.WriteLine("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Name", CurrentLanguage) + ":</span>");
                    Output.WriteLine("              <input name=\"" + id_name + "_name" + i + "\" id=\"" + id_name + "_name" + i + "\" class=\"" + html_element_name + "_name_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(manufacturers[i - 1].Name) + "\" /><br />");
                    Output.WriteLine("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Location(s)", CurrentLanguage) + ":</span>");
                    ReadOnlyCollection <Origin_Info_Place> places = manufacturers[i - 1].Places;
                    if ((places.Count > 0) && (places[0].Place_Text.Length > 0))
                    {
                        Output.WriteLine("              <input name=\"" + id_name + "_firstloc" + i + "\" id=\"" + id_name + "_firstloc" + i + "\" class=\"" + html_element_name + "_location_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(places[0].Place_Text) + "\" />");
                    }
                    else
                    {
                        Output.WriteLine("              <input name=\"" + id_name + "_firstloc" + i + "\" id=\"" + id_name + "_firstloc" + i + "\" class=\"" + html_element_name + "_location_input sbk_Focusable\" type=\"text\" value=\"\" />");
                    }
                    if ((places.Count > 1) && (places[1].Place_Text.Length > 0))
                    {
                        Output.WriteLine("              <input name=\"" + id_name + "_secondloc" + i + "\" id=\"" + id_name + "_secondloc" + i + "\" class=\"" + html_element_name + "_location_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(places[1].Place_Text) + "\" />");
                    }
                    else
                    {
                        Output.WriteLine("              <input name=\"" + id_name + "_secondloc" + i + "\" id=\"" + id_name + "_secondloc" + i + "\" class=\"" + html_element_name + "_location_input sbk_Focusable\" type=\"text\" value=\"\" />");
                    }
                    if ((places.Count > 2) && (places[2].Place_Text.Length > 0))
                    {
                        Output.Write("              <input name=\"" + id_name + "_thirdloc" + i + "\" id=\"" + id_name + "_thirdloc" + i + "\" class=\"" + html_element_name + "_location_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(places[2].Place_Text) + "\" />");
                    }
                    else
                    {
                        Output.Write("              <input name=\"" + id_name + "_thirdloc" + i + "\" id=\"" + id_name + "_thirdloc" + i + "\" class=\"" + html_element_name + "_location_input sbk_Focusable\" type=\"text\" value=\"\" />");
                    }

                    if (i < manufacturers.Count)
                    {
                        Output.WriteLine("<br />");
                    }
                    else
                    {
                        Output.WriteLine("</div>");
                        Output.WriteLine("          </td>");
                    }
                }
            }

            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add a new manufacturer", CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_publisher_element('" + html_element_name + "');\"><img class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" /></a>");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");

            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");

            Output.WriteLine();
        }
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="IsMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="PopupFormBuilder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This element appends a popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool IsMozilla, StringBuilder PopupFormBuilder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string DEFAULT_ACRONYM = "Enter zoological taxonomic information about living organisms related to this material.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.French:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                default:
                    Acronym = DEFAULT_ACRONYM;
                    break;
                }
            }

            Output.WriteLine("  <!-- " + Title + " Form Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }

            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.Write("      <div id=\"" + html_element_name + "_div\">");

            // Get the zoological taxonomy
            Zoological_Taxonomy_Info zooInfo = Bib.Get_Metadata_Module(GlobalVar.ZOOLOGICAL_TAXONOMY_METADATA_MODULE_KEY) as Zoological_Taxonomy_Info;

            if (zooInfo == null)
            {
                zooInfo = new Zoological_Taxonomy_Info();
            }


            int zoo_index = 1;

            // Add this subject linke
            string zoo_as_string = zooInfo.ToString();

            if (zoo_as_string.Length > 0)
            {
                Output.Write("\n        <a title=\"Click to edit this zoological taxonomic information\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_zootaxon_term_" + zoo_index + "')\" onblur=\"link_blurred2('form_zootaxon_term_" + zoo_index + "')\" onkeypress=\"return popup_keypress_focus('form_zootaxon_" + zoo_index + "', 'formzootaxonkingdom_" + zoo_index + "', '" + IsMozilla.ToString() + "' );\"  onclick=\"return popup_focus('form_zootaxon_" + zoo_index + "', 'formzootaxonkingdom_" + zoo_index + "' );\"><div class=\"form_linkline form_zootaxon_line\" id=\"form_zootaxon_term_" + zoo_index + "\">" + zoo_as_string + "</div></a>");
            }
            else
            {
                Output.Write("\n        <a title=\"Click to edit this hierarchical zootaxon information\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_zootaxon_term_" + zoo_index + "')\" onblur=\"link_blurred2('form_zootaxon_term_" + zoo_index + "')\" onkeypress=\"return popup_keypress_focus('form_zootaxon_" + zoo_index + "', 'formzootaxonkingdom_" + zoo_index + "', '" + IsMozilla.ToString() + "' );\"  onclick=\"return popup_focus('form_zootaxon_" + zoo_index + "', 'formzootaxonkingdom_" + zoo_index + "' );\"><div class=\"form_linkline_empty form_zootaxon_line\" id=\"form_zootaxon_term_" + zoo_index + "\"><i>No taxonomic information</i></div></a>");
            }

            // Add the popup form
            PopupFormBuilder.AppendLine("<!-- Zoological Taxonomy Form " + zoo_index + " -->");
            PopupFormBuilder.AppendLine("<div class=\"zootaxon_popup_div sbkMetadata_PopupDiv\" id=\"form_zootaxon_" + zoo_index + "\" style=\"display:none;\">");
            PopupFormBuilder.AppendLine("  <div class=\"sbkMetadata_PopupTitle\"><table style=\"width:100%\"><tr><td style=\"text-align:left\">Edit Zoological Taxonomy</td><td style=\"text-align:right\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" alt=\"HELP\" target=\"_" + html_element_name.ToUpper() + "\" >?</a> &nbsp; <a href=\"#template\" alt=\"CLOSE\" onclick=\"return close_zootaxon_form('form_zootaxon_" + zoo_index + "')\">X</a> &nbsp; </td></tr></table></div>");
            PopupFormBuilder.AppendLine("  <br />");
            PopupFormBuilder.AppendLine("  <table class=\"sbkMetadata_PopupTable\">");

            // Add the rows of data
            PopupFormBuilder.AppendLine("    <tr><td style=\"width:100px;\">Kingdom:</td><td colspan=\"2\"><input class=\"formzootaxon_input sbk_Focusable\" name=\"formzootaxonkingdom_" + zoo_index + "\" id=\"formzootaxonkingdom_" + zoo_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(zooInfo.Kingdom) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td>Phylum:</td><td colspan=\"2\"><input class=\"formzootaxon_input sbk_Focusable\" name=\"formzootaxonphylum_" + zoo_index + "\" id=\"formzootaxonphylum_" + zoo_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(zooInfo.Phylum) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td>Class:</td><td colspan=\"2\"><input class=\"formzootaxon_input sbk_Focusable\" name=\"formzootaxonclass_" + zoo_index + "\" id=\"formzootaxonclass_" + zoo_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(zooInfo.Class) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td>Order:</td><td colspan=\"2\"><input class=\"formzootaxon_input sbk_Focusable\" name=\"formzootaxonorder_" + zoo_index + "\" id=\"formzootaxonorder_" + zoo_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(zooInfo.Order) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td>Family:</td><td colspan=\"2\"><input class=\"formzootaxon_input sbk_Focusable\" name=\"formzootaxonfamily_" + zoo_index + "\" id=\"formzootaxonfamily_" + zoo_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(zooInfo.Family) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td>Genus:</td><td colspan=\"2\"><input class=\"formzootaxon_input sbk_Focusable\" name=\"formzootaxongenus_" + zoo_index + "\" id=\"formzootaxongenus_" + zoo_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(zooInfo.Genus) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td>Species:</td><td colspan=\"2\"><input class=\"formzootaxon_input sbk_Focusable\" name=\"formzootaxonspecies_" + zoo_index + "\" id=\"formzootaxonspecies_" + zoo_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(zooInfo.Specific_Epithet) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td>Common Name:</td><td colspan=\"2\"><input class=\"formzootaxon_input sbk_Focusable\" name=\"formzootaxoncommon_" + zoo_index + "\" id=\"formzootaxoncommon_" + zoo_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(zooInfo.Common_Name) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr style=\"height:35px; text-align: center; vertical-align: bottom;\">");
            PopupFormBuilder.AppendLine("      <td colspan=\"3\"><button title=\"Close\" class=\"sbkMetadata_RoundButton\" onclick=\"return close_zootaxon_form('form_zootaxon_" + zoo_index + "');\">CLOSE</button></td>");
            PopupFormBuilder.AppendLine("    </tr>");

            PopupFormBuilder.AppendLine("  </table>");
            PopupFormBuilder.AppendLine("</div>");
            PopupFormBuilder.AppendLine();

            zoo_index++;

            // Add the link to add a new other subject and close the main element
            Output.WriteLine("\n            </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add a new zoological taxonomy object", CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return new_zoo_link_clicked('" + Template_Page + "');\"><img class=\"repeat_button\" src=\"" + REPEAT_BUTTON_URL + "\" /></a>");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");

            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
示例#16
0
        /// <summary> Method helps to render the html for all elements based on TextBox_ComboBox_Element class </summary>
        /// <param name="Output"> Output for the generate html for this element </param>
        /// <param name="TextValues"> Value(s) for the current digital resource to display in the text box </param>
        /// <param name="SelectValues"> Value(s) for the current digital resource to display in the combo box</param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        protected void render_helper(TextWriter Output, List <string> TextValues, List <string> SelectValues, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            if (TextValues.Count == 0)
            {
                TextValues.Add(String.Empty);
                SelectValues.Add(String.Empty);
            }

            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table><tr><td>");
            Output.WriteLine("      <div id=\"" + html_element_name + "_div\">");
            for (int i = 1; i <= TextValues.Count; i++)
            {
                // Write the text box
                Output.Write("        <input name=\"" + id_name + "_text" + i + "\" id=\"" + id_name + "_text" + i + "\" class=\"" + html_element_name + "_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(TextValues[i - 1]) + "\" ");
                if (textBoxEvents != null)
                {
                    textBoxEvents.Add_Events_HTML(Output);
                }
                Output.Write(" />");

                // If there is a second label, draw that
                if (SecondLabel.Length > 0)
                {
                    Output.WriteLine("<span class=\"metadata_sublabel\">" + Translator.Get_Translation(SecondLabel, CurrentLanguage) + ":</span>");
                }
                else
                {
                    Output.WriteLine();
                }

                // Write the combo box
                Output.Write("        <select class=\"" + html_element_name + "_select\" name=\"" + id_name + "_select" + i + "\" id=\"" + id_name + "_select" + i + "\" ");
                if (comboBoxEvents != null)
                {
                    comboBoxEvents.Add_Events_HTML(Output);
                }
                Output.WriteLine(" >");



                bool found_option = false;
                for (int j = 0; j < PossibleSelectItemsText.Count; j++)
                {
                    if ((i < PossibleSelectItemsText.Count) && (PossibleSelectItemsText[j] == SelectValues[i - 1]))
                    {
                        if (PossibleSelectItemsValue.Count > j)
                        {
                            Output.WriteLine("          <option selected=\"selected=\" value=\"" + PossibleSelectItemsValue[j] + "\">" + PossibleSelectItemsText[j] + "</option>");
                        }
                        else
                        {
                            Output.WriteLine("          <option selected=\"selected=\" value=\"" + PossibleSelectItemsText[j] + "\">" + PossibleSelectItemsText[j] + "</option>");
                        }
                        found_option = true;
                    }
                    else
                    {
                        if (PossibleSelectItemsValue.Count > j)
                        {
                            Output.WriteLine("          <option value=\"" + PossibleSelectItemsValue[j] + "\">" + PossibleSelectItemsText[j] + "</option>");
                        }
                        else
                        {
                            Output.WriteLine("          <option value=\"" + PossibleSelectItemsText[j] + "\">" + PossibleSelectItemsText[j] + "</option>");
                        }
                    }
                }

                if ((i <= SelectValues.Count) && (SelectValues[i - 1].Length > 0) && (!Restrict_Values) && (!found_option))
                {
                    Output.WriteLine("          <option value=\"" + SelectValues[i - 1] + "\" selected=\"selected=\">" + SelectValues[i - 1] + "</option>");
                }
                Output.Write("        </select>");

                if (i == TextValues.Count)
                {
                    Output.WriteLine();
                    Output.WriteLine("      </div>");
                }
                else
                {
                    Output.WriteLine("<br />");
                }
            }

            Output.WriteLine("    </td>");
            Output.WriteLine("    <td style=\"vertical-align:bottom\" >");

            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add another " + Title.ToLower(), CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_text_box_select_element('" + html_element_name + "', '" + SecondLabel + "');\"><img class=\"repeat_button\" src=\"" + REPEAT_BUTTON_URL + "\" /></a>");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr></table></td></tr>");

            Output.WriteLine();
        }
        /// <summary> Method helps to render all multiple combo box based elements </summary>
        /// <param name="Output"> Output for the generated html for this element </param>
        /// <param name="instance_value"> Value for the current digital resource to display</param>
        /// <param name="possible_values"> Possible vlaues for this combo boxes </param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        protected void render_helper(TextWriter Output, string instance_value, List <string> possible_values, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }


            if (Read_Only)
            {
                Output.Write("    <td>");
                Output.Write(instance_value);
                Output.WriteLine("</td>");
            }
            else
            {
                Output.WriteLine("    <td>");
                Output.WriteLine("      <table>");
                Output.WriteLine("        <tr>");
                Output.WriteLine("          <td>");
                Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

                const int i = 1;

                string value = instance_value;
                Output.WriteLine("              <select name=\"" + id_name + i + "\" id=\"" + id_name + i + "\" class=\"" + html_element_name + "_input\" type=\"text\" >");
                bool found = false;
                if (value.Length == 0)
                {
                    found = true;
                    Output.WriteLine("                <option value=\"\" selected=\"selected\" >&nbsp;</option>");
                }
                else
                {
                    Output.WriteLine("                <option value=\"\">&nbsp;</option>");
                }
                foreach (string item in possible_values)
                {
                    if (item.ToUpper() == value.ToUpper())
                    {
                        found = true;
                        Output.WriteLine("                <option value=\"" + item + "\" selected=\"selected\" >" + item + "</option>");
                    }
                    else
                    {
                        Output.WriteLine("                <option value=\"" + item + "\">" + item + "</option>");
                    }
                }
                if (!found)
                {
                    Output.WriteLine("                <option value=\"" + value + "\" selected=\"selected\" >" + value + "</option>");
                }
                Output.WriteLine("              </select>");

                Output.WriteLine("</div>");
            }

            Output.WriteLine("          </td>");
            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");

            if (view_choices_string.Length > 0)
            {
                Output.WriteLine("            " + view_choices_string.Replace("<%WEBSKIN%>", Skin_Code).Replace("<%?URLOPTS%>", "") + "&nbsp; ");
            }

            if (Repeatable)
            {
                Output.WriteLine("          <span id=\"" + html_element_name + "_repeaticon\" name=\"" + html_element_name + "_repeaticon\"><img title=\"" + Translator.Get_Translation("Click to add another " + Title.ToLower(), CurrentLanguage) + ".\" alt=\"+\" class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" onmousedown=\"add_new_multi_combo_element('" + html_element_name + "', 1," + max_boxes + "," + boxes_per_line + "); return false;\" /></span>");
            }

            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");


            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");


            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="isMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="popup_form_builder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This simple element does not append any popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool isMozilla, StringBuilder popup_form_builder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Enter the period of time which is the subject of this material.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            if (Bib.Bib_Info.TemporalSubjects_Count == 0)
            {
                const int i = 1;
                Output.Write("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Start Year", CurrentLanguage) + ":</span>");
                Output.Write("<input name=\"" + id_name + "_start" + i + "\" id=\"" + id_name + "_start" + i + "\" class=\"" + html_element_name + "_year_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_start" + i + "', '" + html_element_name + "_year_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_start" + i + "', '" + html_element_name + "_year_input')\" />");
                Output.Write("<span class=\"metadata_sublabel\">" + Translator.Get_Translation("End Year", CurrentLanguage) + ":</span>");
                Output.Write("<input name=\"" + id_name + "_end" + i + "\" id=\"" + id_name + "_end" + i + "\" class=\"" + html_element_name + "_year_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_end" + i + "', '" + html_element_name + "_year_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_end" + i + "', '" + html_element_name + "_year_input')\" />");
                Output.Write("<span class=\"metadata_sublabel\">" + Translator.Get_Translation("Period", CurrentLanguage) + ":</span>");
                Output.WriteLine("<input name=\"" + id_name + "_period" + i + "\" id=\"" + id_name + "_period" + i + "\" class=\"" + html_element_name + "_period_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_period" + i + "', '" + html_element_name + "_period_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_period" + i + "', '" + html_element_name + "_period_input')\" /></div>");
                Output.WriteLine("            </div>");
            }
            else
            {
                ReadOnlyCollection <Temporal_Info> temporalSubjects = Bib.Bib_Info.TemporalSubjects;
                for (int i = 1; i <= temporalSubjects.Count; i++)
                {
                    Output.Write("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Start Year", CurrentLanguage) + ":</span>");
                    Output.Write("<input name=\"" + id_name + "_start" + i + "\" id=\"" + id_name + "_start" + i + "\" class=\"" + html_element_name + "_year_input\" type=\"text\" value=\"" + temporalSubjects[i - 1].Start_Year.ToString().Replace("-1", "") + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_start" + i + "', '" + html_element_name + "_year_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_start" + i + "', '" + html_element_name + "_year_input')\" />");
                    Output.Write("<span class=\"metadata_sublabel\">" + Translator.Get_Translation("End Year", CurrentLanguage) + ":</span>");
                    Output.Write("<input name=\"" + id_name + "_end" + i + "\" id=\"" + id_name + "_end" + i + "\" class=\"" + html_element_name + "_year_input\" type=\"text\" value=\"" + temporalSubjects[i - 1].End_Year.ToString().Replace("-1", "") + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_end" + i + "', '" + html_element_name + "_year_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_end" + i + "', '" + html_element_name + "_year_input')\" />");
                    Output.Write("<span class=\"metadata_sublabel\">" + Translator.Get_Translation("Period", CurrentLanguage) + ":</span>");
                    Output.Write("<input name=\"" + id_name + "_period" + i + "\" id=\"" + id_name + "_period" + i + "\" class=\"" + html_element_name + "_period_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(temporalSubjects[i - 1].TimePeriod) + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_period" + i + "', '" + html_element_name + "_period_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_period" + i + "', '" + html_element_name + "_period_input')\" />");

                    Output.WriteLine(i < temporalSubjects.Count ? "<br />" : "\n            </div>");
                }
            }
            Output.WriteLine("          </td>");

            Output.WriteLine("          <td valign=\"bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add a new temporal coverage field", CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_temporal_element();\"><img border=\"0px\" class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" /></a>");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");

            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
示例#19
0
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="isMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="popup_form_builder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This element appends a popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool isMozilla, StringBuilder popup_form_builder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Enter serial hierarchy information which explains how this volume related to the larger body of work.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            Output.WriteLine("  <!-- " + Title + " Form Element -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }

            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");

            Output.WriteLine("    <tr><td>&nbsp;</td><td><span style=\"color:Gray;padding-left:55px;\">Display Text</span></td><td><span style=\"color:Gray;\"> &nbsp; Display Order</span></td></tr>");


            // Add the rows of enumeration data
            Output.WriteLine("    <tr><td width=\"100px\">Level 1:</td>");
            if (Bib.Behaviors.Serial_Info.Count > 0)
            {
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_text_input\" id=\"form_serialhierarchy_enum1text\" name=\"form_serialhierarchy_enum1text\" value=\"" + HttpUtility.HtmlEncode(Bib.Behaviors.Serial_Info[0].Display) + "\" onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum1text', 'form_serialhierarchy_text_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum1text', 'form_serialhierarchy_text_input')\" ></td>");
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input\" id=\"form_serialhierarchy_enum1order\" name=\"form_serialhierarchy_enum1order\" value=\"" + HttpUtility.HtmlEncode(Bib.Behaviors.Serial_Info[0].Order.ToString()) + "\"  onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum1order', 'form_serialhierarchy_order_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum1order', 'form_serialhierarchy_order_input')\" ></td></tr>");
            }
            else
            {
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_text_input\" id=\"form_serialhierarchy_enum1text\" name=\"form_serialhierarchy_enum1text\" value=\"\" onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum1text', 'form_serialhierarchy_text_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum1text', 'form_serialhierarchy_text_input')\" ></td>");
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input\" id=\"form_serialhierarchy_enum1order\" name=\"form_serialhierarchy_enum1order\" value=\"\" onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum1order', 'form_serialhierarchy_order_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum1order', 'form_serialhierarchy_order_input')\" ></td></tr>");
            }

            Output.WriteLine("    <tr><td>Level 2:</td>");
            if (Bib.Behaviors.Serial_Info.Count > 1)
            {
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_text_input\" id=\"form_serialhierarchy_enum2text\" name=\"form_serialhierarchy_enum2text\" value=\"" + HttpUtility.HtmlEncode(Bib.Behaviors.Serial_Info[1].Display) + "\"  onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum2text', 'form_serialhierarchy_text_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum2text', 'form_serialhierarchy_text_input')\" ></td>");
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input\" id=\"form_serialhierarchy_enum2order\" name=\"form_serialhierarchy_enum2order\" value=\"" + HttpUtility.HtmlEncode(Bib.Behaviors.Serial_Info[1].Order.ToString()) + "\" onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum2order', 'form_serialhierarchy_order_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum2order', 'form_serialhierarchy_order_input')\"></td></tr>");
            }
            else
            {
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_text_input\" id=\"form_serialhierarchy_enum2text\" name=\"form_serialhierarchy_enum2text\" value=\"\"  onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum2text', 'form_serialhierarchy_text_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum2text', 'form_serialhierarchy_text_input')\" ></td>");
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input\" id=\"form_serialhierarchy_enum2order\" name=\"form_serialhierarchy_enum2order\" value=\"\" onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum2order', 'form_serialhierarchy_order_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum2order', 'form_serialhierarchy_order_input')\" ></td></tr>");
            }

            Output.WriteLine("    <tr><td>Level 3:</td>");
            if (Bib.Behaviors.Serial_Info.Count > 2)
            {
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_text_input\" id=\"form_serialhierarchy_enum3text\" name=\"form_serialhierarchy_enum3text\" value=\"" + HttpUtility.HtmlEncode(Bib.Behaviors.Serial_Info[2].Display) + "\"  onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum3text', 'form_serialhierarchy_text_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum3text', 'form_serialhierarchy_text_input')\" ></td>");
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input\" id=\"form_serialhierarchy_enum3order\" name=\"form_serialhierarchy_enum3order\" value=\"" + HttpUtility.HtmlEncode(Bib.Behaviors.Serial_Info[2].Order.ToString()) + "\" onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum3order', 'form_serialhierarchy_order_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum3order', 'form_serialhierarchy_order_input')\" ></td></tr>");
            }
            else
            {
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_text_input\" id=\"form_serialhierarchy_enum3text\" name=\"form_serialhierarchy_enum3text\" value=\"\"  onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum3text', 'form_serialhierarchy_text_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum3text', 'form_serialhierarchy_text_input')\" ></td>");
                Output.WriteLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input\" id=\"form_serialhierarchy_enum3order\" name=\"form_serialhierarchy_enum3order\" value=\"\" onfocus=\"javascript:textbox_enter('form_serialhierarchy_enum3order', 'form_serialhierarchy_order_input_focused')\" onblur=\"javascript:textbox_leave('form_serialhierarchy_enum3order', 'form_serialhierarchy_order_input')\" ></td></tr>");
            }

            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();

            //// Determine which is primary, the enumeration or chronology.
            //bool enum_primary = true;
            //if (Bib.Serial_Info.Count > 0)
            //{
            //    if (Bib.Bib_Info.Series_Part_Info.Year == Bib.Serial_Info[0].Display)
            //    {
            //        enum_primary = false;
            //    }
            //}
            //else
            //{
            //    // If no default, set it by type
            //    if (Bib.Bib_Info.Type.Type.ToUpper().IndexOf("NEWSPAPER") >= 0)
            //    {
            //        enum_primary = false;
            //    }
            //}
        }
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="IsMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="PopupFormBuilder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This element appends a popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool IsMozilla, StringBuilder PopupFormBuilder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string DEFAULT_ACRONYM = "Enter any related URL for this material";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.French:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                default:
                    Acronym = DEFAULT_ACRONYM;
                    break;
                }
            }

            Output.WriteLine("  <!-- Related URL Form Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }

            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            // Write the EAD popup link
            if (Bib.Bib_Info.Location.Other_URL.Length == 0)
            {
                Output.Write("              <a title=\"Click to edit the related URL information\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_related_url_term')\" onblur=\"link_blurred2('form_related_url_term')\" onkeypress=\"return popup_keypress_focus('form_related_url', 'form_relatedurl_label', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_related_url', 'form_relatedurl_label' );\"><div class=\"form_linkline_empty form_related_url_line\" id=\"form_related_url_term\">");
                Output.Write("<i>Empty Related URL </i>");
            }
            else
            {
                Output.Write("              <a title=\"Click to edit the related URL information\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_related_url_term')\" onblur=\"link_blurred2('form_related_url_term')\" onkeypress=\"return popup_keypress_focus('form_related_url', 'form_relatedurl_label', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_related_url', 'form_relatedurl_label' );\"><div class=\"form_linkline form_related_url_line\" id=\"form_related_url_term\">");
                Output.Write(HttpUtility.HtmlEncode(Bib.Bib_Info.Location.Other_URL));
                if (Bib.Bib_Info.Location.Other_URL_Display_Label.Length > 0)
                {
                    Output.Write(" ( <i>" + HttpUtility.HtmlEncode(Bib.Bib_Info.Location.Other_URL_Display_Label) + "</i> )");
                }
            }
            Output.WriteLine("</div></a>");
            Output.WriteLine("            </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();

            // Add the popup form
            PopupFormBuilder.AppendLine("<!-- Related URL Form -->");
            PopupFormBuilder.AppendLine("<div class=\"related_url_popup_div sbkMetadata_PopupDiv\" id=\"form_related_url\" style=\"display:none;\">");
            PopupFormBuilder.AppendLine("  <div class=\"sbkMetadata_PopupTitle\"><table style=\"width:100%\"><tr><td style=\"text-align:left\">Edit Related URL</td><td style=\"text-align:right\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" alt=\"HELP\" target=\"_" + html_element_name.ToUpper() + "\" >?</a> &nbsp; <a href=\"#template\" alt=\"CLOSE\" onclick=\"close_related_url_form()\">X</a> &nbsp; </td></tr></table></div>");
            PopupFormBuilder.AppendLine("  <br />");
            PopupFormBuilder.AppendLine("  <table class=\"sbkMetadata_PopupTable\">");

            // Add the rows of data
            PopupFormBuilder.AppendLine("    <tr><td style=\"width:70px\">Label:</td><td><input class=\"form_relatedurl_input sbk_Focusable\" name=\"form_relatedurl_label\" id=\"form_relatedurl_label\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Location.Other_URL_Display_Label) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td>URL:</td><td><input class=\"form_relatedurl_input sbk_Focusable\" name=\"form_relatedurl_url\" id=\"form_relatedurl_url\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Location.Other_URL) + "\" /></td></tr>");
            PopupFormBuilder.AppendLine("    <tr><td>Note:</td><td><input class=\"form_relatedurl_input sbk_Focusable\" name=\"form_relatedurl_note\" id=\"form_relatedurl_note\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Location.Other_URL_Note) + "\" /></td></tr>");


            // Finish the popup form and add the CLOSE button
            PopupFormBuilder.AppendLine("    <tr style=\"height:35px; text-align: center; vertical-align: bottom;\">");
            PopupFormBuilder.AppendLine("      <td colspan=\"2\"><button title=\"Close\" class=\"sbkMetadata_RoundButton\" onclick=\"return close_related_url_form();\">CLOSE</button></td>");
            PopupFormBuilder.AppendLine("    </tr>");
            PopupFormBuilder.AppendLine("  </table>");
            PopupFormBuilder.AppendLine("</div>");
            PopupFormBuilder.AppendLine();
        }
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="IsMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="PopupFormBuilder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This simple element does not append any popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool IsMozilla, StringBuilder PopupFormBuilder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string DEFAULT_ACRONYM = "Select the type which best categorizes this material and provide information about the larger body of work on the next line.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.French:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                default:
                    Acronym = DEFAULT_ACRONYM;
                    break;
                }
            }

            // Determine the material type
            string material_type;
            string sobekcm_type = Bib.Bib_Info.SobekCM_Type_String;

            if (sobekcm_type.Length == 0)
            {
                material_type = "Select Material Type";
            }
            else
            {
                material_type = sobekcm_type == "Archival" ? Bib.Bib_Info.Original_Description.Extent : sobekcm_type;
            }

            // Determine the text for the larger body of work
            string larger_text;
            string larger_value = String.Empty;
            bool   other_value  = false;

            switch (material_type)
            {
            case "Book Chapter":
                larger_text  = "Book Title:";
                larger_value = Bib.Bib_Info.SeriesTitle.ToString();
                break;

            case "Conference Papers":
            case "Conference Proceedings":
                larger_text = "Conference Name:";
                if (Bib.Bib_Info.Names_Count > 0)
                {
                    foreach (Name_Info thisName in Bib.Bib_Info.Names)
                    {
                        if ((thisName.Name_Type == Name_Info_Type_Enum.conference) && (thisName.Full_Name.Length > 0))
                        {
                            larger_value = thisName.ToString();
                            break;
                        }
                    }
                }
                break;

            case "Course Material":
                larger_text  = "Course Name:";
                larger_value = Bib.Bib_Info.SeriesTitle.ToString();
                break;

            case "Journal Article":
                larger_text  = "Journal Citation:";
                larger_value = Bib.Bib_Info.SeriesTitle.ToString();
                break;

            case "Technical Reports":
                larger_text  = "Series Title:";
                larger_value = Bib.Bib_Info.SeriesTitle.ToString();
                break;

            case "Select Material Type":
                larger_text  = "Larger Body of Work:";
                larger_value = Bib.Bib_Info.SeriesTitle.ToString();
                break;

            default:
                material_type = "Other";
                larger_text   = "Larger Body of Work:";
                larger_value  = Bib.Bib_Info.SeriesTitle.ToString();
                other_value   = true;
                break;
            }

            string id_name = "irtype";
            string html_element_name_irtype = "ir_type";
            string title = "Material Type";

            if ((material_type.Length == 0) && (default_values.Count > 0))
            {
                material_type = default_values[0];
            }

            Output.WriteLine("  <!-- Institutional Repository Material Type Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name_irtype.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name_irtype.ToUpper() + "\">" + Translator.Get_Translation(title, CurrentLanguage) + ":</a></td>");
            }
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name_irtype + "_div\">");
            if (material_type.IndexOf("Select") == 0)
            {
                Output.WriteLine("              <select class=\"" + html_element_name_irtype + "_input_init\" name=\"" + id_name + "\" id=\"" + id_name + "\" onchange=\"javascript:ir_type_change()\" >");
            }
            else
            {
                Output.WriteLine("              <select class=\"" + html_element_name_irtype + "_input\" name=\"" + id_name + "\" id=\"" + id_name + "\" onchange=\"javascript:ir_type_change()\" >");
            }

            bool found_option = false;

            foreach (string thisOption in items)
            {
                if (thisOption == material_type)
                {
                    Output.WriteLine("                <option selected=\"selected=\" value=\"" + thisOption + "\">" + thisOption + "</option>");
                    found_option = true;
                }
                else
                {
                    Output.WriteLine("                <option value=\"" + thisOption + "\">" + thisOption + "</option>");
                }
            }
            if ((material_type.Length > 0) && (!restrict_values) && (!found_option))
            {
                Output.WriteLine("                <option selected=\"selected=\" value=\"" + material_type + "\">" + material_type + "</option>");
            }
            Output.WriteLine("              </select>");
            if (other_value)
            {
                Output.WriteLine("              <span class=\"metadata_sublabel\" id=\"irtype_othertext\" name=\"irtype_othertext\">" + Translator.Get_Translation("Specify Type", CurrentLanguage) + ":</span>");
                Output.WriteLine("              <input type=\"text\" class=\"irtype_other_input sbk_Focusable\" id=\"irtype_otherinput\" name=\"irtype_otherinput\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Original_Description.Extent) + "\" />");
            }
            Output.WriteLine("              </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td valign=\"bottom\" >");
            Output.WriteLine("            <a target=\"_" + html_element_name_irtype.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();

            id_name = "largerbody";
            html_element_name_irtype = "larger_body";
            title = larger_text;

            Output.WriteLine("  <!-- Institutional Repository Larger Body of Work (IR_Type_Element) -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Read_Only)
            {
                Output.WriteLine("    <td class=\"metadata_label\">" + Translator.Get_Translation(title, CurrentLanguage) + "</td>");
            }
            else
            {
                if (Acronym.Length > 0)
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name_irtype.ToUpper() + "\"><acronym title=\"" + Acronym + "\"><span id=\"larger_body_label\">" + title + "</span></acronym></a></td>");
                }
                else
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name_irtype.ToUpper() + "\"><span id=\"larger_body_label\">" + title + "</span></a></td>");
                }
            }


            if (Read_Only)
            {
                Output.Write("    <td>");
                Output.Write(larger_value);
                Output.WriteLine("</td>");
            }
            else
            {
                Output.WriteLine("    <td>");
                Output.WriteLine("      <table><tr><td>");
                Output.WriteLine("      <div id=\"" + html_element_name_irtype + "_div\">");
                Output.WriteLine("      <input name=\"" + id_name + "\" id=\"" + id_name + "\" class=\"" + html_element_name_irtype + "_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(larger_value.Replace("<i>", "").Replace("</i>", "")) + "\" /></div>");
                Output.WriteLine("    </td>");
                Output.WriteLine("         <td vstyle=\"vertical-align=:bottom\" >");
                Output.WriteLine("            <a target=\"_" + html_element_name_irtype.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
                Output.WriteLine("          </td>");
                Output.WriteLine("  </tr></table>");
                Output.WriteLine("  </td>");
            }

            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="isMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="popup_form_builder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This element appends a popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool isMozilla, StringBuilder popup_form_builder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Enter any related URL for this material";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            Output.WriteLine("  <!-- Related URL Form Element -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }

            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            // Write the EAD popup link
            if (Bib.Bib_Info.Location.Other_URL.Length == 0)
            {
                Output.Write("              <a title=\"Click to edit the related URL information\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_related_url_term')\" onblur=\"link_blurred2('form_related_url_term')\" onkeypress=\"return popup_keypress_focus('form_related_url', 'form_related_url_term', 'form_relatedurl_label', 210, 620, '" + isMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_related_url', 'form_related_url_term', 'form_relatedurl_label', 210, 620 );\"><div class=\"form_linkline_empty form_related_url_line\" id=\"form_related_url_term\">");
                Output.Write("<i>Empty Related URL </i>");
            }
            else
            {
                Output.Write("              <a title=\"Click to edit the related URL information\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_related_url_term')\" onblur=\"link_blurred2('form_related_url_term')\" onkeypress=\"return popup_keypress_focus('form_related_url', 'form_related_url_term', 'form_relatedurl_label', 210, 620, '" + isMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_related_url', 'form_related_url_term', 'form_relatedurl_label', 210, 620 );\"><div class=\"form_linkline form_related_url_line\" id=\"form_related_url_term\">");
                Output.Write(HttpUtility.HtmlEncode(Bib.Bib_Info.Location.Other_URL));
                if (Bib.Bib_Info.Location.Other_URL_Display_Label.Length > 0)
                {
                    Output.Write(" ( <i>" + HttpUtility.HtmlEncode(Bib.Bib_Info.Location.Other_URL_Display_Label) + "</i> )");
                }
            }
            Output.WriteLine("</div></a>");
            Output.WriteLine("            </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td valign=\"bottom\" >");
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();

            // Add the popup form
            popup_form_builder.AppendLine("<!-- Related URL Form -->");
            popup_form_builder.AppendLine("<div class=\"related_url_popup_div\" id=\"form_related_url\" style=\"display:none;\">");
            popup_form_builder.AppendLine("  <div class=\"popup_title\"><table width=\"100%\"><tr><td align=\"left\">EDIT RELATED URL</td><td align=\"right\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" alt=\"HELP\" target=\"_" + html_element_name.ToUpper() + "\" >?</a> &nbsp; <a href=\"#template\" alt=\"CLOSE\" onclick=\"close_related_url_form()\">X</a> &nbsp; </td></tr></table></div>");
            popup_form_builder.AppendLine("  <br />");
            popup_form_builder.AppendLine("  <table class=\"popup_table\">");

            // Add the rows of data
            popup_form_builder.AppendLine("    <tr><td width=\"70px\">Label:</td><td><input class=\"form_relatedurl_input\" name=\"form_relatedurl_label\" id=\"form_relatedurl_label\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Location.Other_URL_Display_Label) + "\" onfocus=\"javascript:textbox_enter('form_relatedurl_label', 'form_relatedurl_input_focused')\" onblur=\"javascript:textbox_leave('form_relatedurl_label', 'form_relatedurl_input')\" /></td></tr>");
            popup_form_builder.AppendLine("    <tr><td>URL:</td><td><input class=\"form_relatedurl_input\" name=\"form_relatedurl_url\" id=\"form_relatedurl_url\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Location.Other_URL) + "\" onfocus=\"javascript:textbox_enter('form_relatedurl_url', 'form_relatedurl_input_focused')\" onblur=\"javascript:textbox_leave('form_relatedurl_url', 'form_relatedurl_input')\" /></td></tr>");
            popup_form_builder.AppendLine("    <tr><td>Note:</td><td><input class=\"form_relatedurl_input\" name=\"form_relatedurl_note\" id=\"form_relatedurl_note\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Location.Other_URL_Note) + "\" onfocus=\"javascript:textbox_enter('form_relatedurl_note', 'form_relatedurl_input_focused')\" onblur=\"javascript:textbox_leave('form_relatedurl_note', 'form_relatedurl_input')\" /></td></tr>");


            // Finish the popup form
            popup_form_builder.AppendLine("  </table>");
            popup_form_builder.AppendLine("  <br />");
            popup_form_builder.AppendLine("  <center><a href=\"#template\" onclick=\"return close_related_url_form();\"><img border=\"0\" src=\"" + Close_Button_URL(Skin_Code, Base_URL) + "\" alt=\"CLOSE\" /></a></center>");
            popup_form_builder.AppendLine("</div>");
            popup_form_builder.AppendLine();
        }
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="isMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="popup_form_builder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This simple element does not append any popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool isMozilla, StringBuilder popup_form_builder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Select the view types for this material when viewed online.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            // Options = NONE, HTML, HTML_MAP, JPEG, JPEG2000, RELATED_IMAGES, TEXT, PAGE TURNER, GOOGLE MAP, EMPTY STRING
            // Get collection of all items
            List <View_Object> views = new List <View_Object>();

            if (Bib.Behaviors.Item_Level_Page_Views_Count > 0)
            {
                views.AddRange(Bib.Behaviors.Item_Level_Page_Views);
            }
            if (Bib.Behaviors.Views_Count > 0)
            {
                views.AddRange(Bib.Behaviors.Views.Where(itemView => (itemView.View_Type != View_Enum.CITATION) && (itemView.View_Type != View_Enum.ALL_VOLUMES) && (itemView.View_Type != View_Enum.DOWNLOADS) && (itemView.View_Type != View_Enum.FLASH) && (itemView.View_Type != View_Enum.GOOGLE_MAP) && (itemView.View_Type != View_Enum.PDF) && (itemView.View_Type != View_Enum.TOC)));
            }

            if (views.Count == 0)
            {
                const int i = 1;
                // Add the view types select
                Output.Write("<select name=\"" + id_name + "_type" + i + "\" id=\"" + id_name + "_type" + i + "\" class=\"" + html_element_name + "_type\" onchange=\"viewer_type_changed('" + id_name + "_type" + i + "');\">");
                Output.Write("<option value=\"\" selected=\"selected\">&nbsp;</option>");
                Output.Write("<option value=\"html\" >HTML</option>");
                Output.Write("<option value=\"htmlmap\" >HTML Map</option>");
                Output.Write("<option value=\"jpeg\" >JPEG</option>");
                Output.Write("<option value=\"jpeg2000\" >JPEG2000</option>");
                Output.Write("<option value=\"map\">Map Display</option>");
                Output.Write("<option value=\"pageturner\" >Page Turner</option>");
                Output.Write("<option value=\"related\" >Related Images</option>");
                Output.Write("<option value=\"text\" >Text</option>");
                Output.Write("<option value=\"tei\" >TEI</option>");
                Output.Write("</select>");

                // Add the file sublabel
                Output.Write("<span id=\"" + id_name + "_details" + i + "\" style=\"display:none\">");

                Output.Write("<span class=\"metadata_sublabel\">File:</span>");

                // Add the file select
                Output.Write("<select name=\"" + id_name + "_file" + i + "\" id=\"" + id_name + "_file" + i + "\" class=\"" + html_element_name + "_file\">");
                Output.Write("<option value=\"\" selected=\"selected\">&nbsp;</option>");
                Output.Write("</select>");

                // Add the label sublabel
                Output.Write("<span class=\"metadata_sublabel\">Label:</span>");

                // Add the label input
                Output.WriteLine("<input name=\"" + id_name + "_label" + i + "\" id=\"" + id_name + "_label" + i + "\" class=\"" + html_element_name + "_label_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_label" + i + "', '" + html_element_name + "_label_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_label" + i + "', '" + html_element_name + "_label_input')\" /></span>");
                Output.WriteLine("            </div>");
            }
            else
            {
                for (int i = 1; i <= views.Count; i++)
                {
                    // Add the view types select
                    Output.Write("<select name=\"" + id_name + "_type" + i + "\" id=\"" + id_name + "_type" + i + "\" class=\"" + html_element_name + "_type\" onchange=\"viewer_type_changed('" + id_name + "_type" + i + "');\">");
                    Output.Write(views[i - 1].View_Type == View_Enum.None
                                     ? "<option value=\"\" selected=\"selected\" >&nbsp;</option>"
                                     : "<option value=\"\">&nbsp;</option>");

                    Output.Write(views[i - 1].View_Type == View_Enum.HTML
                                     ? "<option value=\"html\" selected=\"selected\" >HTML</option>"
                                     : "<option value=\"html\" >HTML</option>");

                    Output.Write(views[i - 1].View_Type == View_Enum.HTML_MAP
                                     ? "<option value=\"htmlmap\" selected=\"selected\" >HTML Map</option>"
                                     : "<option value=\"htmlmap\" >HTML Map</option>");

                    Output.Write(views[i - 1].View_Type == View_Enum.JPEG
                                     ? "<option value=\"jpeg\" selected=\"selected\" >JPEG</option>"
                                     : "<option value=\"jpeg\" >JPEG</option>");

                    Output.Write(views[i - 1].View_Type == View_Enum.JPEG2000
                                     ? "<option value=\"jpeg2000\" selected=\"selected\" >JPEG2000</option>"
                                     : "<option value=\"jpeg2000\" >JPEG2000</option>");

                    Output.Write(views[i - 1].View_Type == View_Enum.GOOGLE_MAP
                                     ? "<option value=\"map\" selected=\"selected\" >Map Display</option>"
                                     : "<option value=\"map\" >Map Display</option>");

                    Output.Write(views[i - 1].View_Type == View_Enum.PAGE_TURNER
                                     ? "<option value=\"pageturner\" selected=\"selected\" >Page Turner</option>"
                                     : "<option value=\"pageturner\" >Page Turner</option>");

                    Output.Write(views[i - 1].View_Type == View_Enum.RELATED_IMAGES
                                     ? "<option value=\"related\" selected=\"selected\" >Related Images</option>"
                                     : "<option value=\"related\" >Related Images</option>");

                    Output.Write(views[i - 1].View_Type == View_Enum.TEXT
                                     ? "<option value=\"text\" selected=\"selected\" >Text</option>"
                                     : "<option value=\"text\" >Text</option>");

                    Output.Write(views[i - 1].View_Type == View_Enum.TEI
                                    ? "<option value=\"tei\" selected=\"selected\" >TEI</option>"
                                    : "<option value=\"tei\" >TEI</option>");

                    Output.Write("</select>");

                    // Add the file sublabel
                    Output.Write("<span id=\"" + id_name + "_details" + i + "\" style=\"display:none\">");
                    Output.Write("<span class=\"metadata_sublabel\">File:</span>");

                    // Add the file select
                    Output.Write("<select name=\"" + id_name + "_file" + i + "\" id=\"" + id_name + "_file" + i + "\" class=\"" + html_element_name + "_file\">");

                    if (views[i - 1].FileName.Length > 0)
                    {
                        Output.Write("<option value=\"\">&nbsp;</option>");
                        Output.Write("<option value=\"" + views[i - 1].FileName + "\" selected=\"selected\">" + views[i - 1].FileName + "</option>");
                    }
                    else
                    {
                        Output.Write("<option value=\"\" selected=\"selected\">&nbsp;</option>");
                    }
                    Output.Write("</select>");

                    // Add the label sublabel
                    Output.Write("<span class=\"metadata_sublabel\">Label:</span>");

                    // Add the label input
                    Output.Write("<input name=\"" + id_name + "_label" + i + "\" id=\"" + id_name + "_label" + i + "\" class=\"" + html_element_name + "_label_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(views[i - 1].Label) + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_label" + i + "', '" + html_element_name + "_label_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_label" + i + "', '" + html_element_name + "_label_input')\" /></span>");

                    Output.WriteLine(i < views.Count ? "<br />" : "</div>");
                }
            }
            Output.WriteLine("          </td>");

            Output.WriteLine("          <td valign=\"bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add a new type of viewer", CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_viewer_element();\"><img border=\"0px\" class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" /></a>");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");

            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
        /// <summary> Method helps to render the html for all elements based on TextBox_TextBox_Element class </summary>
        /// <param name="Output"> Output for the generate html for this element </param>
        /// <param name="InstanceValuesText1"> Value(s) for the current digital resource to display in the first text box</param>
        /// <param name="InstanceValuesText2" >Value(s) for the current digital resource to display in the second text box</param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        protected void render_helper(TextWriter Output, List <string> InstanceValuesText1, List <string> InstanceValuesText2, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            if ((InstanceValuesText1.Count == 0) && (InstanceValuesText2.Count == 0))
            {
                render_helper(Output, String.Empty, String.Empty, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
                return;
            }

            if ((InstanceValuesText1.Count == 1) && (InstanceValuesText2.Count == 1))
            {
                render_helper(Output, InstanceValuesText1[0], InstanceValuesText2[0], Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
                return;
            }


            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title.Replace(":", "") + " Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Title.IndexOf(":") < 0)
            {
                if (Acronym.Length > 0)
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
                }
                else
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
                }
            }
            else
            {
                if (Acronym.Length > 0)
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + "</acronym></a></td>");
                }
                else
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + "</a></td>");
                }
            }
            Output.WriteLine("    <td>");

            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            for (int i = 1; i <= InstanceValuesText1.Count; i++)
            {
                // Write the first text
                if (FirstLabel.Length > 0)
                {
                    Output.Write("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation(FirstLabel, CurrentLanguage) + ":</span>");
                }
                else
                {
                    Output.Write("              ");
                }

                // Write the first text box
                Output.Write("<input name=\"" + id_name + "_first" + i + "\" id=\"" + id_name + "_first" + i + "\" class=\"" + html_element_name + "_first_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(InstanceValuesText1[i - 1]) + "\" ");
                if (textBox1Events != null)
                {
                    textBox1Events.Add_Events_HTML(Output);
                }
                Output.Write(" />");

                // Write the second text
                if (SecondLabel.Length > 0)
                {
                    Output.Write("<span class=\"metadata_sublabel\">" + Translator.Get_Translation(SecondLabel, CurrentLanguage) + ":</span>");
                }

                // Write the second text box
                Output.Write("<input name=\"" + id_name + "_second" + i + "\" id=\"" + id_name + "_second" + i + "\" class=\"" + html_element_name + "_second_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(InstanceValuesText2[i - 1]) + "\" ");
                if (textBox2Events != null)
                {
                    textBox2Events.Add_Events_HTML(Output);
                }
                Output.Write(" />");
                Output.WriteLine(i < InstanceValuesText1.Count ? "<br />" : "</div>");
            }

            Output.WriteLine("          </td>");
            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add another " + Title.ToLower(), CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_two_text_box_element('" + html_element_name + "','" + FirstLabel + "','" + SecondLabel + "');\"><img class=\"repeat_button\" src=\"" + REPEAT_BUTTON_URL + "\" /></a>");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>"); Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");

            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
示例#25
0
        /// <summary> Get the navigation bar html for a view, given information about the current request </summary>
        /// <param name="Item_View"> View for which to generate the html </param>
        /// <param name="Resource_Type"> Current resource type, which determines the text in several viewer's tabs</param>
        /// <param name="Skin_Code"> Code for the current web sking, which determines which tab images to use </param>
        /// <param name="Current_Mode"> Mode / navigation information for the current request</param>
        /// <param name="Page_Sequence"> Current page sequence </param>
        /// <param name="Translator"> Language support object provides support for translating common user interface elements, like the names of these tabs </param>
        /// <param name="Show_Zoomable"> Flag indicates if the zoomable server is online and should be displayable </param>
        /// <returns> Collection of the html for the navigation bar (one view could have multiple tabs)</returns>
        public static List <string> Get_Nav_Bar_HTML(View_Object Item_View, string Resource_Type,
                                                     string Skin_Code, SobekCM_Navigation_Object Current_Mode, int Page_Sequence,
                                                     Language_Support_Info Translator, bool Show_Zoomable, SobekCM_Item Current_Item)
        {
            List <string> returnVal = new List <string>();

            switch (Item_View.View_Type)
            {
            case View_Enum.ALL_VOLUMES:
                string allVolumeCode       = "allvolumes";
                string resource_type_upper = Resource_Type.ToUpper();
                if (Current_Mode.ViewerCode.IndexOf("allvolumes") == 0)
                {
                    allVolumeCode = Current_Mode.ViewerCode;
                }
                if (resource_type_upper.IndexOf("NEWSPAPER") >= 0)
                {
                    returnVal.Add(HTML_Helper(Skin_Code, allVolumeCode, Translator.Get_Translation("ALL ISSUES", Current_Mode.Language), Current_Mode));
                }
                else
                {
                    if (resource_type_upper.IndexOf("MAP") >= 0)
                    {
                        returnVal.Add(HTML_Helper(Skin_Code, allVolumeCode, Translator.Get_Translation("RELATED MAPS", Current_Mode.Language), Current_Mode));
                    }
                    else
                    {
                        returnVal.Add(resource_type_upper.IndexOf("AERIAL") >= 0
                                              ? HTML_Helper(Skin_Code, allVolumeCode, Translator.Get_Translation("RELATED FLIGHTS", Current_Mode.Language), Current_Mode)
                                              : HTML_Helper(Skin_Code, allVolumeCode, Translator.Get_Translation("ALL VOLUMES", Current_Mode.Language), Current_Mode));
                    }
                }
                break;

            case View_Enum.CITATION:
                if ((Current_Mode.ViewerCode == "citation") || (Current_Mode.ViewerCode == "marc") || (Current_Mode.ViewerCode == "metadata") || (Current_Mode.ViewerCode == "usage"))
                {
                    returnVal.Add(HTML_Helper(Skin_Code, Current_Mode.ViewerCode, Translator.Get_Translation("CITATION", Current_Mode.Language), Current_Mode));
                }
                else
                {
                    returnVal.Add(HTML_Helper(Skin_Code, "citation", Translator.Get_Translation("CITATION", Current_Mode.Language), Current_Mode));
                }
                break;

            case View_Enum.DATASET_CODEBOOK:
                returnVal.Add(HTML_Helper(Skin_Code, "dscodebook", Translator.Get_Translation("DATA STRUCTURE", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.DATASET_REPORTS:
                returnVal.Add(HTML_Helper(Skin_Code, "dsreports", Translator.Get_Translation("REPORTS", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.DATASET_VIEWDATA:
                returnVal.Add(HTML_Helper(Skin_Code, "dsview", Translator.Get_Translation("EXPLORE DATA", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.DOWNLOADS:
                returnVal.Add(HTML_Helper(Skin_Code, "downloads", Translator.Get_Translation("DOWNLOADS", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.FEATURES:
                returnVal.Add(HTML_Helper(Skin_Code, "features", Translator.Get_Translation("FEATURES", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.FLASH:
                returnVal.Add(Item_View.Label.Length == 0
                                      ? HTML_Helper(Skin_Code, "flash", Translator.Get_Translation("FLASH VIEW", Current_Mode.Language), Current_Mode)
                                      : HTML_Helper(Skin_Code, "flash", Translator.Get_Translation(Item_View.Label.ToUpper(), Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.GOOGLE_MAP:
                if (Current_Mode.Coordinates.Length > 0)
                {
                    if (Current_Mode.ViewerCode == "mapsearch")
                    {
                        returnVal.Add(HTML_Helper(Skin_Code, "mapsearch", Translator.Get_Translation("MAP SEARCH", Current_Mode.Language), Current_Mode));
                    }
                    else
                    {
                        if ((Current_Item.Web.Static_PageCount > 1) || (Current_Item.Bib_Info.SobekCM_Type != TypeOfResource_SobekCM_Enum.Map))
                        {
                            returnVal.Add(HTML_Helper(Skin_Code, "map", Translator.Get_Translation("SEARCH RESULTS", Current_Mode.Language), Current_Mode));
                        }
                        else
                        {
                            returnVal.Add(HTML_Helper(Skin_Code, "map", Translator.Get_Translation("MAP COVERAGE", Current_Mode.Language), Current_Mode));
                        }
                    }
                }
                else
                {
                    returnVal.Add(HTML_Helper(Skin_Code, "map", Translator.Get_Translation("MAP IT!", Current_Mode.Language), Current_Mode));
                }
                break;

            case View_Enum.GOOGLE_MAP_BETA:
                if (Current_Mode.Coordinates.Length > 0)
                {
                    if (Current_Mode.ViewerCode == "mapsearchbeta")
                    {
                        returnVal.Add(HTML_Helper(Skin_Code, "mapsearchbeta", Translator.Get_Translation("MAP SEARCH", Current_Mode.Language), Current_Mode));
                    }
                    else
                    {
                        if ((Current_Item.Web.Static_PageCount > 1) || (Current_Item.Bib_Info.SobekCM_Type != TypeOfResource_SobekCM_Enum.Map_Beta))
                        {
                            returnVal.Add(HTML_Helper(Skin_Code, "mapbeta", Translator.Get_Translation("SEARCH RESULTS", Current_Mode.Language), Current_Mode));
                        }
                        else
                        {
                            returnVal.Add(HTML_Helper(Skin_Code, "mapbeta", Translator.Get_Translation("MAP COVERAGE", Current_Mode.Language), Current_Mode));
                        }
                    }
                }
                else
                {
                    returnVal.Add(HTML_Helper(Skin_Code, "map", Translator.Get_Translation("MAP IT!", Current_Mode.Language), Current_Mode));
                }
                break;

            case View_Enum.HTML:
                returnVal.Add(Item_View.Label.Length > 0
                                      ? HTML_Helper(Skin_Code, "html", Item_View.Label.ToUpper(), Current_Mode)
                                      : HTML_Helper(Skin_Code, "html", "HTML LINK", Current_Mode));
                break;

            case View_Enum.JPEG:
                returnVal.Add(HTML_Helper_PageView(Skin_Code, Page_Sequence.ToString() + "j", Translator.Get_Translation("STANDARD", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.JPEG_TEXT_TWO_UP:
                returnVal.Add(HTML_Helper_PageView(Skin_Code, Page_Sequence.ToString() + "u", Translator.Get_Translation("PAGE IMAGE WITH TEXT", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.JPEG2000:
                if (Show_Zoomable)
                {
                    returnVal.Add(HTML_Helper_PageView(Skin_Code, Page_Sequence.ToString() + "x", Translator.Get_Translation("ZOOMABLE", Current_Mode.Language), Current_Mode));
                }
                break;

            case View_Enum.PDF:
                returnVal.Add(HTML_Helper(Skin_Code, "pdf", Translator.Get_Translation("PDF VIEWER", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.RELATED_IMAGES:
                returnVal.Add(Current_Mode.ViewerCode.IndexOf("thumbs") >= 0
                                      ? HTML_Helper(Skin_Code, Current_Mode.ViewerCode, Translator.Get_Translation("THUMBNAILS", Current_Mode.Language), Current_Mode)
                                      : HTML_Helper(Skin_Code, "thumbs", Translator.Get_Translation("THUMBNAILS", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.SEARCH:
                returnVal.Add(HTML_Helper(Skin_Code, "search", Translator.Get_Translation("SEARCH", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.SIMPLE_HTML_LINK:
                returnVal.Add("<li> <a href=\"" + Item_View.Attributes + "\" target=\"_blank\" alt=\"Link to '" + Item_View.Label + "'\"> " + Translator.Get_Translation(Item_View.Label.ToUpper(), Current_Mode.Language) + " </a></li>");
                break;

            case View_Enum.STREETS:
                returnVal.Add(HTML_Helper(Skin_Code, "streets", Translator.Get_Translation("STREETS", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.TEXT:
                returnVal.Add(HTML_Helper_PageView(Skin_Code, Page_Sequence.ToString() + "t", Translator.Get_Translation("PAGE TEXT", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.TOC:
                // returnVal.Add(base.HTML_Helper(Skin_Code, "TC", "Table of Contents", Current_Mode));
                break;

            case View_Enum.RESTRICTED:
                returnVal.Add(HTML_Helper(Skin_Code, "restricted", Translator.Get_Translation("RESTRICTED", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.EAD_CONTAINER_LIST:
                returnVal.Add(HTML_Helper(Skin_Code, "container", Translator.Get_Translation("CONTAINER LIST", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.EAD_DESCRIPTION:
                // Return nothing, this is currently written when writing the CITATION, for
                // all EAD type items.
                //returnVal.Add(HTML_Helper(Skin_Code, "description", Translator.Get_Translation("DESCRIPTION", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.PAGE_TURNER:
                returnVal.Add(HTML_Helper(Skin_Code, "pageturner#page/1/mode/2up", Translator.Get_Translation("PAGE TURNER", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.YOUTUBE_VIDEO:
                returnVal.Add(HTML_Helper(Skin_Code, "youtube", Translator.Get_Translation("VIDEO", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.EMBEDDED_VIDEO:
                returnVal.Add(HTML_Helper(Skin_Code, "video", Translator.Get_Translation("VIDEO", Current_Mode.Language), Current_Mode));
                break;

            case View_Enum.TRACKING:
                // DO nothing in this case.. do not write any tab
                break;

            case View_Enum.TRACKING_SHEET:
                //DO nothing in this case.. do not write any tab
                break;

            case View_Enum.QUALITY_CONTROL:
                // DO nothing in this case.. do not write any tab
                break;
            }

            return(returnVal);
        }
示例#26
0
        /// <summary> Method helps to render all simple text box based elements </summary>
        /// <param name="Output"> Output for the generated html for this element </param>
        /// <param name="instance_values"> Value(s) for the current digital resource to display</param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <param name="HTML_ID_Name"> ID name used for these elements.  This is usually provided when there are multiple fixed-roles or fixed-type elements </param>
        protected void render_helper(TextWriter Output, ReadOnlyCollection <string> instance_values, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL, string HTML_ID_Name)
        {
            List <string> allValues = new List <string>();

            allValues.AddRange(default_values);
            allValues.AddRange(instance_values);

            if (allValues.Count == 0)
            {
                render_helper(Output, String.Empty, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL, HTML_ID_Name);
                return;
            }

            if (allValues.Count == 1)
            {
                render_helper(Output, allValues[0], Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL, HTML_ID_Name);
                return;
            }

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Title.IndexOf(":") < 0)
            {
                if (Acronym.Length > 0)
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
                }
                else
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
                }
            }
            else
            {
                if (Acronym.Length > 0)
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + "</acronym></a></td>");
                }
                else
                {
                    Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + "</a></td>");
                }
            }


            if (Read_Only)
            {
                Output.WriteLine("    <td>");
                Output.WriteLine("      <table>");
                Output.WriteLine("        <tr>");
                Output.Write("          <td><div class=\"" + HTML_ID_Name + "_div\">");
                for (int i = 0; i < instance_values.Count; i++)
                {
                    Output.Write(instance_values[i]);
                    if (i < (instance_values.Count - 1))
                    {
                        Output.Write("<br />");
                    }
                }
                Output.WriteLine("</div></td>");
                Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
                Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
                Output.WriteLine("          </td>");
                Output.WriteLine("        </tr>");
                Output.WriteLine("      </table>");
                Output.WriteLine("    </td>");
            }
            else
            {
                Output.WriteLine("    <td>");
                Output.WriteLine("      <table>");
                Output.WriteLine("        <tr>");
                Output.WriteLine("          <td>");
                Output.WriteLine("            <div id=\"" + HTML_ID_Name + "_div\">");

                for (int i = 1; i <= allValues.Count; i++)
                {
                    if (i == allValues.Count)
                    {
                        Output.WriteLine("              <input name=\"" + HTML_ID_Name + i + "\" id=\"" + HTML_ID_Name + i + "\" class=\"" + html_element_name + "_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(allValues[i - 1].Replace("<i>", "").Replace("</i>", "")) + "\" />");
                    }
                    else
                    {
                        Output.WriteLine("              <input name=\"" + HTML_ID_Name + i + "\" id=\"" + HTML_ID_Name + i + "\" class=\"" + html_element_name + "_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(allValues[i - 1].Replace("<i>", "").Replace("</i>", "")) + "\" /><br />");
                    }
                }

                Output.WriteLine("            </div>");
                Output.WriteLine("          </td>");
                Output.WriteLine("          <td style=\"vertical-align:bottom\" >");

                if (view_choices_string.Length > 0)
                {
                    Output.WriteLine("            " + view_choices_string.Replace("<%INTERFACE%>", Skin_Code) + "&nbsp; ");
                }

                if (Repeatable)
                {
                    Output.WriteLine("          <a title=\"" + Translator.Get_Translation("Click to add another " + Title.ToLower(), CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_new_element_adv('" + HTML_ID_Name + "', '" + html_element_name + "');\"><img class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" /></a>");
                }

                Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");

                Output.WriteLine("          </td>");
                Output.WriteLine("        </tr>");
                Output.WriteLine("      </table>");

                Output.WriteLine("    </td>");
            }

            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
示例#27
0
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="IsMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="PopupFormBuilder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This simple element does not append any popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool IsMozilla, StringBuilder PopupFormBuilder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string DEFAULT_ACRONYM = "Enter any notes about this digital manifestation or the original material";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                case Web_Language_Enum.French:
                    Acronym = DEFAULT_ACRONYM;
                    break;

                default:
                    Acronym = DEFAULT_ACRONYM;
                    break;
                }
            }

            // Determine the columns for this text area, based on browser
            int actual_cols = cols;

            if (IsMozilla)
            {
                actual_cols = colsMozilla;
            }


            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr style=\text-align:left\">");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            int notes_count = 0;

            if (Bib.Bib_Info.Notes_Count > 0)
            {
                notes_count += Bib.Bib_Info.Notes.Count(ThisNote => ((ThisNote.Note_Type != Note_Type_Enum.statement_of_responsibility) || (Include_Statement_Responsibility)) && (ThisNote.Note_Type != Note_Type_Enum.default_type));
            }

            if (notes_count == 0)
            {
                Output.WriteLine("              <div id=\"" + html_element_name + "_topdiv1\">");
                Output.WriteLine("                <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Type", CurrentLanguage) + ":</span>");
                Output.WriteLine("                <select class=\"" + html_element_name + "_type\" name=\"" + id_name + "_type1\" id=\"" + id_name + "_type1\" onchange=\"complexnote_type_change('1');\" >");
                Output.WriteLine("                  <option selected=\"selected=\" value=\"500\"></option>");
                Output.WriteLine("                  <option value=\"541\">Acquisition</option>");
                Output.WriteLine("                  <option value=\"530\">Additional Physical Form</option>");
                Output.WriteLine("                  <option value=\"504\">Bibliography</option>");
                Output.WriteLine("                  <option value=\"545\">Biographical</option>");
                Output.WriteLine("                  <option value=\"510\">Citation/Reference</option>");
                Output.WriteLine("                  <option value=\"508\">Creation/Production Credits</option>");
                Output.WriteLine("                  <option value=\"362\">Dates/Sequential Designation</option>");
                Output.WriteLine("                  <option value=\"donation\">Donation</option>");
                Output.WriteLine("                  <option value=\"585\">Exhibitions</option>");
                Output.WriteLine("                  <option value=\"536\">Funding</option>");
                Output.WriteLine("                  <option value=\"internal\">Internal Comments</option>");
                Output.WriteLine("                  <option value=\"550\">Issuing Body</option>");
                Output.WriteLine("                  <option value=\"546\">Language</option>");
                Output.WriteLine("                  <option value=\"515\">Numbering Peculiarities</option>");
                Output.WriteLine("                  <option value=\"535\">Original Location</option>");
                Output.WriteLine("                  <option value=\"534\">Original Version</option>");
                Output.WriteLine("                  <option value=\"561\">Ownership</option>");
                Output.WriteLine("                  <option value=\"511\">Performers</option>");
                Output.WriteLine("                  <option value=\"524\">Preferred Citation</option>");
                Output.WriteLine("                  <option value=\"581\">Publications</option>");
                Output.WriteLine("                  <option value=\"pubstatus\">Publication Status</option>");
                Output.WriteLine("                  <option value=\"506\">Restriction</option>");
                if (Include_Statement_Responsibility)
                {
                    Output.WriteLine("                  <option value=\"245\">Statement of Responsibility</option>");
                }
                Output.WriteLine("                  <option value=\"538\">System Details</option>");
                Output.WriteLine("                  <option value=\"502\">Thesis</option>");
                Output.WriteLine("                  <option value=\"518\">Venue</option>");
                Output.WriteLine("                  <option value=\"562\">Version Identification</option>");
                Output.WriteLine("                </select>");
                Output.WriteLine("              </div>");

                Output.WriteLine("              <textarea rows=\"" + Rows + "\" cols=\"" + actual_cols + "\" name=\"" + id_name + "_textarea1\" id=\"" + id_name + "_textarea1\" class=\"" + html_element_name + "_input sbk_Focusable\" ></textarea>");
            }
            else
            {
                int i = 1;
                foreach (Note_Info thisNote in Bib.Bib_Info.Notes)
                {
                    if (((thisNote.Note_Type != Note_Type_Enum.statement_of_responsibility) || (Include_Statement_Responsibility)) &&
                        (thisNote.Note_Type != Note_Type_Enum.default_type))
                    {
                        string note_display_label   = String.Empty;
                        string display_label_prompt = "Materials Selected";

                        Output.WriteLine("              <div id=\"" + html_element_name + "_topdiv" + i + "\">");
                        Output.WriteLine("                <span class=\"metadata_sublabel2\">Type:</span>");
                        Output.WriteLine("                <select class=\"" + html_element_name + "_type\" name=\"" + id_name + "_type" + i + "\" id=\"" + id_name + "_type" + i + "\" onchange=\"complexnote_type_change('" + i + "');\" >");

                        if (thisNote.Note_Type == Note_Type_Enum.NONE)
                        {
                            Output.WriteLine("                  <option value=\"500\" selected=\"selected\"></option>");
                            note_display_label   = thisNote.Display_Label;
                            display_label_prompt = "Display Label";
                        }
                        else
                        {
                            Output.WriteLine("                  <option value=\"500\"></option>");
                        }

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.acquisition
                                             ? "                  <option value=\"541\" selected=\"selected\">Acquisition</option>"
                                             : "                  <option value=\"541\">Acquisition</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.additional_physical_form
                                             ? "                  <option value=\"530\" selected=\"selected\">Additional Physical Form</option>"
                                             : "                  <option value=\"530\">Additional Physical Form</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.bibliography
                                             ? "                  <option value=\"504\" selected=\"selected\">Bibliography</option>"
                                             : "                  <option value=\"504\">Bibliography</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.biographical
                                             ? "                  <option value=\"545\" selected=\"selected\">Biographical</option>"
                                             : "                  <option value=\"545\">Biographical</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.citation_reference
                                             ? "                  <option value=\"510\" selected=\"selected\">Citation/Reference</option>"
                                             : "                  <option value=\"510\">Citation/Reference</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.creation_credits
                                             ? "                  <option value=\"508\" selected=\"selected\">Creation/Production Credits</option>"
                                             : "                  <option value=\"508\">Creation/Production Credits</option>");

                        if (thisNote.Note_Type == Note_Type_Enum.dates_sequential_designation)
                        {
                            Output.WriteLine("                  <option value=\"362\" selected=\"selected\">Dates/Sequential Designation</option>");
                            note_display_label   = thisNote.Display_Label;
                            display_label_prompt = "Source";
                        }
                        else
                        {
                            Output.WriteLine("                  <option value=\"362\">Dates/Sequential Designation</option>");
                        }

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.donation
                                             ? "                  <option value=\"donation\" selected=\"selected\">Donation</option>"
                                             : "                  <option value=\"donation\">Donation</option>");

                        if (thisNote.Note_Type == Note_Type_Enum.exhibitions)
                        {
                            Output.WriteLine("                  <option value=\"585\" selected=\"selected\">Exhibitions</option>");
                            note_display_label = thisNote.Display_Label;
                        }
                        else
                        {
                            Output.WriteLine("                  <option value=\"585\">Exhibitions</option>");
                        }

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.funding
                                             ? "                  <option value=\"536\" selected=\"selected\">Funding</option>"
                                             : "                  <option value=\"536\">Funding</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.internal_comments
                                             ? "                  <option value=\"internal\" selected=\"selected\">Internal Comments</option>"
                                             : "                  <option value=\"internal\">Internal Comments</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.issuing_body
                                             ? "                  <option value=\"550\" selected=\"selected\">Issuing Body</option>"
                                             : "                  <option value=\"550\">Issuing Body</option>");

                        if (thisNote.Note_Type == Note_Type_Enum.language)
                        {
                            Output.WriteLine("                  <option value=\"546\" selected=\"selected\">Language</option>");
                            note_display_label = thisNote.Display_Label;
                        }
                        else
                        {
                            Output.WriteLine("                  <option value=\"546\">Language</option>");
                        }

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.numbering_peculiarities
                                             ? "                  <option value=\"515\" selected=\"selected\">Numbering Peculiarities</option>"
                                             : "                  <option value=\"515\">Numbering Peculiarities</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.original_location
                                             ? "                  <option value=\"535\" selected=\"selected\">Original Location</option>"
                                             : "                  <option value=\"535\">Original Location</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.original_version
                                             ? "                  <option value=\"534\" selected=\"selected\">Original Version</option>"
                                             : "                  <option value=\"534\">Original Version</option>");

                        if (thisNote.Note_Type == Note_Type_Enum.ownership)
                        {
                            Output.WriteLine("                  <option value=\"561\" selected=\"selected\">Ownership</option>");
                            note_display_label = thisNote.Display_Label;
                        }
                        else
                        {
                            Output.WriteLine("                  <option value=\"561\">Ownership</option>");
                        }

                        if (thisNote.Note_Type == Note_Type_Enum.performers)
                        {
                            Output.WriteLine("                  <option value=\"511\" selected=\"selected\">Performers</option>");
                            note_display_label   = thisNote.Display_Label;
                            display_label_prompt = "Display Label";
                        }
                        else
                        {
                            Output.WriteLine("                  <option value=\"511\">Performers</option>");
                        }

                        if (thisNote.Note_Type == Note_Type_Enum.preferred_citation)
                        {
                            Output.WriteLine("                  <option value=\"524\" selected=\"selected\">Preferred Citation</option>");
                            note_display_label = thisNote.Display_Label;
                        }
                        else
                        {
                            Output.WriteLine("                  <option value=\"524\">Preferred Citation</option>");
                        }

                        if (thisNote.Note_Type == Note_Type_Enum.publications)
                        {
                            Output.WriteLine("                  <option value=\"581\" selected=\"selected\">Publications</option>");
                            note_display_label = thisNote.Display_Label;
                        }
                        else
                        {
                            Output.WriteLine("                  <option value=\"581\">Publications</option>");
                        }

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.publication_status
                                             ? "                  <option value=\"pubstatus\" selected=\"selected\">Publication Status</option>"
                                             : "                  <option value=\"pubstatus\">Publication Status</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.restriction
                                             ? "                  <option value=\"506\" selected=\"selected\">Restriction</option>"
                                             : "                  <option value=\"506\">Restriction</option>");

                        if (Include_Statement_Responsibility)
                        {
                            Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.statement_of_responsibility
                                                 ? "                  <option value=\"245\" selected=\"selected\">Statement of Responsibility</option>"
                                                 : "                  <option value=\"245\">Statement of Responsibility</option>");
                        }

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.system_details
                                             ? "                  <option value=\"538\" selected=\"selected\">System Details</option>"
                                             : "                  <option value=\"538\">System Details</option>");

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.thesis
                                             ? "                  <option value=\"502\" selected=\"selected\">Thesis</option>"
                                             : "                  <option value=\"502\">Thesis</option>");

                        if (thisNote.Note_Type == Note_Type_Enum.date_venue)
                        {
                            Output.WriteLine("                  <option value=\"518\" selected=\"selected\">Venue</option>");
                            note_display_label = thisNote.Display_Label;
                        }
                        else
                        {
                            Output.WriteLine("                  <option value=\"518\">Venue</option>");
                        }

                        Output.WriteLine(thisNote.Note_Type == Note_Type_Enum.version_identification
                                             ? "                  <option value=\"562\" selected=\"selected\">Version Identification</option>"
                                             : "                  <option value=\"562\">Version Identification</option>");


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

                        if (note_display_label.Length > 0)
                        {
                            Output.Write("<span class=\"metadata_sublabel\" id=\"complexnote_inputtext" + i + "\" name=\"complexnote_inputtext" + i + "\">" + display_label_prompt + ":</span>");
                            Output.WriteLine("<input class=\"complexnote_input sbk_Focusable\" id=\"complexnote_inputtext" + i + "\" name=\"complexnote_input" + i + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(note_display_label) + "\" />");
                        }

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

                        Output.Write("              <textarea rows=\"" + Rows + "\" cols=\"" + actual_cols + "\" name=\"" + id_name + "_textarea" + i + "\" id=\"" + id_name + "_textarea" + i + "\" class=\"" + html_element_name + "_input sbk_Focusable\" >" + HttpUtility.HtmlEncode(thisNote.Note) + "</textarea>");

                        if (i < Bib.Bib_Info.Notes_Count)
                        {
                            Output.WriteLine("<br />");
                        }
                        else
                        {
                            Output.WriteLine();
                        }

                        i++;
                    }
                }
                Output.WriteLine("            </div>");
                Output.WriteLine("          </td>");
            }

            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");

            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add a new note", CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_complex_note('" + Rows + "','" + actual_cols + "');\"><img class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" /></a>");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");

            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
示例#28
0
        /// <summary> Method helps to render all multiple text box based elements </summary>
        /// <param name="Output"> Output for the generated html for this element </param>
        /// <param name="instance_value"> Value for the current digital resource to display</param>
        /// <param name="Skin_Code"> Code for the current html skin </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <param name="HTML_ID_Name"> ID name used for these elements.  This is usually provided when there are multiple fixed-roles or fixed-type elements </param>
        protected void render_helper(TextWriter Output, string instance_value, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL, string HTML_ID_Name)
        {
            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");

            // Get the label to show
            string label_to_show = Title.Replace(":", "");

            if (label_from_template_file.Length > 0)
            {
                label_to_show = label_from_template_file;
            }

            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(label_to_show, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(label_to_show, CurrentLanguage) + ":</a></td>");
            }

            if (Read_Only)
            {
                Output.WriteLine("    <td>");
                Output.WriteLine("      <table>");
                Output.WriteLine("        <tr>");
                Output.WriteLine("          <td><div class=\"" + HTML_ID_Name + "_div\">" + instance_value + "</div></td>");
                Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
                Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
                Output.WriteLine("          </td>");
                Output.WriteLine("        </tr>");
                Output.WriteLine("      </table>");
                Output.WriteLine("    </td>");
            }
            else
            {
                Output.WriteLine("    <td>");

                Output.WriteLine("      <table>");
                Output.WriteLine("        <tr>");
                Output.WriteLine("          <td>");
                Output.WriteLine("            <div id=\"" + HTML_ID_Name + "_div\">");
                Output.WriteLine("              <input name=\"" + HTML_ID_Name + "1\" id=\"" + HTML_ID_Name + "1\" class=\"" + html_element_name + "_input sbk_Focusable\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(instance_value.Replace("<i>", "").Replace("</i>", "")) + "\" />");
                Output.WriteLine("            </div>");
                Output.WriteLine("          </td>");
                Output.WriteLine("          <td style=\"vertical-align:bottom\" >");

                if (view_choices_string.Length > 0)
                {
                    Output.WriteLine("            " + view_choices_string.Replace("<%INTERFACE%>", Skin_Code) + "&nbsp; ");
                }

                if (Repeatable)
                {
                    Output.WriteLine("          <a title=\"" + Translator.Get_Translation("Click to add another " + Title.ToLower(), CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_new_element_adv('" + HTML_ID_Name + "', '" + html_element_name + "');\"><img class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" /></a>");
                }

                Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");

                Output.WriteLine("          </td>");
                Output.WriteLine("        </tr>");
                Output.WriteLine("      </table>");

                Output.WriteLine("    </td>");
            }

            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
示例#29
0
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="IsMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="PopupFormBuilder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This element appends a popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool IsMozilla, StringBuilder PopupFormBuilder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Enter serial hierarchy information which explains how this volume related to the larger body of work.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            Output.WriteLine("  <!-- " + Title + " Form Element -->");
            Output.WriteLine("  <tr>");
            Output.WriteLine("    <td style=\"width:" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }

            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");
            string serial_hierarchy_string = show_hierarchy_value(Bib.Behaviors.Serial_Info);

            if (serial_hierarchy_string.Length == 0)
            {
                Output.WriteLine("              <a title=\"Click to edit the serial hierarchy\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_serial_hierarchy_term')\" onblur=\"return link_blurred2('form_serial_hierarchy_term')\" onkeypress=\"return popup_keypress_focus('form_serial_hierarchy', 'form_serialhierarchy_enum1text', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_serial_hierarchy', 'form_serialhierarchy_enum1text' );\"><div class=\"form_linkline_empty form_serial_hierarchy_line\" id=\"form_serial_hierarchy_term\"><i>Empty Serial Hierarchy</i></div></a>");
            }
            else
            {
                Output.WriteLine("              <a title=\"Click to edit the serial hierarchy\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_serial_hierarchy_term')\" onblur=\"link_blurred2('form_serial_hierarchy_term')\" onkeypress=\"return popup_keypress_focus('form_serial_hierarchy', 'form_serialhierarchy_enum1text', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_serial_hierarchy', 'form_serialhierarchy_enum1text' );\"><div class=\"form_linkline form_serial_hierarchy_line\" id=\"form_serial_hierarchy_term\">" + serial_hierarchy_string + "</div></a>");
            }
            Output.WriteLine("            </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td style=\"vertical-align:bottom\" >");
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img class=\"help_button\" src=\"" + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();

            // Determine which is primary, the enumeration or chronology.
            bool enum_primary = true;

            if (Bib.Behaviors.Serial_Info.Count > 0)
            {
                if (Bib.Bib_Info.Series_Part_Info.Year == Bib.Behaviors.Serial_Info[0].Display)
                {
                    enum_primary = false;
                }
            }
            else
            {
                // If no default, set it by type
                if (Bib.Bib_Info.SobekCM_Type == TypeOfResource_SobekCM_Enum.Newspaper)
                {
                    enum_primary = false;
                }
            }

            // Add the popup form
            PopupFormBuilder.AppendLine("<!-- Serial Hierarchy Form -->");
            PopupFormBuilder.AppendLine("<div class=\"serial_hierarchy_popup_div sbkMetadata_PopupDiv\" id=\"form_serial_hierarchy\" style=\"display:none;\">");
            PopupFormBuilder.AppendLine("  <div class=\"sbkMetadata_PopupTitle\"><table style=\"width:100%\"><tr><td style=\"text-align:left\">Edit Serial Hierarchy</td><td style=\"text-align:right\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" alt=\"HELP\" target=\"_" + html_element_name.ToUpper() + "\" >?</a> &nbsp; <a href=\"#template\" alt=\"CLOSE\" onclick=\"close_serial_hierarchy()\">X</a> &nbsp; </td></tr></table></div>");
            PopupFormBuilder.AppendLine("  <br />");
            PopupFormBuilder.AppendLine("  <table class=\"sbkMetadata_PopupTable\">");

            // Add the Enumeration Information title
            PopupFormBuilder.AppendLine("    <tr><td colspan=\"4\" class=\"SobekEditItemSectionTitle_first\" >Enumeration Information</td></tr>");

            // Add the enumeration as primary radio button
            PopupFormBuilder.Append("    <tr><td colspan=\"2\"> &nbsp; &nbsp; <input type=\"radio\" id=\"form_serialhierarchy_primary_enum\" name=\"form_serialhierarchy_primary\" value=\"enum\"");
            if (enum_primary)
            {
                PopupFormBuilder.Append(" checked=\"checked\"");
            }
            PopupFormBuilder.AppendLine(" onclick=\"focus_element( 'form_serialhierarchy_enum1text');\" /> <label for=\"form_serialhierarchy_primary_enum\">Primary</label> </td><td><span style=\"color:Gray;padding-left:55px;\">Display Text</span></td><td><span style=\"color:Gray;\"> &nbsp; Display Order</span></td></tr>");

            // determine the first enumeration data
            string enum1 = Bib.Bib_Info.Series_Part_Info.Enum1;

            if (Bib.Bib_Info.Series_Part_Info.Enum1.ToUpper().Replace(" ", "").Replace(".", "") == Bib.Bib_Info.Main_Title.Title.ToUpper().Replace(" ", "").Replace(".", ""))
            {
                enum1 = "[TITLE]";
            }

            // Add the rows of enumeration data
            PopupFormBuilder.Append("    <tr><td style=\"width:90px\">&nbsp;</td><td style=\"width:100px\">(Volume):</td>");
            PopupFormBuilder.Append("<td><input type=\"text\" class=\"form_serialhierarchy_text_input sbk_Focusable\" id=\"form_serialhierarchy_enum1text\" name=\"form_serialhierarchy_enum1text\" value=\"" + HttpUtility.HtmlEncode(enum1) + "\" ></td>");
            if (Bib.Bib_Info.Series_Part_Info.Enum1_Index >= 0)
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_enum1order\" name=\"form_serialhierarchy_enum1order\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Enum1_Index.ToString()) + "\" ></td></tr>");
            }
            else
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_enum1order\" name=\"form_serialhierarchy_enum1order\" value=\"\" ></td></tr>");
            }

            PopupFormBuilder.Append("    <tr><td>&nbsp;</td><td>(Issue):</td>");
            PopupFormBuilder.Append("<td><input type=\"text\" class=\"form_serialhierarchy_text_input sbk_Focusable\" id=\"form_serialhierarchy_enum2text\" name=\"form_serialhierarchy_enum2text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Enum2) + "\" ></td>");
            if (Bib.Bib_Info.Series_Part_Info.Enum2_Index >= 0)
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_enum2order\" name=\"form_serialhierarchy_enum2order\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Enum2_Index.ToString()) + "\" ></td></tr>");
            }
            else
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_enum2order\" name=\"form_serialhierarchy_enum2order\" value=\"\" ></td></tr>");
            }

            PopupFormBuilder.Append("    <tr><td>&nbsp;</td><td>(Part):</td>");
            PopupFormBuilder.Append("<td><input type=\"text\" class=\"form_serialhierarchy_text_input sbk_Focusable\" id=\"form_serialhierarchy_enum3text\" name=\"form_serialhierarchy_enum3text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Enum3) + "\" ></td>");
            if (Bib.Bib_Info.Series_Part_Info.Enum3_Index >= 0)
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_enum3order\" name=\"form_serialhierarchy_enum3order\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Enum3_Index.ToString()) + "\" ></td></tr>");
            }
            else
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_enum3order\" name=\"form_serialhierarchy_enum3order\" value=\"\" ></td></tr>");
            }

            // Add the Chronological Information title
            PopupFormBuilder.AppendLine("    <tr><td colspan=\"4\" class=\"SobekEditItemSectionTitle sbk_Focusable\" >Chronological Information</td></tr>");

            // Add the chronology as primary radio button
            PopupFormBuilder.Append("    <tr><td colspan=\"2\"> &nbsp; &nbsp; <input type=\"radio\" id=\"form_serialhierarchy_primary_chrono\" name=\"form_serialhierarchy_primary\" value=\"chrono\"");
            if (!enum_primary)
            {
                PopupFormBuilder.Append(" checked=\"checked\"");
            }
            PopupFormBuilder.AppendLine(" onclick=\"focus_element( 'form_serialhierarchy_chrono1text');\" /> <label for=\"form_serialhierarchy_primary_chrono\">Primary</label> </td><td><span style=\"color:Gray;padding-left:55px;\">Display Text</span></td><td><span style=\"color:Gray;\"> &nbsp; Display Order</span></td></tr>");

            // Add the rows of chronological data
            PopupFormBuilder.Append("    <tr><td>&nbsp;</td><td>Year:</td>");
            PopupFormBuilder.Append("<td><input type=\"text\" class=\"form_serialhierarchy_text_input sbk_Focusable\" id=\"form_serialhierarchy_chrono1text\" name=\"form_serialhierarchy_chrono1text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Year) + "\" ></td>");
            if (Bib.Bib_Info.Series_Part_Info.Year_Index >= 0)
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_chrono1order\" name=\"form_serialhierarchy_chrono1order\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Year_Index.ToString()) + "\" ></td></tr>");
            }
            else
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_chrono1order\" name=\"form_serialhierarchy_chrono1order\" value=\"\" ></td></tr>");
            }

            PopupFormBuilder.Append("    <tr><td>&nbsp;</td><td>(Month):</td>");
            PopupFormBuilder.Append("<td><input type=\"text\" class=\"form_serialhierarchy_text_input sbk_Focusable\" id=\"form_serialhierarchy_chrono2text\" name=\"form_serialhierarchy_chrono2text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Month) + "\" ></td>");
            if (Bib.Bib_Info.Series_Part_Info.Month_Index >= 0)
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_chrono2order\" name=\"form_serialhierarchy_chrono2order\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Month_Index.ToString()) + "\" ></td></tr>");
            }
            else
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_chrono2order\" name=\"form_serialhierarchy_chrono2order\" value=\"\" ></td></tr>");
            }

            PopupFormBuilder.Append("    <tr><td>&nbsp;</td><td>(Day):</td>");
            PopupFormBuilder.Append("<td><input type=\"text\" class=\"form_serialhierarchy_text_input sbk_Focusable\" id=\"form_serialhierarchy_chrono3text\" name=\"form_serialhierarchy_chrono3text\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Day) + "\" ></td>");
            if (Bib.Bib_Info.Series_Part_Info.Day_Index >= 0)
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_chrono3order\" name=\"form_serialhierarchy_chrono3order\" value=\"" + HttpUtility.HtmlEncode(Bib.Bib_Info.Series_Part_Info.Day_Index.ToString()) + "\" ></td></tr>");
            }
            else
            {
                PopupFormBuilder.AppendLine("<td><input type=\"text\" class=\"form_serialhierarchy_order_input sbk_Focusable\" id=\"form_serialhierarchy_chrono3order\" name=\"form_serialhierarchy_chrono3order\" value=\"\" ></td></tr>");
            }


            // Finish the popup form and add the CLOSE button
            PopupFormBuilder.AppendLine("    <tr style=\"height:35px; text-align: center; vertical-align: bottom;\">");
            PopupFormBuilder.AppendLine("      <td colspan=\"3\"><button title=\"Close\" class=\"sbkMetadata_RoundButton\" onclick=\"return close_serial_hierarchy();\">CLOSE</button></td>");
            PopupFormBuilder.AppendLine("    </tr>");
            PopupFormBuilder.AppendLine("  </table>");
            PopupFormBuilder.AppendLine("</div>");
            PopupFormBuilder.AppendLine();
        }
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="isMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="popup_form_builder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This simple element does not append any popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool isMozilla, StringBuilder popup_form_builder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Enter the name(s) of the publisher(s) of the larger body of work. If your work is currently unpublished, you may enter your name as the publisher or leave the field blank. If you are adding administrative material (newsletters, handbooks, etc.) on behalf of a department within the university, enter the name of your department as the publisher.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            string id_name = html_element_name.Replace("_", "");

            Output.WriteLine("  <!-- " + Title + " Element -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Acronym.Length > 0)
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\"><acronym title=\"" + Acronym + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</acronym></a></td>");
            }
            else
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name.ToUpper() + "\">" + Translator.Get_Translation(Title, CurrentLanguage) + ":</a></td>");
            }
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            if (Bib.Bib_Info.Publishers_Count == 0)
            {
                const int i = 1;
                Output.WriteLine("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Name", CurrentLanguage) + ":</span>");
                Output.Write("              <input name=\"" + id_name + "_name" + i + "\" id=\"" + id_name + "_name" + i + "\" class=\"" + html_element_name + "_name_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_name" + i + "', '" + html_element_name + "_name_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_name" + i + "', '" + html_element_name + "_name_input')\" />");
                Output.WriteLine("<br />");
                Output.WriteLine("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Location(s)", CurrentLanguage) + ":</span>");
                Output.WriteLine("              <input name=\"" + id_name + "_firstloc" + i + "\" id=\"" + id_name + "_firstloc" + i + "\" class=\"" + html_element_name + "_location_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_firstloc" + i + "', '" + html_element_name + "_location_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_firstloc" + i + "', '" + html_element_name + "_location_input')\" />");
                Output.WriteLine("              <input name=\"" + id_name + "_secondloc" + i + "\" id=\"" + id_name + "_secondloc" + i + "\" class=\"" + html_element_name + "_location_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_secondloc" + i + "', '" + html_element_name + "_location_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_secondloc" + i + "', '" + html_element_name + "_location_input')\" />");
                Output.Write("              <input name=\"" + id_name + "_thirdloc" + i + "\" id=\"" + id_name + "_thirdloc" + i + "\" class=\"" + html_element_name + "_location_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_thirdloc" + i + "', '" + html_element_name + "_location_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_thirdloc" + i + "', '" + html_element_name + "_location_input')\" />");
                Output.WriteLine("</div>");
                Output.WriteLine("          </td>");
            }
            else
            {
                ReadOnlyCollection <Publisher_Info> publishers = Bib.Bib_Info.Publishers;
                for (int i = 1; i <= publishers.Count; i++)
                {
                    Output.WriteLine("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Name", CurrentLanguage) + ":</span>");
                    Output.Write("              <input name=\"" + id_name + "_name" + i + "\" id=\"" + id_name + "_name" + i + "\" class=\"" + html_element_name + "_name_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(publishers[i - 1].Name) + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_name" + i + "', '" + html_element_name + "_name_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_name" + i + "', '" + html_element_name + "_name_input')\" />");
                    Output.WriteLine("<br />");
                    Output.WriteLine("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation("Location(s)", CurrentLanguage) + ":</span>");
                    ReadOnlyCollection <Origin_Info_Place> places = publishers[i - 1].Places;
                    if ((places.Count > 0) && (places[0].Place_Text.Length > 0))
                    {
                        Output.WriteLine("              <input name=\"" + id_name + "_firstloc" + i + "\" id=\"" + id_name + "_firstloc" + i + "\" class=\"" + html_element_name + "_location_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(places[0].Place_Text) + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_firstloc" + i + "', '" + html_element_name + "_location_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_firstloc" + i + "', '" + html_element_name + "_location_input')\" />");
                    }
                    else
                    {
                        Output.WriteLine("              <input name=\"" + id_name + "_firstloc" + i + "\" id=\"" + id_name + "_firstloc" + i + "\" class=\"" + html_element_name + "_location_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_firstloc" + i + "', '" + html_element_name + "_location_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_firstloc" + i + "', '" + html_element_name + "_location_input')\" />");
                    }
                    if ((places.Count > 1) && (places[1].Place_Text.Length > 0))
                    {
                        Output.WriteLine("              <input name=\"" + id_name + "_secondloc" + i + "\" id=\"" + id_name + "_secondloc" + i + "\" class=\"" + html_element_name + "_location_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(places[1].Place_Text) + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_secondloc" + i + "', '" + html_element_name + "_location_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_secondloc" + i + "', '" + html_element_name + "_location_input')\" />");
                    }
                    else
                    {
                        Output.WriteLine("              <input name=\"" + id_name + "_secondloc" + i + "\" id=\"" + id_name + "_secondloc" + i + "\" class=\"" + html_element_name + "_location_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_secondloc" + i + "', '" + html_element_name + "_location_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_secondloc" + i + "', '" + html_element_name + "_location_input')\" />");
                    }
                    if ((places.Count > 2) && (places[2].Place_Text.Length > 0))
                    {
                        Output.Write("              <input name=\"" + id_name + "_thirdloc" + i + "\" id=\"" + id_name + "_thirdloc" + i + "\" class=\"" + html_element_name + "_location_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(places[2].Place_Text) + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_thirdloc" + i + "', '" + html_element_name + "_location_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_thirdloc" + i + "', '" + html_element_name + "_location_input')\" />");
                    }
                    else
                    {
                        Output.Write("              <input name=\"" + id_name + "_thirdloc" + i + "\" id=\"" + id_name + "_thirdloc" + i + "\" class=\"" + html_element_name + "_location_input\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_thirdloc" + i + "', '" + html_element_name + "_location_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_thirdloc" + i + "', '" + html_element_name + "_location_input')\" />");
                    }

                    if (i < publishers.Count)
                    {
                        Output.WriteLine("<br />");
                    }
                    else
                    {
                        Output.WriteLine("</div>");
                        Output.WriteLine("          </td>");
                    }
                }
            }

            Output.WriteLine("          <td valign=\"bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <a title=\"" + Translator.Get_Translation("Click to add a new publisher", CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_publisher_element('" + html_element_name + "');\"><img border=\"0px\" class=\"repeat_button\" src=\"" + Base_URL + REPEAT_BUTTON_URL + "\" /></a>");
            }
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");

            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");

            Output.WriteLine();
        }