HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/RMourik/bassol.nl/wwwroot/CMSModules/MediaLibrary/Tools/Library_List.aspx.cs
using System;

using CMS.Helpers;
using CMS.PortalEngine;
using CMS.UIControls;
using CMS.ExtendedControls.ActionsConfig;
using CMS.Modules;

[UIElement("CMS.MediaLibrary", "MediaLibrary")]
public partial class CMSModules_MediaLibrary_Tools_Library_List : CMSMediaLibraryPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        // New item link
        CurrentMaster.HeaderActions.AddAction(new HeaderAction
        {
            Text = GetString("media.list.newlibrary"),
            RedirectUrl = ResolveUrl("Library_New.aspx")
        });

        PageTitle.TitleText = GetString("media.list.medialibrary");
        elemList.OnEdit += new EventHandler(elemList_OnEdit);
    }


    private void elemList_OnEdit(object sender, EventArgs e)
    {
        URLHelper.Redirect(GetEditUrl());
    }


    /// <summary>
    /// Creates URL for editing.
    /// </summary>
    private String GetEditUrl()
    {
        UIElementInfo uiChild = UIElementInfoProvider.GetUIElementInfo("CMS.MediaLibrary", "EditMediaLibrary");
        if (uiChild != null)
        {
            return UIContextHelper.GetElementUrl(uiChild, false, elemList.SelectedItemID);
        }

        return String.Empty;
    }
}