예제 #1
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 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 fixed type of identifier.";
                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;
                }
            }

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

            List <string> terms = new List <string>();

            if (Bib.Bib_Info.Identifiers_Count > 0)
            {
                terms.AddRange(Bib.Bib_Info.Identifiers.Select(thisIdentifier => thisIdentifier.Identifier));
            }

            Title = label_from_template_file;
            if (label_from_template_file.Length == 0)
            {
                Title = "MISSING LABEL!";
            }

            render_helper(Output, terms, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL, fixed_type_from_template_file.Replace(" ", "_").ToLower() + "fixedidentifier");
        }
        /// <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 year this item was copyrighted.";
                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.Origin_Info.Date_Copyrighted, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
        /// <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 information about any related items 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;
                }
            }

            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>");
            }

            // Make sure there is at least one related item
            if (Bib.Bib_Info.RelatedItems_Count == 0)
            {
                Bib.Bib_Info.Add_Related_Item(new Related_Item_Info());
            }

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

            if (Bib.Bib_Info.RelatedItems_Count > 0)
            {
                foreach (Related_Item_Info thisItem in Bib.Bib_Info.RelatedItems)
                {
                    // Add this related item links
                    if ((thisItem.hasMainTitle) && (thisItem.Main_Title.Title.Length > 0))
                    {
                        Output.Write("\n        <a title=\"Click to edit this related item\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_related_item_term_" + item_index + "')\" onblur=\"link_blurred2('form_related_item_term_" + item_index + "')\" onkeypress=\"return popup_keypress_focus('form_related_item_" + item_index + "', 'form_relateditem_title_" + item_index + "', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_related_item_" + item_index + "', 'form_relateditem_title_" + item_index + "' );\"><div class=\"form_linkline form_related_item_line\" id=\"form_related_item_term_" + item_index + "\">");

                        if (thisItem.URL_Display_Label.Length > 0)
                        {
                            Output.Write("( <i>" + thisItem.URL_Display_Label + "</i> ) " + thisItem.Main_Title.Title);
                        }
                        else
                        {
                            string relation = String.Empty;
                            switch (thisItem.Relationship)
                            {
                            case Related_Item_Type_Enum.Succeeding:
                                relation = "( <i>Succeeded by</i> ) ";
                                break;

                            case Related_Item_Type_Enum.OtherVersion:
                                relation = "( <i>Other Version</i> ) ";
                                break;

                            case Related_Item_Type_Enum.OtherFormat:
                                relation = "( <i>Other Format</i> ) ";
                                break;

                            case Related_Item_Type_Enum.Preceding:
                                relation = "( <i>Preceded by</i> ) ";
                                break;

                            case Related_Item_Type_Enum.Host:
                                relation = "( <i>Host</i> ) ";
                                break;
                            }
                            Output.Write(relation + thisItem.Main_Title.Title);
                        }
                    }
                    else
                    {
                        Output.Write("\n        <a title=\"Click to edit this related item\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_related_item_term_" + item_index + "')\" onblur=\"link_blurred2('form_related_item_term_" + item_index + "')\" onkeypress=\"return popup_keypress_focus('form_related_item_" + item_index + "', 'form_relateditem_title_" + item_index + "', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_related_item_" + item_index + "', 'form_relateditem_title_" + item_index + "' );\"><div class=\"form_linkline_empty form_related_item_line\" id=\"form_related_item_term_" + item_index + "\">");

                        Output.Write("<i>Empty Related Item</i>");
                    }

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

                    // Add the popup form
                    PopupFormBuilder.AppendLine("<!-- Related Item Form " + item_index + " -->");
                    PopupFormBuilder.AppendLine("<div class=\"related_item_popup_div sbkMetadata_PopupDiv\" id=\"form_related_item_" + item_index + "\" style=\"display:none;\">");
                    PopupFormBuilder.AppendLine("  <div class=\"sbkMetadata_PopupTitle\"><table style=\"width:100%\"><tr><td style=\"text-align:left\">Edit Related Items</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_item_form('form_related_item_" + item_index + "')\">X</a> &nbsp; </td></tr></table></div>");
                    PopupFormBuilder.AppendLine("  <br />");
                    PopupFormBuilder.AppendLine("  <table class=\"sbkMetadata_PopupTable\">");

                    // Add the relation and display label
                    PopupFormBuilder.Append("    <tr><td style=\"width:90px\">Relation:</td><td><select class=\"form_relateditem_select\" name=\"form_relateditem_relation_" + item_index + "\" id=\"form_relateditem_relation_" + item_index + "\" >");
                    PopupFormBuilder.Append(thisItem.Relationship == Related_Item_Type_Enum.UNKNOWN
                                                  ? "<option value=\"\" selected=\"selected\" >&nbsp;</option>"
                                                  : "<option value=\"\">&nbsp;</option>");

                    PopupFormBuilder.Append(thisItem.Relationship == Related_Item_Type_Enum.Host
                                                  ? "<option value=\"host\" selected=\"selected\" >Host</option>"
                                                  : "<option value=\"host\">Host</option>");

                    PopupFormBuilder.Append(thisItem.Relationship == Related_Item_Type_Enum.OtherFormat
                                                  ? "<option value=\"other_format\" selected=\"selected\" >Other Format</option>"
                                                  : "<option value=\"other_format\">Other Format</option>");

                    PopupFormBuilder.Append(thisItem.Relationship == Related_Item_Type_Enum.OtherVersion
                                                  ? "<option value=\"other_version\" selected=\"selected\" >Other Version</option>"
                                                  : "<option value=\"other_version\">Other Version</option>");

                    PopupFormBuilder.Append(thisItem.Relationship == Related_Item_Type_Enum.Preceding
                                                  ? "<option value=\"preceding\" selected=\"selected\" >Preceding</option>"
                                                  : "<option value=\"preceding\">Preceding</option>");

                    PopupFormBuilder.Append(thisItem.Relationship == Related_Item_Type_Enum.Succeeding
                                                  ? "<option value=\"succeeding\" selected=\"selected\" >Succeeding</option>"
                                                  : "<option value=\"succeeding\">Succeeding</option>");

                    PopupFormBuilder.Append("</select></td>");
                    PopupFormBuilder.AppendLine("      <td style=\"width:255px\">Display Label: &nbsp; <input class=\"form_relateditem_medium_input sbk_Focusable\" name=\"form_relateditem_display_" + item_index + "\" id=\"form_relateditem_display_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisItem.URL_Display_Label) + "\" /></td>");
                    PopupFormBuilder.AppendLine("    </tr>");

                    string issn = String.Empty;
                    string oclc = String.Empty;
                    string lccn = String.Empty;
                    if (thisItem.Identifiers_Count > 0)
                    {
                        foreach (Identifier_Info thisIdentifier in thisItem.Identifiers)
                        {
                            switch (thisIdentifier.Type.ToUpper())
                            {
                            case "ISSN":
                                issn = thisIdentifier.Identifier;
                                break;

                            case "OCLC":
                                oclc = thisIdentifier.Identifier;
                                break;

                            case "LCCN":
                                lccn = thisIdentifier.Identifier;
                                break;
                            }
                        }
                    }

                    // Add the title and URL rows
                    string related_title = String.Empty;
                    if (thisItem.hasMainTitle)
                    {
                        related_title = thisItem.Main_Title.Title;
                    }

                    PopupFormBuilder.AppendLine("    <tr><td>Title:</td><td colspan=\"2\"><input class=\"form_relateditem_large_input sbk_Focusable\" name=\"form_relateditem_title_" + item_index + "\" id=\"form_relateditem_title_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(related_title) + "\" /></td></tr>");
                    PopupFormBuilder.AppendLine("    <tr><td>URL:</td><td colspan=\"2\"><input class=\"form_relateditem_large_input sbk_Focusable\" name=\"form_relateditem_url_" + item_index + "\" id=\"form_relateditem_url_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisItem.URL) + "\" /></td></tr>");

                    // Add the system ID and ISSN row
                    PopupFormBuilder.AppendLine("    <tr><td>System ID:</td><td><input class=\"form_relateditem_medium_input sbk_Focusable\" name=\"form_relateditem_sobekid_" + item_index + "\" id=\"form_relateditem_sobekid_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisItem.SobekCM_ID) + "\" /></td>");
                    PopupFormBuilder.AppendLine("        <td>ISSN: &nbsp; <input class=\"form_relateditem_medium_input sbk_Focusable\" name=\"form_relateditem_issn_" + item_index + "\" id=\"form_relateditem_issn_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(issn) + "\" /></td></tr>");

                    // Add the OCLC and LCCN row
                    PopupFormBuilder.AppendLine("    <tr><td>OCLC:</td><td><input class=\"form_relateditem_medium_input sbk_Focusable\" name=\"form_relateditem_oclc_" + item_index + "\" id=\"form_relateditem_oclc_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(oclc) + "\" /></td>");
                    PopupFormBuilder.AppendLine("        <td>LCCN: &nbsp; <input class=\"form_relateditem_medium_input sbk_Focusable\" name=\"form_relateditem_lccn_" + item_index + "\" id=\"form_relateditem_lccn_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(lccn) + "\" /></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_related_item_form('form_related_item_" + item_index + "');\">CLOSE</button></td>");
                    PopupFormBuilder.AppendLine("    </tr>");
                    PopupFormBuilder.AppendLine("  </table>");
                    PopupFormBuilder.AppendLine("</div>");
                    PopupFormBuilder.AppendLine();

                    item_index++;
                }
            }

            // Add the link to add a new related item and close the main element
            Output.WriteLine("\n            </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 related item", CurrentLanguage) + ".\" alt=\"+\" class=\"repeat_button\" src=\"" + REPEAT_BUTTON_URL + "\" onmousedown=\"new_relateditem_link_clicked('" + Template_Page + "');\" />");
            }
            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();
        }
