protected override void OnDataBinding(EventArgs e) { var activities = ManagementActivity.GetActivity(Engine, CurrentItem); ActivitiesJson = ManagementActivity.ToJson(activities); ShowActivities = activities.Count > 0; base.OnDataBinding(e); }
protected override void OnDataBinding(EventArgs e) { var allVersions = Engine.Resolve <IVersionManager>().GetVersionsOf(CurrentItem.VersionOf.Value ?? CurrentItem, skip: 0, take: 4); var activities = ManagementActivity.GetActivity(Engine, CurrentItem); ActivitiesJson = ManagementActivity.ToJson(activities); ShowActivities = activities.Count > 0; base.OnDataBinding(e); }
private void NotifyEditing(IEngine engine, HttpContextWrapper context) { var selection = new SelectionUtility(context, engine); if (Convert.ToBoolean(context.Request["changes"])) { engine.AddActivity(new ManagementActivity { Operation = "Edit", PerformedBy = context.User.Identity.Name, ID = selection.SelectedItem.ID, Path = selection.SelectedItem.Path }); } var activities = ManagementActivity.GetActivity(engine, selection.SelectedItem); context.Response.ContentType = "application/json"; context.Response.Write(ManagementActivity.ToJson(activities)); }
private void NotifyEditing(IEngine engine, HttpContextWrapper context) { var selection = new SelectionUtility(context, engine); if (Convert.ToBoolean(context.Request["changes"])) { engine.AddActivity(new ManagementActivity { Operation = "Edit", PerformedBy = context.User.Identity.Name, ID = selection.SelectedItem.ID, Path = selection.SelectedItem.Path }); } var activities = ManagementActivity.GetActivity(engine, selection.SelectedItem); var messages = engine.Resolve <N2.Edit.Collaboration.ManagementMessageCollector>() .GetMessages(CollaborationContext.Create(engine.Resolve <IProfileRepository>(), selection.SelectedItem, context)) .ToList(); context.Response.ContentType = "application/json"; context.Response.Write(ManagementActivity.ToJson(activities, messages)); }
protected override void OnDataBinding(EventArgs e) { try { var allVersions = Engine.Resolve <IVersionManager>() .GetVersionsOf(CurrentItem.VersionOf.Value ?? CurrentItem, skip: 0, take: 4); var activities = ManagementActivity.GetActivity(Engine, CurrentItem); ActivitiesJson = ManagementActivity.ToJson(activities); ShowActivities = activities.Count > 0; base.OnDataBinding(e); } catch (Exception ex) { Logger.Error(ex); activityTemplatePlaceholder.Visible = false; errorDisplay.Visible = true; errorDisplayText.Text = ex.ToString(); } }