/// <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);
        }
예제 #2
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> Prepares the bib object for the save, by clearing any existing data in this element's related field(s) </summary>
 /// <param name="Bib"> Existing digital resource object which may already have values for this element's data field(s) </param>
 /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
 /// <remarks> This clears any preexisting abstracts </remarks>
 public override void Prepare_For_Save(SobekCM_Item Bib, User_Object Current_User)
 {
     Bib.Bib_Info.Clear_Abstracts();
 }
예제 #4
0
 /// <summary> Creates and returns the an instance of the <see cref="Usage_Stats_ItemViewer"/> class for showing the
 /// usage statistics ( readership / visitors ) over time for a digital resource during execution of a single HTTP request. </summary>
 /// <param name="CurrentItem"> Digital resource object </param>
 /// <param name="CurrentUser"> Current user, who may or may not be logged on </param>
 /// <param name="CurrentRequest"> Information about the current request </param>
 /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
 /// <returns> Fully built and initialized <see cref="Usage_Stats_ItemViewer"/> object </returns>
 /// <remarks> This method is called whenever a request requires the actual viewer to be created to render the HTML for
 /// the digital resource requested.  The created viewer is then destroyed at the end of the request </remarks>
 public iItemViewer Create_Viewer(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, Custom_Tracer Tracer)
 {
     return(new Usage_Stats_ItemViewer(CurrentItem, CurrentUser, CurrentRequest));
 }
예제 #5
0
        /// <summary> Constructor for a new instance of the Related_Images_ItemViewer class, used to display
        /// the thumbnail images (i.e., related images) associated with a digital resource </summary>
        /// <param name="BriefItem"> Digital resource object </param>
        /// <param name="CurrentUser"> Current user, who may or may not be logged on </param>
        /// <param name="CurrentRequest"> Information about the current request </param>
        /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
        /// <param name="ViewerCode"> Viewer code for the related images viewer </param>
        public Related_Images_ItemViewer(BriefItemInfo BriefItem, User_Object CurrentUser, Navigation_Object CurrentRequest, Custom_Tracer Tracer, string ViewerCode)
        {
            // Save the arguments for use later
            briefItem      = BriefItem;
            currentRequest = CurrentRequest;

            // Get the proper number of thumbnails per page
            if (CurrentUser != null)
            {
                // First, pull the thumbnails per page from the user options
                thumbnailsPerPage = CurrentUser.Get_Setting("Related_Images_ItemViewer:ThumbnailsPerPage", 50);

                // Or was there a new value in the URL?
                if ((currentRequest.Thumbnails_Per_Page.HasValue) && (currentRequest.Thumbnails_Per_Page.Value >= -1))
                {
                    CurrentUser.Add_Setting("Related_Images_ItemViewer:ThumbnailsPerPage", currentRequest.Thumbnails_Per_Page);
                    thumbnailsPerPage = currentRequest.Thumbnails_Per_Page.Value;
                }
            }
            else
            {
                int    tempValue    = 50;
                object sessionValue = HttpContext.Current.Session["Related_Images_ItemViewer:ThumbnailsPerPage"];
                if (sessionValue != null)
                {
                    int.TryParse(sessionValue.ToString(), out tempValue);
                }
                thumbnailsPerPage = tempValue;

                // Or was there a new value in the URL?
                if ((currentRequest.Thumbnails_Per_Page.HasValue) && (currentRequest.Thumbnails_Per_Page.Value >= -1))
                {
                    HttpContext.Current.Session["Related_Images_ItemViewer:ThumbnailsPerPage"] = currentRequest.Thumbnails_Per_Page;
                    thumbnailsPerPage = currentRequest.Thumbnails_Per_Page.Value;
                }
            }

            // -1 means to display all thumbnails
            if (thumbnailsPerPage == -1)
            {
                thumbnailsPerPage = int.MaxValue;
            }

            // Now, reset the value in the navigation object, since we won't need to set it again
            currentRequest.Thumbnails_Per_Page = -100;

            // Get the proper size of thumbnails per page
            if (CurrentUser != null)
            {
                // First, pull the thumbnails per page from the user options
                thumbnailSize = CurrentUser.Get_Setting("Related_Images_ItemViewer:ThumbnailSize", 1);

                // Or was there a new value in the URL?
                if ((currentRequest.Size_Of_Thumbnails.HasValue) && (currentRequest.Size_Of_Thumbnails.Value > -1))
                {
                    CurrentUser.Add_Setting("Related_Images_ItemViewer:ThumbnailSize", currentRequest.Size_Of_Thumbnails);
                    thumbnailSize = currentRequest.Size_Of_Thumbnails.Value;
                }
            }
            else
            {
                int    tempValue    = 1;
                object sessionValue = HttpContext.Current.Session["Related_Images_ItemViewer:ThumbnailSize"];
                if (sessionValue != null)
                {
                    int.TryParse(sessionValue.ToString(), out tempValue);
                }
                thumbnailSize = tempValue;

                // Or was there a new value in the URL?
                if ((currentRequest.Size_Of_Thumbnails.HasValue) && (currentRequest.Size_Of_Thumbnails.Value > -1))
                {
                    HttpContext.Current.Session["Related_Images_ItemViewer:ThumbnailSize"] = currentRequest.Size_Of_Thumbnails;
                    thumbnailSize = currentRequest.Size_Of_Thumbnails.Value;
                }
            }

            // Now, reset the value in the navigation object, since we won't need to set it again
            currentRequest.Size_Of_Thumbnails = -1;

            // Get the number of thumbnails for this item
            pageCount = briefItem.Images != null ? briefItem.Images.Count : 0;

            // Determine the page
            page = 1;
            if (!String.IsNullOrEmpty(CurrentRequest.ViewerCode))
            {
                int tempPageParse;
                if (Int32.TryParse(CurrentRequest.ViewerCode.Replace(ViewerCode.Replace("#", ""), ""), out tempPageParse))
                {
                    page = tempPageParse;
                }
            }

            // Just a quick range check
            if (page > pageCount)
            {
                page = 1;
            }
        }