예제 #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 = "Select the collections to which this item should belong";
            //    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;
            //    }
            //}

            //List<string> codes = new List<string>();
            //List<string> possibles = new List<string>();
            //if (Bib.Behaviors.Aggregation_Count > 0)
            //{
            //    codes.AddRange(Bib.Behaviors.Aggregation_Code_List);
            //    possibles.AddRange(Bib.Behaviors.Aggregation_Code_List);
            //}

            //// Check the user to see if this should be limited
            //bool some_set_as_selectable = false;
            //if (!Current_User.Is_Internal_User)
            //{
            //    // Are there aggregationPermissions set aside for the user?
            //    ReadOnlyCollection<User_Permissioned_Aggregation> allAggrs = Current_User.Aggregations;

            //    foreach (User_Permissioned_Aggregation thisAggr in allAggrs)
            //    {
            //        if (thisAggr.CanSelect)
            //        {
            //            some_set_as_selectable = true;
            //            if ((items.Contains(thisAggr.Code)) && (!possibles.Contains(thisAggr.Code)))
            //                possibles.Add(thisAggr.Code);
            //        }
            //    }
            //}

            //if (some_set_as_selectable)
            //{
            //    render_helper(Output, codes, possibles, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
            //}
            //else
            //{
            //    render_helper(Output, codes, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
            //}
        }
        /// <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="text_values"> Value(s) for the current digital resource to display in the text box </param>
        /// <param name="select_values"> 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> text_values, List <string> select_values, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            if (text_values.Count == 0)
            {
                text_values.Add(String.Empty);
                select_values.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 <= text_values.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(text_values[i - 1]) + "\" />");

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

                // Write the combo box
                Output.WriteLine("        <select class=\"" + html_element_name + "_select\" name=\"" + id_name + "_select" + i + "\" id=\"" + id_name + "_select" + i + "\" >");

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

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

                if (i == text_values.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 + "', '" + second_label + "');\"><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></table></td></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 = "Encoding level corresponds to the encoding level of any original catalog record.";
                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;
                }
            }

            if (Bib.Bib_Info.EncodingLevel.Trim().Length == 0)
            {
                render_helper(Output, "(none)", Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL, true);
            }
            else
            {
                render_helper(Output, Bib.Bib_Info.EncodingLevel, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
            }
        }
        /// <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 any spatial coverage information which relates 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;
                }
            }

            List <string> allValues = new List <string>();

            if (Bib.Bib_Info.Subjects_Count > 0)
            {
                allValues.AddRange(from thisSubject in Bib.Bib_Info.Subjects where thisSubject.Class_Type == Subject_Info_Type.Hierarchical_Spatial select thisSubject.ToString());
            }
            render_helper(Output, allValues, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
 /// <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_values"> Value(s) for the current digital resource to display</param>
 /// <param name="possible_values"> Possible vlaues for the 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, List <string> instance_values, List <string> possible_values, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
 {
     render_helper(Output, new ReadOnlyCollection <string>(instance_values), possible_values, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
 }
        /// <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 information about the target audience 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;
                }
            }

            List <string> audiences = new List <string>();

            if (Bib.Bib_Info.Target_Audiences_Count > 0)
            {
                audiences.AddRange(Bib.Bib_Info.Target_Audiences.Select(thisAudience => thisAudience.Audience));
            }
            render_helper(Output, new ReadOnlyCollection <string>(audiences), Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
 /// <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="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, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
 {
     render_helper(Output, instance_value, items, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
 }
        /// <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 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>");
                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 valign=\"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=\"+\" border=\"0px\" 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 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();
        }
예제 #12
0
 /// <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="select_value"> Value for the current digital resource to display in the combo box</param>
 /// <param name="text_value"> 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="initial_value"> 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 select_value, string text_value, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL, bool initial_value)
 {
     render_helper(Output, select_value, possible_select_items, text_value, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL, initial_value);
 }
예제 #13
0
        /// <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="select_value"> Value for the current digital resource to display in the combo box</param>
        /// <param name="userdefined_possible"> List of possible select values, set by the user </param>
        /// <param name="text_value"> 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="initial_value"> 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 select_value, List <string> userdefined_possible, string text_value, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL, bool initial_value)
        {
            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;

            // Write the combo box
            // Write the combo box
            if (clear_textbox_on_combobox_change)
            {
                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')\" onchange=\"clear_textbox('" + id_name + "_text" + i + "')\" >");
            }
            else
            {
                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')\" >");
            }


            bool found_option = false;

            foreach (string thisOption in possible_select_items)
            {
                if ((i < possible_select_items.Count) && (thisOption == select_value))
                {
                    Output.Write("<option value=\"" + thisOption + "\" selected=\"selected=\">" + thisOption + "</option>");
                    found_option = true;
                }
                else
                {
                    Output.Write("<option value=\"" + thisOption + "\" >" + thisOption + "</option>");
                }
            }

            if ((select_value.Length > 0) && (!Restrict_Values) && (!found_option))
            {
                Output.Write("<option value=\"" + select_value + "\" selected=\"selected=\">" + select_value + "</option>");
            }
            Output.Write("</select>");

            // Write the second text
            if (second_label.Length > 0)
            {
                Output.Write("<span class=\"metadata_sublabel\">" + second_label + ":</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(text_value) + "\" />");

            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=\"" + 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 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)
 {
     render_helper(Output, Bib.Web.Additional_Work_Needed, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
 }
        /// <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 = "Classification or call number for this item, usually associated with an authority.";
                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;
                }
            }

            List <string> terms   = new List <string>();
            List <string> schemes = new List <string>();

            if (Bib.Bib_Info.Classifications_Count > 0)
            {
                foreach (Classification_Info thisClassification in Bib.Bib_Info.Classifications)
                {
                    terms.Add(thisClassification.Classification);
                    schemes.Add(thisClassification.Authority.ToUpper());
                }
            }

            render_helper(Output, terms, schemes, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
예제 #16
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 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 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 = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            List <string> creator = new List <string>();
            List <string> roles   = new List <string>();

            if (Bib.Bib_Info.hasMainEntityName)
            {
                creator.Add(Bib.Bib_Info.Main_Entity_Name.ToString(false));
                if (Bib.Bib_Info.Main_Entity_Name.Name_Type == Name_Info_Type_Enum.conference)
                {
                    roles.Add("Conference");
                }
                else
                {
                    if (Bib.Bib_Info.Main_Entity_Name.Roles.Count > 0)
                    {
                        bool found = false;
                        foreach (Name_Info_Role thisRole in Bib.Bib_Info.Main_Entity_Name.Roles)
                        {
                            if (thisRole.Role_Type == Name_Info_Role_Type_Enum.text)
                            {
                                roles.Add(thisRole.Role);
                                found = true;
                                break;
                            }
                        }
                        if (!found)
                        {
                            roles.Add(Bib.Bib_Info.Main_Entity_Name.Roles[0].Role);
                        }
                    }
                    else
                    {
                        roles.Add(String.Empty);
                    }
                }
            }

            foreach (Name_Info thisName in Bib.Bib_Info.Names)
            {
                if (thisName.hasData)
                {
                    creator.Add(thisName.ToString(false));
                    if (thisName.Name_Type == Name_Info_Type_Enum.conference)
                    {
                        roles.Add("Conference");
                    }
                    else
                    {
                        if (thisName.Roles.Count > 0)
                        {
                            bool found = false;
                            foreach (Name_Info_Role thisRole in thisName.Roles)
                            {
                                if (thisRole.Role_Type == Name_Info_Role_Type_Enum.text)
                                {
                                    roles.Add(thisRole.Role);
                                    found = true;
                                    break;
                                }
                            }
                            if (!found)
                            {
                                roles.Add(thisName.Roles[0].Role);
                            }
                        }
                        else
                        {
                            roles.Add(String.Empty);
                        }
                    }
                }
            }

            render_helper(Output, creator, roles, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
예제 #17
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 any subject keyword to describe your material here, along with the vocabulary from which this subject term was pulled.";
                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>");
            }

            // Ensure there is at least one standard subject
            bool found_standard = false;

            if (Bib.Bib_Info.Subjects_Count > 0)
            {
                if (Bib.Bib_Info.Subjects.Any(ThisSubject => ThisSubject.Class_Type == Subject_Info_Type.Standard))
                {
                    found_standard = true;
                }
            }
            if (!found_standard)
            {
                Bib.Bib_Info.Add_Subject();
            }

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

            foreach (Subject_Info thisSubject in Bib.Bib_Info.Subjects)
            {
                if (thisSubject.Class_Type == Subject_Info_Type.Standard)
                {
                    Subject_Info_Standard standSubject = ( Subject_Info_Standard )thisSubject;

                    // Add this subject linke
                    if (standSubject.hasData)
                    {
                        Output.Write("\n        <a title=\"Click to edit this subject information\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_subject_term_" + subject_index + "')\" onblur=\"link_blurred2('form_subject_term_" + subject_index + "')\" onkeypress=\"return popup_keypress_focus('form_subject_" + subject_index + "', 'formsubjecttopic1_" + subject_index + "', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_subject_" + subject_index + "', 'formsubjecttopic1_" + subject_index + "' );\"><div class=\"form_linkline form_subject_line\" id=\"form_subject_term_" + subject_index + "\">" + standSubject + "</div></a>");
                    }
                    else
                    {
                        Output.Write("\n        <a title=\"Click to edit this subject information\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onfocus=\"link_focused2('form_subject_term_" + subject_index + "')\" onblur=\"link_blurred2('form_subject_term_" + subject_index + "')\" onkeypress=\"return popup_keypress_focus('form_subject_" + subject_index + "', 'formsubjecttopic1_" + subject_index + "', '" + IsMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_subject_" + subject_index + "', 'formsubjecttopic1_" + subject_index + "' );\"><div class=\"form_linkline_empty form_subject_line\" id=\"form_subject_term_" + subject_index + "\"><i>Empty Subject Keyword</i></div></a>");
                    }

                    // Add the popup form
                    PopupFormBuilder.AppendLine("<!-- Subject Keyword Form " + subject_index + " -->");
                    PopupFormBuilder.AppendLine("<div class=\"subject_popup_div sbkMetadata_PopupDiv\" id=\"form_subject_" + subject_index + "\" style=\"display:none;\">");
                    PopupFormBuilder.AppendLine("  <div class=\"sbkMetadata_PopupTitle\"><table style=\"width:100%\"><tr><td style=\"text-align:left\">Edit Subject</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_subject_form('form_subject_" + subject_index + "')\">X</a> &nbsp; </td></tr></table></div>");
                    PopupFormBuilder.AppendLine("  <br />");
                    PopupFormBuilder.AppendLine("  <table class=\"sbkMetadata_PopupTable\">");

                    // Add the options for this subject ( standard, name, or title)
                    PopupFormBuilder.Append("    <tr><td>Subject Type:</td><td><select class=\"formsubject_type\" name=\"formsubjecttype_" + subject_index + "\" id=\"formsubjecttype_" + subject_index + "\" >");
                    PopupFormBuilder.Append("<option value=\"standard\" selected=\"selected\">Standard</option>");
                    PopupFormBuilder.AppendLine("</select></td>");
                    PopupFormBuilder.Append("        <td>MARC: &nbsp; <select class=\"formsubject_map\" name=\"formsubjectmap_" + subject_index + "\" id=\"formsubjectmap_" + subject_index + "\" >");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ") < 0
                                                  ? "<option value=\"none\" selected=\"selected\" >&nbsp;</option>"
                                                  : "<option value=\"none\" >&nbsp;</option>");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ648") == 0
                                                  ? "<option value=\"648\" selected=\"selected\" >648 - Chronological Term</option>"
                                                  : "<option value=\"648\" >648 - Chronological Term</option>");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ650") == 0
                                                  ? "<option value=\"650\" selected=\"selected\" >650 - Topical Term</option>"
                                                  : "<option value=\"650\" >650 - Topical Term</option>");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ651") == 0
                                                  ? "<option value=\"651\" selected=\"selected\" >651 - Geographic Name</option>"
                                                  : "<option value=\"651\" >651 - Geographic Name</option>");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ653") == 0
                                                  ? "<option value=\"653\" selected=\"selected\" >653 - Uncontrolled Index</option>"
                                                  : "<option value=\"653\" >653 - Uncontrolled Index</option>");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ654") == 0
                                                  ? "<option value=\"654\" selected=\"selected\" >654 - Faceted Topical</option>"
                                                  : "<option value=\"654\" >654 - Faceted Topical</option>");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ655") == 0
                                                  ? "<option value=\"655\" selected=\"selected\" >655 - Genre / Form</option>"
                                                  : "<option value=\"655\" >655 - Genre / Form</option>");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ656") == 0
                                                  ? "<option value=\"656\" selected=\"selected\" >656 - Occupation</option>"
                                                  : "<option value=\"656\" >656 - Occupation</option>");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ657") == 0
                                                  ? "<option value=\"657\" selected=\"selected\" >657 - Function</option>"
                                                  : "<option value=\"657\" >657 - Function</option>");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ690") == 0
                                                  ? "<option value=\"690\" selected=\"selected\" >690 - Local Topical</option>"
                                                  : "<option value=\"690\" >690 - Local Topical</option>");

                    PopupFormBuilder.Append(standSubject.ID.IndexOf("SUBJ691") == 0
                                                  ? "<option value=\"691\" selected=\"selected\" >691 - Local Geographic</option>"
                                                  : "<option value=\"691\" >691 - Local Geographic</option>");

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

                    // Add the first row of topical term boxes
                    PopupFormBuilder.Append("    <tr><td>Topical Term(s):</td><td colspan=\"2\">");
                    if (standSubject.Topics_Count >= 1)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttopic1_" + subject_index + "\" id=\"formsubjecttopic1_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Topics[0]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttopic1_" + subject_index + "\" id=\"formsubjecttopic1_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }

                    if (standSubject.Topics_Count >= 2)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttopic2_" + subject_index + "\" id=\"formsubjecttopic2_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Topics[1]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttopic2_" + subject_index + "\" id=\"formsubjecttopic2_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }
                    PopupFormBuilder.AppendLine("</td></tr>");

                    // Add the second row of topical term boxes
                    PopupFormBuilder.Append("    <tr><td>&nbsp;</td><td colspan=\"2\">");
                    if (standSubject.Topics_Count >= 3)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttopic3_" + subject_index + "\" id=\"formsubjecttopic3_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Topics[2]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttopic3_" + subject_index + "\" id=\"formsubjecttopic3_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }

                    if (standSubject.Topics_Count >= 4)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttopic4_" + subject_index + "\" id=\"formsubjecttopic4_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Topics[3]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttopic4_" + subject_index + "\" id=\"formsubjecttopic4_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }
                    PopupFormBuilder.AppendLine("</td></tr>");

                    // Add the two chronological term boxes
                    PopupFormBuilder.Append("    <tr><td>Chronological Term(s):</td><td colspan=\"2\">");
                    if (standSubject.Temporals_Count >= 1)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttemporal1_" + subject_index + "\" id=\"formsubjecttemporal1_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Temporals[0]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttemporal1_" + subject_index + "\" id=\"formsubjecttemporal1_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }

                    if (standSubject.Temporals_Count >= 2)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttemporal2_" + subject_index + "\" id=\"formsubjecttemporal2_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Temporals[1]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjecttemporal2_" + subject_index + "\" id=\"formsubjecttemporal2_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }
                    PopupFormBuilder.AppendLine("</td></tr>");

                    // Add the two geographic term boxes
                    PopupFormBuilder.Append("    <tr><td>Geographic Term(s):</td><td colspan=\"2\">");
                    if (standSubject.Geographics_Count >= 1)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjectgeo1_" + subject_index + "\" id=\"formsubjectgeo1_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Geographics[0]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjectgeo1_" + subject_index + "\" id=\"formsubjectgeo1_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }

                    if (standSubject.Geographics_Count >= 2)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjectgeo2_" + subject_index + "\" id=\"formsubjectgeo2_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Geographics[1]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjectgeo2_" + subject_index + "\" id=\"formsubjectgeo2_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }
                    PopupFormBuilder.AppendLine("</td></tr>");

                    // Add the two genre term boxes
                    PopupFormBuilder.Append("    <tr><td>Form / Genre Term(s):</td><td colspan=\"2\">");
                    if (standSubject.Genres_Count >= 1)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjectgenre1_" + subject_index + "\" id=\"formsubjectgenre1_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Genres[0]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjectgenre1_" + subject_index + "\" id=\"formsubjectgenre1_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }

                    if (standSubject.Genres_Count >= 2)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjectgenre2_" + subject_index + "\" id=\"formsubjectgenre2_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Genres[1]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_medium_input sbk_Focusable\" name=\"formsubjectgenre2_" + subject_index + "\" id=\"formsubjectgenre2_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }
                    PopupFormBuilder.AppendLine("</td></tr>");

                    // Add the occupational term box
                    PopupFormBuilder.Append("    <tr><td>Occupation:</td><td colspan=\"2\">");
                    if (standSubject.Occupations_Count >= 1)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_large_input sbk_Focusable\" name=\"formsubjectoccup1_" + subject_index + "\" id=\"formsubjectoccup1_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Occupations[0]) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_large_input sbk_Focusable\" name=\"formsubjectoccup1_" + subject_index + "\" id=\"formsubjectoccup1_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }
                    PopupFormBuilder.AppendLine("</td></tr>");

                    // Add the authority and language text boxes
                    PopupFormBuilder.Append("    <tr><td>Authority:</td><td>");
                    if (standSubject.Authority.Length > 0)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_small_input sbk_Focusable\" name=\"formsubjectauthority_" + subject_index + "\" id=\"formsubjectauthority_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Authority) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_small_input sbk_Focusable\" name=\"formsubjectauthority_" + subject_index + "\" id=\"formsubjectauthority_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }
                    PopupFormBuilder.Append("</td><td width=\"255px\" > &nbsp; Language: &nbsp; ");
                    if (standSubject.Language.Length > 0)
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_small_input sbk_Focusable\" name=\"formsubjectlanguage_" + subject_index + "\" id=\"formsubjectlanguage_" + subject_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(standSubject.Language) + "\" />");
                    }
                    else
                    {
                        PopupFormBuilder.Append("<input class=\"formsubject_small_input sbk_Focusable\" name=\"formsubjectlanguage_" + subject_index + "\" id=\"formsubjectlanguage_" + subject_index + "\" type=\"text\" value=\"\" />");
                    }
                    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_subject_form('form_subject_" + subject_index + "');\">CLOSE</button></td>");
                    PopupFormBuilder.AppendLine("    </tr>");
                    PopupFormBuilder.AppendLine("  </table>");
                    PopupFormBuilder.AppendLine("</div>");
                    PopupFormBuilder.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 style=\"vertical-align:bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <img title=\"" + Translator.Get_Translation("Click to add a new named subject", CurrentLanguage) + ".\" alt=\"+\" class=\"repeat_button\" src=\"" + REPEAT_BUTTON_URL + "\" onmousedown=\"new_subject_link_clicked('" + Template_Page + "');\" />");
            }
            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> 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 your abstract here. If your material does not have an abstract, you may include a summary of your document here.";
                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;
                }
            }

            // 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 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 align=\"left\">");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");

            if (Bib.Bib_Info.Abstracts_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\" onfocus=\"javascript:textbox_enter('" + id_name + "_type1','" + html_element_name + "_type_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_type1','" + html_element_name + "_type')\" >");
                Output.WriteLine("                  <option selected=\"selected=\" value=\"\"></option>");
                Output.WriteLine("                  <option value=\"abstract\">Abstract</option>");
                Output.WriteLine("                  <option value=\"content\">Content Advice</option>");
                Output.WriteLine("                  <option value=\"review\">Review</option>");
                Output.WriteLine("                  <option value=\"scope\">Scope and Content</option>");
                Output.WriteLine("                  <option value=\"subject\">Subject</option>");
                Output.WriteLine("                  <option value=\"summary\">Summary</option>");
                Output.WriteLine("                </select>");

                Output.WriteLine("                <span class=\"metadata_sublabel\">" + Translator.Get_Translation("Language", CurrentLanguage) + ":</span>");
                Output.WriteLine("                <input name=\"" + id_name + "_language1\" id=\"" + id_name + "_language1\" class=\"" + html_element_name + "_language\" type=\"text\" value=\"\" onfocus=\"javascript:textbox_enter('" + id_name + "_language1', '" + html_element_name + "_language_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_language1', '" + html_element_name + "_language')\" />");
                Output.WriteLine("              </div>");
                Output.WriteLine("              <textarea rows=\"" + Rows + "\" cols=\"" + actual_cols + "\" name=\"" + id_name + "_textarea1\" id=\"" + id_name + "_textarea1\" class=\"" + html_element_name + "_input\" onfocus=\"javascript:textbox_enter('" + id_name + "_textarea1','" + html_element_name + "_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_textarea1','" + html_element_name + "_input')\"></textarea>");
            }
            else
            {
                int i = 1;
                foreach (Abstract_Info thisAbstract in Bib.Bib_Info.Abstracts)
                {
                    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 + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_type" + i + "','" + html_element_name + "_type_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_type" + i + "','" + html_element_name + "_type')\" >");
                    Output.WriteLine("                  <option value=\"\"></option>");

                    Output.WriteLine(thisAbstract.Type.ToLower() != "abstract"
                                         ? "                  <option value=\"abstract\">Abstract</option>"
                                         : "                  <option value=\"abstract\" selected=\"selected\">Abstract</option>");

                    Output.WriteLine(thisAbstract.Type.ToLower() != "content advice"
                                         ? "                  <option value=\"content\">Content Advice</option>"
                                         : "                  <option value=\"content\" selected=\"selected\">Content Advice</option>");

                    Output.WriteLine(thisAbstract.Type.ToLower() != "review"
                                         ? "                  <option value=\"review\">Review</option>"
                                         : "                  <option value=\"review\" selected=\"selected\">Review</option>");

                    Output.WriteLine(thisAbstract.Type.ToLower() != "scope and content"
                                         ? "                  <option value=\"scope\">Scope and Content</option>"
                                         : "                  <option value=\"scope\" selected=\"selected\">Scope and Content</option>");

                    Output.WriteLine(thisAbstract.Type.ToLower() != "subject"
                                         ? "                  <option value=\"subject\">Subject</option>"
                                         : "                  <option value=\"subject\" selected=\"selected\">Subject</option>");

                    Output.WriteLine(thisAbstract.Type.ToLower() != "summary"
                                         ? "                  <option value=\"summary\">Summary</option>"
                                         : "                  <option value=\"summary\" selected=\"selected\">Summary</option>");

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

                    Output.WriteLine("                <span class=\"metadata_sublabel\">Language:</span>");
                    Output.WriteLine("                <input name=\"" + id_name + "_language1\" id=\"" + id_name + "_language1\" class=\"" + html_element_name + "_language\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisAbstract.Language) + "\" onfocus=\"javascript:textbox_enter('" + id_name + "_language1', '" + html_element_name + "_language_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_language1', '" + html_element_name + "_language')\" />");
                    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\" onfocus=\"javascript:textbox_enter('" + id_name + "_textarea" + i + "','" + html_element_name + "_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "_textarea" + i + "','" + html_element_name + "_input')\">" + HttpUtility.HtmlEncode(thisAbstract.Abstract_Text) + "</textarea>");


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

                    i++;
                }
            }

            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 abstract", CurrentLanguage) + ".\" href=\"" + Base_URL + "l/technical/javascriptrequired\" onmousedown=\"return add_complex_abstract('" + Rows + "','" + actual_cols + "');\"><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 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 = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

            List <string> instanceValues = new List <string>();

            if ((Bib.Bib_Info.hasMainEntityName) && (Bib.Bib_Info.Main_Entity_Name.ToString().Length > 0))
            {
                string main_name_as_string = Bib.Bib_Info.Main_Entity_Name.ToString();
                if ((main_name_as_string != "unknown") && (main_name_as_string.Length > 0))
                {
                    instanceValues.Add(main_name_as_string);
                }
            }
            foreach (Name_Info thisName in Bib.Bib_Info.Names)
            {
                bool include = true;
                if ((Options != null) && (Options.ContainsKey("contributor_included")) && (String.Compare(Options["contributor_included"], "true", StringComparison.OrdinalIgnoreCase) == 0))
                {
                    if (thisName.Roles.Any(ThisRole => ThisRole.Role.ToLower() == "contributor"))
                    {
                        include = false;
                    }
                }
                if (include)
                {
                    string name_as_string = thisName.ToString();
                    if ((name_as_string != "unknown") && (name_as_string.Length > 0))
                    {
                        instanceValues.Add(name_as_string);
                    }
                }
            }

            render_helper(Output, instanceValues, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
        /// <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 a FAST subject keyword to describe this 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;
                }
            }


            render_helper(Output, new List <string>(), new List <string>(), Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
        /// <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 = "Holding location for the physical material, if this is a digital manifestation of a physical item.  Otherwise, the institution holding the digital version.";
                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;
                }
            }

            // This should always have a blank value
            if (!possible_select_items.Contains(String.Empty))
            {
                possible_select_items.Insert(0, String.Empty);
            }

            // Check the user to see if this should be limited
            bool          some_set_as_selectable = false;
            List <string> possibles = new List <string> {
                Bib.Bib_Info.Location.Holding_Code.ToUpper()
            };

            if (!Current_User.Is_Internal_User)
            {
                // Are there aggregations set aside for the user?
                ReadOnlyCollection <User_Editable_Aggregation> allAggrs = Current_User.Aggregations;

                foreach (User_Editable_Aggregation thisAggr in allAggrs)
                {
                    if (thisAggr.CanSelect)
                    {
                        some_set_as_selectable = true;
                        string code = thisAggr.Code.ToUpper();
                        if ((code.Length > 1) && (code[0] == 'I'))
                        {
                            code = code.Substring(1);
                        }
                        if ((possible_select_items.Contains(code)) && (!possibles.Contains(code)))
                        {
                            possibles.Add(code);
                        }
                    }
                }
            }

            string holding_code = Bib.Bib_Info.Location.Holding_Code.ToUpper();

            if (some_set_as_selectable)
            {
                render_helper(Output, holding_code, possibles, Bib.Bib_Info.Location.Holding_Name, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL, false);
            }
            else
            {
                render_helper(Output, holding_code, Bib.Bib_Info.Location.Holding_Name, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
            }
        }
