<xsl:if test="ddwrt:IfHasRights('2')">
<div>
<img src="/_layouts/images/caladd.gif"
alt=""/> <a><xsl:attribute
name="onclick">javascript:NewItem2(event,
"/_layouts/listform.aspx?PageType=8&ListId={}&RootFolder=");javascript:return
false;</xsl:attribute> <xsl:attribute
name="href">/_layouts/listform.aspx?PageType=8&ListId={}&RootFolder=</xsl:attribute>Add
new announcement</a>
</div>
</xsl:if>
From C:\Program Files\Microsoft Office\Office14\CAML2XSL.XSL:
<!-- keep in sync with global.cs!!!
EmptyMask =0x0000000000000000,
// list/document perms =0x000000000000XXXX,
ViewListItems =0x0000000000000001,
AddListItems =0x0000000000000002,
EditListItems =0x0000000000000004,
DeleteListItems =0x0000000000000008,
ApproveItems =0x0000000000000010,
OpenItems =0x0000000000000020,
ViewVersions =0x0000000000000040,
DeleteVersions =0x0000000000000080,
CancelCheckout =0x0000000000000100,
ManagePersonalViews =0x0000000000000200,
// UnusedList10 =0x0000000000000400, /* obsolete ManageListPermission */
ManageLists =0x0000000000000800,
ViewFormPages =0x0000000000001000,
// UnusedList20 =0x0000000000002000,
// UnusedList40 =0x0000000000004000,
// UnusedList80 =0x0000000000008000,
// web level perms =0x0000XXXXXXXX0000,
Open =0x0000000000010000,
ViewPages =0x0000000000020000,
AddAndCustomizePages =0x0000000000040000,
ApplyThemeAndBorder =0x0000000000080000,
ApplyStyleSheets =0x0000000000100000,
ViewUsageData =0x0000000000200000,
CreateSSCSite =0x0000000000400000,
ManageSubwebs =0x0000000000800000,
CreateGroups =0x0000000001000000,
ManagePermissions =0x0000000002000000,
BrowseDirectories =0x0000000004000000,
BrowseUserInfo =0x0000000008000000,
AddDelPrivateWebParts =0x0000000010000000,
UpdatePersonalWebParts =0x0000000020000000,
ManageWeb =0x0000000040000000,
UseRemoteAPIs =0x0000002000000000,
ManageAlerts =0x0000004000000000,
CreateAlerts =0x0000008000000000,
EditMyUserInfo =0x0000010000000000,
// special perms =0xXXXX000000000000,
EnumeratePermissions =0x4000000000000000,
// end of list
FullMask =0x7FFFFFFFFFFFFFFF,
-->
Resources:
http://sharepoint.indigoreality.com/2012/05/04/sharepoint-2010-ifhasrightspermissionmask/
SPBasePermissions enumeration
Tuesday, July 22, 2014
Saturday, May 31, 2014
Thursday, May 29, 2014
PowerShell - Custom List - Delete All Versions
$web = Get-SPWeb "http://localhost"
$list = $web.Lists["MyList"]
foreach ($item in $list.Items)
{
$item.Versions.DeleteAll()
}
$list.EnableVersioning=$False
$list.update()
$web.Dispose();
Update: This seems to have issues, so need to follow up with better solution.
$list = $web.Lists["MyList"]
foreach ($item in $list.Items)
{
$item.Versions.DeleteAll()
}
$list.EnableVersioning=$False
$list.update()
$web.Dispose();
Update: This seems to have issues, so need to follow up with better solution.
Labels:
PowerShell
Friday, May 23, 2014
Get Content Database Name with PowerShell
Get-SPDatabase | Where-Object { $_.TypeName -eq "Configuration Database" } | Select Name
Sunday, May 18, 2014
Windows Explorer - Favorites
Windows Explorer > Right-Click 'Favorites' > Add current location to Favorites.
C:\Windows\System32\drivers\etc
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14
C:\inetpub\wwwroot\wss\VirtualDirectories
C:\ProgramData\Microsoft\SharePoint\Config
C:\Windows\System32\drivers\etc
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14
C:\inetpub\wwwroot\wss\VirtualDirectories
C:\ProgramData\Microsoft\SharePoint\Config
Wednesday, May 14, 2014
Filter on Workflow Status
NotStarted = 0
FailedOnStart = 1
InProgress = 2
ErrorOccurred = 3
StoppedByUser = 4
Completed = 5
FailedOnStartRetrying = 6
ErrorOccurredRetrying = 7
ViewQueryOverflow = 8
Max = 15
OOTB Approval WF:
Canceled = 15
Approved = 0×10 (16)
Rejected = 0×11 (17)
References:
http://chanakyajayabalan.wordpress.com/2010/03/08/sharepoint-workflow-status-codes/
FailedOnStart = 1
InProgress = 2
ErrorOccurred = 3
StoppedByUser = 4
Completed = 5
FailedOnStartRetrying = 6
ErrorOccurredRetrying = 7
ViewQueryOverflow = 8
Max = 15
OOTB Approval WF:
Canceled = 15
Approved = 0×10 (16)
Rejected = 0×11 (17)
References:
http://chanakyajayabalan.wordpress.com/2010/03/08/sharepoint-workflow-status-codes/
Friday, May 9, 2014
Word 2010 - Show Document Panel
Word 2010 > 'File' tab > 'Info' > 'Properties' dropdown > 'Show Document Panel'
Subscribe to:
Comments (Atom)