mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#20255: Moving some workflow activities to custom features
Work Item: 20255
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Comments.Models;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Workflows.Models;
|
||||
using Orchard.Workflows.Services;
|
||||
|
||||
namespace Orchard.Comments.Activities {
|
||||
[OrchardFeature("Orchard.Comments.Workflows")]
|
||||
public class CloseCommentsActivity : Task {
|
||||
|
||||
public CloseCommentsActivity() {
|
||||
|
@@ -9,5 +9,10 @@ Features:
|
||||
Orchard.Comments:
|
||||
Name: Comments
|
||||
Description: Standard content item comments.
|
||||
Dependencies: Settings, Orchard.Tokens, Orchard.Workflows
|
||||
Dependencies: Settings, Orchard.Tokens
|
||||
Category: Social
|
||||
Orchard.Comments.Workflows:
|
||||
Name: Comments Workflows Activities
|
||||
Description: Provides workflow activities for comments management.
|
||||
Category: Workflows
|
||||
Dependencies: Orchard.Workflows
|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Data;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Roles.Models;
|
||||
@@ -11,6 +12,7 @@ using Orchard.Workflows.Models;
|
||||
using Orchard.Workflows.Services;
|
||||
|
||||
namespace Orchard.Roles.Activities {
|
||||
[OrchardFeature("Orchard.Roles.Workflows")]
|
||||
public class AssignRoleActivity : Task {
|
||||
private readonly IWorkContextAccessor _workContextAccessor;
|
||||
private readonly IRepository<UserRolesPartRecord> _repository;
|
||||
|
@@ -1,12 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Security;
|
||||
using Orchard.Workflows.Models;
|
||||
using Orchard.Workflows.Services;
|
||||
|
||||
namespace Orchard.Roles.Activities {
|
||||
[OrchardFeature("Orchard.Roles.Workflows")]
|
||||
public class IsInRoleActivity : Task {
|
||||
private readonly IWorkContextAccessor _workContextAccessor;
|
||||
|
||||
|
@@ -2,13 +2,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Roles.Models;
|
||||
using Orchard.Security;
|
||||
using Orchard.Workflows.Models;
|
||||
using Orchard.Workflows.Services;
|
||||
|
||||
namespace Orchard.Workflows.Activities {
|
||||
namespace Orchard.Roles.Activities {
|
||||
[OrchardFeature("Orchard.Roles.Workflows")]
|
||||
public class UserTaskActivity : Event {
|
||||
private readonly IWorkContextAccessor _workContextAccessor;
|
||||
|
||||
|
@@ -3,16 +3,18 @@ using System.Linq;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.Data;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Roles.Activities;
|
||||
using Orchard.Security;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Workflows.Activities;
|
||||
using Orchard.Workflows.Models;
|
||||
using Orchard.Workflows.Services;
|
||||
|
||||
namespace Orchard.Roles.Drivers {
|
||||
[OrchardFeature("Orchard.Roles.Workflows")]
|
||||
public class UserTaskDriver : ContentPartDriver<ContentPart> {
|
||||
private readonly IWorkflowManager _workflowManager;
|
||||
private readonly IRepository<AwaitingActivityRecord> _awaitingActivityRepository;
|
||||
|
@@ -2,11 +2,13 @@
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Roles.Services;
|
||||
|
||||
namespace Orchard.Roles.Forms {
|
||||
[OrchardFeature("Orchard.Roles.Workflows")]
|
||||
public class UserTaskForms : IFormProvider {
|
||||
private readonly IRoleService _roleService;
|
||||
protected dynamic Shape { get; set; }
|
||||
|
@@ -4,7 +4,15 @@ Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.7.1
|
||||
OrchardVersion: 1.7.1
|
||||
Description: The roles module is adding the ability to assign roles to users. It's also providing a set of default roles for which other modules can define default permissions.
|
||||
FeatureDescription: Standard user roles.
|
||||
Category: Core
|
||||
Dependencies: Orchard.Users, Orchard.Workflows
|
||||
Description: Provides anti-spam services to protect your content from malicious submissions.
|
||||
Features:
|
||||
Orchard.Roles:
|
||||
Name: Roles
|
||||
Description: Standard user roles.
|
||||
Category: Core
|
||||
Dependencies: Orchard.Users
|
||||
Orchard.Roles.Workflows:
|
||||
Name: Roles Workflows Activities
|
||||
Description: Provides an anti-spam filter based on Akismet.
|
||||
Category: Workflows
|
||||
Dependencies: Orchard.Workflows
|
||||
|
Reference in New Issue
Block a user