예제 #22
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 = "Select the resource type information which best describes 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;
                }
            }

            string thisType = Bib.Bib_Info.SobekCM_Type_String;

            if (Bib.Bib_Info.SobekCM_Type == TypeOfResource_SobekCM_Enum.Project)
            {
                thisType = String.Empty;
                if (Bib.Bib_Info.Notes_Count > 0)
                {
                    foreach (Note_Info thisNote in Bib.Bib_Info.Notes.Where(ThisNote => ThisNote.Note_Type == Note_Type_Enum.DefaultType))
                    {
                        thisType = thisNote.Note;
                        break;
                    }
                }
            }

            // Apply a default here
            if ((String.IsNullOrEmpty(thisType)) || (String.Equals(thisType, "Unknown", StringComparison.OrdinalIgnoreCase)))
            {
                if ((DefaultValues != null) && (DefaultValues.Count > 0))
                {
                    thisType = DefaultValues[0];
                }
            }

            // Determine the material type
            if (thisType.Length == 0)
            {
                render_helper(Output, "Select Material Type", Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL, true);
            }
            else
            {
                render_helper(Output, thisType, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL, 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 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 = "If the original material is cartographic in nature and has scale indicated listed, include it here.";
                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;
                }
            }

            // Clear out the cartographics
            string scale = String.Empty;

            foreach (Subject_Info thisSubject in Bib.Bib_Info.Subjects.Where(thisSubject => thisSubject.Class_Type == Subject_Info_Type.Cartographics))
            {
                scale = ((Subject_Info_Cartographics)thisSubject).Scale;
                break;
            }

            render_helper(Output, scale, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
예제 #24
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 = "Identifier/number for this item in the primary catalog record system";
                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;
                }
            }

            const string identifierType1  = "CATRECORDNUM";
            string       identifier_type2 = identifierType1;

            if (label_from_template_file.Length > 0)
            {
                identifier_type2 = label_from_template_file.Replace(" Number", "").Trim().ToUpper();
            }
            string identifier_value = String.Empty;

            foreach (Identifier_Info thisIdentifier in Bib.Bib_Info.Identifiers.Where(thisIdentifier => (thisIdentifier.Type.ToUpper() == identifierType1) || (thisIdentifier.Type.ToUpper() == identifier_type2)))
            {
                identifier_value = thisIdentifier.Identifier;
                break;
            }

            render_helper(Output, identifier_value, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
        /// <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_values_text1"> Value(s) for the current digital resource to display in the first text box</param>
        /// <param name="instance_values_text2" >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> instance_values_text1, List<string> instance_values_text2, string Skin_Code, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL )
        {
            if ((instance_values_text1.Count == 0) && ( instance_values_text2.Count == 0 ))
            {
                render_helper(Output, String.Empty, String.Empty, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
                return;
            }

            if ((instance_values_text1.Count == 1) && (instance_values_text2.Count == 1))
            {
                render_helper(Output, instance_values_text1[0], instance_values_text2[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 <= instance_values_text1.Count; i++)
                {
                    // Write the first text
                    if (first_label.Length > 0)
                    {
                        Output.Write("              <span class=\"metadata_sublabel2\">" + Translator.Get_Translation(first_label, 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(instance_values_text1[i - 1]) + "\" />");

                    // Write the second text
                    if (second_label.Length > 0)
                    {
                        Output.Write("<span class=\"metadata_sublabel\">" + Translator.Get_Translation(second_label, 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(instance_values_text2[i - 1]) + "\"  />");
                    Output.WriteLine(i < instance_values_text1.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 + "','" + first_label + "','" + second_label + "');\"><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 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)
            {
                Acronym = "Measurement related to this item, whether it is length, volume, duration, weight, etc..";
            }

            List <string> terms   = new List <string>();
            List <string> schemes = new List <string>();

            // Try to get any existing learning object metadata module
            VRACore_Info vraInfo = Bib.Get_Metadata_Module(GlobalVar.VRACORE_METADATA_MODULE_KEY) as VRACore_Info;

            if (vraInfo != null)
            {
                foreach (VRACore_Measurement_Info thisMeasurement in vraInfo.Measurements)
                {
                    terms.Add(thisMeasurement.Measurements);
                    schemes.Add(thisMeasurement.Units);
                }
            }

            render_helper(Output, terms, schemes, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
예제 #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 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;
                }
            }

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

            int actual_cols = cols;

            if (IsMozilla)
            {
                actual_cols = cols_mozilla;
            }

            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("      <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.Replace(DEFAULT_PREFIX, "").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("                </ul>");
            Output.WriteLine("        </div>");
            Output.WriteLine("      </div>");

            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=\"" + baseURL + "default/images/cc_zero.png\" /></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=\"" + baseURL + "default/images/cc_by.png\" /></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=\"" + baseURL + "default/images/cc_by_sa.png\" /></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=\"" + baseURL + "default/images/cc_by_nd.png\" /></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=\"" + baseURL + "default/images/cc_by_nc.png\" /></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=\"" + baseURL + "default/images/cc_by_nc_sa.png\" /></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=\"" + baseURL + "default/images/cc_by_nc_nd.png\" /></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>");
            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 title of this material here.";
                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;
                }
            }

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

            render_helper(Output, Bib.Bib_Info.Main_Title.ToString(), Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
예제 #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 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 date this item was created, if different from the publication/issued date.";
                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 date = Bib.Bib_Info.Origin_Info.Date_Created;

            if (LabelFromTemplateFile.Length > 0)
            {
                Title = LabelFromTemplateFile;
            }

            render_helper(Output, date, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }
        /// <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 geographic location of the publisher(s) 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;
                }
            }

            List <string> instanceValues = new List <string>();

            if (Bib.Bib_Info.Publishers_Count > 0)
            {
                foreach (Publisher_Info thisName in Bib.Bib_Info.Publishers)
                {
                    instanceValues.AddRange(from thisPlace in thisName.Places where thisPlace.Place_Text.Length > 0 select thisPlace.Place_Text);
                }
            }

            render_helper(Output, instanceValues, Skin_Code, Current_User, CurrentLanguage, Translator, Base_URL);
        }