Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
In umbraco 4.7 for the last edit dashboard control is it possible to update so that you can also put the editor name next to node name? Also does the last edit only show last edits for currently logged in user or is that list for all users?
Regards
Ismail
Hi Ismail,
You could create a new inline method to effectively override the PrintNodeName one? Like so...
<%@ Control Language="c#" AutoEventWireup="True" Codebehind="LatestEdits.ascx.cs" Inherits="dashboardUtilities.LatestEdits" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> <link href="/umbraco_client/propertypane/style.css" rel="stylesheet" /> <script runat="server"> public string PrintLine(object nodeId, object date, object userId) { var nodeName = PrintNodeName(nodeId, date); int id; if (int.TryParse(userId.ToString(), out id) && !string.IsNullOrWhiteSpace(nodeName)) { var user = umbraco.BusinessLogic.User.GetUser(id); if (user != null) { return string.Format("{0} by {1} <br/>", nodeName.Replace("<br/>", string.Empty), user.Name); } } return nodeName; } </script> <asp:Repeater id="Repeater1" runat="server"> <HeaderTemplate> <div class="propertypane"> <div class="guiDialogNormal" style="margin: 10px"> <h2><%=umbraco.ui.Text("defaultdialogs", "lastEdited")%>:</h2> </HeaderTemplate> <ItemTemplate> <%# PrintLine(DataBinder.Eval(Container.DataItem, "NodeId"), DataBinder.Eval(Container.DataItem, "datestamp"), DataBinder.Eval(Container.DataItem, "userId")) %> </ItemTemplate> <FooterTemplate> </div> </div> </FooterTemplate> </asp:Repeater>
You could extend it to only display currently logged in user - umbraco.BusinessLogic.User.GetCurrent()
Enjoy! (Keep in mind that upgrades will overwrite this!)
Cheers, Lee.
It only displays the currently logged in user! The real question is "how do I get the control to display all users?"
I've just had to do this for a client, and it seems as if the Writer is the last user to edit the document, which is a User object, with a "Name"
var d = new Document(int.Parse(nodeId.ToString())); var by = d.Writer.Name;
Just in case anyone else gets befuddled.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Last edit dashboard
In umbraco 4.7 for the last edit dashboard control is it possible to update so that you can also put the editor name next to node name? Also does the last edit only show last edits for currently logged in user or is that list for all users?
Regards
Ismail
Hi Ismail,
You could create a new inline method to effectively override the PrintNodeName one? Like so...
You could extend it to only display currently logged in user - umbraco.BusinessLogic.User.GetCurrent()
Enjoy! (Keep in mind that upgrades will overwrite this!)
Cheers, Lee.
It only displays the currently logged in user! The real question is "how do I get the control to display all users?"
I've just had to do this for a client, and it seems as if the Writer is the last user to edit the document, which is a User object, with a "Name"
Just in case anyone else gets befuddled.
is working on a reply...