Exemple #1
0
        public void Process(PopulateScribanMailActionModelArgs args)
        {
            var blog = _blogManager.GetCurrentBlog(args.WorkflowPipelineArgs.DataItem);

            if (blog != null)
            {
                args.AddModel(ModelKey, blog);
            }
        }
Exemple #2
0
        public void Process(PopulateScribanMailActionModelArgs args)
        {
            if (args.CommentItem == null)
            {
                return;
            }

            var entryItem = new CommentItem(args.WorkflowPipelineArgs.DataItem);

            args.AddModel(ModelKey, entryItem);
        }
Exemple #3
0
        public void Process(PopulateScribanMailActionModelArgs args)
        {
            if (args.EntryItem == null)
            {
                return;
            }

            var entryItem = new EntryItem(args.EntryItem);

            args.AddModel(EntryModelKey, entryItem);

            if (!string.IsNullOrEmpty(entryItem.InnerItem.Statistics.CreatedBy))
            {
                var createdByUser = GetUser(entryItem.InnerItem.Statistics.CreatedBy);
                args.AddModel(CreatedByModelKey, createdByUser.Profile);
            }

            if (!string.IsNullOrEmpty(entryItem.InnerItem.Statistics.UpdatedBy))
            {
                var updatedByUser = GetUser(entryItem.InnerItem.Statistics.UpdatedBy);
                args.AddModel(UpdatedByModelKey, updatedByUser.Profile);
            }
        }
        public void Process(PopulateScribanMailActionModelArgs args)
        {
            var dataItem = args.WorkflowPipelineArgs.DataItem;
            var workflow = dataItem.State.GetWorkflow();

            var events = new WorkflowEvent[0];

            if (workflow != null)
            {
                events = workflow.GetHistory(dataItem);
            }

            args.AddModel(ModelKey, events);
        }
Exemple #5
0
 public void Process(PopulateScribanMailActionModelArgs args)
 {
     args.AddModel(ModelKey, _user ?? Context.User);
 }
Exemple #6
0
 public void Process(PopulateScribanMailActionModelArgs args)
 {
     args.AddModel(ModelKey, DateTime.Now);
 }
Exemple #7
0
 public void Process(PopulateScribanMailActionModelArgs args)
 {
     args.AddModel(ModelKey, _site ?? Context.Site);
 }
        public void Process(PopulateScribanMailActionModelArgs args)
        {
            var nextStateItem = GetNextStateItem(args.WorkflowPipelineArgs.ProcessorItem.InnerItem);

            args.AddModel(ModelKey, nextStateItem == null ? string.Empty : nextStateItem.Name);
        }