Monday, July 28, 2014
InfoPath 2010 - Web Browser Form
'File' > 'Info' > 'Advanced form options' (At the bottom) > 'Form Options' > 'Compatibility' > 'Form type: Web Browser Form'
Labels:
InfoPath
Wednesday, July 23, 2014
Content Query Web Part (CQWP) - Author with Presence
Exerpt taken directly from:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/fb79d25c-78b7-452e-9c94-bb5e29063b0c/displaying-authors-with-presence-information-in-a-content-query-web-part-cqwp?forum=sharepointcustomizationprevious
Add the following template to "ContentQueryMain":
This is dependant on adding a reference to the ddwrt namespace in:
xmlns:ddwrt=http://schemas.microsoft.com/WebParts/v2/DataView/runtime
And it is called and referenced like the following in ItemStyles.xsl :
References:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/fb79d25c-78b7-452e-9c94-bb5e29063b0c/displaying-authors-with-presence-information-in-a-content-query-web-part-cqwp?forum=sharepointcustomizationprevious
http://social.technet.microsoft.com/Forums/sharepoint/en-US/fb79d25c-78b7-452e-9c94-bb5e29063b0c/displaying-authors-with-presence-information-in-a-content-query-web-part-cqwp?forum=sharepointcustomizationprevious
Add the following template to "ContentQueryMain":
<xsl:template name="OuterTemplate.AuthorPresence">
<xsl:param name="Author" select="." />
<xsl:variable name="sEmail" select="ddwrt:UserLookup(string($Author) ,'EMail')" />
<xsl:variable name="sID" select="ddwrt:UserLookup(string($Author) ,'ID')" />
<a href="{concat('/_Layouts/userdisp.aspx?ID=', $sID)}" onclick="GoToLinkOrDialogNewWindow(this);return false;">
<xsl:value-of select="$Author" />
</a>
<img src="/_layouts/images/blank.gif" height="1" width="3" />
<a href="javascript:" class="ms-imnlink">
<img width="12" height="12" border="0" src="/_layouts/images/blank.gif" valign="middle" class="ms-imnImg" name="imnmark" alt="No presence information" title="" id="{concat('MWP_pawn_',$ClientId,'_',$sID,',type=sip')}" sip="{$sEmail}"/>
</a>
</xsl:template>
This is dependant on adding a reference to the ddwrt namespace in
xmlns:ddwrt=http://schemas.microsoft.com/WebParts/v2/DataView/runtime
And it is called and referenced like the following in ItemStyles.xsl :
<xsl:variable name="DisplayAuthor">
<xsl:call-template name="OuterTemplate.AuthorPresence">
<xsl:with-param name="Author" select="@Author" />
</xsl:call-template>
</xsl:variable>
<p>Created By: <xsl:copy-of select="$DisplayAuthor" /></p>
References:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/fb79d25c-78b7-452e-9c94-bb5e29063b0c/displaying-authors-with-presence-information-in-a-content-query-web-part-cqwp?forum=sharepointcustomizationprevious
Tuesday, July 22, 2014
XSL Security Trimming without SPSecurityTrimmedControl - ddwrt IfHasRights()
<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
<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
Subscribe to:
Posts (Atom)