예제 #6
0
        /// <summary> Renders the HTML for this element </summary>
        /// <param name="Output"> Textwriter to write the HTML for this element </param>
        /// <param name="Bib"> Object to populate this element from </param>
        /// <param name="Skin_Code"> Code for the current skin </param>
        /// <param name="isMozilla"> Flag indicates if the current browse is Mozilla Firefox (different css choices for some elements)</param>
        /// <param name="popup_form_builder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This 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);
        }
 /// <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> Prepares the bib object for the save, by clearing any existing data in this element's related field(s) </summary>
 /// <param name="Bib"> Existing digital resource object which may already have values for this element's data field(s) </param>
 /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
 /// <remarks> This clears any preexisting target audiences </remarks>
 public override void Prepare_For_Save(SobekCM_Item Bib, User_Object Current_User)
 {
     Bib.Bib_Info.Clear_Target_Audiences();
 }
        /// <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 rights you give for sharing, repurposing, or remixing your item to other users.  You may also select a creative commons license below.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

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

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

            int actual_cols = cols;

            if (isMozilla)
            {
                actual_cols = 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("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name + "_div\">");
            Output.WriteLine("              <textarea rows=\"" + rows + "\" cols=\"" + actual_cols + "\" name=\"" + id_name + "1\" id=\"" + id_name + "1\" class=\"" + html_element_name + "_input\" onfocus=\"javascript:textbox_enter('" + id_name + "1','" + html_element_name + "_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "1','" + html_element_name + "_input')\">" + HttpUtility.HtmlEncode(Bib.Bib_Info.Access_Condition.Text.Trim()) + "</textarea>");
            Output.WriteLine("              <div class=\"ShowOptionsRow\">");
            Output.WriteLine("                <a href=\"\" onclick=\"return open_cc_rights();\"><img src=\"" + baseURL + "design/skins/" + Skin_Code + "/tabs/cLDG.gif\" border=\"0\" class=\"tab_image\" alt=\"\" /><span class=\"tab\">CREATIVE COMMONS</span><img src=\"" + baseURL + "design/skins/" + Skin_Code + "/tabs/cRDG.gif\" border=\"0\" class=\"tab_image\" alt=\"\" /></a>");
            Output.WriteLine("              </div>");
            Output.WriteLine("            </div>");
            Output.WriteLine("          </td>");
            Output.WriteLine("          <td valign=\"bottom\" >");
            Output.WriteLine("            <a target=\"_" + html_element_name.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button_rightsmgmt\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();


            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td colspan=\"2\">&nbsp;</td>");
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table id=\"cc_rights\" cellpadding=\"3px\" cellspacing=\"3px\" style=\"display:none;\">");
            Output.WriteLine("        <tr><td colspan=\"2\">You may also select a <a title=\"Explanation of different creative commons licenses.\" href=\"http://creativecommons.org/about/licenses/\">Creative Commons License</a> option below.<br /></td></tr>");
            Output.WriteLine("        <tr><td> &nbsp; <a href=\"\" onclick=\"return set_cc_rights('rightsmgmt1','[cc0] The author dedicated the work to the Commons by waiving all of his or her rights to the work worldwide under copyright law and all related or neighboring legal rights he or she had in the work, to the extent allowable by law.');\"><img title=\"You dedicate the work to the Commons by waiving all of your rights to the work worldwide under copyright law and all related or neighboring legal rights you had in the work, to the extent allowable by law.\" src=\"" + 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("");
        }
예제 #10
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> Prepares the bib object for the save, by clearing any existing data in this element's related field(s) </summary>
 /// <param name="Bib"> Existing digital resource object which may already have values for this element's data field(s) </param>
 /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
 /// <remarks> This does nothing since there is only one rights statement </remarks>
 public override void Prepare_For_Save(SobekCM_Item Bib, User_Object Current_User)
 {
     // Do nothing since there is only one rights statement
 }
        /// <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);
        }
