protected override void  OnDataBinding(EventArgs e)
        {
            var activities = ManagementActivity.GetActivity(Engine, CurrentItem);

            ActivitiesJson = ManagementActivity.ToJson(activities);
            ShowActivities = activities.Count > 0;

            base.OnDataBinding(e);
        }
示例#2
0
        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);
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }
示例#5
0
        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();
            }
        }