<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %> <%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %> <%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %> <%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <% SPSite spServer = SPControl.GetContextSite(Context); SPWeb spWeb = SPControl.GetContextWeb(Context); %> <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,pagetitle_sharepoint%>" EncodeMethod='HtmlEncode'/> <% SPSite spServer = SPControl.GetContextSite(Context); SPWeb spWeb = SPControl.GetContextWeb(Context); %>
.aspx
<% if (bFromValidDocLib == false) { %> <% if (iIndex == 0 && spWeb.DoesUserHavePermissions(SPBasePermissions.ManageLists)) { %> <% } %>
<% SPListCollection spLists = spWeb.Lists; int iIndex = 0; System.Collections.Generic.SortedList assetLibs = new System.Collections.Generic.SortedList(); System.Collections.Generic.SortedList notAssetLibs = new System.Collections.Generic.SortedList(); for (int i = 0 ;i < spLists.Count ;i++) { SPList spList = spLists[i]; SPDocumentLibrary spDocLib = spList as SPDocumentLibrary; if ((!spList.Hidden) && (spList.BaseType == SPBaseType.DocumentLibrary) && spDocLib != null && !spDocLib.IsCatalog && (spList.BaseTemplate != SPListTemplateType.PictureLibrary)) { bool bHasPermission = false; bool oldState = SPSecurity.CatchAccessDeniedException; try { SPSecurity.CatchAccessDeniedException = false; bHasPermission = spList.DoesUserHavePermissions(SPBasePermissions.AddListItems); } catch (UnauthorizedAccessException) { } finally { SPSecurity.CatchAccessDeniedException = oldState; } if (bHasPermission) { bDocLibAvailable = true; if (spList.IsSiteAssetsLibrary) { assetLibs.Add(spList.Title, spList); } else { notAssetLibs.Add(spList.Title, spList); } } } } foreach(System.Collections.Generic.KeyValuePair oneEntry in assetLibs) { if (iIndex == 0) { %> <% } SPList oneEntryValue = oneEntry.Value as SPList; if (oneEntryValue != null) { %> <% } iIndex++; } if (iIndex == 0) { %>
<% } else { %> /> <% } if (bFromValidFolder) { %> /> <% } %> DISABLED <% } %> value="" accesskey="" />
<%@ Register TagPrefix="wssuc" TagName="TopNavBar" src="~/_controltemplates/TopNavBar.ascx" %>