• [Forward]Use the SharePoint My Tasks Web Part outside of My Sites


    from http://yalla.itgroove.net/2014/04/use-sharepoint-tasks-web-part-outside-sites/

    Use the SharePoint My Tasks Web Part outside of My Sites

    Ever wanted to get the functionality of the “My Tasks” web part, outside your SharePoint 2013 My Site? My team did – adding it to our regular Consultant Dashboard would complete the picture of a comprehensive central employee central dashboard where all one’s tasks, issues, and other key metrics are available in one spot. 1

    The first question is, how to get the My Tasks widget, which essentially seems to be a web part, exported and re-usable elsewhere. This web part is joined at the hip to the Work Management Service and is not available via the GUI to be re-deployed elsewhere as a standard web part.

    Although it seems that perhaps in SP 2013 pre-RTM the web part was available to be deployed as a web part via the web part category “Content Rollup” > My Tasks, it ain’t there currently. Would love to know why it was apparently pulled, but that’s not going to distract from the mission at hand.

    Simply exporting the web part and importing elsewhere results in a dismal blankness. No errors, no data either. The web part really seems to want to live in the My Site context.

    What worked for me was:

    1. Going to a “Tasks” page on a My Site, and exporting the Tasks Web Part 2. Using SharePoint Designer to copy the related sub-pages that are linked from the top menu (AllTasks.aspx, Highlights.aspx, Settings.aspx, RecentlyAssigned.aspx, EditTask.aspx, & CompletedTasks.aspx) from the root of the My Site into the destination team site – this allows you to still access those views from the destination site 3. Edit those sub-pages to remove the Personal redirect control reference: <SPSWC:PersonalSpaceRedirect runat=”server”/> That will prevent visitors to the view pages from being redirected to a non-existent My Site. 4. Import the Tasks Web Part into the destination Site.

    All is well, we are now rocking with the My Tasks web part added on whatever page we desire: 2

    You can customize the XML manifest for the web part to taste as well:

    01 <webParts>
    02  <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
    03  <metaData>
    04  <type name="Microsoft.Office.Server.WorkManagement.UI.TaskListWebPart,
    05 Microsoft.Office.Server.WorkManagement.UI, Version=15.0.0.0, Culture=neutral,
    06 PublicKeyToken=71e9bce111e9429c" />
    07  <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
    08  </metaData>
    09  <data>
    10  <properties>
    11  <property name="HelpUrl" type="string" />
    12  <property name="Hidden" type="bool">False</property>
    13  <property name="ChromeType" type="chrometype">Default</property>
    14  <property name="AllowClose" type="bool">True</property>
    15  <property name="ShowRefreshStatus" type="bool">True</property>
    16  <property name="ExportMode" type="exportmode">All</property>
    17  <property name="AllowMinimize" type="bool">True</property>
    18  <property name="AllowEdit" type="bool">True</property>
    19  <property name="Direction" type="direction">NotSet</property>
    20  <property name="AllowConnect" type="bool">True</property>
    21  <property name="MissingAssembly" type="string">Cannot import this Web Part.</property>
    22  <property name="TaskListType" type="Microsoft.Sharepoint.WorkManagement.TaskListType,
    23 Microsoft.Office.Server.WorkManagement.UI, Version=15.0.0.0, Culture=neutral,
    24 PublicKeyToken=71e9bce111e9429c">Active</property>
    25  <property name="TimelineViewData" type="string" null="true" />
    26  <property name="HelpMode" type="helpmode">Modeless</property>
    27  <property name="Description" type="string"></property>
    28  <property name="TitleIconImageUrl" type="string" />
    29  <property name="CatalogIconImageUrl" type="string" />
    30  <property name="ChromeState" type="chromestate">Normal</property>
    31  <property name="AllowZoneChange" type="bool">True</property>
    32  <property name="LastQueryTime" type="datetime" />
    33  <property name="Height" type="string" />
    34  <property name="ShowViewSelector" type="bool">False</property>
    35  <property name="Width" type="string" />
    36  <property name="Title" type="string">My Tasks</property>
    37  <property name="AllowHide" type="bool">True</property>
    38  <property name="TitleUrl" type="string">~sitecollection/AllTasks.aspx</property>
    39  </properties>
    40  </data>
    41  </webPart>
    42  </webParts>

    The only task remaining that would really smooth it is to figure out how to modify the “views” inside the My Tasks Web Part properties – for example, it’d be  desirable to filter out Completed tasks from the “ProjectSites” view. No idea where that view lives though. ;)

  • 相关阅读:
    【计算机视觉】OpenCV篇(6)
    【计算机视觉】OpenCV篇(5)
    C++解决头文件相互包含问题的方法
    【计算机视觉】OpenCV篇(4)
    java mysql多次事务 模拟依据汇率转账,并存储转账信息 分层完成 dao层 service 层 client层 连接池使用C3p0 写入库使用DBUtils
    MySQL事务隔离级别 解决并发问题
    在jdbc基础上进阶一小步的C3p0 连接池(DBCP 不能读xml配置文件,已淘汰) 和DBUtils 中两个主要类QueryRunner和ResultSetHandler的使用
    java数据库 JDBC操作MySQL数据库常用API 部门表和员工表 创建表 添加数据 查询数据
    java XML 通过BeanUtils的population为对象赋值 根据用户选择进行dom4j解析
    java基础 xml 使用dom4j解析 xml文件 servlet根据pattern 找到class
  • 原文地址:https://www.cnblogs.com/csts/p/3824803.html
Copyright © 2020-2023  润新知