mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Compare commits
317 Commits
1.9.1
...
feature/re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfe2c296ec | ||
|
|
3036396ae6 | ||
|
|
27da7125b8 | ||
|
|
fd1b06f72d | ||
|
|
a2d3e41dad | ||
|
|
645c36a2dd | ||
|
|
6c04c416c7 | ||
|
|
863761d30a | ||
|
|
ad4a702f7c | ||
|
|
298b2fb930 | ||
|
|
95eecd30b9 | ||
|
|
537adf9cba | ||
|
|
85b06375a0 | ||
|
|
a431bb0cb0 | ||
|
|
784e1c0961 | ||
|
|
2c10b0df98 | ||
|
|
2654a2c47c | ||
|
|
ed214246d8 | ||
|
|
76132f2691 | ||
|
|
41b245560c | ||
|
|
e054a833af | ||
|
|
9a2eaf7ac9 | ||
|
|
89c5b2f7de | ||
|
|
b6db85b8af | ||
|
|
4e61c3314d | ||
|
|
b37951e205 | ||
|
|
6bce34f379 | ||
|
|
c8f2c27311 | ||
|
|
22fa33c06f | ||
|
|
bbf6700e1a | ||
|
|
c2b0041e1c | ||
|
|
70697b8c5e | ||
|
|
504f484b19 | ||
|
|
2508f503b7 | ||
|
|
1093e16a81 | ||
|
|
1fe436e05a | ||
|
|
b18f153e6a | ||
|
|
c75ba007e6 | ||
|
|
b5b3ffea8e | ||
|
|
b05dcf9a56 | ||
|
|
3c7fffc320 | ||
|
|
b580995e4b | ||
|
|
2873eb8991 | ||
|
|
eebe29fec3 | ||
|
|
aaef6d8810 | ||
|
|
379ae61e34 | ||
|
|
dbba4e2787 | ||
|
|
27365a71d9 | ||
|
|
6a5028b80a | ||
|
|
e021218b3c | ||
|
|
993e6a1e43 | ||
|
|
0318db4c53 | ||
|
|
7758eb66f2 | ||
|
|
e7ceb732b1 | ||
|
|
03a193b6c2 | ||
|
|
38705580c8 | ||
|
|
1d6cb27d01 | ||
|
|
6b0985a44e | ||
|
|
28168c0550 | ||
|
|
9d6937c792 | ||
|
|
583ff8951a | ||
|
|
5c688267fa | ||
|
|
2c496a36db | ||
|
|
4967fa807b | ||
|
|
18166bd274 | ||
|
|
23e525206b | ||
|
|
b1c782f560 | ||
|
|
9dbf30cd10 | ||
|
|
ca4fb40bdf | ||
|
|
315f271fcc | ||
|
|
c435a98670 | ||
|
|
42dae3edf3 | ||
|
|
4e7e274d85 | ||
|
|
9966e13fa3 | ||
|
|
f3fc2b53ba | ||
|
|
1a9b7af4ac | ||
|
|
0c7fd67dca | ||
|
|
6063ba31d0 | ||
|
|
7bf2c702a1 | ||
|
|
61d432ba4c | ||
|
|
7cdb9ecf53 | ||
|
|
1aefd0fdbd | ||
|
|
ae61c81575 | ||
|
|
31e3072328 | ||
|
|
29042d10f2 | ||
|
|
6636527006 | ||
|
|
aacf0b2476 | ||
|
|
88ac0d2879 | ||
|
|
723c177fe3 | ||
|
|
622b191ad5 | ||
|
|
c192ade6a9 | ||
|
|
104cf7d5f4 | ||
|
|
45aeb7b467 | ||
|
|
d6c452466c | ||
|
|
a4edee5474 | ||
|
|
0e47295b9f | ||
|
|
745e88805c | ||
|
|
db66ec941c | ||
|
|
fb923f09e0 | ||
|
|
95a073ff93 | ||
|
|
a3a252fb19 | ||
|
|
5560cd76db | ||
|
|
d2ad3e31bb | ||
|
|
6d58498b82 | ||
|
|
5a828da403 | ||
|
|
c68d212681 | ||
|
|
0bd279cc89 | ||
|
|
34ddbbd371 | ||
|
|
de9fc2fb5b | ||
|
|
e066e39070 | ||
|
|
6e3d00b2d9 | ||
|
|
8beec81217 | ||
|
|
d782d83db7 | ||
|
|
20fe55a458 | ||
|
|
298f30e628 | ||
|
|
81dade1ab4 | ||
|
|
8a7a300414 | ||
|
|
31a325a810 | ||
|
|
bde7d900c0 | ||
|
|
550b778b8b | ||
|
|
9893eb7430 | ||
|
|
ffcccf7ae1 | ||
|
|
23f3f29a47 | ||
|
|
60ce2d777c | ||
|
|
f8ab1c509e | ||
|
|
fb717b0e2e | ||
|
|
56032dd815 | ||
|
|
a721352797 | ||
|
|
ab8162347e | ||
|
|
6763bd8bb8 | ||
|
|
8f281ef9d9 | ||
|
|
8421b2f7e8 | ||
|
|
55f2fb24c2 | ||
|
|
071733495e | ||
|
|
13b012d212 | ||
|
|
202dbc3866 | ||
|
|
ce630f980c | ||
|
|
67de77fe08 | ||
|
|
6183c8783e | ||
|
|
bb13163ac3 | ||
|
|
7415d6d5cc | ||
|
|
99f7285e80 | ||
|
|
61fe66d806 | ||
|
|
4da549abf3 | ||
|
|
1e83068b8c | ||
|
|
059b6c38e0 | ||
|
|
34008c469e | ||
|
|
9bf6ac5718 | ||
|
|
801d58183a | ||
|
|
443b03fd67 | ||
|
|
09d232612a | ||
|
|
d1ae7380e4 | ||
|
|
0283dc22c5 | ||
|
|
95221229ac | ||
|
|
f5b9a76675 | ||
|
|
5f30667df1 | ||
|
|
8976cc11d1 | ||
|
|
c3c8edf300 | ||
|
|
064ee72d6d | ||
|
|
cb7a52b25c | ||
|
|
bcf457d3f3 | ||
|
|
22b961f7d4 | ||
|
|
f84361d231 | ||
|
|
2a57a15363 | ||
|
|
316c6e3262 | ||
|
|
15ccba2b81 | ||
|
|
82602369c6 | ||
|
|
1f10abb9ea | ||
|
|
f98c5e27f6 | ||
|
|
3c94d48f59 | ||
|
|
d4a8df3e99 | ||
|
|
3e2dfe0609 | ||
|
|
52c897fd02 | ||
|
|
7ebaf2fd5c | ||
|
|
052a80474f | ||
|
|
f2b8d68345 | ||
|
|
301792f5ed | ||
|
|
3760e12029 | ||
|
|
1cfbfbce92 | ||
|
|
f932cc394f | ||
|
|
865f583be2 | ||
|
|
c73d6c0a91 | ||
|
|
e963fac2b9 | ||
|
|
b4c578a2c5 | ||
|
|
9e66ee6560 | ||
|
|
55edf7ccfd | ||
|
|
085feeb118 | ||
|
|
92de1f7207 | ||
|
|
9491a5750b | ||
|
|
635abd7456 | ||
|
|
74a71321de | ||
|
|
fa3f1cbc70 | ||
|
|
2dc5448ee0 | ||
|
|
02b889a925 | ||
|
|
2c45b9b13e | ||
|
|
5479fe9bcb | ||
|
|
e0aa89b668 | ||
|
|
ba409819f2 | ||
|
|
324214e812 | ||
|
|
ba9e1679b8 | ||
|
|
3311c9a8a4 | ||
|
|
a11c92ae50 | ||
|
|
7689fe7394 | ||
|
|
379ac040e1 | ||
|
|
cd479efdae | ||
|
|
b86f7146f8 | ||
|
|
fc09661fd6 | ||
|
|
1a9be8c57a | ||
|
|
f2f9d8c1ca | ||
|
|
ceaa36c329 | ||
|
|
ce6876eacf | ||
|
|
a919aab936 | ||
|
|
ff461b3945 | ||
|
|
5a5d2f9ae8 | ||
|
|
c7094ab46b | ||
|
|
e6b84ad587 | ||
|
|
af6282c275 | ||
|
|
278c8c656a | ||
|
|
3c0c903c10 | ||
|
|
67da9bce29 | ||
|
|
1551a7dd81 | ||
|
|
d2fc47eb2d | ||
|
|
8dbd003f61 | ||
|
|
d273134df3 | ||
|
|
13fe3649a8 | ||
|
|
d3f5765f5b | ||
|
|
6b18883e24 | ||
|
|
b9973d91d8 | ||
|
|
6afbc78395 | ||
|
|
fa40f4d8b0 | ||
|
|
b771e3e67e | ||
|
|
a2df93bf39 | ||
|
|
23e773910f | ||
|
|
c9d30d6cc2 | ||
|
|
6615ea961e | ||
|
|
6baf308b1f | ||
|
|
c91ff87773 | ||
|
|
21d80434e8 | ||
|
|
c0a06becd0 | ||
|
|
41d3e13a71 | ||
|
|
e72d4639db | ||
|
|
0c2e655c7e | ||
|
|
6932fdeac5 | ||
|
|
f9523a32b8 | ||
|
|
84a7c1fccb | ||
|
|
3a1c4db64c | ||
|
|
5de70ecdef | ||
|
|
0395d33f71 | ||
|
|
df483c3a8e | ||
|
|
e508385dcb | ||
|
|
96b41fb9b7 | ||
|
|
eb517fccaf | ||
|
|
fcbd77c02a | ||
|
|
c32d4f485b | ||
|
|
b639d893c0 | ||
|
|
5dabbf7aec | ||
|
|
a746532212 | ||
|
|
201408bd59 | ||
|
|
7c0f4500eb | ||
|
|
af8df72f5e | ||
|
|
54c53b7a12 | ||
|
|
dd34d87ac9 | ||
|
|
dacdbdffb2 | ||
|
|
8a300065c9 | ||
|
|
f5e4ef8fe5 | ||
|
|
b239a492b4 | ||
|
|
195d8711f9 | ||
|
|
7be9428fac | ||
|
|
df9eb83a6c | ||
|
|
73ee4d1e37 | ||
|
|
8f84a011b6 | ||
|
|
a9df078ce3 | ||
|
|
838cd0a99a | ||
|
|
eb6285012a | ||
|
|
65e951eee1 | ||
|
|
bfa6f1326e | ||
|
|
1a889594d9 | ||
|
|
21b1fb9105 | ||
|
|
6727e61f6c | ||
|
|
c525bda388 | ||
|
|
d5f75a242d | ||
|
|
24776bf9ee | ||
|
|
79e4aa199f | ||
|
|
d6a0242433 | ||
|
|
b88d08b0ff | ||
|
|
456e2ccbbd | ||
|
|
cbb5a2f9fc | ||
|
|
3e6043b6d7 | ||
|
|
3bb36ab010 | ||
|
|
0d9a4a295c | ||
|
|
ee1b7a5088 | ||
|
|
2cfcdfaa8b | ||
|
|
bcb6f2c4ac | ||
|
|
db0c8c3d1f | ||
|
|
06070fbb03 | ||
|
|
f8e82be4b9 | ||
|
|
566d23ec55 | ||
|
|
ef135d348c | ||
|
|
441e6056fa | ||
|
|
1bc9adae0d | ||
|
|
eca6f9177d | ||
|
|
e3249cc02c | ||
|
|
c9ebd1db67 | ||
|
|
1729e73a73 | ||
|
|
3241458017 | ||
|
|
8383572ce1 | ||
|
|
1a02d106a8 | ||
|
|
c044118b3f | ||
|
|
11dc9309f0 | ||
|
|
42d7eeec18 | ||
|
|
ffd68ec5d6 | ||
|
|
721004306d | ||
|
|
804b4bbc7b | ||
|
|
765c265977 | ||
|
|
68c0e67aee | ||
|
|
fac9080326 | ||
|
|
344d9d77be |
@@ -1,4 +1,8 @@
|
||||
FOR %%b in (
|
||||
FOR %%b in (
|
||||
"%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
|
||||
"%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
|
||||
"%ProgramFiles%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
|
||||
|
||||
"%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"
|
||||
"%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
|
||||
"%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# Orchard
|
||||
|
||||
Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
|
||||
|
||||
[](https://gitter.im/OrchardCMS/Orchard?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
## About The Orchard Project
|
||||
|
||||
#### Please visit our website at http://orchardproject.net for the most current information about this project.
|
||||
@@ -16,8 +19,8 @@ Our mission is to empower our users and foster a dedicated and diverse community
|
||||
There are many ways you can [contribute to Orchard](http://orchardproject.net/contribution): you can [fix bugs](https://github.com/OrchardCMS/Orchard/issues), contribute modules and themes to [our gallery](http://gallery.orchardproject.net/), [write documentation](https://github.com/OrchardCMS/OrchardDoc), [translate Orchard](http://orchardproject.net/localize), or answer questions [on our forums](http://orchard.codeplex.com/discussions) and [on Stack Overflow](http://stackoverflow.com/questions/tagged/orchardcms).
|
||||
|
||||
## Project Status
|
||||
Orchard is currently in version 1.8.1. We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
||||
Our 1.8.1 release is available from our Downloads page, and is easy to [Install Orchard using the Web Platform Installer](http://www.orchardproject.net/docs/Installing-Orchard.ashx). We encourage interested developers to check out the source code on the Orchard Github site and get involved with the project.
|
||||
Orchard is currently in version 1.9. We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
||||
Our 1.9 release is available from [our Downloads page](https://github.com/OrchardCMS/Orchard/releases), and is easy to [Install Orchard using the Web Platform Installer](http://www.orchardproject.net/docs/Installing-Orchard.ashx). We encourage interested developers to check out the source code on the Orchard Github site and get involved with the project.
|
||||
|
||||
* [Download the latest release](https://github.com/OrchardCMS/Orchard/releases)
|
||||
* [Feature roadmap](http://www.orchardproject.net/docs/feature-roadmap.ashx)
|
||||
|
||||
7
lib/npgsql/LICENSE.txt
Normal file
7
lib/npgsql/LICENSE.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright (c) 2002-2013, The Npgsql Development Team
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
|
||||
|
||||
IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE NPGSQL DEVELOPMENT TEAM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
THE NPGSQL DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
BIN
lib/npgsql/Mono.Security.dll
Normal file
BIN
lib/npgsql/Mono.Security.dll
Normal file
Binary file not shown.
6502
lib/npgsql/Npgsql.XML
Normal file
6502
lib/npgsql/Npgsql.XML
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/npgsql/Npgsql.dll
Normal file
BIN
lib/npgsql/Npgsql.dll
Normal file
Binary file not shown.
BIN
lib/npgsql/Npgsql.pdb
Normal file
BIN
lib/npgsql/Npgsql.pdb
Normal file
Binary file not shown.
52
lib/npgsql/README.md
Normal file
52
lib/npgsql/README.md
Normal file
@@ -0,0 +1,52 @@
|
||||
Npgsql - .NET Data Provider for PostgreSQL
|
||||
=============
|
||||
|
||||
###What Is Npgsql?
|
||||
|
||||
Npgsql is a .Net Data Provider for PostgreSQL. It allows you to connect and interact with PostgreSQL server using .NET.
|
||||
|
||||
|
||||
###Project Information
|
||||
|
||||
+ [Offical Site][1]
|
||||
+ [Npgsql source code @ GitHub][2]
|
||||
+ [Available on NuGet Gallery][3]
|
||||
+ [Wiki - Usage and other information][4]
|
||||
|
||||
|
||||
###Developers
|
||||
|
||||
Developers who contributes to Npgsql currently or in past, in no particular order:
|
||||
|
||||
+ Brar Piening
|
||||
+ Francisco Figueiredo Jr.
|
||||
+ Ben Clewett
|
||||
+ Daniel Morgan
|
||||
+ Dave Page
|
||||
+ Ulrich Sprick
|
||||
+ Glen Parker
|
||||
+ Josh Cooley
|
||||
+ Jon Asher
|
||||
+ Chris Morgan
|
||||
+ Thilo Utke
|
||||
+ Hiroshi Saito
|
||||
+ Shay Rojansky
|
||||
|
||||
###License
|
||||
|
||||
Refer LICENSE.txt for more information on license terms.
|
||||
|
||||
###Code history
|
||||
|
||||
On December 2nd, [we committed a change][5] to restructure Npgsql code. This change modified file locations and unfortunately made the complete modification history of those files to not be available anymore through GitHub interface directly. [This stackoverflow post][6] documents a way to access the history before the rename: You just need to access the object tree **before** the rename and then you can see the rest of the file history.
|
||||
In the case of this rename, this is the tree: https://github.com/npgsql/Npgsql/tree/2f8928e4dee59275767de0df2ec41a654744a3bc
|
||||
|
||||
This will help future searches for the history of the files. Note that you stil can access the complete history of the file through command line: `git log --follow ./newflodername/file`
|
||||
|
||||
|
||||
[1]: http://www.npgsql.org/ "Official site"
|
||||
[2]: https://github.com/npgsql/Npgsql/ "Npgsql source code @ GitHub"
|
||||
[3]: http://www.nuget.org/packages/Npgsql/ "Npgsql @ Nuget Gallery"
|
||||
[4]: https://github.com/npgsql/Npgsql/wiki/ "Wiki"
|
||||
[5]: https://github.com/npgsql/Npgsql/commit/d7beea23f3407b38747cde05568a59ac87cdd121#diff-3b02da674650ba0f31603c365249f34f
|
||||
[6]: http://stackoverflow.com/questions/17213046/see-history-in-github-after-folder-rename
|
||||
BIN
lib/npgsql/de/Npgsql.resources.dll
Normal file
BIN
lib/npgsql/de/Npgsql.resources.dll
Normal file
Binary file not shown.
BIN
lib/npgsql/es/Npgsql.resources.dll
Normal file
BIN
lib/npgsql/es/Npgsql.resources.dll
Normal file
Binary file not shown.
BIN
lib/npgsql/fi/Npgsql.resources.dll
Normal file
BIN
lib/npgsql/fi/Npgsql.resources.dll
Normal file
Binary file not shown.
BIN
lib/npgsql/fr/Npgsql.resources.dll
Normal file
BIN
lib/npgsql/fr/Npgsql.resources.dll
Normal file
Binary file not shown.
BIN
lib/npgsql/ja/Npgsql.resources.dll
Normal file
BIN
lib/npgsql/ja/Npgsql.resources.dll
Normal file
Binary file not shown.
BIN
lib/npgsql/zh-CN/Npgsql.resources.dll
Normal file
BIN
lib/npgsql/zh-CN/Npgsql.resources.dll
Normal file
Binary file not shown.
@@ -101,6 +101,7 @@
|
||||
<ProjectReference Include="..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -126,11 +127,11 @@
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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">
|
||||
</Target>
|
||||
<!-- 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">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -18,7 +18,7 @@
|
||||
</appSettings>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
@@ -60,7 +60,7 @@
|
||||
<add extension=".csproj" type="Orchard.Environment.Extensions.Compilers.CSharpExtensionBuildProviderShim"/>
|
||||
</buildProviders>
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Mvc, Version=5..0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
@@ -147,7 +147,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
|
||||
@@ -171,11 +171,11 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral"/>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Autofac;
|
||||
using JetBrains.Annotations;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Caching;
|
||||
@@ -83,7 +82,6 @@ namespace Orchard.Core.Tests.Body {
|
||||
}
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
public class ThingHandler : ContentHandler {
|
||||
public ThingHandler() {
|
||||
Filters.Add(new ActivatingFilter<Thing>(ThingDriver.ContentTypeName));
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Routing;
|
||||
using Autofac;
|
||||
using JetBrains.Annotations;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Caching;
|
||||
@@ -134,12 +133,12 @@ namespace Orchard.Core.Tests.Common.Providers {
|
||||
}
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
class TestHandler : ContentHandler {
|
||||
public TestHandler() {
|
||||
Filters.Add(new ActivatingFilter<CommonPart>("test-item"));
|
||||
Filters.Add(new ActivatingFilter<ContentPart<CommonPartVersionRecord>>("test-item"));
|
||||
Filters.Add(new ActivatingFilter<TestUser>("User"));
|
||||
Filters.Add(new ActivatingFilter<AlternateTestUser>("AlternateUser"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,6 +147,11 @@ namespace Orchard.Core.Tests.Common.Providers {
|
||||
public string UserName { get { return "x"; } }
|
||||
public string Email { get { return "y"; } }
|
||||
}
|
||||
class AlternateTestUser : ContentPart, IUser {
|
||||
public new int Id { get { return 6655322; } }
|
||||
public string UserName { get { return "y"; } }
|
||||
public string Email { get { return "x"; } }
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void OwnerShouldBeNullAndZeroByDefault() {
|
||||
@@ -361,14 +365,22 @@ namespace Orchard.Core.Tests.Common.Providers {
|
||||
public void EditingShouldSetModifiedUtc() {
|
||||
var contentManager = _container.Resolve<IContentManager>();
|
||||
|
||||
var user = contentManager.New<IUser>("User");
|
||||
_authn.Setup(x => x.GetAuthenticatedUser()).Returns(user);
|
||||
|
||||
var createUtc = _clock.UtcNow;
|
||||
var item = contentManager.Create<ICommonPart>("test-item", VersionOptions.Draft, init => { });
|
||||
contentManager.Publish(item.ContentItem);
|
||||
|
||||
Assert.That(item.CreatedUtc, Is.EqualTo(createUtc));
|
||||
Assert.That(item.ModifiedUtc, Is.EqualTo(createUtc));
|
||||
Assert.That(item.VersionModifiedBy, Is.EqualTo(user.UserName));
|
||||
Assert.That(item.PublishedUtc, Is.EqualTo(createUtc));
|
||||
|
||||
// Switch user
|
||||
var secondUser = contentManager.New<IUser>("AlternateUser");
|
||||
_authn.Setup(x => x.GetAuthenticatedUser()).Returns(secondUser);
|
||||
|
||||
_clock.Advance(TimeSpan.FromMinutes(1));
|
||||
var editUtc = _clock.UtcNow;
|
||||
|
||||
@@ -379,6 +391,7 @@ namespace Orchard.Core.Tests.Common.Providers {
|
||||
Assert.That(item.ModifiedUtc, Is.EqualTo(editUtc));
|
||||
Assert.That(item.PublishedUtc, Is.EqualTo(createUtc));
|
||||
Assert.That(updater.ModelErrors.Count, Is.EqualTo(0));
|
||||
Assert.That(item.VersionModifiedBy, Is.EqualTo(secondUser.UserName));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -127,10 +127,12 @@
|
||||
<ProjectReference Include="..\Orchard.Web\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -154,10 +156,10 @@
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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>
|
||||
<!-- 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="CopySqlCeBinaries">
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1 +1 @@
|
||||
setup /SiteName:Profiling /AdminUsername:admin /AdminPassword:profiling-secret /DatabaseProvider:SQLServer /DatabaseConnectionString:"Data Source=.;Initial Catalog=Orchard;Integrated Security=True" /EnabledFeatures:Profiling,Orchard.Framework,Common,Containers,Contents,Dashboard,Feeds,Navigation,Reports,Scheduling,Settings,Shapes,Title,PackagingServices,Gallery,Orchard.PublishLater,Orchard.Blogs,Orchard.Comments,Orchard.ContentTypes,Orchard.jQuery,Orchard.Lists,Orchard.MediaLibrary,Orchard.ContentPicker,Orchard.MediaPicker,Orchard.Modules,Orchard.Packaging,Orchard.Pages,Orchard.Recipes,Orchard.Roles,Orchard.Tags,Orchard.Themes,Orchard.Users,Orchard.Scripting,Orchard.Scripting.Lightweight,Orchard.Widgets,TinyMce,TheThemeMachine,Orchard.Tokens,Orchard.Alias,Orchard.Autoroute
|
||||
setup /SiteName:Profiling /AdminUsername:admin /AdminPassword:profiling-secret /DatabaseProvider:SQLServer /DatabaseConnectionString:"Data Source=.;Initial Catalog=Orchard;Integrated Security=True" /EnabledFeatures:Profiling,Orchard.Framework,Common,Containers,Contents,Dashboard,Feeds,Navigation,Scheduling,Settings,Shapes,Title,PackagingServices,Gallery,Orchard.PublishLater,Orchard.Blogs,Orchard.Comments,Orchard.ContentTypes,Orchard.jQuery,Orchard.Lists,Orchard.MediaLibrary,Orchard.ContentPicker,Orchard.MediaPicker,Orchard.Modules,Orchard.Packaging,Orchard.Pages,Orchard.Recipes,Orchard.Roles,Orchard.Tags,Orchard.Themes,Orchard.Users,Orchard.Scripting,Orchard.Scripting.Lightweight,Orchard.Widgets,TinyMce,TheThemeMachine,Orchard.Tokens,Orchard.Alias,Orchard.Autoroute
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Orchard.Specs.Bindings {
|
||||
virtualDirectory,
|
||||
TableData(
|
||||
new { extension = "Module", names = "Lucene, Markdown, Orchard.Alias, Orchard.AntiSpam, Orchard.ArchiveLater, Orchard.Autoroute, Orchard.Azure, Orchard.Blogs, Orchard.Caching, Orchard.CodeGeneration, Orchard.Comments, Orchard.ContentPermissions, Orchard.ContentPicker, Orchard.ContentTypes, Orchard.CustomForms, Orchard.DesignerTools, Orchard.Email, Orchard.Fields, Orchard.Forms, Orchard.ImageEditor, Orchard.ImportExport, Orchard.Indexing, Orchard.JobsQueue, Orchard.jQuery, Orchard.Layouts, Orchard.Lists, Orchard.Localization, Orchard.Media, Orchard.MediaLibrary, Orchard.MediaPicker, Orchard.MediaProcessing, Orchard.Migrations, Orchard.Modules, Orchard.MultiTenancy, Orchard.OutputCache, Orchard.Packaging, Orchard.Pages, Orchard.Projections, Orchard.PublishLater, Orchard.Recipes, Orchard.Roles, Orchard.Rules, Orchard.Scripting, Orchard.Scripting.CSharp, Orchard.Scripting.Dlr, Orchard.Search, Orchard.SecureSocketsLayer, Orchard.Setup, Orchard.Tags, Orchard.TaskLease, Orchard.Taxonomies, Orchard.Templates, Orchard.Themes, Orchard.Tokens, Orchard.Users, Orchard.Warmup, Orchard.Widgets, Orchard.Workflows, SysCache, TinyMce, Upgrade" },
|
||||
new { extension = "Core", names = "Common, Containers, Contents, Dashboard, Feeds, Navigation, Reports, Scheduling, Settings, Shapes, Title, XmlRpc" },
|
||||
new { extension = "Core", names = "Common, Containers, Contents, Dashboard, Feeds, Navigation, Scheduling, Settings, Shapes, Title, XmlRpc" },
|
||||
new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
|
||||
|
||||
webApp.WhenIGoTo("Setup");
|
||||
|
||||
@@ -426,6 +426,7 @@
|
||||
<ProjectReference Include="..\Orchard.Web\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj">
|
||||
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
|
||||
@@ -446,6 +447,7 @@
|
||||
<ProjectReference Include="..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Tools\Orchard\Orchard.csproj">
|
||||
<Project>{33B1BC8D-E292-4972-A363-22056B207156}</Project>
|
||||
@@ -502,11 +504,11 @@
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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">
|
||||
</Target>
|
||||
<!-- 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">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -7,7 +7,7 @@ Scenario: Root request shows setup form
|
||||
Given I have a clean site with
|
||||
| extension | names |
|
||||
| Module | Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title, Reports |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||
| Theme | SafeMode |
|
||||
When I go to "/"
|
||||
Then I should see "Welcome to Orchard"
|
||||
@@ -18,7 +18,7 @@ Scenario: Setup folder also shows setup form
|
||||
Given I have a clean site with
|
||||
| extension | names |
|
||||
| Module | Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title, Reports |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||
| Theme | SafeMode |
|
||||
When I go to "/Setup"
|
||||
Then I should see "Welcome to Orchard"
|
||||
@@ -29,7 +29,7 @@ Scenario: Some of the initial form values are required
|
||||
Given I have a clean site with
|
||||
| extension | names |
|
||||
| Module | Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title, Reports |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||
| Theme | SafeMode |
|
||||
When I go to "/Setup"
|
||||
And I hit "Finish Setup"
|
||||
@@ -41,7 +41,7 @@ Scenario: Calling setup on a brand new install
|
||||
Given I have a clean site with
|
||||
| extension | names |
|
||||
| Module | Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title, Reports |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||
| Theme | SafeMode, TheAdmin, TheThemeMachine |
|
||||
And I am on "/Setup"
|
||||
When I fill in
|
||||
|
||||
8
src/Orchard.Specs/Setup.feature.cs
generated
8
src/Orchard.Specs/Setup.feature.cs
generated
@@ -82,7 +82,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table1.AddRow(new string[] {
|
||||
"Core",
|
||||
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
||||
" Shapes, XmlRpc, Title, Reports"});
|
||||
" Shapes, XmlRpc, Title"});
|
||||
table1.AddRow(new string[] {
|
||||
"Theme",
|
||||
"SafeMode"});
|
||||
@@ -117,7 +117,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table2.AddRow(new string[] {
|
||||
"Core",
|
||||
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
||||
" Shapes, XmlRpc, Title, Reports"});
|
||||
" Shapes, XmlRpc, Title"});
|
||||
table2.AddRow(new string[] {
|
||||
"Theme",
|
||||
"SafeMode"});
|
||||
@@ -152,7 +152,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table3.AddRow(new string[] {
|
||||
"Core",
|
||||
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
||||
" Shapes, XmlRpc, Title, Reports"});
|
||||
" Shapes, XmlRpc, Title"});
|
||||
table3.AddRow(new string[] {
|
||||
"Theme",
|
||||
"SafeMode"});
|
||||
@@ -189,7 +189,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
table4.AddRow(new string[] {
|
||||
"Core",
|
||||
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
||||
" Shapes, XmlRpc, Title, Reports"});
|
||||
" Shapes, XmlRpc, Title"});
|
||||
table4.AddRow(new string[] {
|
||||
"Theme",
|
||||
"SafeMode, TheAdmin, TheThemeMachine"});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Autofac;
|
||||
using JetBrains.Annotations;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Caching;
|
||||
@@ -188,7 +187,6 @@ namespace Orchard.Tests.Modules.Comments.Services {
|
||||
}
|
||||
}
|
||||
|
||||
[UsedImplicitly]
|
||||
public class CommentedItemHandler : ContentHandler {
|
||||
public CommentedItemHandler() {
|
||||
Filters.Add(new ActivatingFilter<CommentedItem>("commentedItem"));
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace Orchard.Tests.Modules.ImportExport.Services {
|
||||
builder.RegisterType<RecipeHarvester>().As<IRecipeHarvester>();
|
||||
builder.RegisterType<RecipeStepExecutor>().As<IRecipeStepExecutor>();
|
||||
builder.RegisterType<StubStepQueue>().As<IRecipeStepQueue>().InstancePerLifetimeScope();
|
||||
builder.RegisterType<StubRecipeJournal>().As<IRecipeJournal>();
|
||||
builder.RegisterType<StubRecipeScheduler>().As<IRecipeScheduler>();
|
||||
builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
|
||||
builder.RegisterType<StubAppDataFolder>().As<IAppDataFolder>();
|
||||
|
||||
@@ -17,7 +17,6 @@ namespace Orchard.Tests.Modules.Media.Services {
|
||||
private const string FolderName1 = "Folder1";
|
||||
private const string FolderName2 = "Folder2";
|
||||
private const string FolderName3 = "Folder3";
|
||||
private const string FolderRecipeJournal = "RecipeJournal";
|
||||
|
||||
private const string InnerDirectory = "MyDir";
|
||||
|
||||
@@ -54,11 +53,9 @@ namespace Orchard.Tests.Modules.Media.Services {
|
||||
[Test]
|
||||
public void GetMediaFoldersTest() {
|
||||
StorageProvider.ListFoldersPredicate = path => {
|
||||
return string.IsNullOrEmpty(path)
|
||||
? new[] {new StubStorageFolder(FolderName1)}
|
||||
: string.Equals(path, FolderName1)
|
||||
? new[] {new StubStorageFolder(FolderName2), new StubStorageFolder(FolderName3)}
|
||||
: string.Equals(path, FolderRecipeJournal) ? new[] { new StubStorageFolder(FolderRecipeJournal), new StubStorageFolder(FolderName1) } : new StubStorageFolder[] { };
|
||||
return string.IsNullOrEmpty(path) ? new[] {new StubStorageFolder(FolderName1)}
|
||||
: string.Equals(path, FolderName1) ? new[] {new StubStorageFolder(FolderName2), new StubStorageFolder(FolderName3)}
|
||||
: new StubStorageFolder[] { };
|
||||
};
|
||||
|
||||
IEnumerable<MediaFolder> mediaFolders = MediaService.GetMediaFolders(null);
|
||||
@@ -72,10 +69,6 @@ namespace Orchard.Tests.Modules.Media.Services {
|
||||
Assert.That(mediaFolders.Count(), Is.EqualTo(2), "Folder1 has 2 sub directories");
|
||||
Assert.That(mediaFolders.FirstOrDefault(mediaFolder => mediaFolder.Name.Equals(FolderName2)), Is.Not.Null, "Correct sub directory in root path");
|
||||
Assert.That(mediaFolders.FirstOrDefault(mediaFolder => mediaFolder.Name.Equals(FolderName3)), Is.Not.Null, "Correct sub directory in root path");
|
||||
|
||||
mediaFolders = MediaService.GetMediaFolders(FolderRecipeJournal);
|
||||
Assert.That(mediaFolders.Count(), Is.EqualTo(1), "Folder that contains RecipeJournal hides the RecipeJournal directory.");
|
||||
Assert.That(mediaFolders.FirstOrDefault(mediaFolder => mediaFolder.Name.Equals(FolderName1)), Is.Not.Null, "Correct sub directory in root path");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -205,6 +205,7 @@
|
||||
<ProjectReference Include="..\Orchard.Web\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Web\Modules\Lucene\Lucene.csproj">
|
||||
<Project>{D5D447D7-EF8E-43A6-B9A4-3B025DD9F45D}</Project>
|
||||
@@ -301,6 +302,7 @@
|
||||
<ProjectReference Include="..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -334,10 +336,10 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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>
|
||||
<!-- 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="CopySqlCeBinaries">
|
||||
<ItemGroup>
|
||||
|
||||
@@ -67,7 +67,6 @@ namespace Orchard.Tests.Modules.Recipes.RecipeHandlers {
|
||||
builder.RegisterType<ShellStateManager>().As<IShellStateManager>().SingleInstance();
|
||||
builder.RegisterType<StubEventBus>().As<IEventBus>().SingleInstance();
|
||||
builder.RegisterType<ModuleRecipeHandler>();
|
||||
builder.RegisterType<StubRecipeJournal>().As<IRecipeJournal>();
|
||||
builder.RegisterSource(new EventsRegistrationSource());
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ namespace Orchard.Tests.Modules.Recipes.Services {
|
||||
builder.RegisterType<RecipeHarvester>().As<IRecipeHarvester>();
|
||||
builder.RegisterType<RecipeStepExecutor>().As<IRecipeStepExecutor>();
|
||||
builder.RegisterType<StubStepQueue>().As<IRecipeStepQueue>().InstancePerLifetimeScope();
|
||||
builder.RegisterType<StubRecipeJournal>().As<IRecipeJournal>();
|
||||
builder.RegisterType<StubRecipeScheduler>().As<IRecipeScheduler>();
|
||||
builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
|
||||
builder.RegisterType<StubAppDataFolder>().As<IAppDataFolder>();
|
||||
@@ -152,28 +151,6 @@ namespace Orchard.Tests.Modules.Recipes.Services {
|
||||
}
|
||||
}
|
||||
|
||||
public class StubRecipeJournal : IRecipeJournal {
|
||||
public void ExecutionStart(string executionId) {
|
||||
}
|
||||
|
||||
public void ExecutionComplete(string executionId) {
|
||||
}
|
||||
|
||||
public void ExecutionFailed(string executionId) {
|
||||
}
|
||||
|
||||
public void WriteJournalEntry(string executionId, string message) {
|
||||
}
|
||||
|
||||
public RecipeJournal GetRecipeJournal(string executionId) {
|
||||
return new RecipeJournal();
|
||||
}
|
||||
|
||||
public RecipeStatus GetRecipeStatus(string executionId) {
|
||||
return RecipeStatus.Complete;
|
||||
}
|
||||
}
|
||||
|
||||
public class StubStepQueue : IRecipeStepQueue {
|
||||
readonly Queue<RecipeStep> _queue = new Queue<RecipeStep>();
|
||||
|
||||
|
||||
@@ -30,15 +30,17 @@ using Orchard.UI.PageClass;
|
||||
using Orchard.Users.Handlers;
|
||||
using Orchard.Users.Models;
|
||||
using Orchard.Users.Services;
|
||||
using Orchard.Services;
|
||||
|
||||
namespace Orchard.Tests.Modules.Users.Services {
|
||||
[TestFixture]
|
||||
public class MembershipServiceTests {
|
||||
private IMembershipValidationService _membershipValidationService;
|
||||
private IMembershipService _membershipService;
|
||||
private ISessionFactory _sessionFactory;
|
||||
private ISession _session;
|
||||
private IContainer _container;
|
||||
|
||||
private StubClock _clock;
|
||||
|
||||
public class TestSessionLocator : ISessionLocator {
|
||||
private readonly ISession _session;
|
||||
@@ -72,6 +74,7 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
public void Init() {
|
||||
var builder = new ContainerBuilder();
|
||||
//builder.RegisterModule(new ImplicitCollectionSupportModule());
|
||||
builder.RegisterType<MembershipValidationService>().As<IMembershipValidationService>();
|
||||
builder.RegisterType<MembershipService>().As<IMembershipService>();
|
||||
builder.RegisterType<DefaultContentQuery>().As<IContentQuery>();
|
||||
builder.RegisterType<DefaultContentManager>().As<IContentManager>();
|
||||
@@ -88,6 +91,7 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
|
||||
builder.RegisterType<DefaultShapeTableManager>().As<IShapeTableManager>();
|
||||
builder.RegisterType<DefaultShapeFactory>().As<IShapeFactory>();
|
||||
builder.RegisterInstance(_clock = new StubClock()).As<IClock>();
|
||||
builder.RegisterType<StubExtensionManager>().As<IExtensionManager>();
|
||||
builder.RegisterInstance(new Mock<IPageClassBuilder>().Object);
|
||||
builder.RegisterType<DefaultContentDisplay>().As<IContentDisplay>();
|
||||
@@ -96,6 +100,7 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
_session = _sessionFactory.OpenSession();
|
||||
builder.RegisterInstance(new TestSessionLocator(_session)).As<ISessionLocator>();
|
||||
_container = builder.Build();
|
||||
_membershipValidationService = _container.Resolve<IMembershipValidationService>();
|
||||
_membershipService = _container.Resolve<IMembershipService>();
|
||||
}
|
||||
|
||||
@@ -152,5 +157,64 @@ namespace Orchard.Tests.Modules.Users.Services {
|
||||
Assert.That(validate2, Is.Null);
|
||||
Assert.That(validate3, Is.Not.Null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UsersWhoHaveNeverLoggedInCanBeAuthenticated() {
|
||||
var user = (UserPart)_membershipService.CreateUser(new CreateUserParams("a", "b", "c", null, null, true));
|
||||
|
||||
Assert.That(_membershipValidationService.CanAuthenticateWithCookie(user), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UsersWhoHaveNeverLoggedOutCanBeAuthenticated() {
|
||||
var user = (UserPart)_membershipService.CreateUser(new CreateUserParams("a", "b", "c", null, null, true));
|
||||
|
||||
user.LastLoginUtc = _clock.UtcNow;
|
||||
_clock.Advance(TimeSpan.FromMinutes(1));
|
||||
|
||||
Assert.That(_membershipValidationService.CanAuthenticateWithCookie(user), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UsersWhoHaveLoggedOutCantBeAuthenticated() {
|
||||
var user = (UserPart)_membershipService.CreateUser(new CreateUserParams("a", "b", "c", null, null, true));
|
||||
|
||||
user.LastLoginUtc = _clock.UtcNow;
|
||||
_clock.Advance(TimeSpan.FromMinutes(1));
|
||||
user.LastLogoutUtc = _clock.UtcNow;
|
||||
_clock.Advance(TimeSpan.FromMinutes(1));
|
||||
|
||||
Assert.That(_membershipValidationService.CanAuthenticateWithCookie(user), Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UsersWhoHaveLoggedInCanBeAuthenticated() {
|
||||
var user = (UserPart)_membershipService.CreateUser(new CreateUserParams("a", "b", "c", null, null, true));
|
||||
|
||||
user.LastLogoutUtc = _clock.UtcNow;
|
||||
_clock.Advance(TimeSpan.FromMinutes(1));
|
||||
user.LastLoginUtc = _clock.UtcNow;
|
||||
_clock.Advance(TimeSpan.FromMinutes(1));
|
||||
|
||||
Assert.That(_membershipValidationService.CanAuthenticateWithCookie(user), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PendingUsersCantBeAuthenticated() {
|
||||
var user = (UserPart)_membershipService.CreateUser(new CreateUserParams("a", "b", "c", null, null, true));
|
||||
|
||||
user.RegistrationStatus = UserStatus.Pending;
|
||||
|
||||
Assert.That(_membershipValidationService.CanAuthenticateWithCookie(user), Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ApprovedUsersCanBeAuthenticated() {
|
||||
var user = (UserPart)_membershipService.CreateUser(new CreateUserParams("a", "b", "c", null, null, true));
|
||||
|
||||
user.RegistrationStatus = UserStatus.Approved;
|
||||
|
||||
Assert.That(_membershipValidationService.CanAuthenticateWithCookie(user), Is.True);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,6 +471,46 @@ namespace Orchard.Tests.ContentManagement {
|
||||
Assert.That(gamma2.Record.Versions, Has.Count.EqualTo(2));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DraftRequiredShouldAlwaysBuildNewVersionFromPublishedIfDraftNotFound()
|
||||
{
|
||||
Trace.WriteLine("gamma1");
|
||||
var gamma1 = _manager.Create(DefaultGammaName, VersionOptions.Published);
|
||||
Trace.WriteLine("flush");
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
|
||||
Trace.WriteLine("gammaDraft1");
|
||||
var gammaDraft1 = _manager.Get(gamma1.Id, VersionOptions.DraftRequired);
|
||||
Assert.That(gammaDraft1.Version, Is.EqualTo(2));
|
||||
Trace.WriteLine("flush");
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
|
||||
Trace.WriteLine("Delete gammaDraft1");
|
||||
var gammaDraft2 = _manager.Get(gammaDraft1.Id, VersionOptions.Draft);
|
||||
gammaDraft2.VersionRecord.Latest = false;
|
||||
|
||||
Trace.WriteLine("Restore gamma1 as Latest");
|
||||
var gamma2 = _manager.Get(gamma1.Id, VersionOptions.Published);
|
||||
var publishedVersion = gamma2.Record.Versions.SingleOrDefault(x => x.Published);
|
||||
if (publishedVersion != null)
|
||||
{
|
||||
publishedVersion.Latest = true;
|
||||
}
|
||||
Trace.WriteLine("flush");
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
|
||||
Trace.WriteLine("gammaDraft3");
|
||||
var gammaDraft3 = _manager.Get(gamma1.Id, VersionOptions.DraftRequired);
|
||||
Assert.That(gammaDraft3.Version, Is.EqualTo(3));
|
||||
Assert.That(gammaDraft3.Record, Is.Not.SameAs(gammaDraft2.Record));
|
||||
Trace.WriteLine("flush");
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UsingGetManyDraftRequiredShouldBuildNewVersionIfLatestIsAlreadyPublished() {
|
||||
Trace.WriteLine("gamma1");
|
||||
|
||||
@@ -59,6 +59,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
builder.RegisterInstance(new ShellSettings { Name = ShellSettings.DefaultName, DataProvider = "SqlCe" });
|
||||
builder.RegisterType<SqlCeStatementProvider>().As<ISqlStatementProvider>();
|
||||
builder.RegisterType<MySqlStatementProvider>().As<ISqlStatementProvider>();
|
||||
builder.RegisterType<PostgreSqlStatementProvider>().As<ISqlStatementProvider>();
|
||||
|
||||
builder.RegisterType<AlphaPartHandler>().As<IContentHandler>();
|
||||
builder.RegisterType<BetaPartHandler>().As<IContentHandler>();
|
||||
|
||||
@@ -12,15 +12,14 @@ using Orchard.Environment;
|
||||
using Orchard.Environment.Configuration;
|
||||
using Orchard.Environment.ShellBuilders.Models;
|
||||
using Orchard.FileSystems.AppData;
|
||||
using Orchard.Reports.Services;
|
||||
using Orchard.Tests.ContentManagement;
|
||||
using System.IO;
|
||||
using Orchard.Tests.Environment;
|
||||
using Orchard.Tests.FileSystems.AppData;
|
||||
using Orchard.Tests.Stubs;
|
||||
|
||||
namespace Orchard.Tests.DataMigration {
|
||||
[TestFixture]
|
||||
namespace Orchard.Tests.DataMigration
|
||||
{
|
||||
[TestFixture]
|
||||
public class SchemaBuilderTestsBase {
|
||||
private IContainer _container;
|
||||
private ISessionFactory _sessionFactory;
|
||||
@@ -45,7 +44,6 @@ namespace Orchard.Tests.DataMigration {
|
||||
builder.RegisterInstance(appDataFolder).As<IAppDataFolder>();
|
||||
builder.RegisterType<SqlCeDataServicesProvider>().As<IDataServicesProvider>();
|
||||
builder.RegisterType<DataServicesProviderFactory>().As<IDataServicesProviderFactory>();
|
||||
builder.RegisterType<StubReportsCoordinator>().As<IReportsCoordinator>();
|
||||
builder.RegisterType<DefaultDataMigrationInterpreter>().As<IDataMigrationInterpreter>();
|
||||
builder.RegisterType<SqlCeCommandInterpreter>().As<ICommandInterpreter>();
|
||||
builder.RegisterType<SessionConfigurationCache>().As<ISessionConfigurationCache>();
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Routing;
|
||||
using Autofac;
|
||||
using JetBrains.Annotations;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using Orchard.DisplayManagement;
|
||||
@@ -19,7 +18,7 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
|
||||
public class ShapeAttributeBindingStrategyTests : ContainerTestBase {
|
||||
private Feature _testFeature;
|
||||
|
||||
protected override void Register([NotNull] ContainerBuilder builder) {
|
||||
protected override void Register(ContainerBuilder builder) {
|
||||
if (builder == null) {
|
||||
throw new ArgumentNullException("builder");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Localization.Services;
|
||||
|
||||
namespace Orchard.Tests.Localization {
|
||||
|
||||
[TestFixture]
|
||||
public class LocalizationStreamParserTests {
|
||||
|
||||
[Test]
|
||||
public void ShouldTrimLeadingQuotes() {
|
||||
var parser = new LocalizationStreamParser();
|
||||
|
||||
var text = new StringBuilder();
|
||||
text.AppendLine("#: ~/Themes/MyTheme/Views/MyView.cshtml");
|
||||
text.AppendLine("msgctxt \"~/Themes/MyTheme/Views/MyView.cshtml\"");
|
||||
text.AppendLine("msgid \"\\\"{0}\\\" Foo\"");
|
||||
text.AppendLine("msgstr \"\\\"{0}\\\" Foo\"");
|
||||
|
||||
var translations = new Dictionary<string, string>();
|
||||
parser.ParseLocalizationStream(text.ToString(), translations, false);
|
||||
|
||||
Assert.AreEqual("\"{0}\" Foo", translations["~/themes/mytheme/views/myview.cshtml|\"{0}\" foo"]);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ShouldTrimTrailingQuotes() {
|
||||
var parser = new LocalizationStreamParser();
|
||||
|
||||
var text = new StringBuilder();
|
||||
text.AppendLine("#: ~/Themes/MyTheme/Views/MyView.cshtml");
|
||||
text.AppendLine("msgctxt \"~/Themes/MyTheme/Views/MyView.cshtml\"");
|
||||
text.AppendLine("msgid \"Foo \\\"{0}\\\"\"");
|
||||
text.AppendLine("msgstr \"Foo \\\"{0}\\\"\"");
|
||||
|
||||
var translations = new Dictionary<string, string>();
|
||||
parser.ParseLocalizationStream(text.ToString(), translations, false);
|
||||
|
||||
Assert.AreEqual("Foo \"{0}\"", translations["~/themes/mytheme/views/myview.cshtml|foo \"{0}\""]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,6 +259,7 @@
|
||||
<Compile Include="FileSystems\Dependencies\AssemblyProbingFolderTests.cs" />
|
||||
<Compile Include="FileSystems\Dependencies\DependenciesFolderTests.cs" />
|
||||
<Compile Include="FileSystems\VirtualPath\DefaultVirtualPathProviderTests.cs" />
|
||||
<Compile Include="Localization\LocalizationStreamParserTests.cs" />
|
||||
<Compile Include="Localization\TextTests.cs" />
|
||||
<Compile Include="Localization\CurrentCultureWorkContextTests.cs" />
|
||||
<Compile Include="Localization\CultureManagerTests.cs" />
|
||||
@@ -280,7 +281,6 @@
|
||||
<Compile Include="Stubs\StubHttpContextAccessor.cs" />
|
||||
<Compile Include="Stubs\StubWorkContextAccessor.cs" />
|
||||
<Compile Include="Stubs\StubExtensionManager.cs" />
|
||||
<Compile Include="Stubs\StubReportsCoordinator.cs" />
|
||||
<Compile Include="Stubs\StubVirtualPathProvider.cs" />
|
||||
<Compile Include="Stubs\StubFileSystem.cs" />
|
||||
<Compile Include="Stubs\StubAppDataFolder.cs" />
|
||||
@@ -332,10 +332,12 @@
|
||||
<ProjectReference Include="..\Orchard.Web\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -381,10 +383,10 @@
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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>
|
||||
<!-- 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="CopySqlCeBinaries">
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
using Orchard.Reports;
|
||||
using Orchard.Reports.Services;
|
||||
|
||||
namespace Orchard.Tests.Stubs {
|
||||
public class StubReportsCoordinator : IReportsCoordinator {
|
||||
public void Add(string reportKey, ReportEntryType type, string message) {
|
||||
|
||||
}
|
||||
|
||||
public int Register(string reportKey, string activityName, string title) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,6 +96,7 @@
|
||||
<ProjectReference Include="..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>True</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -119,11 +120,11 @@
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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">
|
||||
</Target>
|
||||
<!-- 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">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -1,88 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<log4net>
|
||||
|
||||
<!-- If you are looking here and want more output, first thing to do is change root/priority/@value to "INFO" or "ALL". -->
|
||||
<!-- If you are looking here and want more output, first thing to do is change root/priority/@value to "INFO" or "ALL". -->
|
||||
|
||||
<root>
|
||||
<!-- Value of priority may be ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF. -->
|
||||
<priority value="WARN" />
|
||||
<appender-ref ref="error-file" />
|
||||
<appender-ref ref="debug-file" />
|
||||
</root>
|
||||
<root>
|
||||
<!-- Value of priority may be ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF. -->
|
||||
<priority value="WARN" />
|
||||
<appender-ref ref="error-file" />
|
||||
<appender-ref ref="debug-file" />
|
||||
</root>
|
||||
|
||||
<!-- Example of turning on the output from a component or namespace. -->
|
||||
<!--
|
||||
<logger name="Orchard.Data.SessionLocator">
|
||||
<priority value="INFO" />
|
||||
</logger>
|
||||
-->
|
||||
<!-- Example of turning on the output from a component or namespace. -->
|
||||
<!--
|
||||
<logger name="Orchard.Data.SessionLocator">
|
||||
<priority value="INFO" />
|
||||
</logger>
|
||||
-->
|
||||
|
||||
<logger name="Orchard">
|
||||
<!-- Messages coming from Orchard are sent to the attached debugger. -->
|
||||
<appender-ref ref="debugger"/>
|
||||
<!-- Note: if you put a ref=debugger into <root> element above and widen the priority to ALL or DEBUG, then you will see nhibernate trace in the attached debugger as well. -->
|
||||
</logger>
|
||||
<logger name="Orchard.Recipes">
|
||||
<!-- Anything recipe-related goes into a dedicated file. -->
|
||||
<priority value="INFO" />
|
||||
<appender-ref ref="recipes-file" />
|
||||
</logger>
|
||||
|
||||
<logger name="Orchard.Localization">
|
||||
<!-- This source is very verbose - setting priority here to avoid flooding trace if root priority is lowered. -->
|
||||
<priority value="WARN" />
|
||||
</logger>
|
||||
<logger name="Orchard">
|
||||
<!-- Messages coming from Orchard are sent to the attached debugger. -->
|
||||
<appender-ref ref="debugger"/>
|
||||
<!-- Note: if you put a ref=debugger into <root> element above and widen the priority to ALL or DEBUG, then you will see nhibernate trace in the attached debugger as well. -->
|
||||
</logger>
|
||||
|
||||
<logger name="NHibernate.Cache">
|
||||
<!-- This source is very verbose - setting priority here to avoid flooding trace if root priority is lowered. -->
|
||||
<priority value="ERROR" />
|
||||
</logger>
|
||||
<logger name="Orchard.Localization">
|
||||
<!-- This source is very verbose - setting priority here to avoid flooding trace if root priority is lowered. -->
|
||||
<priority value="WARN" />
|
||||
</logger>
|
||||
|
||||
<logger name="NHibernate.AdoNet.AbstractBatcher">
|
||||
<!-- Displays failed table statements that are otherwise intercepted and rendered when unexpected. -->
|
||||
<priority value="OFF" />
|
||||
</logger>
|
||||
<logger name="NHibernate.Cache">
|
||||
<!-- This source is very verbose - setting priority here to avoid flooding trace if root priority is lowered. -->
|
||||
<priority value="ERROR" />
|
||||
</logger>
|
||||
|
||||
<logger name="NHibernate.Util.ADOExceptionReporter">
|
||||
<!-- Displays failed table statements that are otherwise intercepted and rendered when unexpected. -->
|
||||
<priority value="OFF" />
|
||||
</logger>
|
||||
<logger name="NHibernate.AdoNet.AbstractBatcher">
|
||||
<!-- Displays failed table statements that are otherwise intercepted and rendered when unexpected. -->
|
||||
<priority value="OFF" />
|
||||
</logger>
|
||||
|
||||
<appender name="debugger" type="log4net.Appender.DebugAppender">
|
||||
<!-- Sends log messages to Visual Studio if attached. -->
|
||||
<immediateFlush value="true" />
|
||||
<layout type="log4net.Layout.SimpleLayout" />
|
||||
</appender>
|
||||
<logger name="NHibernate.Util.ADOExceptionReporter">
|
||||
<!-- Displays failed table statements that are otherwise intercepted and rendered when unexpected. -->
|
||||
<priority value="OFF" />
|
||||
</logger>
|
||||
|
||||
<appender name="debug-file" type="Orchard.Logging.OrchardFileAppender">
|
||||
<!-- Sends log messages to a file in App_Data. -->
|
||||
<file value="App_Data/Logs/orchard-debug" />
|
||||
<appendToFile value="true" />
|
||||
<!-- Immediate flush on error log, to avoid data loss with sudden termination. -->
|
||||
<immediateFlush value="true" />
|
||||
<staticLogFileName value="false" />
|
||||
<rollingStyle value="Date" />
|
||||
<datepattern value="-yyyy.MM.dd'.log'" />
|
||||
<!-- Prevents Orchard.exe from displaying locking debug messages. -->
|
||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %logger - %P{Tenant} - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
<appender name="debugger" type="log4net.Appender.DebugAppender">
|
||||
<!-- Sends log messages to Visual Studio if attached. -->
|
||||
<immediateFlush value="true" />
|
||||
<layout type="log4net.Layout.SimpleLayout" />
|
||||
</appender>
|
||||
|
||||
<appender name="debug-file" type="Orchard.Logging.OrchardFileAppender">
|
||||
<file value="App_Data/Logs/orchard-debug" />
|
||||
<appendToFile value="true" />
|
||||
<!-- Immediate flush on error log, to avoid data loss with sudden termination. -->
|
||||
<immediateFlush value="true" />
|
||||
<staticLogFileName value="false" />
|
||||
<rollingStyle value="Date" />
|
||||
<datepattern value="-yyyy.MM.dd'.log'" />
|
||||
<!-- Prevents Orchard.exe from displaying locking debug messages. -->
|
||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %logger - %P{Tenant} - %level% %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="error-file" type="Orchard.Logging.OrchardFileAppender">
|
||||
<file value="App_Data/Logs/orchard-error" />
|
||||
<appendToFile value="true" />
|
||||
<!-- Immediate flush on error log, to avoid data loss with sudden termination. -->
|
||||
<immediateFlush value="true" />
|
||||
<staticLogFileName value="false" />
|
||||
<rollingStyle value="Date" />
|
||||
<datepattern value="-yyyy.MM.dd'.log'" />
|
||||
<!-- Prevents Orchard.exe from displaying locking debug messages. -->
|
||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
||||
<filter type="log4net.Filter.LevelRangeFilter">
|
||||
<!-- Only ERROR and FATAL log messages end up in this target, even if child loggers accept lower priority. -->
|
||||
<levelMin value="ERROR" />
|
||||
</filter>
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %logger - %P{Tenant} - %message%newline%P{Url}%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="recipes-file" type="Orchard.Logging.OrchardFileAppender">
|
||||
<!-- Sends ERROR and FATAL log messages to a file in App_Data. -->
|
||||
<file value="App_Data/Logs/orchard-recipes" />
|
||||
<appendToFile value="true" />
|
||||
<!-- Immediate flush on error log, to avoid data loss with sudden termination. -->
|
||||
<immediateFlush value="true" />
|
||||
<staticLogFileName value="false" />
|
||||
<rollingStyle value="Date" />
|
||||
<datepattern value="-yyyy.MM.dd'.log'" />
|
||||
<!-- Prevents Orchard.exe from displaying locking debug messages. -->
|
||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %logger - %P{Tenant} - %level% %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="error-file" type="Orchard.Logging.OrchardFileAppender">
|
||||
<!-- Sends ERROR and FATAL log messages to a file in App_Data. -->
|
||||
<file value="App_Data/Logs/orchard-error" />
|
||||
<appendToFile value="true" />
|
||||
<!-- Immediate flush on error log, to avoid data loss with sudden termination. -->
|
||||
<immediateFlush value="true" />
|
||||
<staticLogFileName value="false" />
|
||||
<rollingStyle value="Date" />
|
||||
<datepattern value="-yyyy.MM.dd'.log'" />
|
||||
<!-- Prevents Orchard.exe from displaying locking debug messages. -->
|
||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
|
||||
<filter type="log4net.Filter.LevelRangeFilter">
|
||||
<!-- Only ERROR and FATAL log messages end up in this target, even if child loggers accept lower priority. -->
|
||||
<levelMin value="ERROR" />
|
||||
</filter>
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %logger - %P{Tenant} - %message%newline %P{Url}%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
</log4net>
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Common.Utilities;
|
||||
|
||||
namespace Orchard.Core.Common.DateEditor {
|
||||
[UsedImplicitly]
|
||||
public class DateEditorHandler : ContentHandler {
|
||||
public DateEditorHandler() {
|
||||
OnPublished<CommonPart>((context, part) => {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Mvc.Html;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
@@ -14,7 +13,6 @@ using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace Orchard.Core.Common.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class BodyPartDriver : ContentPartDriver<BodyPart> {
|
||||
private readonly IEnumerable<IHtmlFilter> _htmlFilters;
|
||||
private readonly RequestContext _requestContext;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.Core.Common.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class IdentityPartDriver : ContentPartDriver<IdentityPart> {
|
||||
public IdentityPartDriver() {
|
||||
T = NullLocalizer.Instance;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
@@ -12,7 +11,6 @@ using Orchard.Localization;
|
||||
using Orchard.Services;
|
||||
|
||||
namespace Orchard.Core.Common.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class TextFieldDriver : ContentFieldDriver<TextField> {
|
||||
private readonly IEnumerable<IHtmlFilter> _htmlFilters;
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
|
||||
namespace Orchard.Core.Common.Handlers {
|
||||
[UsedImplicitly]
|
||||
public class BodyPartHandler : ContentHandler {
|
||||
public BodyPartHandler(IRepository<BodyPartRecord> bodyRepository) {
|
||||
Filters.Add(StorageFilter.For(bodyRepository));
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Data;
|
||||
@@ -11,7 +10,6 @@ using Orchard.Security;
|
||||
using Orchard.Services;
|
||||
|
||||
namespace Orchard.Core.Common.Handlers {
|
||||
[UsedImplicitly]
|
||||
public class CommonPartHandler : ContentHandler {
|
||||
private readonly IClock _clock;
|
||||
private readonly IAuthenticationService _authenticationService;
|
||||
@@ -77,7 +75,7 @@ namespace Orchard.Core.Common.Handlers {
|
||||
protected bool ContentTypeWithACommonPart(string typeName) {
|
||||
//Note: What about content type handlers which activate "CommonPart" in code?
|
||||
var contentTypeDefinition = _contentDefinitionManager.GetTypeDefinition(typeName);
|
||||
|
||||
|
||||
if (contentTypeDefinition != null)
|
||||
return contentTypeDefinition.Parts.Any(part => part.PartDefinition.Name == "CommonPart");
|
||||
|
||||
@@ -99,6 +97,7 @@ namespace Orchard.Core.Common.Handlers {
|
||||
part.ModifiedUtc = utcNow;
|
||||
part.VersionCreatedUtc = utcNow;
|
||||
part.VersionModifiedUtc = utcNow;
|
||||
part.VersionModifiedBy = GetUserName();
|
||||
}
|
||||
|
||||
private void AssignUpdateDates(UpdateEditorContext context, CommonPart part) {
|
||||
@@ -106,6 +105,7 @@ namespace Orchard.Core.Common.Handlers {
|
||||
|
||||
part.ModifiedUtc = utcNow;
|
||||
part.VersionModifiedUtc = utcNow;
|
||||
part.VersionModifiedBy = GetUserName();
|
||||
}
|
||||
|
||||
private void AssignRemovingDates(RemoveContentContext context, CommonPart part) {
|
||||
@@ -113,15 +113,17 @@ namespace Orchard.Core.Common.Handlers {
|
||||
|
||||
part.ModifiedUtc = utcNow;
|
||||
part.VersionModifiedUtc = utcNow;
|
||||
part.VersionModifiedBy = GetUserName();
|
||||
}
|
||||
|
||||
protected void AssignVersioningDates(VersionContentContext context, CommonPart existing, CommonPart building) {
|
||||
var utcNow = _clock.UtcNow;
|
||||
|
||||
// assign the created date
|
||||
// assign the created date
|
||||
building.VersionCreatedUtc = utcNow;
|
||||
// assign modified date for the new version
|
||||
building.VersionModifiedUtc = utcNow;
|
||||
building.VersionModifiedBy = GetUserName();
|
||||
// publish date should be null until publish method called
|
||||
building.VersionPublishedUtc = null;
|
||||
|
||||
@@ -136,7 +138,7 @@ namespace Orchard.Core.Common.Handlers {
|
||||
|
||||
protected void AssignPublishingDates(PublishContentContext context, CommonPart part) {
|
||||
var utcNow = _clock.UtcNow;
|
||||
|
||||
|
||||
part.PublishedUtc = utcNow;
|
||||
part.VersionPublishedUtc = utcNow;
|
||||
}
|
||||
@@ -144,33 +146,37 @@ namespace Orchard.Core.Common.Handlers {
|
||||
protected void LazyLoadHandlers(CommonPart part) {
|
||||
// add handlers that will load content for id's just-in-time
|
||||
part.OwnerField.Loader(() => _contentManager.Get<IUser>(part.Record.OwnerId));
|
||||
part.ContainerField.Loader(() => part.Record.Container == null ? null : _contentManager.Get(part.Record.Container.Id));
|
||||
part.ContainerField.Loader(() => part.Record.Container == null ? null : _contentManager.Get(part.Record.Container.Id));
|
||||
}
|
||||
|
||||
protected static void PropertySetHandlers(ActivatedContentContext context, CommonPart part) {
|
||||
// add handlers that will update records when part properties are set
|
||||
|
||||
part.OwnerField.Setter(user => {
|
||||
part.Record.OwnerId = user == null
|
||||
? 0
|
||||
: user.ContentItem.Id;
|
||||
return user;
|
||||
});
|
||||
part.Record.OwnerId = user == null
|
||||
? 0
|
||||
: user.ContentItem.Id;
|
||||
return user;
|
||||
});
|
||||
|
||||
// Force call to setter if we had already set a value
|
||||
if (part.OwnerField.Value != null)
|
||||
part.OwnerField.Value = part.OwnerField.Value;
|
||||
|
||||
part.ContainerField.Setter(container => {
|
||||
part.Record.Container = container == null
|
||||
? null
|
||||
: container.ContentItem.Record;
|
||||
return container;
|
||||
});
|
||||
part.Record.Container = container == null
|
||||
? null
|
||||
: container.ContentItem.Record;
|
||||
return container;
|
||||
});
|
||||
|
||||
// Force call to setter if we had already set a value
|
||||
if (part.ContainerField.Value != null)
|
||||
part.ContainerField.Value = part.ContainerField.Value;
|
||||
}
|
||||
private string GetUserName() {
|
||||
var user = _authenticationService.GetAuthenticatedUser();
|
||||
return user == null ? string.Empty : user.UserName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
|
||||
namespace Orchard.Core.Common.Handlers {
|
||||
[UsedImplicitly]
|
||||
public class IdentityPartHandler : ContentHandler {
|
||||
public IdentityPartHandler(IRepository<IdentityPartRecord> identityRepository,
|
||||
IContentManager contentManager) {
|
||||
|
||||
@@ -15,14 +15,14 @@ namespace Orchard.Core.Common {
|
||||
}
|
||||
|
||||
public int Create() {
|
||||
SchemaBuilder.CreateTable("BodyPartRecord",
|
||||
SchemaBuilder.CreateTable("BodyPartRecord",
|
||||
table => table
|
||||
.ContentPartVersionRecord()
|
||||
.Column<string>("Text", column => column.Unlimited())
|
||||
.Column<string>("Format")
|
||||
);
|
||||
|
||||
SchemaBuilder.CreateTable("CommonPartRecord",
|
||||
SchemaBuilder.CreateTable("CommonPartRecord",
|
||||
table => table
|
||||
.ContentPartRecord()
|
||||
.Column<int>("OwnerId")
|
||||
@@ -31,13 +31,14 @@ namespace Orchard.Core.Common {
|
||||
.Column<DateTime>("ModifiedUtc")
|
||||
.Column<int>("Container_id")
|
||||
);
|
||||
|
||||
SchemaBuilder.CreateTable("CommonPartVersionRecord",
|
||||
|
||||
SchemaBuilder.CreateTable("CommonPartVersionRecord",
|
||||
table => table
|
||||
.ContentPartVersionRecord()
|
||||
.Column<DateTime>("CreatedUtc")
|
||||
.Column<DateTime>("PublishedUtc")
|
||||
.Column<DateTime>("ModifiedUtc")
|
||||
.Column<string>("ModifiedBy")
|
||||
);
|
||||
|
||||
SchemaBuilder.CreateTable("IdentityPartRecord",
|
||||
@@ -58,7 +59,7 @@ namespace Orchard.Core.Common {
|
||||
.Attachable()
|
||||
.WithDescription("Automatically generates a unique identity for the content item, which is required in import/export scenarios where one content item references another."));
|
||||
|
||||
return 4;
|
||||
return 5;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
@@ -99,13 +100,17 @@ namespace Orchard.Core.Common {
|
||||
|
||||
foreach (var existingIdentityPart in existingIdentityParts) {
|
||||
var updateIdentityPartRecord = _identityPartRepository.Get(existingIdentityPart.Id);
|
||||
|
||||
|
||||
updateIdentityPartRecord.Identifier = existingIdentityPart.Identifier;
|
||||
|
||||
|
||||
_identityPartRepository.Update(updateIdentityPartRecord);
|
||||
}
|
||||
|
||||
return 4;
|
||||
}
|
||||
public int UpdateFrom4() {
|
||||
SchemaBuilder.AlterTable("CommonPartVersionRecord", table => table.AddColumn<string>("ModifiedBy", command => command.Nullable()));
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Orchard.Core.Common.Utilities;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.ContentManagement.Utilities;
|
||||
using Orchard.Security;
|
||||
|
||||
namespace Orchard.Core.Common.Models {
|
||||
@@ -54,6 +54,15 @@ namespace Orchard.Core.Common.Models {
|
||||
PartVersionRecord.CreatedUtc = value;
|
||||
}
|
||||
}
|
||||
public string VersionModifiedBy {
|
||||
get {
|
||||
return PartVersionRecord == null ? null : PartVersionRecord.ModifiedBy;
|
||||
}
|
||||
set {
|
||||
if (PartVersionRecord != null)
|
||||
PartVersionRecord.ModifiedBy = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime? VersionPublishedUtc {
|
||||
get {
|
||||
|
||||
@@ -6,5 +6,6 @@ namespace Orchard.Core.Common.Models {
|
||||
public virtual DateTime? CreatedUtc { get; set; }
|
||||
public virtual DateTime? PublishedUtc { get; set; }
|
||||
public virtual DateTime? ModifiedUtc { get; set; }
|
||||
public virtual string ModifiedBy { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace Orchard.Core.Common.Utilities {
|
||||
[Obsolete("Use Orchard.ContentManagement.Utilities.LazyField instead.")]
|
||||
public class LazyField<T> {
|
||||
private T _value;
|
||||
private Func<T> _loader;
|
||||
private Func<T, T> _setter;
|
||||
|
||||
public T Value {
|
||||
get {return GetValue();}
|
||||
set {SetValue(value);}
|
||||
get { return GetValue(); }
|
||||
set { SetValue(value); }
|
||||
}
|
||||
|
||||
public void Loader(Func<T> loader) {
|
||||
@@ -22,7 +23,7 @@ namespace Orchard.Core.Common.Utilities {
|
||||
private T GetValue() {
|
||||
if (_loader != null) {
|
||||
_value = _loader();
|
||||
_loader = null;
|
||||
_loader = null;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
@*
|
||||
Model:
|
||||
ContentPart
|
||||
*@
|
||||
|
||||
@{
|
||||
string displayUser = null;
|
||||
if (Model.ContentPart != null) {
|
||||
if (!string.IsNullOrWhiteSpace(Model.ContentPart.VersionModifiedBy)) {
|
||||
displayUser = Model.ContentPart.VersionModifiedBy;
|
||||
}
|
||||
else if (Model.ContentPart.Owner != null) {
|
||||
displayUser = Model.ContentPart.Owner.UserName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@T("By {0}", displayUser ?? T("unknown").ToString())
|
||||
@@ -1,14 +0,0 @@
|
||||
@*
|
||||
Model:
|
||||
ContentPart
|
||||
*@
|
||||
|
||||
@using Orchard.ContentManagement;
|
||||
@using Orchard.Core.Common.Models;
|
||||
@using Orchard.Security;
|
||||
@{
|
||||
CommonPart commonPart = Model.ContentPart;
|
||||
// owner isn't really who last modified this, is it?
|
||||
IUser owner = commonPart.As<CommonPart>() == null ? null : commonPart.As<CommonPart>().Owner;
|
||||
}
|
||||
@T("By {0}", owner == null ? T("unknown").ToString() : Convert.ToString(Html.ItemDisplayText(owner)))
|
||||
@@ -1,12 +1,10 @@
|
||||
@using Orchard.ContentManagement;
|
||||
@using Orchard.Core.Common.Models;
|
||||
@{
|
||||
CommonPart commonPart = Model.ContentPart;
|
||||
DateTime? modifiedUtc = commonPart.As<CommonPart>() == null ? null : commonPart.As<CommonPart>().ModifiedUtc;
|
||||
@{
|
||||
DateTime? modifiedUtc = Model.ContentPart == null ? null : Model.ContentPart.ModifiedUtc;
|
||||
}
|
||||
<ul class="pageStatus">
|
||||
<li>@if (modifiedUtc.HasValue) {
|
||||
@T("Last modified: {0}", Display.DateTimeRelative(DateTimeUtc: modifiedUtc.Value))} |
|
||||
</li>
|
||||
<li>@Display.CommonMetadataOwner(ContentPart: Model.ContentPart)</li>
|
||||
</ul>
|
||||
<li>
|
||||
@if (modifiedUtc.HasValue) {
|
||||
@T("Last modified: {0}", Display.DateTimeRelative(DateTimeUtc: modifiedUtc.Value))} |
|
||||
</li>
|
||||
<li>@Display.CommonMetadataLastModified(ContentPart: Model.ContentPart)</li>
|
||||
</ul>
|
||||
@@ -2,7 +2,7 @@
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.MetaData.Models;
|
||||
using Orchard.ContentManagement.Records;
|
||||
using Orchard.Core.Common.Utilities;
|
||||
using Orchard.ContentManagement.Utilities;
|
||||
using Orchard.Core.Containers.Services;
|
||||
using Orchard.Core.Containers.Settings;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Orchard.Core.Containers.Models {
|
||||
public enum OrderByDirection {
|
||||
Ascending,
|
||||
Descending
|
||||
}
|
||||
}
|
||||
@@ -26,8 +26,6 @@ namespace Orchard.Core.Containers.ViewModels {
|
||||
|
||||
public enum SortDirection {
|
||||
Ascending,
|
||||
Descending,
|
||||
Created,
|
||||
DisplayText
|
||||
Descending
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
@model Orchard.Core.Containers.ViewModels.ContainerWidgetViewModel
|
||||
@using Orchard.Core.Containers.Models;
|
||||
@{
|
||||
Script.Require("ShapesBase");
|
||||
}
|
||||
@@ -25,8 +24,8 @@
|
||||
@Html.SelectOption(Model.Part.Record.OrderByProperty, "CustomPropertiesPart.CustomThree", T("Custom 3").Text)
|
||||
</select>
|
||||
<select title="@T("Order direction")" id="@Html.FieldIdFor(m => m.Part.Record.OrderByDirection)" name="@Html.FieldNameFor(m => m.Part.Record.OrderByDirection)">
|
||||
@Html.SelectOption(Model.Part.Record.OrderByDirection, (int)OrderByDirection.Ascending, T("Ascending").Text)
|
||||
@Html.SelectOption(Model.Part.Record.OrderByDirection, (int)OrderByDirection.Descending, T("Descending").Text)
|
||||
@Html.SelectOption(Model.Part.Record.OrderByDirection, (int)SortDirection.Ascending, T("Ascending").Text)
|
||||
@Html.SelectOption(Model.Part.Record.OrderByDirection, (int)SortDirection.Descending, T("Descending").Text)
|
||||
</select>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
@@ -6,7 +5,6 @@ using Orchard.Security;
|
||||
using Orchard.Security.Permissions;
|
||||
|
||||
namespace Orchard.Core.Contents.Security {
|
||||
[UsedImplicitly]
|
||||
public class AuthorizationEventHandler : IAuthorizationServiceEventHandler {
|
||||
public void Checking(CheckAccessContext context) { }
|
||||
public void Complete(CheckAccessContext context) { }
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
<div class="manage">
|
||||
@Html.ActionLink(createLinkText.Text, "Create", new { Area = "Contents", Id = (string)Model.Options.SelectedFilter }, new { @class = "button primaryAction" })
|
||||
</div>
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
<fieldset class="bulk-actions">
|
||||
<label><input type="checkbox" class="check-all" />@T("Select all")</label>@T(" | ")
|
||||
<label for="publishActions">@T("Actions:")</label>
|
||||
<select id="publishActions" name="Options.BulkAction">
|
||||
@Html.SelectOption((ContentsBulkAction)Model.Options.BulkAction, ContentsBulkAction.None, T("Choose action...").ToString())
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div class="help-item">
|
||||
<h2 class="contribute">@T("Contribute back")</h2>
|
||||
<p>@T("Help grow Orchard. We encourage contributions of all sorts, including code submissions, documentation, translations, feature recommendations, and more.Here are some ways to <a href=\"http://orchardproject.net/contribution\">give back to the project</a>.")</p>
|
||||
<p>@T("Help grow Orchard. We encourage contributions of all sorts, including code submissions, documentation, translations, feature recommendations, and more. Here are some ways to <a href=\"http://orchardproject.net/contribution\">give back to the project</a>.")</p>
|
||||
</div>
|
||||
|
||||
<div class="help-item">
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using System;
|
||||
using System.Web.Mvc;
|
||||
using System.Xml.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Core.Feeds.Models;
|
||||
|
||||
namespace Orchard.Core.Feeds.Rss {
|
||||
[UsedImplicitly]
|
||||
public class RssFeedBuilder : IFeedBuilderProvider, IFeedBuilder {
|
||||
public FeedBuilderMatch Match(FeedContext context) {
|
||||
if (context.Format == "rss") {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
using System.Web.Mvc;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Mvc.Filters;
|
||||
|
||||
namespace Orchard.Core.Feeds.Services {
|
||||
[UsedImplicitly]
|
||||
public class FeedFilter : FilterProvider, IResultFilter {
|
||||
private readonly IFeedManager _feedManager;
|
||||
private readonly IWorkContextAccessor _workContextAccessor;
|
||||
|
||||
@@ -3,10 +3,8 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace Orchard.Core.Feeds.Services {
|
||||
[UsedImplicitly]
|
||||
public class FeedManager : IFeedManager {
|
||||
private readonly IList<Link> _links = new List<Link>();
|
||||
|
||||
|
||||
@@ -4,14 +4,12 @@ using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using System.Xml.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Feeds.Models;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.Services;
|
||||
|
||||
namespace Orchard.Core.Feeds.StandardBuilders {
|
||||
[UsedImplicitly]
|
||||
public class CorePartsFeedItemBuilder : IFeedItemBuilder {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly RouteCollection _routes;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using System.Xml.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Core.Feeds.Models;
|
||||
@@ -12,7 +11,6 @@ using Orchard.Services;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.Core.Feeds.StandardQueries {
|
||||
[UsedImplicitly]
|
||||
public class ContainerFeedQuery : IFeedQueryProvider, IFeedQuery {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly IEnumerable<IHtmlFilter> _htmlFilters;
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, T("Couldn't manage the main menu")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
// See http://orchard.codeplex.com/workitem/17116
|
||||
// See https://github.com/OrchardCMS/Orchard/issues/948
|
||||
if (menuItemEntries != null) {
|
||||
foreach (var menuItemEntry in menuItemEntries) {
|
||||
MenuPart menuPart = _menuService.Get(menuItemEntry.MenuItemId);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
@@ -10,7 +9,6 @@ using Orchard.UI.Navigation;
|
||||
using Orchard.Utility;
|
||||
|
||||
namespace Orchard.Core.Navigation.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class AdminMenuPartDriver : ContentPartDriver<AdminMenuPart> {
|
||||
private readonly IAuthorizationService _authorizationService;
|
||||
private readonly INavigationManager _navigationManager;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Security;
|
||||
|
||||
namespace Orchard.Core.Navigation.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class MenuItemPartDriver : ContentPartDriver<MenuItemPart> {
|
||||
private readonly IAuthorizationService _authorizationService;
|
||||
private readonly IWorkContextAccessor _workContextAccessor;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
@@ -11,7 +10,6 @@ using Orchard.UI.Navigation;
|
||||
using Orchard.Utility;
|
||||
|
||||
namespace Orchard.Core.Navigation.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class MenuPartDriver : ContentPartDriver<MenuPart> {
|
||||
private readonly IAuthorizationService _authorizationService;
|
||||
private readonly INavigationManager _navigationManager;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Data;
|
||||
|
||||
namespace Orchard.Core.Navigation.Handlers {
|
||||
[UsedImplicitly]
|
||||
public class AdminMenuPartHandler : ContentHandler {
|
||||
public AdminMenuPartHandler(IRepository<AdminMenuPartRecord> menuPartRepository) {
|
||||
Filters.Add(StorageFilter.For(menuPartRepository));
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Navigation.Services;
|
||||
using Orchard.Core.Title.Models;
|
||||
|
||||
namespace Orchard.Core.Navigation.Handlers {
|
||||
[UsedImplicitly]
|
||||
public class MenuHandler : ContentHandler {
|
||||
private readonly IMenuService _menuService;
|
||||
private readonly IContentManager _contentManager;
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Data;
|
||||
|
||||
namespace Orchard.Core.Navigation.Handlers {
|
||||
[UsedImplicitly]
|
||||
public class MenuPartHandler : ContentHandler {
|
||||
private readonly IContentManager _contentManager;
|
||||
|
||||
@@ -37,7 +35,7 @@ namespace Orchard.Core.Navigation.Handlers {
|
||||
return menu;
|
||||
});
|
||||
|
||||
menuPart.MenuField.Loader(ctx =>
|
||||
menuPart.MenuField.Loader(() =>
|
||||
_contentManager.Get(menuPart.Record.MenuId, menuPart.IsPublished() ? VersionOptions.Published : VersionOptions.Latest)
|
||||
);
|
||||
}
|
||||
@@ -48,7 +46,7 @@ namespace Orchard.Core.Navigation.Handlers {
|
||||
if (part != null) {
|
||||
string stereotype;
|
||||
if (context.ContentItem.TypeDefinition.Settings.TryGetValue("Stereotype", out stereotype) && stereotype == "MenuItem") {
|
||||
context.Metadata.DisplayText = part.MenuText;
|
||||
context.Metadata.DisplayText = part.MenuText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Security;
|
||||
|
||||
namespace Orchard.Core.Navigation.Security {
|
||||
[UsedImplicitly]
|
||||
public class AuthorizationEventHandler : IAuthorizationServiceEventHandler {
|
||||
private readonly IContentManager _contentManager;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Web;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
@@ -7,7 +6,6 @@ using Orchard.Localization;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
namespace Orchard.Core.Navigation.Services {
|
||||
[UsedImplicitly]
|
||||
public class AdminMenuNavigationProvider : INavigationProvider {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly IContentDefinitionManager _contentDefinitionManager;
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
using Orchard.Core.Title.Models;
|
||||
|
||||
namespace Orchard.Core.Navigation.Services {
|
||||
[UsedImplicitly]
|
||||
public class MainMenuService : IMenuService {
|
||||
private readonly IContentManager _contentManager;
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -117,7 +118,6 @@
|
||||
<Compile Include="Containers\ListViews\DefaultListView.cs" />
|
||||
<Compile Include="Containers\Migrations.cs" />
|
||||
<Compile Include="Containers\Models\ContainablePart.cs" />
|
||||
<Compile Include="Containers\Models\OrderByDirection.cs" />
|
||||
<Compile Include="Containers\Models\ContainerPart.cs" />
|
||||
<Compile Include="Common\Shapes.cs" />
|
||||
<Compile Include="Common\Fields\TextField.cs" />
|
||||
@@ -176,12 +176,7 @@
|
||||
<Compile Include="Contents\ViewModels\ListContentTypesViewModel.cs" />
|
||||
<Compile Include="Navigation\ViewModels\MenuPartViewModel.cs" />
|
||||
<Compile Include="Navigation\ViewModels\MenuWidgetViewModel.cs" />
|
||||
<Compile Include="Reports\AdminMenu.cs" />
|
||||
<Compile Include="Reports\Controllers\AdminController.cs" />
|
||||
<Compile Include="Reports\Routes.cs" />
|
||||
<Compile Include="Navigation\Migrations.cs" />
|
||||
<Compile Include="Reports\ViewModels\DisplayReportViewModel.cs" />
|
||||
<Compile Include="Reports\ViewModels\ReportsAdminIndexViewModel.cs" />
|
||||
<Compile Include="Common\Utilities\LazyField.cs" />
|
||||
<Compile Include="Common\Handlers\CommonPartHandler.cs" />
|
||||
<Compile Include="Common\Models\CommonPart.cs" />
|
||||
@@ -228,6 +223,11 @@
|
||||
<Compile Include="Navigation\ViewModels\MenuItemEntry.cs" />
|
||||
<Compile Include="Navigation\ViewModels\NavigationManagementViewModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Reports\AdminMenu.cs" />
|
||||
<Compile Include="Reports\Controllers\AdminController.cs" />
|
||||
<Compile Include="Reports\Routes.cs" />
|
||||
<Compile Include="Reports\ViewModels\DisplayReportViewModel.cs" />
|
||||
<Compile Include="Reports\ViewModels\ReportsAdminIndexViewModel.cs" />
|
||||
<Compile Include="Scheduling\Migrations.cs" />
|
||||
<Compile Include="Scheduling\Models\ScheduledTaskRecord.cs" />
|
||||
<Compile Include="Scheduling\Services\ScheduledTaskManager.cs" />
|
||||
@@ -292,7 +292,7 @@
|
||||
<Content Include="Common\Views\Fields.Common.Text.cshtml" />
|
||||
<Content Include="Common\Views\Parts.Common.Body.SummaryAdmin.cshtml" />
|
||||
<Content Include="Common\Views\Parts.Common.Metadata.cshtml" />
|
||||
<Content Include="Common\Views\CommonMetadataOwner.cshtml" />
|
||||
<Content Include="Common\Views\CommonMetadataLastModified.cshtml" />
|
||||
<Content Include="Containers\Module.txt" />
|
||||
<Content Include="Contents\Styles\images\menu.content.png" />
|
||||
<Content Include="Contents\Styles\menu.content-admin.css" />
|
||||
@@ -318,8 +318,6 @@
|
||||
<Content Include="Reports\Module.txt" />
|
||||
<Content Include="Reports\Styles\images\menu.reports.png" />
|
||||
<Content Include="Reports\Styles\menu.reports-admin.css" />
|
||||
<Content Include="Reports\Views\Admin\Display.cshtml" />
|
||||
<Content Include="Reports\Views\Admin\Index.cshtml" />
|
||||
<Content Include="Settings\Module.txt" />
|
||||
<Content Include="Settings\Styles\admin.css" />
|
||||
<Content Include="Settings\Styles\images\menu.settings.png" />
|
||||
@@ -354,7 +352,7 @@
|
||||
<ProjectReference Include="..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>True</Private>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -435,9 +433,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Reports\Styles\Web.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Views\Parts.Common.Metadata.SummaryAdmin.cshtml" />
|
||||
</ItemGroup>
|
||||
@@ -570,6 +565,11 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Common\Views\EditorTemplates\Flavor.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Reports\Styles\Web.config" />
|
||||
<Content Include="Reports\Views\Admin\Display.cshtml" />
|
||||
<Content Include="Reports\Views\Admin\Index.cshtml" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
using Orchard.Localization;
|
||||
using Orchard.Security;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
namespace Orchard.Core.Reports {
|
||||
public class AdminMenu : INavigationProvider {
|
||||
public Localizer T { get; set; }
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder.AddImageSet("reports")
|
||||
.Add(T("Reports"), "12",
|
||||
menu => menu.Add(T("View"), "0", item => item.Action("Index", "Admin", new { area = "Reports" })
|
||||
.Permission(StandardPermissions.SiteOwner)));
|
||||
}
|
||||
}
|
||||
using Orchard.Localization;
|
||||
using Orchard.Security;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
namespace Orchard.Core.Reports {
|
||||
public class AdminMenu : INavigationProvider {
|
||||
public Localizer T { get; set; }
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder.AddImageSet("reports")
|
||||
.Add(T("Reports"), "12",
|
||||
menu => menu.Add(T("View"), "0", item => item.Action("Index", "Admin", new { area = "Reports" })
|
||||
.Permission(StandardPermissions.SiteOwner)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,42 +1,42 @@
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Core.Reports.ViewModels;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Reports.Services;
|
||||
using Orchard.Security;
|
||||
|
||||
namespace Orchard.Core.Reports.Controllers {
|
||||
public class AdminController : Controller {
|
||||
private readonly IReportsManager _reportsManager;
|
||||
|
||||
public AdminController(
|
||||
IOrchardServices services,
|
||||
IReportsManager reportsManager) {
|
||||
Services = services;
|
||||
_reportsManager = reportsManager;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public IOrchardServices Services { get; set; }
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public ActionResult Index() {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to list reports")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var model = new ReportsAdminIndexViewModel { Reports = _reportsManager.GetReports().ToList() };
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public ActionResult Display(int id) {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to display report")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var model = new DisplayReportViewModel { Report = _reportsManager.Get(id) };
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
}
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.Core.Reports.ViewModels;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Reports.Services;
|
||||
using Orchard.Security;
|
||||
|
||||
namespace Orchard.Core.Reports.Controllers {
|
||||
public class AdminController : Controller {
|
||||
private readonly IReportsManager _reportsManager;
|
||||
|
||||
public AdminController(
|
||||
IOrchardServices services,
|
||||
IReportsManager reportsManager) {
|
||||
Services = services;
|
||||
_reportsManager = reportsManager;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
public IOrchardServices Services { get; set; }
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public ActionResult Index() {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to list reports")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var model = new ReportsAdminIndexViewModel { Reports = _reportsManager.GetReports().ToList() };
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public ActionResult Display(int id) {
|
||||
if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to display report")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var model = new DisplayReportViewModel { Report = _reportsManager.Get(id) };
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
Name: Reports
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The dashboard module is providing the reports screen of the application.
|
||||
FeatureDescription: Reports management.
|
||||
Category: Core
|
||||
Name: Reports
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The dashboard module is providing the reports screen of the application.
|
||||
FeatureDescription: Reports management.
|
||||
Category: Core
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.Mvc.Routes;
|
||||
|
||||
namespace Orchard.Core.Reports {
|
||||
public class Routes : IRouteProvider {
|
||||
public void GetRoutes(ICollection<RouteDescriptor> routes) {
|
||||
foreach (var routeDescriptor in GetRoutes())
|
||||
routes.Add(routeDescriptor);
|
||||
}
|
||||
|
||||
public IEnumerable<RouteDescriptor> GetRoutes() {
|
||||
return new[] {
|
||||
new RouteDescriptor {
|
||||
Priority = -5,
|
||||
Route = new Route(
|
||||
"Admin/Reports",
|
||||
new RouteValueDictionary {
|
||||
{"area", "Reports"},
|
||||
{"controller", "Admin"},
|
||||
{"action", "Index"}
|
||||
},
|
||||
new RouteValueDictionary(),
|
||||
new RouteValueDictionary {
|
||||
{"area", "Reports"}
|
||||
},
|
||||
new MvcRouteHandler())
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.Mvc.Routes;
|
||||
|
||||
namespace Orchard.Core.Reports {
|
||||
public class Routes : IRouteProvider {
|
||||
public void GetRoutes(ICollection<RouteDescriptor> routes) {
|
||||
foreach (var routeDescriptor in GetRoutes())
|
||||
routes.Add(routeDescriptor);
|
||||
}
|
||||
|
||||
public IEnumerable<RouteDescriptor> GetRoutes() {
|
||||
return new[] {
|
||||
new RouteDescriptor {
|
||||
Priority = -5,
|
||||
Route = new Route(
|
||||
"Admin/Reports",
|
||||
new RouteValueDictionary {
|
||||
{"area", "Reports"},
|
||||
{"controller", "Admin"},
|
||||
{"action", "Index"}
|
||||
},
|
||||
new RouteValueDictionary(),
|
||||
new RouteValueDictionary {
|
||||
{"area", "Reports"}
|
||||
},
|
||||
new MvcRouteHandler())
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
|
||||
</staticContent>
|
||||
|
||||
<handlers accessPolicy="Script,Read">
|
||||
<!--
|
||||
iis7 - for any request to a file exists on disk, return it via native http module.
|
||||
accessPolicy 'Script' is to allow for a managed 404 page.
|
||||
-->
|
||||
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.navicon-reports {
|
||||
background-image:url(images/menu.reports.png) !important;
|
||||
}
|
||||
.navicon-reports:hover {
|
||||
background-position:0 -30px !important;
|
||||
.navicon-reports {
|
||||
background-image:url(images/menu.reports.png) !important;
|
||||
}
|
||||
.navicon-reports:hover {
|
||||
background-position:0 -30px !important;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using Orchard.Reports;
|
||||
|
||||
namespace Orchard.Core.Reports.ViewModels {
|
||||
public class DisplayReportViewModel {
|
||||
public Report Report { get; set; }
|
||||
}
|
||||
using Orchard.Reports;
|
||||
|
||||
namespace Orchard.Core.Reports.ViewModels {
|
||||
public class DisplayReportViewModel {
|
||||
public Report Report { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Reports;
|
||||
|
||||
namespace Orchard.Core.Reports.ViewModels {
|
||||
public class ReportsAdminIndexViewModel {
|
||||
public IList<Report> Reports { get; set; }
|
||||
}
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Reports;
|
||||
|
||||
namespace Orchard.Core.Reports.ViewModels {
|
||||
public class ReportsAdminIndexViewModel {
|
||||
public IList<Report> Reports { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,39 +1,39 @@
|
||||
@model DisplayReportViewModel
|
||||
@using Orchard.Core.Reports.ViewModels;
|
||||
|
||||
@{ Layout.Title = T("Display Report").ToString(); }
|
||||
|
||||
@using(Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<table class="items" summary="@T("This is a table of the reports in your application")">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">@T("Type")</th>
|
||||
<th scope="col">@T("Message")</th>
|
||||
<th scope="col">@T("Date")</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var reportEntry in Model.Report.Entries) {
|
||||
<tr>
|
||||
<td>
|
||||
@reportEntry.Type
|
||||
</td>
|
||||
<td>
|
||||
@reportEntry.Message
|
||||
</td>
|
||||
<td>
|
||||
@reportEntry.Utc.ToLocalTime().ToShortDateString() @reportEntry.Utc.ToLocalTime().ToShortTimeString()
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</fieldset>
|
||||
@model DisplayReportViewModel
|
||||
@using Orchard.Core.Reports.ViewModels;
|
||||
|
||||
@{ Layout.Title = T("Display Report").ToString(); }
|
||||
|
||||
@using(Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<table class="items" summary="@T("This is a table of the reports in your application")">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">@T("Type")</th>
|
||||
<th scope="col">@T("Message")</th>
|
||||
<th scope="col">@T("Date")</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var reportEntry in Model.Report.Entries) {
|
||||
<tr>
|
||||
<td>
|
||||
@reportEntry.Type
|
||||
</td>
|
||||
<td>
|
||||
@reportEntry.Message
|
||||
</td>
|
||||
<td>
|
||||
@reportEntry.Utc.ToLocalTime().ToShortDateString() @reportEntry.Utc.ToLocalTime().ToShortTimeString()
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</fieldset>
|
||||
}
|
||||
@@ -1,39 +1,39 @@
|
||||
@model ReportsAdminIndexViewModel
|
||||
@using Orchard.Core.Reports.ViewModels;
|
||||
|
||||
@{ Layout.Title = T("Reports").ToString(); }
|
||||
|
||||
@using(Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<table class="items" summary="@T("This is a table of the reports in your application")">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">@T("Name")</th>
|
||||
<th scope="col">@T("Title")</th>
|
||||
<th scope="col">@T("Date")</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var report in Model.Reports) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(report.ActivityName, "Display", new {id = report.ReportId})
|
||||
</td>
|
||||
<td>
|
||||
@report.Title
|
||||
</td>
|
||||
<td>
|
||||
@report.Utc.ToLocalTime().ToShortDateString() @report.Utc.ToLocalTime().ToShortTimeString()
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</fieldset>
|
||||
@model ReportsAdminIndexViewModel
|
||||
@using Orchard.Core.Reports.ViewModels;
|
||||
|
||||
@{ Layout.Title = T("Reports").ToString(); }
|
||||
|
||||
@using(Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<table class="items" summary="@T("This is a table of the reports in your application")">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">@T("Name")</th>
|
||||
<th scope="col">@T("Title")</th>
|
||||
<th scope="col">@T("Date")</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var report in Model.Reports) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(report.ActivityName, "Display", new {id = report.ReportId})
|
||||
</td>
|
||||
<td>
|
||||
@report.Title
|
||||
</td>
|
||||
<td>
|
||||
@report.Utc.ToLocalTime().ToShortDateString() @report.Utc.ToLocalTime().ToShortTimeString()
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</fieldset>
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Scheduling.Models;
|
||||
using Orchard.Data;
|
||||
@@ -11,7 +10,6 @@ using Orchard.Tasks;
|
||||
using Orchard.Tasks.Scheduling;
|
||||
|
||||
namespace Orchard.Core.Scheduling.Services {
|
||||
[UsedImplicitly]
|
||||
public class ScheduledTaskExecutor : IBackgroundTask {
|
||||
private readonly IClock _clock;
|
||||
private readonly IRepository<ScheduledTaskRecord> _repository;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Scheduling.Models;
|
||||
using Orchard.Data;
|
||||
@@ -10,7 +9,6 @@ using Orchard.Tasks.Scheduling;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.Core.Scheduling.Services {
|
||||
[UsedImplicitly]
|
||||
public class ScheduledTaskManager : IScheduledTaskManager {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly IRepository<ScheduledTaskRecord> _repository;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Drivers;
|
||||
using Orchard.Core.Settings.Models;
|
||||
@@ -13,7 +12,6 @@ using Orchard.Settings;
|
||||
using Orchard.UI.Notify;
|
||||
|
||||
namespace Orchard.Core.Settings.Drivers {
|
||||
[UsedImplicitly]
|
||||
public class SiteSettingsPartDriver : ContentPartDriver<SiteSettingsPart> {
|
||||
private readonly ISiteService _siteService;
|
||||
private readonly ICultureManager _cultureManager;
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
using JetBrains.Annotations;
|
||||
using System;
|
||||
using Orchard.Core.Settings.Models;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
|
||||
namespace Orchard.Core.Settings.Handlers {
|
||||
[UsedImplicitly]
|
||||
public class SiteSettingsPartHandler : ContentHandler {
|
||||
public SiteSettingsPartHandler() {
|
||||
Filters.Add(new ActivatingFilter<SiteSettingsPart>("Site"));
|
||||
|
||||
OnInitializing<SiteSettingsPart>(InitializeSiteSettings);
|
||||
}
|
||||
|
||||
private static void InitializeSiteSettings(InitializingContentContext initializingContentContext, SiteSettingsPart siteSettingsPart) {
|
||||
siteSettingsPart.SiteSalt = Guid.NewGuid().ToString("N");
|
||||
siteSettingsPart.SiteName = "My Orchard Project Application";
|
||||
siteSettingsPart.PageTitleSeparator = " - ";
|
||||
siteSettingsPart.SiteTimeZone = TimeZoneInfo.Local.Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,10 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using System.Linq;
|
||||
using Orchard.Caching;
|
||||
using Orchard.Core.Settings.Models;
|
||||
using Orchard.Logging;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Settings;
|
||||
|
||||
namespace Orchard.Core.Settings.Services {
|
||||
[UsedImplicitly]
|
||||
public class SiteService : ISiteService {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly ICacheManager _cacheManager;
|
||||
@@ -18,11 +14,8 @@ namespace Orchard.Core.Settings.Services {
|
||||
ICacheManager cacheManager) {
|
||||
_contentManager = contentManager;
|
||||
_cacheManager = cacheManager;
|
||||
Logger = NullLogger.Instance;
|
||||
}
|
||||
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public ISite GetSiteSettings() {
|
||||
var siteId = _cacheManager.Get("SiteId", ctx => {
|
||||
var site = _contentManager.Query("Site")
|
||||
@@ -30,12 +23,7 @@ namespace Orchard.Core.Settings.Services {
|
||||
.FirstOrDefault();
|
||||
|
||||
if (site == null) {
|
||||
site = _contentManager.Create<SiteSettingsPart>("Site", item => {
|
||||
item.SiteSalt = Guid.NewGuid().ToString("N");
|
||||
item.SiteName = "My Orchard Project Application";
|
||||
item.PageTitleSeparator = " - ";
|
||||
item.SiteTimeZone = TimeZoneInfo.Local.Id;
|
||||
}).ContentItem;
|
||||
site = _contentManager.Create<SiteSettingsPart>("Site").ContentItem;
|
||||
}
|
||||
|
||||
return site.Id;
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
if (controller.is(":checkbox")) {
|
||||
controller.click($(this).toggleWhatYouControl).each($(this).toggleWhatYouControl);
|
||||
} else if (controller.is(":radio")) {
|
||||
$("[name=" + controller.attr("name") + "]").click(function () { $("[name=" + $(this).attr("name") + "]").each($(this).toggleWhatYouControl); });
|
||||
$("[name='" + controller.attr("name") + "']").click(function () { $("[name='" + $(this).attr("name") + "']").each($(this).toggleWhatYouControl); });
|
||||
}
|
||||
else if (controller.is("option")) {
|
||||
controller.parent().change(function() {
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="Orchard.Framework"/>
|
||||
<add assembly="Orchard.Core"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -99,9 +100,9 @@
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<!-- 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">
|
||||
<!-- 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)" />
|
||||
|
||||
@@ -66,10 +66,12 @@
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -144,20 +146,20 @@
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<!-- 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">
|
||||
<!-- 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" DependsOnTargets="AfterBuildCompiler">
|
||||
<PropertyGroup>
|
||||
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
|
||||
</PropertyGroup>
|
||||
<!-- If this is an area child project, uncomment the following line:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
<!-- If this is an area child project, uncomment the following line:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
-->
|
||||
<!-- If this is an area parent project, uncomment the following lines:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||
<!-- If this is an area parent project, uncomment the following lines:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||
-->
|
||||
</Target>
|
||||
<Target Name="AfterBuildCompiler" Condition="'$(MvcBuildViews)'=='true'">
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="Orchard.Framework"/>
|
||||
<add assembly="Orchard.Core"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
||||
@@ -88,10 +88,12 @@
|
||||
<ProjectReference Include="..\..\..\Orchard\Orchard.Framework.csproj">
|
||||
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
|
||||
<Name>Orchard.Framework</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Core\Orchard.Core.csproj">
|
||||
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
|
||||
<Name>Orchard.Core</Name>
|
||||
<Private>false</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -121,20 +123,20 @@
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<!-- 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">
|
||||
<!-- 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" DependsOnTargets="AfterBuildCompiler">
|
||||
<PropertyGroup>
|
||||
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
|
||||
</PropertyGroup>
|
||||
<!-- If this is an area child project, uncomment the following line:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
<!-- If this is an area child project, uncomment the following line:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Child" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
-->
|
||||
<!-- If this is an area parent project, uncomment the following lines:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||
<!-- If this is an area parent project, uncomment the following lines:
|
||||
<CreateAreaManifest AreaName="$(AssemblyName)" AreaType="Parent" AreaPath="$(ProjectDir)" ManifestPath="$(AreasManifestDir)" ContentFiles="@(Content)" />
|
||||
<CopyAreaManifests ManifestPath="$(AreasManifestDir)" CrossCopy="false" RenameViews="true" />
|
||||
-->
|
||||
</Target>
|
||||
<Target Name="AfterBuildCompiler" Condition="'$(MvcBuildViews)'=='true'">
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="Orchard.Framework"/>
|
||||
<add assembly="Orchard.Core"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.AntiSpam.Models;
|
||||
using Orchard.AntiSpam.Models;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Localization;
|
||||
|
||||
namespace Orchard.AntiSpam.Handlers {
|
||||
[UsedImplicitly]
|
||||
[OrchardFeature("Akismet.Filter")]
|
||||
public class AkismetSettingsPartHandler : ContentHandler {
|
||||
public AkismetSettingsPartHandler() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user