mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Move OPC packaging module to Futures.
--HG-- branch : dev
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using Orchard.Localization;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
namespace Futures.Modules.Packaging {
|
||||
public class AdminMenu : INavigationProvider {
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder.Add(T("Site Configuration"), "11", menu => menu
|
||||
.Add(T("Module Packaging"), "5.0", item => item
|
||||
.Action("Index", "Packaging", new { area = "Futures.Modules.Packaging" })));
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,12 +1,11 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using Futures.Modules.Packaging.Services;
|
||||
using Orchard.Commands;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Modules.Packaging.Services;
|
||||
|
||||
namespace Orchard.Modules.Packaging.Commands {
|
||||
[OrchardFeature("Orchard.Modules.Packaging")]
|
||||
namespace Futures.Modules.Packaging.Commands {
|
||||
public class PackagingCommands : DefaultOrchardCommandHandler {
|
||||
private readonly IExtensionManager _extensionManager;
|
||||
private readonly IPackageBuilder _packageBuilder;
|
@@ -1,7 +1,7 @@
|
||||
using System.IO;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Orchard.Modules.Packaging.Controllers {
|
||||
namespace Futures.Modules.Packaging.Controllers {
|
||||
public class DownloadStreamResult : ActionResult {
|
||||
public string FileName { get; set; }
|
||||
public string ContentType { get; set; }
|
@@ -1,16 +1,16 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Futures.Modules.Packaging.Services;
|
||||
using Futures.Modules.Packaging.ViewModels;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Modules.Packaging.Services;
|
||||
using Orchard.Modules.Packaging.ViewModels;
|
||||
using Orchard.Themes;
|
||||
using Orchard.UI.Admin;
|
||||
using Orchard.UI.Notify;
|
||||
|
||||
namespace Orchard.Modules.Packaging.Controllers {
|
||||
[Admin, Themed, OrchardFeature("Orchard.Modules.Packaging")]
|
||||
namespace Futures.Modules.Packaging.Controllers {
|
||||
[Themed, Admin]
|
||||
public class PackagingController : Controller {
|
||||
private readonly IPackageManager _packageManager;
|
||||
private readonly IPackageSourceManager _packageSourceManager;
|
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}</ProjectGuid>
|
||||
<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Futures.Modules.Packaging</RootNamespace>
|
||||
<AssemblyName>Futures.Modules.Packaging</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
<Compile Include="Commands\PackagingCommands.cs" />
|
||||
<Compile Include="Controllers\DownloadStreamResult.cs" />
|
||||
<Compile Include="Controllers\PackagingController.cs" />
|
||||
<Compile Include="Services\AtomExtensions.cs" />
|
||||
<Compile Include="Services\IPackageBuilder.cs" />
|
||||
<Compile Include="Services\IPackageExpander.cs" />
|
||||
<Compile Include="Services\IPackageManager.cs" />
|
||||
<Compile Include="Services\IPackageSourceManager.cs" />
|
||||
<Compile Include="Services\PackageBuilder.cs" />
|
||||
<Compile Include="Services\PackageData.cs" />
|
||||
<Compile Include="Services\PackageEntry.cs" />
|
||||
<Compile Include="Services\PackageExpander.cs" />
|
||||
<Compile Include="Services\PackageManager.cs" />
|
||||
<Compile Include="Services\PackageSource.cs" />
|
||||
<Compile Include="Services\PackageSourceManager.cs" />
|
||||
<Compile Include="ViewModels\PackagingHarvestViewModel.cs" />
|
||||
<Compile Include="ViewModels\PackagingModulesViewModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ViewModels\PackagingSourcesViewModel.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Module.txt" />
|
||||
<Content Include="Views\Packaging\Harvest.ascx" />
|
||||
<Content Include="Views\Packaging\Modules.ascx" />
|
||||
<Content Include="Views\Packaging\Sources.ascx" />
|
||||
<Content Include="Views\Packaging\_Subnav.ascx" />
|
||||
<Content Include="Views\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Content\" />
|
||||
<Folder Include="Models\" />
|
||||
<Folder Include="Scripts\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target> -->
|
||||
<Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>False</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>40980</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
11
src/Orchard.Web/Modules/Futures.Modules.Packaging/Module.txt
Normal file
11
src/Orchard.Web/Modules/Futures.Modules.Packaging/Module.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
name: Futures.Modules.Packaging
|
||||
antiforgery: enabled
|
||||
author: The Orchard Team
|
||||
website: http://orchardproject.net
|
||||
version: 0.1
|
||||
orchardversion: 0.1.2010.0312
|
||||
description: The packaging module enables packaging modules using the OPC format.
|
||||
features:
|
||||
Futures.Modules.Packaging:
|
||||
Description: Standard module and feature management.
|
||||
Category: Developer
|
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Futures.Modules.Packaging")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Futures.Modules.Packaging")]
|
||||
[assembly: AssemblyCopyright("Copyright © CodePlex Foundation 2009")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("f483c19e-56fd-442f-89fe-efed8153dbb0")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@@ -0,0 +1,14 @@
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
static class AtomExtensions {
|
||||
public static string Atom(this XElement entry, string localName) {
|
||||
var element = entry.Element(AtomXName(localName));
|
||||
return element != null ? element.Value : null;
|
||||
}
|
||||
|
||||
public static XName AtomXName(string localName) {
|
||||
return XName.Get(localName, "http://www.w3.org/2005/Atom");
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
using System.IO;
|
||||
using Orchard;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public interface IPackageBuilder : IDependency {
|
||||
Stream BuildPackage(ExtensionDescriptor extensionDescriptor);
|
||||
}
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
using System.IO;
|
||||
using Orchard;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public interface IPackageExpander : IDependency {
|
||||
void ExpandPackage(Stream packageStream);
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
using Orchard;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public interface IPackageManager : IDependency {
|
||||
PackageData Harvest(string extensionName);
|
||||
PackageData Download(string feedItemId);
|
||||
|
||||
void Push(PackageData packageData, string feedUrl);
|
||||
void Install(PackageData packageData);
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Orchard;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public interface IPackageSourceManager : IDependency {
|
||||
IEnumerable<PackageSource> GetSources();
|
||||
void AddSource(PackageSource source);
|
||||
void RemoveSource(Guid id);
|
||||
void UpdateLists();
|
||||
|
||||
IEnumerable<PackageEntry> GetModuleList();
|
||||
}
|
||||
}
|
@@ -3,18 +3,12 @@ using System.IO;
|
||||
using System.IO.Packaging;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
using Orchard.FileSystems.WebSite;
|
||||
|
||||
namespace Orchard.Modules.Packaging.Services {
|
||||
public interface IPackageBuilder : IDependency {
|
||||
Stream BuildPackage(ExtensionDescriptor extensionDescriptor);
|
||||
}
|
||||
|
||||
[OrchardFeature("Orchard.Modules.Packaging")]
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public class PackageBuilder : IPackageBuilder {
|
||||
private readonly IExtensionManager _extensionManager;
|
||||
private readonly IWebSiteFolder _webSiteFolder;
|
||||
@@ -35,10 +29,7 @@ namespace Orchard.Modules.Packaging.Services {
|
||||
public XDocument Project { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public Stream BuildPackage(ExtensionDescriptor extensionDescriptor) {
|
||||
|
||||
|
||||
var context = new CreateContext();
|
||||
BeginPackage(context);
|
||||
try {
|
||||
@@ -157,7 +148,5 @@ namespace Orchard.Modules.Packaging.Services {
|
||||
static void EndPackage(CreateContext context) {
|
||||
context.Package.Close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
using System.IO;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public class PackageData {
|
||||
public string ExtensionName { get; set; }
|
||||
public string ExtensionVersion { get; set; }
|
||||
|
||||
public Stream PackageStream { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
using System.ServiceModel.Syndication;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public class PackageEntry {
|
||||
public PackageSource Source { get; set; }
|
||||
public SyndicationFeed SyndicationFeed { get; set; }
|
||||
public SyndicationItem SyndicationItem { get; set; }
|
||||
public string PackageStreamUri { get; set; }
|
||||
}
|
||||
}
|
@@ -3,19 +3,12 @@ using System.IO;
|
||||
using System.IO.Packaging;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
using Orchard.FileSystems.VirtualPath;
|
||||
using Orchard.FileSystems.WebSite;
|
||||
|
||||
namespace Orchard.Modules.Packaging.Services {
|
||||
public interface IPackageExpander : IDependency {
|
||||
void ExpandPackage(Stream packageStream);
|
||||
}
|
||||
|
||||
[OrchardFeature("Orchard.Modules.Packaging")]
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public class PackageExpander : IPackageExpander {
|
||||
private const string ContentTypePrefix = "Orchard ";
|
||||
private readonly IExtensionManager _extensionManager;
|
@@ -1,30 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.IO.Packaging;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using Orchard.Environment.Extensions;
|
||||
|
||||
namespace Orchard.Modules.Packaging.Services {
|
||||
|
||||
public class PackageData {
|
||||
public string ExtensionName { get; set; }
|
||||
public string ExtensionVersion { get; set; }
|
||||
|
||||
public Stream PackageStream { get; set; }
|
||||
}
|
||||
|
||||
public interface IPackageManager : IDependency {
|
||||
PackageData Harvest(string extensionName);
|
||||
PackageData Download(string feedItemId);
|
||||
|
||||
void Push(PackageData packageData, string feedUrl);
|
||||
void Install(PackageData packageData);
|
||||
}
|
||||
|
||||
[OrchardFeature("Orchard.Modules.Packaging")]
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public class PackageManager : IPackageManager {
|
||||
private readonly IExtensionManager _extensionManager;
|
||||
private readonly IPackageSourceManager _packageSourceManager;
|
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public class PackageSource {
|
||||
public Guid Id { get; set; }
|
||||
public string FeedUrl { get; set; }
|
||||
}
|
||||
}
|
@@ -3,48 +3,12 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.ServiceModel.Syndication;
|
||||
using System.Web;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.FileSystems.AppData;
|
||||
|
||||
namespace Orchard.Modules.Packaging.Services {
|
||||
public interface IPackageSourceManager : IDependency {
|
||||
IEnumerable<PackageSource> GetSources();
|
||||
void AddSource(PackageSource source);
|
||||
void RemoveSource(Guid id);
|
||||
void UpdateLists();
|
||||
|
||||
IEnumerable<PackageEntry> GetModuleList();
|
||||
}
|
||||
|
||||
public class PackageSource {
|
||||
public Guid Id { get; set; }
|
||||
public string FeedUrl { get; set; }
|
||||
}
|
||||
|
||||
public class PackageEntry {
|
||||
public PackageSource Source { get; set; }
|
||||
public SyndicationFeed SyndicationFeed { get; set; }
|
||||
public SyndicationItem SyndicationItem { get; set; }
|
||||
public string PackageStreamUri { get; set; }
|
||||
}
|
||||
|
||||
|
||||
static class AtomExtensions {
|
||||
public static string Atom(this XElement entry, string localName) {
|
||||
var element = entry.Element(AtomXName(localName));
|
||||
return element != null ? element.Value : null;
|
||||
}
|
||||
|
||||
public static XName AtomXName(string localName) {
|
||||
return XName.Get(localName, "http://www.w3.org/2005/Atom");
|
||||
}
|
||||
}
|
||||
|
||||
[OrchardFeature("Orchard.Modules.Packaging")]
|
||||
namespace Futures.Modules.Packaging.Services {
|
||||
public class PackageSourceManager : IPackageSourceManager {
|
||||
private readonly IAppDataFolder _appDataFolder;
|
||||
private static readonly XmlSerializer _sourceSerializer = new XmlSerializer(typeof(List<PackageSource>), new XmlRootAttribute("Sources"));
|
||||
@@ -132,8 +96,5 @@ namespace Orchard.Modules.Packaging.Services {
|
||||
|
||||
return packageInfos.ToArray();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,18 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Futures.Modules.Packaging.Services;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
using Orchard.Modules.Packaging.Services;
|
||||
|
||||
namespace Orchard.Modules.Packaging.ViewModels {
|
||||
public class PackagingModulesViewModel {
|
||||
public IEnumerable<PackageEntry> Modules { get; set; }
|
||||
}
|
||||
public class PackagingSourcesViewModel {
|
||||
public IEnumerable<PackageSource> Sources { get; set; }
|
||||
}
|
||||
namespace Futures.Modules.Packaging.ViewModels {
|
||||
public class PackagingHarvestViewModel {
|
||||
public IEnumerable<PackageSource> Sources { get; set; }
|
||||
public IEnumerable<ExtensionDescriptor> Extensions { get; set; }
|
@@ -0,0 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Futures.Modules.Packaging.Services;
|
||||
|
||||
namespace Futures.Modules.Packaging.ViewModels {
|
||||
public class PackagingModulesViewModel {
|
||||
public IEnumerable<PackageEntry> Modules { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Futures.Modules.Packaging.Services;
|
||||
|
||||
namespace Futures.Modules.Packaging.ViewModels {
|
||||
public class PackagingSourcesViewModel {
|
||||
public IEnumerable<PackageSource> Sources { get; set; }
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Modules.Packaging.ViewModels.PackagingHarvestViewModel>" %>
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Futures.Modules.Packaging.ViewModels.PackagingHarvestViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<h1>
|
||||
<%: Html.TitleForPage(T("Packaging").ToString(), T("Harvest Packages").ToString())%></h1>
|
@@ -1,4 +1,4 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Modules.Packaging.ViewModels.PackagingModulesViewModel>" %>
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Futures.Modules.Packaging.ViewModels.PackagingModulesViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<h1>
|
||||
<%: Html.TitleForPage(T("Packaging").ToString(), T("Browse Packages").ToString())%></h1>
|
@@ -1,4 +1,4 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Modules.Packaging.ViewModels.PackagingSourcesViewModel>" %>
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Futures.Modules.Packaging.ViewModels.PackagingSourcesViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<h1>
|
||||
<%: Html.TitleForPage(T("Packaging").ToString(), T("Edit Sources").ToString())%></h1>
|
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<configuration>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
|
||||
</httpHandlers>
|
||||
|
||||
<!--
|
||||
Enabling request validation in view pages would cause validation to occur
|
||||
after the input has already been processed by the controller. By default
|
||||
MVC performs request validation before a controller processes the input.
|
||||
To change this behavior apply the ValidateInputAttribute to a
|
||||
controller or action.
|
||||
-->
|
||||
<pages
|
||||
validateRequest="false"
|
||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<controls>
|
||||
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
62
src/Orchard.Web/Modules/Futures.Modules.Packaging/Web.config
Normal file
62
src/Orchard.Web/Modules/Futures.Modules.Packaging/Web.config
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Note: As an alternative to hand editing this file you can use the
|
||||
web admin tool to configure settings for your application. Use
|
||||
the Website->Asp.Net Configuration option in Visual Studio.
|
||||
A full list of settings and comments can be found in
|
||||
machine.config.comments usually located in
|
||||
\Windows\Microsoft.Net\Framework\v2.x\Config
|
||||
-->
|
||||
<configuration>
|
||||
<appSettings/>
|
||||
<connectionStrings>
|
||||
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
|
||||
</connectionStrings>
|
||||
<system.web>
|
||||
<!--
|
||||
Set compilation debug="true" to insert debugging
|
||||
symbols into the compiled page. Because this
|
||||
affects performance, set this value to true only
|
||||
during development.
|
||||
-->
|
||||
<compilation debug="false" targetFramework="4.0">
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc"/>
|
||||
<add namespace="System.Web.Mvc.Ajax"/>
|
||||
<add namespace="System.Web.Mvc.Html"/>
|
||||
<add namespace="System.Web.Routing"/>
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web>
|
||||
<system.web.extensions/>
|
||||
<!--
|
||||
The system.webServer section is required for running ASP.NET AJAX under Internet
|
||||
Information Services 7.0. It is not necessary for previous version of IIS.
|
||||
-->
|
||||
<system.webServer>
|
||||
<modules runAllManagedModulesForAllRequests="true">
|
||||
</modules>
|
||||
<handlers>
|
||||
<remove name="UrlRoutingHandler"/>
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
@@ -9,6 +9,3 @@ features:
|
||||
Orchard.Modules:
|
||||
Description: Standard module and feature management.
|
||||
Category: Core
|
||||
Orchard.Modules.Packaging:
|
||||
Description: Standard module and feature management.
|
||||
Category: Developer
|
||||
|
@@ -45,7 +45,6 @@
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
@@ -64,9 +63,6 @@
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Web.Mobile" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WindowsBase">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
@@ -74,14 +70,6 @@
|
||||
<Compile Include="Controllers\AdminController.cs" />
|
||||
<Compile Include="Extensions\StringExtensions.cs" />
|
||||
<Compile Include="Models\ModuleFeature.cs" />
|
||||
<Compile Include="Packaging\Commands\PackagingCommands.cs" />
|
||||
<Compile Include="Packaging\Controllers\DownloadStreamResult.cs" />
|
||||
<Compile Include="Packaging\Controllers\PackagingController.cs" />
|
||||
<Compile Include="Packaging\Services\PackageExpander.cs" />
|
||||
<Compile Include="Packaging\Services\PackageBuilder.cs" />
|
||||
<Compile Include="Packaging\Services\PackageManager.cs" />
|
||||
<Compile Include="Packaging\Services\PackageSourceManager.cs" />
|
||||
<Compile Include="Packaging\ViewModels\PackagingModulesViewModel.cs" />
|
||||
<Compile Include="ViewModels\FeaturesViewModel.cs" />
|
||||
<Compile Include="Models\Module.cs" />
|
||||
<Compile Include="Permissions.cs" />
|
||||
@@ -100,10 +88,6 @@
|
||||
<Content Include="styles\jquery.switchable.css" />
|
||||
<Content Include="Views\Admin\Add.ascx" />
|
||||
<Content Include="Views\Admin\Index.ascx" />
|
||||
<Content Include="Views\Packaging\_Subnav.ascx" />
|
||||
<Content Include="Views\Packaging\Harvest.ascx" />
|
||||
<Content Include="Views\Packaging\Sources.ascx" />
|
||||
<Content Include="Views\Packaging\Modules.ascx" />
|
||||
<Content Include="Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
Reference in New Issue
Block a user