예제 #13
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 = "Select the type which best categorizes this material and provide information about the larger body of work on the next line.";
                switch (CurrentLanguage)
                {
                case Web_Language_Enum.English:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.Spanish:
                    Acronym = defaultAcronym;
                    break;

                case Web_Language_Enum.French:
                    Acronym = defaultAcronym;
                    break;

                default:
                    Acronym = defaultAcronym;
                    break;
                }
            }

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

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

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

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

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

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

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

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

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

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

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

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

            Output.WriteLine("  <!-- Institutional Repository Material Type Element -->");
            Output.WriteLine("  <tr 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_irtype.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_irtype.ToUpper() + "\">" + Translator.Get_Translation(title, CurrentLanguage) + ":</a></td>");
            }
            Output.WriteLine("    <td>");
            Output.WriteLine("      <table>");
            Output.WriteLine("        <tr>");
            Output.WriteLine("          <td>");
            Output.WriteLine("            <div id=\"" + html_element_name_irtype + "_div\">");
            if (material_type.IndexOf("Select") == 0)
            {
                Output.WriteLine("              <select class=\"" + html_element_name_irtype + "_input_init\" name=\"" + id_name + "\" id=\"" + id_name + "\" onchange=\"javascript:ir_type_change()\" onfocus=\"javascript:textbox_enter('" + id_name + "', '" + html_element_name_irtype + "_input_focused')\" onblur=\"javascript:selectbox_leave('" + id_name + "', '" + html_element_name_irtype + "_input', '" + html_element_name_irtype + "_input_init')\" >");
            }
            else
            {
                Output.WriteLine("              <select class=\"" + html_element_name_irtype + "_input\" name=\"" + id_name + "\" id=\"" + id_name + "\" onchange=\"javascript:ir_type_change()\" onfocus=\"javascript:textbox_enter('" + id_name + "', '" + html_element_name_irtype + "_input_focused')\" onblur=\"javascript:selectbox_leave('" + id_name + "', '" + html_element_name_irtype + "_input', '" + html_element_name_irtype + "_input_init')\" >");
            }

            bool found_option = false;

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

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

            Output.WriteLine("  <!-- Institutional Repository Larger Body of Work (IR_Type_Element) -->");
            Output.WriteLine("  <tr align=\"left\">");
            Output.WriteLine("    <td width=\"" + LEFT_MARGIN + "px\">&nbsp;</td>");
            if (Read_Only)
            {
                Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\">" + Translator.Get_Translation(title, CurrentLanguage) + "</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_irtype.ToUpper() + "\"><b><acronym title=\"" + Acronym + "\"><span id=\"larger_body_label\">" + title + "</span></acronym></b></a></td>");
                }
                else
                {
                    Output.WriteLine("    <td valign=\"top\" class=\"metadata_label\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" target=\"_" + html_element_name_irtype.ToUpper() + "\"><b><span id=\"larger_body_label\">" + title + "</span></b></a></td>");
                }
            }


            if (Read_Only)
            {
                Output.Write("    <td>");
                Output.Write(larger_value);
                Output.WriteLine("</td>");
            }
            else
            {
                Output.WriteLine("    <td>");
                Output.WriteLine("      <table><tr><td>");
                Output.WriteLine("      <div id=\"" + html_element_name_irtype + "_div\">");
                Output.WriteLine("      <input name=\"" + id_name + "\" id=\"" + id_name + "\" class=\"" + html_element_name_irtype + "_input\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(larger_value.Replace("<i>", "").Replace("</i>", "")) + "\" onfocus=\"javascript:textbox_enter('" + id_name + "', '" + html_element_name_irtype + "_input_focused')\" onblur=\"javascript:textbox_leave('" + id_name + "', '" + html_element_name_irtype + "_input')\" /></div>");
                Output.WriteLine("    </td>");
                Output.WriteLine("         <td valign=\"bottom\" >");
                Output.WriteLine("            <a target=\"_" + html_element_name_irtype.ToUpper() + "\"  title=\"" + Translator.Get_Translation("Get help.", CurrentLanguage) + "\" href=\"" + Help_URL(Skin_Code, Base_URL) + "\" ><img border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
                Output.WriteLine("          </td>");
                Output.WriteLine("  </tr></table>");
                Output.WriteLine("  </td>");
            }

            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
        /// <summary> Constructor for a new instance of the Edit_Item_Metadata_MySobekViewer class </summary>
        /// <param name="User"> Authenticated user information </param>
        /// <param name="Current_Mode"> Mode / navigation information for the current request</param>
        /// <param name="All_Items_Lookup"> Allows individual items to be retrieved by various methods as <see cref="Single_Item"/> objects.</param>
        /// <param name="Current_Item"> Individual digital resource to be edited by the user </param>
        /// <param name="Code_Manager"> Code manager contains the list of all valid aggregation codes </param>
        /// <param name="HTML_Skin"> HTML Web skin which controls the overall appearance of this digital library </param>
        /// <param name="Icon_Table"> Dictionary of all the wordmark/icons which can be tagged to the items </param>
        /// <param name="Tracer">Trace object keeps a list of each method executed and important milestones in rendering</param>
        public Edit_Item_Metadata_MySobekViewer(User_Object User,
                                                SobekCM_Navigation_Object Current_Mode,
                                                Item_Lookup_Object All_Items_Lookup,
                                                SobekCM_Item Current_Item, Aggregation_Code_Manager Code_Manager,
                                                Dictionary <string, Wordmark_Icon> Icon_Table,
                                                SobekCM_Skin_Object HTML_Skin,
                                                Custom_Tracer Tracer)
            : base(User)
        {
            Tracer.Add_Trace("Edit_Item_Metadata_MySobekViewer.Constructor", String.Empty);

            currentMode    = Current_Mode;
            item           = Current_Item;
            itemList       = All_Items_Lookup;
            codeManager    = Code_Manager;
            iconList       = Icon_Table;
            webSkin        = HTML_Skin;
            popUpFormsHtml = String.Empty;


            // If the user cannot edit this item, go back
            if (!user.Can_Edit_This_Item(item))
            {
                currentMode.My_Sobek_Type = My_Sobek_Type_Enum.Home;
                HttpContext.Current.Response.Redirect(currentMode.Redirect_URL());
            }

            // Is this a project
            isProject = false;
            if (item.Bib_Info.SobekCM_Type == TypeOfResource_SobekCM_Enum.Project)
            {
                isProject = true;
            }

            string template_code = user.Edit_Template_Code;

            if ((isProject) || (item.Contains_Complex_Content) || (item.Using_Complex_Template))
            {
                template_code = user.Edit_Template_MARC_Code;
            }
            template = Cached_Data_Manager.Retrieve_Template(template_code, Tracer);
            if (template != null)
            {
                Tracer.Add_Trace("Edit_Item_Metadata_MySobekViewer.Constructor", "Found template in cache");
            }
            else
            {
                Tracer.Add_Trace("Edit_Item_Metadata_MySobekViewer.Constructor", "Reading template file");

                // Read this template
                Template_XML_Reader reader = new Template_XML_Reader();
                template = new Template();
                reader.Read_XML(SobekCM_Library_Settings.Base_MySobek_Directory + "templates\\" + template_code + ".xml", template, true);

                // Add the current codes to this template
                template.Add_Codes(Code_Manager);

                // Save this into the cache
                Cached_Data_Manager.Store_Template(template_code, template, Tracer);
            }

            // Get the current page number, or default to 1
            page = 1;
            if (currentMode.My_Sobek_SubMode.Length > 0)
            {
                if ((currentMode.My_Sobek_SubMode == "preview") || (currentMode.My_Sobek_SubMode == "marc") || (currentMode.My_Sobek_SubMode == "mets"))
                {
                    page = 0;
                }
                else
                {
                    page = 1;
                    bool isNumber = currentMode.My_Sobek_SubMode.All(Char.IsNumber);
                    if (isNumber)
                    {
                        if (isProject)
                        {
                            Double.TryParse(currentMode.My_Sobek_SubMode[0].ToString(), out page);
                        }
                        else
                        {
                            Double.TryParse(currentMode.My_Sobek_SubMode, out page);
                        }
                    }
                    else if (isProject)
                    {
                        if (Char.IsNumber(currentMode.My_Sobek_SubMode[0]))
                        {
                            Double.TryParse(currentMode.My_Sobek_SubMode[0].ToString(), out page);
                        }
                    }
                }
            }
        }
 /// <summary> Prepares the bib object for the save, by clearing any existing data in this element's related field(s) </summary>
 /// <param name="Bib"> Existing digital resource object which may already have values for this element's data field(s) </param>
 /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
 /// <remarks> This sets the flag to FALSE.  It will be set to TRUE if the checkbox is present (thus TRUE) in the return form </remarks>
 public override void Prepare_For_Save(SobekCM_Item Bib, User_Object Current_User)
 {
     Bib.Web.Additional_Work_Needed = 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 = "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);
        }
예제 #17
0
 /// <summary> Creates and returns the an instance of the <see cref="JPEG2000_ItemViewer"/> class for showing a zoomable
 /// JPEG2000 image from a page within a digital resource during execution of a single HTTP request. </summary>
 /// <param name="CurrentItem"> Digital resource object </param>
 /// <param name="CurrentUser"> Current user, who may or may not be logged on </param>
 /// <param name="CurrentRequest"> Information about the current request </param>
 /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
 /// <returns> Fully built and initialized <see cref="JPEG2000_ItemViewer"/> object </returns>
 /// <remarks> This method is called whenever a request requires the actual viewer to be created to render the HTML for
 /// the digital resource requested.  The created viewer is then destroyed at the end of the request </remarks>
 public iItemViewer Create_Viewer(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, Custom_Tracer Tracer)
 {
     return(new JPEG2000_ItemViewer(CurrentItem, CurrentUser, CurrentRequest, Tracer, ViewerCode, FileExtensions));
 }
예제 #18
0
 /// <summary> Creates and returns the an instance of the <see cref="Related_Images_ItemViewer"/> class for showing the
 /// thumbnail images (i.e., related images) associated with a digital resource during execution of a single HTTP request. </summary>
 /// <param name="CurrentItem"> Digital resource object </param>
 /// <param name="CurrentUser"> Current user, who may or may not be logged on </param>
 /// <param name="CurrentRequest"> Information about the current request </param>
 /// <param name="Tracer"> Trace object keeps a list of each method executed and important milestones in rendering </param>
 /// <returns> Fully built and initialized <see cref="Related_Images_ItemViewer"/> object </returns>
 /// <remarks> This method is called whenever a request requires the actual viewer to be created to render the HTML for
 /// the digital resource requested.  The created viewer is then destroyed at the end of the request </remarks>
 public virtual iItemViewer Create_Viewer(BriefItemInfo CurrentItem, User_Object CurrentUser, Navigation_Object CurrentRequest, Custom_Tracer Tracer)
 {
     return(new Related_Images_ItemViewer(CurrentItem, CurrentUser, CurrentRequest, Tracer, ViewerCode));
 }
예제 #19
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();
        }
