Environment: Sharepoint2010
Requirement: Insert or display the form or list contents on the Approval Task page to have the content and audit on the same page.
Modified file: Wrktaskip.aspx (remember to back up before changing)
Path where file is located: C:\Program files\common Files\Microsoft Shared\Web Server Extensions\14\template\layouts
List effect:
Form effects:
Specific practices:
Copy wrktaskip.aspx and jquery-1.8.3.js two pieces to C:\Program Files\Common files\microsoft Shared\Web Server Extensions\14\ Template\layouts, remember to back up the source file before copying it.
Wrktaskip.aspx Code:
<%--_lcid= "1033" _version= "14.0.4758" _dal= "1"--%><%--_localbinding--%><%@ Assembly Name= " Microsoft.Office.Workflow.Pages, version=14.0.0.0, Culture=neutral, publickeytoken=71e9bce111e9429c "%><%@ Assembly name= "Microsoft.SharePoint, version=14.0.0.0, Culture=neutral, publickeytoken=71e9bce111e9429c"%> <% @ Page language= "C #" dynamicmasterpagefile= "~masterurl/default.master" inherits= " Microsoft.Office.Workflow.WrkTaskIPPage "enablesessionstate=" true "autoeventwireup=" false "%> <%@ Import Namespace= "Microsoft.SharePoint.WebControls"%> <%@ 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=" InfoPath "namespace=" Microsoft.Office.InfoPath.Server.Controls " Assembly= "Microsoft.Office.InfoPath.Server, version=14.0.0.0, culture=neutral, publickeytoken=71e9bce111e9429c"% ><%@ Register tagprefix= "wssuc" tagname= "linkstable" src= "/_controltemplates/linkstable.ascx"%> <%@ Register tagprefix= "Wssuc" tagname= "inputformsection" src= "/_controltemplates/inputformsection.ascx"%> <%@ Register tagprefix= "Wssuc" tagname= "Inputformcontrol" src= "/_controltemplates/inputformcontrol.ascx"%> <%@ Register tagprefix= "WSSUC" tagname= "linksection" src= "/_controltemplates/linksection.ascx"%> <%@ Register tagprefix= "Wssuc" tagname= "buttonsection" src= "/_controltemplates/buttonsection.ascx"%> <%@ Register tagprefix= "Wssuc" tagname= "ActionBar" src= "/_controltemplates/actionbar.ascx"%> <%@ Register Tagprefix= "Wssuc" tagname= "ToolBar" src= "/_controltemplates/toolbar.ascx"%> <%@ Register tagprefix= "Wssuc" Tagname= "ToolBarButton" src= "/_controltemplates/toolbarbutton.ascx"%> <%@ Register tagprefix= "Wssuc" TagName= "Welcome" src= "/_controltemplates/welcome.ascx"%><asp:content contentplaceholderid= " Placeholderadditionalpagehead "runat=" Server "></asp:content><asp:content contentplaceholderid=" Placeholderpagetitle "runat=" Server > <sharepoint:encodedliteral runat= "text=" <% $Resources:d LC, Wrktask_pagetitle%> "encodemethod= ' HtmlEncode '/></asp:content><asp:content ContentPlaceHolderId=" Placeholderpagetitleintitlearea "runat=" Server "> <a tabindex=1 id=onetidlisthlink href=<% Sphttputility.addquote (Sphttputility.urlpathencode (list.defaultviewurl,true), response.output);%>><% Sphttputility.htmlencode (list.title,response.output);%></a>: <% Sphttputility.htmlencode (M_taskName, Response.Output); %> </asp:content><asp:content contentplaceholderid= "Placeholdertitlebreadcrumb" runat= "Server" > <asp : SiteMapPath sitemapprovider= "Spcontentmapprovider" id= "Contentmap" skiplinktext= "" runat= "Server"/></asp: Content><asp:content contentplaceholderid= "Placeholderleftnavbar" runat= "Server" ></asp:Content> <asp:content contentplaceholderid= "PlaceHolderMain" runat= "Server" > <sharepoint:formcomponent Templatename= "Workfloweditformtoolbar" controlmode= "Edit" runat= "server"/> <table class= "Ms-informationbar" Style= "margin-top:10px;" border= "0" cellpadding= "2" cellspacing= "0" width= "100%" > <tr> <TD width= "Ten" valign= "center" style= "PADDING:4PX;" > /> </td> <td id= "Itemlink" & Gt <% Sphttputility.noencode (m_pagedescription,response.output); %></td> </tr> </table><div style= "width:100%;height:250px;border:1px solid #666; overflow -x:hidden; Overflow-y:auto "> <iframe width=" 100% "height=" 400px "frameborder=" no "style=" Margin-top:-140px;margin-left : 50px; " Id= "Showitemdisplayform" ></iframe> </div> <infopath:xmlformview id= "Xmlformcontrol" runat= " Server "style=" width:100%; " /> <sharepoint:formdigest runat=server/><script src= "/_layouts/jquery-1.8.3.js" ></script> <script language= "JavaScript" > var showDialog = function () {var itemlink = $ ("#itemLink"). Find ("a"). attr ("href"); var Newitemlink; var v = itemlink.split ("/"); V.splice (3, v.length-3); var homepageurl = V.join ("/"); if (itemlink.substring (itemlink.length-4, itemlink.length) = = ". Xml") {Newitemlink = Homepageurl + "/_layout S/formserveR.aspx? xmllocation= "+ encodeURI (itemlink) +" &defaultitemopen=1 "; } else {Newitemlink = Itemlink + "&isdlg=1"; } $ ("#showItemDisplayForm"). attr ("src", newitemlink); } _spbodyonloadfunctionnames.push (' ShowDialog '); </script></asp:Content>
If you have a better way, please share next.
Modify Task Display wrktaskip.aspx page