예제 #20
0
 /// <summary> Flag indicates if the current user has access to this viewer for the item </summary>
 /// <param name="CurrentItem"> Digital resource to see if the current user has correct permissions to use this viewer </param>
 /// <param name="CurrentUser"> Current user, who may or may not be logged on </param>
 /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param>
 /// <returns> TRUE if the user has access to use this viewer, otherwise FALSE </returns>
 public virtual bool Has_Access(BriefItemInfo CurrentItem, User_Object CurrentUser, bool IpRestricted)
 {
     return(!IpRestricted);
 }
예제 #21
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);
 }
예제 #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="popup_form_builder"> Builder for any related popup forms for this element </param>
        /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
        /// <param name="CurrentLanguage"> Current user-interface language </param>
        /// <param name="Translator"> Language support object which handles simple translational duties </param>
        /// <param name="Base_URL"> Base URL for the current request </param>
        /// <remarks> This element appends a popup form to the popup_form_builder</remarks>
        public override void Render_Template_HTML(TextWriter Output, SobekCM_Item Bib, string Skin_Code, bool isMozilla, StringBuilder popup_form_builder, User_Object Current_User, Web_Language_Enum CurrentLanguage, Language_Support_Info Translator, string Base_URL)
        {
            // Check that an acronym exists
            if (Acronym.Length == 0)
            {
                const string defaultAcronym = "Enter information about any related items 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;
                }
            }

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

            // 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_related_item_term_" + item_index + "', 'form_relateditem_title_" + item_index + "', 375, 620, '" + isMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_related_item_" + item_index + "', 'form_related_item_term_" + item_index + "', 'form_relateditem_title_" + item_index + "', 375, 620 );\"><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_related_item_term_" + item_index + "', 'form_relateditem_title_" + item_index + "', 375, 620, '" + isMozilla.ToString() + "' );\" onclick=\"return popup_focus('form_related_item_" + item_index + "', 'form_related_item_term_" + item_index + "', 'form_relateditem_title_" + item_index + "', 375, 620 );\"><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
                    popup_form_builder.AppendLine("<!-- Related Item Form " + item_index + " -->");
                    popup_form_builder.AppendLine("<div class=\"related_item_popup_div\" id=\"form_related_item_" + item_index + "\" style=\"display:none;\">");
                    popup_form_builder.AppendLine("  <div class=\"popup_title\"><table width=\"100%\"><tr><td align=\"left\">EDIT RELATED ITEM</td><td align=\"right\"><a href=\"" + Help_URL(Skin_Code, Base_URL) + "\" alt=\"HELP\" target=\"_" + html_element_name.ToUpper() + "\" >?</a> &nbsp; <a href=\"#template\" alt=\"CLOSE\" onclick=\"close_related_item_form('form_related_item_" + item_index + "')\">X</a> &nbsp; </td></tr></table></div>");
                    popup_form_builder.AppendLine("  <br />");
                    popup_form_builder.AppendLine("  <table class=\"popup_table\">");

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

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

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

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

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

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

                    popup_form_builder.Append("</select></td>");
                    popup_form_builder.AppendLine("      <td width=\"255px\">Display Label: &nbsp; <input class=\"form_relateditem_medium_input\" name=\"form_relateditem_display_" + item_index + "\" id=\"form_relateditem_display_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisItem.URL_Display_Label) + "\" onfocus=\"javascript:textbox_enter('form_relateditem_display_" + item_index + "', 'form_relateditem_medium_input_focused')\" onblur=\"javascript:textbox_leave('form_relateditem_display_" + item_index + "', 'form_relateditem_medium_input')\" /></td>");
                    popup_form_builder.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;
                    }

                    popup_form_builder.AppendLine("    <tr><td>Title:</td><td colspan=\"2\"><input class=\"form_relateditem_large_input\" name=\"form_relateditem_title_" + item_index + "\" id=\"form_relateditem_title_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(related_title) + "\" onfocus=\"javascript:textbox_enter('form_relateditem_title_" + item_index + "', 'form_relateditem_large_input_focused')\" onblur=\"javascript:textbox_leave('form_relateditem_title_" + item_index + "', 'form_relateditem_large_input')\" /></td></tr>");
                    popup_form_builder.AppendLine("    <tr><td>URL:</td><td colspan=\"2\"><input class=\"form_relateditem_large_input\" name=\"form_relateditem_url_" + item_index + "\" id=\"form_relateditem_url_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisItem.URL) + "\" onfocus=\"javascript:textbox_enter('form_relateditem_url_" + item_index + "', 'form_relateditem_large_input_focused')\" onblur=\"javascript:textbox_leave('form_relateditem_url_" + item_index + "', 'form_relateditem_large_input')\" /></td></tr>");

                    // Add the system ID and ISSN row
                    popup_form_builder.AppendLine("    <tr><td>System ID:</td><td><input class=\"form_relateditem_medium_input\" name=\"form_relateditem_sobekid_" + item_index + "\" id=\"form_relateditem_sobekid_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(thisItem.SobekCM_ID) + "\" onfocus=\"javascript:textbox_enter('form_relateditem_sobekid_" + item_index + "', 'form_relateditem_medium_input_focused')\" onblur=\"javascript:textbox_leave('form_relateditem_sobekid_" + item_index + "', 'form_relateditem_medium_input')\" /></td>");
                    popup_form_builder.AppendLine("        <td>ISSN: &nbsp; <input class=\"form_relateditem_medium_input\" name=\"form_relateditem_issn_" + item_index + "\" id=\"form_relateditem_issn_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(issn) + "\" onfocus=\"javascript:textbox_enter('form_relateditem_issn_" + item_index + "', 'form_relateditem_medium_input_focused')\" onblur=\"javascript:textbox_leave('form_relateditem_issn_" + item_index + "', 'form_relateditem_medium_input')\" /></td></tr>");

                    // Add the OCLC and LCCN row
                    popup_form_builder.AppendLine("    <tr><td>OCLC:</td><td><input class=\"form_relateditem_medium_input\" name=\"form_relateditem_oclc_" + item_index + "\" id=\"form_relateditem_oclc_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(oclc) + "\" onfocus=\"javascript:textbox_enter('form_relateditem_oclc_" + item_index + "', 'form_relateditem_medium_input_focused')\" onblur=\"javascript:textbox_leave('form_relateditem_oclc_" + item_index + "', 'form_relateditem_medium_input')\" /></td>");
                    popup_form_builder.AppendLine("        <td>LCCN: &nbsp; <input class=\"form_relateditem_medium_input\" name=\"form_relateditem_lccn_" + item_index + "\" id=\"form_relateditem_lccn_" + item_index + "\" type=\"text\" value=\"" + HttpUtility.HtmlEncode(lccn) + "\" onfocus=\"javascript:textbox_enter('form_relateditem_lccn_" + item_index + "', 'form_relateditem_medium_input_focused')\" onblur=\"javascript:textbox_leave('form_relateditem_lccn_" + item_index + "', 'form_relateditem_medium_input')\" /></td></tr>");

                    // Close out this form
                    popup_form_builder.AppendLine("  </table>");
                    popup_form_builder.AppendLine("  <br />");
                    popup_form_builder.AppendLine("  <center><a href=\"#template\" onclick=\"return close_related_item_form('form_related_item_" + item_index + "');\"><img border=\"0\" src=\"" + Close_Button_URL(Skin_Code, Base_URL) + "\" alt=\"CLOSE\" /></a></center>");
                    popup_form_builder.AppendLine("</div>");
                    popup_form_builder.AppendLine();

                    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 valign=\"bottom\" >");
            if (Repeatable)
            {
                Output.WriteLine("            <img title=\"" + Translator.Get_Translation("Click to add a new related item", CurrentLanguage) + ".\" alt=\"+\" border=\"0px\" class=\"repeat_button\" src=\"" + Base_URL + 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 border=\"0px\" class=\"help_button\" src=\"" + Base_URL + HELP_BUTTON_URL + "\" /></a>");
            Output.WriteLine("          </td>");
            Output.WriteLine("        </tr>");
            Output.WriteLine("      </table>");
            Output.WriteLine("    </td>");
            Output.WriteLine("  </tr>");
            Output.WriteLine();
        }
 /// <summary> Method helps to render all 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> 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> 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();
        }
예제 #26
0
 /// <summary> Flag indicates if the current user has access to this viewer for the item </summary>
 /// <param name="CurrentItem"> Digital resource to see if the current user has correct permissions to use this viewer </param>
 /// <param name="CurrentUser"> Current user, who may or may not be logged on </param>
 /// <param name="IpRestricted"> Flag indicates if this item is IP restricted AND if the current user is outside the ranges </param>
 /// <returns> TRUE if the user has access to use this viewer, otherwise FALSE </returns>
 public bool Has_Access(BriefItemInfo CurrentItem, User_Object CurrentUser, bool IpRestricted)
 {
     // It can always be shown
     return(true);
 }
 /// <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> Prepares the bib object for the save, by clearing any existing data in this element's related field(s) </summary>
 /// <param name="Bib"> Existing digital resource object which may already have values for this element's data field(s) </param>
 /// <param name="Current_User"> Current user, who's rights may impact the way an element is rendered </param>
 /// <remarks> This clears any preexisting series title and other titles </remarks>
 public override void Prepare_For_Save(SobekCM_Item Bib, User_Object Current_User)
 {
     // Do nothing to prepare.. this is an input only element.. it moves up to standard subject area after entry
 }
        /// <summary> Constructor for a new instance of the Aliases_AdminViewer class </summary>
        /// <param name="User"> Authenticated user information </param>
        /// <param name="currentMode"> Mode / navigation information for the current request</param>
        /// <param name="IP_Restrictions"> List of all IP restrictions ranges used in this digital library to restrict access to certain digital resources </param>
        /// <param name="Tracer">Trace object keeps a list of each method executed and important milestones in rendering</param>
        /// <remarks> Postback from handling an edit or new item aggregation alias is handled here in the constructor </remarks>
        public IP_Restrictions_AdminViewer(User_Object User, SobekCM_Navigation_Object currentMode, IP_Restriction_Ranges IP_Restrictions, Custom_Tracer Tracer) : base(User)
        {
            Tracer.Add_Trace("IP_Restrictions_AdminViewer.Constructor", String.Empty);

            ipRestrictionInfo = IP_Restrictions;
            this.currentMode  = currentMode;

            // Ensure the user is the system admin
            if ((User == null) || (!User.Is_System_Admin))
            {
                currentMode.My_Sobek_Type = My_Sobek_Type_Enum.Home;
                HttpContext.Current.Response.Redirect(currentMode.Redirect_URL(), false);
            }

            // Determine if there is an specific IP address range for editing
            index = -1;
            if (currentMode.My_Sobek_SubMode.Length > 0)
            {
                if (!Int32.TryParse(currentMode.My_Sobek_SubMode, out index))
                {
                    index = -1;
                }
            }

            // If there was an index included, try to pull the information about it
            thisRange = null;
            details   = null;
            if ((index >= 1) && (index <= ipRestrictionInfo.Count))
            {
                thisRange = ipRestrictionInfo[index - 1];
                if (thisRange != null)
                {
                    details = SobekCM_Database.Get_IP_Restriction_Range_Details(thisRange.RangeID, Tracer);
                }
            }

            if ((currentMode.isPostBack) && (details != null) && (thisRange != null))
            {
                try
                {
                    // Get a reference to this form
                    NameValueCollection form = HttpContext.Current.Request.Form;

                    // Pull the main values
                    string title   = form["admin_title"].Trim();
                    string notes   = form["admin_notes"].Trim();
                    string message = form["admin_message"].Trim();

                    if (title.Length == 0)
                    {
                        title = thisRange.Title;
                    }

                    // Edit the main values in the database
                    SobekCM_Database.Edit_IP_Range(thisRange.RangeID, title, notes, message, Tracer);
                    thisRange.Title = title;
                    thisRange.Notes = notes;
                    thisRange.Item_Restricted_Statement = message;

                    // Now check each individual IP address range
                    string[] getKeys         = form.AllKeys;
                    int      single_ip_index = 0;
                    foreach (string thisKey in getKeys)
                    {
                        // Is this for a new ip address?
                        if (thisKey.IndexOf("admin_ipstart_") == 0)
                        {
                            // Get the basic information for this single ip address
                            string ip_index    = thisKey.Replace("admin_ipstart_", "");
                            string thisIpStart = form["admin_ipstart_" + ip_index].Trim();
                            string thisIpEnd   = form["admin_ipend_" + ip_index].Trim();
                            string thisIpNote  = form["admin_iplabel_" + ip_index].Trim();

                            // Does this match an existing IP range?
                            if ((ip_index.IndexOf("new") < 0) && (single_ip_index < details.Tables[1].Rows.Count))
                            {
                                // Get the pre-existing IP row
                                DataRow ipRow      = details.Tables[1].Rows[single_ip_index];
                                int     singleIpId = Convert.ToInt32(ipRow[0]);
                                if (thisIpStart.Length == 0)
                                {
                                    SobekCM_Database.Delete_Single_IP(singleIpId, Tracer);
                                }
                                else
                                {
                                    // Is this the same?
                                    if ((thisIpStart != ipRow[1].ToString().Trim()) || (thisIpEnd != ipRow[2].ToString().Trim()) || (thisIpNote != ipRow[3].ToString().Trim()))
                                    {
                                        int edit_point_count = thisIpStart.Count(thisChar => thisChar == '.');

                                        if (edit_point_count == 3)
                                        {
                                            SobekCM_Database.Edit_Single_IP(singleIpId, thisRange.RangeID, thisIpStart, thisIpEnd, thisIpNote, Tracer);
                                        }
                                    }
                                }

                                // Be ready to look at the next pre-existing IP range
                                single_ip_index++;
                            }
                            else
                            {
                                // Just add this as a new single ip address
                                if (thisIpStart.Length > 0)
                                {
                                    int add_point_count = thisIpStart.Count(thisChar => thisChar == '.');

                                    if (add_point_count == 3)
                                    {
                                        SobekCM_Database.Edit_Single_IP(-1, thisRange.RangeID, thisIpStart, thisIpEnd, thisIpNote, Tracer);
                                    }
                                }
                            }
                        }
                    }
                }
                catch (Exception)
                {
                    // Some error caught while handling postback
                }

                // Repopulate the restriction table
                DataTable ipRestrictionTbl = SobekCM_Database.Get_IP_Restriction_Ranges(Tracer);
                if (ipRestrictionTbl != null)
                {
                    IP_Restrictions.Populate_IP_Ranges(ipRestrictionTbl);
                }

                // Forward back to the main form
                currentMode.My_Sobek_SubMode = String.Empty;
                HttpContext.Current.Response.Redirect(currentMode.Redirect_URL());
            }
        }
예제 #30
0
 // Use this for initialization
 void Start()
 {
     renderers = gameObject.GetComponentsInChildren<MeshRenderer>();
     user = GameObject.FindObjectOfType<User_Object>();
 }
        /// <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 = "Enter the name of the committee chair for this thesis/dissertation";
            }

            // Is there an ETD object?
            string valueToDisplay            = string.Empty;
            Thesis_Dissertation_Info etdInfo = Bib.Get_Metadata_Module(GlobalVar.THESIS_METADATA_MODULE_KEY) as Thesis_Dissertation_Info;

            if (etdInfo != null)
            {
                valueToDisplay = etdInfo.Degree;
            }

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