Compare commits

..

317 Commits

Author SHA1 Message Date
Daniel Stolt
bfe2c296ec Added IRecipeResultAccessor for programmatically obtaining result of recipe execution. 2015-07-11 23:22:18 +01:00
Daniel Stolt
3036396ae6 Merge from dev. 2015-07-11 20:59:35 +01:00
Daniel Stolt
27da7125b8 Improved log formatting. 2015-07-10 16:11:50 +01:00
Sipke Schoorstra
fd1b06f72d Updated Features recipe step to include Migrations step.
This will cause migrations to execute after features have been enabled.
2015-07-10 15:31:35 +01:00
Sipke Schoorstra
a2d3e41dad Removed unnecessary injection of IContentManager. 2015-07-10 14:54:15 +01:00
Sipke Schoorstra
645c36a2dd Added support for VS2015 to ClickToBuild.cmd. 2015-07-10 11:55:35 +01:00
Sipke Schoorstra
6c04c416c7 Merge branch 'feature/importexport-full-roundtrip' into dev 2015-07-10 11:48:08 +01:00
Daniel Stolt
863761d30a Improved logging in recipe components. 2015-07-09 22:34:21 +01:00
Daniel Stolt
ad4a702f7c Adding the Reports feature back. 2015-07-09 21:49:02 +01:00
Sipke Schoorstra
298b2fb930 Merge branch '1.9.x' into dev
Conflicts:
	src/Orchard.Web/Modules/Orchard.Dashboards/Web.config
2015-07-09 17:23:13 +01:00
Daniel Stolt
95eecd30b9 Added logging to replace removed recipe journals. 2015-07-09 16:54:13 +01:00
Sipke Schoorstra
537adf9cba #5375: Exporting various items in a predictable order.
Fixes 5375
2015-07-09 14:11:34 +01:00
Sipke Schoorstra
85b06375a0 Added assembly binding redirects. 2015-07-09 14:09:40 +01:00
Daniel Stolt
a431bb0cb0 Removed recipe journals. 2015-07-09 14:09:29 +01:00
Sipke Schoorstra
784e1c0961 Added web.config with redirect bindings. 2015-07-09 13:44:02 +01:00
Daniel Stolt
2c10b0df98 Added Log4net configuration for recipes logging. Added logging to replace the removed reports logging. 2015-07-09 12:31:37 +01:00
Sipke Schoorstra
2654a2c47c Merge branch 'dev' into feature/importexport-full-roundtrip 2015-07-09 12:30:09 +01:00
Sipke Schoorstra
ed214246d8 Removed mixed tabs and spaces. 2015-07-09 12:29:23 +01:00
Sipke Schoorstra
76132f2691 #5056: Added Export Features recipe step.
Fixes #5056
2015-07-09 12:29:05 +01:00
Sipke Schoorstra
41b245560c Removed unused namespaces and empty folder. 2015-07-09 11:59:25 +01:00
Daniel Stolt
e054a833af Removed Orchard.Reports. 2015-07-09 11:43:04 +01:00
Sipke Schoorstra
9a2eaf7ac9 #5489: Handling potential null value for MediaLibraryPickerField.MediaParts.
This happens when a content type has both a MediaLibraryPickerField and the LayoutPart attached.
The layout editor renders the field, whose shape template accesses the MediaParts property, which is not initialized for new content items.

Fixes #5489
2015-07-08 22:45:52 +01:00
Lombiq
89c5b2f7de Fixing that Audit Trail summary item edit link was double-encoded 2015-07-06 01:15:12 +02:00
Lombiq
b6db85b8af Untabifying CommentPartDriver 2015-07-05 14:19:37 +02:00
Sipke Schoorstra
4e61c3314d Merge branch '1.9.x' into dev
Conflicts:
	src/Orchard.Web/Modules/Orchard.Autoroute/Drivers/AutoroutePartDriver.cs
	src/Orchard.Web/Modules/Orchard.Autoroute/Views/EditorTemplates/Parts.Autoroute.Edit.cshtml
	src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/LayoutEditor.js
	src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/LayoutEditor.min.js
	src/Orchard.Web/Modules/Orchard.Layouts/Drivers/LayoutPartDriver.cs
	src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj
2015-07-04 14:35:41 +02:00
Sipke Schoorstra
b37951e205 Merge branch '1.9.x' into dev
Conflicts:
 src/Orchard.Web/Modules/Orchard.Autoroute/Drivers/AutoroutePartDriver.cs
 src/Orchard.Web/Modules/Orchard.Autoroute/Views/EditorTemplates/Parts.Autoroute.Edit.cshtml
 src/Orchard.Web/Modules/Orchard.DynamicForms/Migrations.cs
 src/Orchard.Web/Modules/Orchard.DynamicForms/Views/Elements/ValidationMessage.Design.cshtml
 src/Orchard.Web/Modules/Orchard.DynamicForms/Views/Elements/ValidationSummary.Design.cshtml
 src/Orchard.Web/Modules/Orchard.DynamicForms/Web.config
 src/Orchard.Web/Modules/Orchard.Layouts/Drivers/LayoutPartDriver.cs
 src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj
 src/Orchard.Web/Modules/Orchard.Layouts/Scripts/LayoutEditor.js
 src/Orchard.Web/Modules/Orchard.Layouts/Scripts/LayoutEditor.min.js
 src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.js
 src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.min.js
 src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.css
 src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.min.css
 src/Orchard.Web/Modules/Orchard.Layouts/Views/Elements/Shape.Design.cshtml
 src/Orchard.Web/Modules/Orchard.Layouts/Web.config
2015-07-04 14:27:04 +02:00
Sipke Schoorstra
6bce34f379 #5260: Fixed the issue where form validation result gets output cached.
Fixes #5260
2015-07-04 13:01:17 +02:00
Sipke Schoorstra
c8f2c27311 Fixed form redirect issue.
This fixes the issue where you would not stay on the same page after a model validation occurred.
2015-07-04 12:45:17 +02:00
Sipke Schoorstra
22fa33c06f #5279: Fixed "potentially dangerous request" error.
Fixes #5279
2015-07-04 12:25:23 +02:00
Sipke Schoorstra
bbf6700e1a #5099: Improved image element dialog by hiding Save/Cancel buttons. 2015-07-04 11:45:43 +02:00
Sipke Schoorstra
c2b0041e1c Updated usage of correct LazyField class.
This fixes the "is deprecated" build warning for the Widgets module.
2015-07-04 11:44:18 +02:00
Sipke Schoorstra
70697b8c5e Removed image references.
This stylesheet is a copy from the TheAdminTheme theme, but doesn't require the images, so removed these references instead of copying over the images.
2015-07-04 11:42:50 +02:00
Sipke Schoorstra
504f484b19 Fixed broken Html element view. 2015-07-04 10:32:11 +02:00
Sipke Schoorstra
2508f503b7 #5298: Suppressed input validation on SMPT test form.
This fixes the issue when you try and use address formats such as "User <user@domain.com>" and adds support for sending HTML as part of the message body.

Fixes #5298
2015-07-04 09:51:05 +02:00
Sipke Schoorstra
1093e16a81 #5452: Improved ContentItem and Projection elements by rendering an abstract representation instead.
Fixes #5452
2015-07-04 09:36:31 +02:00
Sipke Schoorstra
1fe436e05a Fixed incorrect method error. 2015-07-04 09:32:51 +02:00
Sipke Schoorstra
b18f153e6a #5445: Fixed form field binding issues.
This fixes two issues:
1. Adding a Form element (and selecting the content type to create using the submitted values) and then adding a form element would not cause the Bindings tab to appear.
2. Adding nested containers (such as Grid, Row and Column) to a Form element would prevent the Bindings tab from appearing when adding a form field element such as TextField to a nested container.

Work Item: #5445
2015-07-04 00:37:14 +02:00
Sébastien Ros
c75ba007e6 Merge pull request #5453 from kumards/patch-1
Fix for duplicate version number on creating a new draft
2015-07-02 12:28:36 -07:00
Sébastien Ros
b5b3ffea8e Merge pull request #5425 from jersiovic/patch-1
Issue #5061 GetImageProfileUrl reprocess images obtained through a dynamic profile on every restart
2015-07-02 12:18:30 -07:00
Sipke Schoorstra
b05dcf9a56 Fixed default layout data for Form. 2015-07-02 15:40:54 +03:00
Sipke Schoorstra
3c7fffc320 Fixed that default layout data would not be applied.
This fixes the issue where the default layout data string would not be applied when creating new content items of a content type with the LayoutPart attached.
For example, creating new Form content items would start out with an empty canvas instead of with a default Form element and a submit button.
2015-07-02 15:34:08 +03:00
Sipke Schoorstra
b580995e4b Added "TypeName" to element data serialization black list.
Having the "TypeName" as part of the element's data field is redundant.
2015-07-02 15:30:20 +03:00
Sipke Schoorstra
2873eb8991 #5337: Fixed homepage becoming lost after publishing layout template being used by the homepage.
Work Item: 5337
2015-07-02 13:37:20 +03:00
Sipke Schoorstra
eebe29fec3 #5467: Fixes the issue where the "Set as homepage" setting is not retained when saving,
The issue was that when you save a content item (without publishing it) while checking the "Set as homepage" checkbox, it would lose its checked status after save.
With this change, the checkbox is again rendered but in a checked status, so that when you do publish, it will become the homepage.

Fixes #5467
2015-07-02 13:01:49 +03:00
adeveloper
aaef6d8810 Adding a test case for DraftRequired version option building new version of the content 2015-07-01 14:31:31 -04:00
adeveloper
379ae61e34 Code clean up
Removed the commented lines in method BuildNewVersion.
2015-07-01 11:38:49 -04:00
Sébastien Ros
dbba4e2787 Merge pull request #5458 from dcinzona/patch-1
Update web.config MVC bindings for Azure Cloud Service
2015-07-01 07:46:39 -07:00
Sébastien Ros
27365a71d9 Merge pull request #5460 from dcinzona/patch-3
Web.Config: Orchard Layouts Updating MVC reference to 5.2.3
2015-07-01 07:46:20 -07:00
Sébastien Ros
6a5028b80a Merge pull request #5461 from dcinzona/patch-4
Web.config - Dynamic Forms: MVC reference updated to 5.2.3
2015-07-01 07:46:00 -07:00
Gustavo Tandeciarz
e021218b3c Updated bindings in azure cloud service web.config
Updated bindings for system.web.http and system.net.http.formatting to 5.2.3
2015-06-30 19:48:05 -04:00
Gustavo Tandeciarz
993e6a1e43 Web.config: MVC reference updated to 5.2.3
Was still referencing 5.1.0.0
2015-06-30 17:54:18 -04:00
Gustavo Tandeciarz
0318db4c53 Web.Config: Updating MVC reference to 5.2.3
web.config was still referencing 5.1.0.0
2015-06-30 17:53:13 -04:00
Sebastien Ros
7758eb66f2 Fixing build 2015-06-30 14:47:22 -07:00
Sebastien Ros
e7ceb732b1 Merge branch '1.9.x' into dev 2015-06-30 14:39:06 -07:00
Sebastien Ros
03a193b6c2 Fixing compilation 2015-06-30 14:38:12 -07:00
Gustavo Tandeciarz
38705580c8 Update web.config MVC bindings
Updated from 5.2.0.0 to 5.2.3
2015-06-30 14:48:02 -04:00
Sebastien Ros
1d6cb27d01 Merge branch '1.9.x' into dev
Conflicts:
	README.md
	src/Orchard.Web/Modules/Orchard.DynamicForms/Controllers/FormController.cs
	src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/CheckboxElementDriver.cs
	src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/EmailFieldElementDriver.cs
	src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/EnumerationElementDriver.cs
	src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/HiddenFieldElementDriver.cs
	src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/RadioButtonElementDriver.cs
	src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextAreaElementDriver.cs
	src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextFieldElementDriver.cs
	src/Orchard.Web/Modules/Orchard.Layouts/Drivers/HeadingElementDriver.cs
	src/Orchard.Web/Modules/Orchard.Layouts/Drivers/HtmlElementDriver.cs
	src/Orchard.Web/Modules/Orchard.Layouts/Drivers/MarkdownElementDriver.cs
	src/Orchard.Web/Modules/Orchard.Layouts/Drivers/TextElementDriver.cs
	src/Orchard.Web/Modules/Orchard.Layouts/Filters/TokensFilter.cs
	src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj
	src/Orchard.Web/Modules/Orchard.Layouts/Views/Elements/Html.cshtml
	src/Orchard/Orchard.Framework.csproj
2015-06-30 11:35:41 -07:00
Sebastien Ros
6b0985a44e Merge branch 'master' into 1.9.x 2015-06-30 11:31:35 -07:00
Jasmin Savard
28168c0550 Fixes #5457; Admin Culture Picker cookie not working on localhost 2015-06-30 13:09:19 -04:00
adeveloper
9d6937c792 DefaultContentManager.cs
The new version should always be contentItemRecord.Versions.Max(x => x.Number) + 1; not latestVersion.Number + 1;

I have a scenario where user can delete the draft content. In this scenario, I set the published version to have Latest=true and the draft version to have Latest=false. Now if I have to create again a new draft out of the published content, I end up having two versions of the same content items with the same version number.
2015-06-29 17:07:14 -04:00
Sipke Schoorstra
583ff8951a Removed unused namespaces. 2015-06-27 19:49:23 +03:00
Sipke Schoorstra
5c688267fa #5420: Added stub CSS files for various activities to prevent 404 errors. 2015-06-27 18:47:06 +03:00
Sipke Schoorstra
2c496a36db #5437: Maintaining selected values after model validation error. 2015-06-27 18:31:08 +03:00
Nicholas Mayne
4967fa807b Fixing multi tenant content culture lookup - thanks to Mr Spits for the patch. 2015-06-27 15:36:13 +01:00
Sipke Schoorstra
18166bd274 Fixed KeyNotFoundException in AutoroutePart.
This fixes the issue where the autoroute part fails after a clean Orchard setup.
2015-06-27 13:38:44 +03:00
Sipke Schoorstra
23e525206b Merge branch 'dev' into feature/dashboard 2015-06-27 12:52:11 +03:00
Sipke Schoorstra
b1c782f560 Added permission checks. 2015-06-27 12:51:08 +03:00
Nicholas Mayne
9dbf30cd10 Merge pull request #5441 from oldrev/pg-connstr-fix
Fixed the sample of PostgreSQL's connection string
2015-06-27 10:37:35 +01:00
Sipke Schoorstra
ca4fb40bdf Merge branch 'dev' into feature/dashboard 2015-06-27 12:12:01 +03:00
oldrev
315f271fcc Fixed the sample of PostgreSQL's connection string 2015-06-27 16:29:20 +08:00
Nicholas Mayne
c435a98670 Merge pull request #5435 from yw80/1.9.x
Remove a excess @ in TaxonomyField.cshtml
2015-06-26 09:07:23 +01:00
yw80
42dae3edf3 Remove a excess @ in TaxonomyField.cshtml
I think this is just an oversight.
2015-06-26 14:21:07 +08:00
Lombiq
4e7e274d85 CSS classes can now be specified for widgets, fixes #5387 2015-06-26 00:34:57 +02:00
Sergio Navarro
9966e13fa3 Removed FilterContext and extra read 2015-06-25 22:50:34 +02:00
Sébastien Ros
f3fc2b53ba Merge pull request #5429 from dalenewman/patch-2
Fix moderator notification
2015-06-25 13:20:16 -07:00
Sébastien Ros
1a9b7af4ac Merge pull request #5430 from jchenga/issues/5148-1.9.x
[Fixes #5418] Lost Password not working with Anonymous Access Off
2015-06-25 13:15:32 -07:00
Jack Cheng
0c7fd67dca [Fixes #5418] Lost Password not working with Anonymous Access Off 2015-06-25 12:57:09 -07:00
Dale Newman
6063ba31d0 Fix moderator notification
`Orchard.Email.Services.SmtpMessageChannel.Process` expects a string for Recipients, not a string array. This results in an *Object reference not set to an instance of an object* exception and the moderator(s) do not get notified. Fixes #4928.
2015-06-25 15:45:50 -04:00
Sébastien Ros
7bf2c702a1 Merge pull request #5427 from jersiovic/patch-2
#5426 Projections don't order queries following Position field
2015-06-25 12:41:42 -07:00
Sébastien Ros
61d432ba4c Merge pull request #5413 from dcinzona/patch-2
Assembly binding to azure storage 4.3.0
2015-06-25 12:23:20 -07:00
Sébastien Ros
7cdb9ecf53 Merge pull request #5404 from MpDzik/pr/localize-quote
Fix handling localized strings with quotes
2015-06-25 12:22:52 -07:00
Sébastien Ros
1aefd0fdbd Merge pull request #5267 from Skrypt/autoroute-patterns-localization
Autoroute patterns localization
2015-06-25 12:12:06 -07:00
Sergio Navarro
ae61c81575 #5426 Projections don't order queries following Position field
Projections don't order queries following the Position field of each order in the query

Related issue https://github.com/OrchardCMS/Orchard/issues/5426
2015-06-25 20:26:15 +02:00
Lombiq
31e3072328 Enabling SetupService to harvest recipes from themes too 2015-06-25 16:57:13 +02:00
Sergio Navarro
29042d10f2 Update ImageProfileManager.cs
Image cache is empty after every reboot of the Orchard app. It makey Dynamic ImageProfiles reprocess images after every reboot. It has a big impact on performance because all the images that use dynamic profiles are reprocessed when they are requested after a reboot. When you open a page with a number of images disks usage increases drammatically and the apps answer very slow to other requests

This is related with this issue https://github.com/OrchardCMS/Orchard/issues/5061
2015-06-23 23:05:17 +02:00
Marek Dzikiewicz
6636527006 Add unit tests for #4154 and #5402 2015-06-23 11:44:46 +02:00
Marek Dzikiewicz
aacf0b2476 Introduce ILocalizationStreamParser
This moves the logic of parsing PO files from
DefaultLocalizedStringManager to a separate service, so that parsing
can be tested independently from resolving translations from loaded PO
files.
2015-06-23 11:44:29 +02:00
Gustavo Tandeciarz
88ac0d2879 Assembly binding to azure storage 4.3.0
Retargeting to 1.9.x - updated assembly binding from 3.1.0 to 4.3.0
2015-06-22 18:55:35 -04:00
Daniel Stolt
723c177fe3 Fixed merge artifacts. 2015-06-22 21:12:43 +03:00
Sebastien Ros
622b191ad5 Merge branch '1.9.x' into dev 2015-06-22 10:11:56 -07:00
Skrypt
c192ade6a9 Removing commented code in migration 2015-06-22 12:18:51 -04:00
Marek Dzikiewicz
104cf7d5f4 Fix handling localized strings with quotes 2015-06-20 22:42:33 +02:00
Daniel Stolt
45aeb7b467 Merged 1.9.x into dev. 2015-06-20 23:30:49 +03:00
Sebastien Ros
d6c452466c Merge branch '1.9.x' into dev 2015-06-19 12:57:49 -07:00
Sebastien Ros
a4edee5474 Refactoring authentication validation 2015-06-19 11:33:44 -07:00
Sebastien Ros
0e47295b9f Merge branch '1.9.x' into dev
Conflicts:
	src/Orchard.Web/Modules/Orchard.Comments/Web.config
	src/Orchard.Web/Modules/Orchard.Fields/Web.config
	src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs
	src/Orchard.Web/Modules/Orchard.Taxonomies/Web.config
2015-06-19 11:33:12 -07:00
Sebastien Ros
745e88805c Fixing unresolvable IMembership dependency
Fixes #5395
2015-06-18 16:23:27 -07:00
Sebastien Ros
db66ec941c Adding setting to set allowed media types 2015-06-18 16:03:50 -07:00
Sebastien Ros
fb923f09e0 Merge branch '1.9.x' into dev 2015-06-18 14:20:08 -07:00
Sebastien Ros
95a073ff93 Ignoring auth cookies of logged out users 2015-06-18 14:06:01 -07:00
Sébastien Ros
a3a252fb19 Merge pull request #5392 from paynecrl97/5356/abstract_active_layer_evaluation
Abstract active layer evaluation away from the Widget Filter
2015-06-18 12:53:21 -07:00
Sébastien Ros
5560cd76db Merge pull request #5376 from thekaveman/dev
adding 'export file' command for use in Orchard.exe
2015-06-18 12:40:22 -07:00
Sébastien Ros
d2ad3e31bb Merge pull request #5358 from oldrev/feature/postgresql
Feature: PostgreSQL Support
2015-06-18 12:35:03 -07:00
Sebastien Ros
6d58498b82 Merge branch '1.9.x' into dev
Conflicts:
	src/Orchard.Web/Modules/Orchard.DynamicForms/Web.config
	src/Orchard.Web/Modules/Orchard.ImageEditor/Web.config
	src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj
	src/Orchard/Localization/Text.cs
2015-06-18 10:35:06 -07:00
paynecrl97
5a828da403 Changes signature of ILayerEvaluationService from IEnumerable to array; Fixes localizer access. 2015-06-18 09:41:18 +01:00
Skrypt
c68d212681 Closes #5389; Admin Culture Picker wrong cookie domain. 2015-06-17 19:47:09 -04:00
paynecrl97
0bd279cc89 Places active layer IDs into a LazyField in order to prevent evaluation multiple times per request 2015-06-17 16:27:29 +01:00
Skrypt
34ddbbd371 Adding lazy update of patterns. Code optimizations.
Commented out the migration patterns upgrade code.
2015-06-14 21:18:57 -04:00
Lombiq
de9fc2fb5b Registration and last login date are now tracked for users, fixes #1296 2015-06-13 23:56:40 +02:00
Lombiq
e066e39070 Decoupling Dynamic Forms' root feature from Orchard.Scripting.CSharp and Orchard.Users, fixes #5349 2015-06-13 23:50:26 +02:00
Skrypt
6e3d00b2d9 Optimization to support null values on culture instead of needing to set it to an empty string --> cleaner 2015-06-12 01:54:42 -04:00
Skrypt
8beec81217 Reverting changes in Migration.
Adding String.IsNullOrEmpty instead of == ""
Fixed migration code to use ContentDefinitionManager only
Fixed return numbers on migration
using DefaultJsonConverter service in AutorouteSettings.cs
2015-06-11 23:53:41 -04:00
Kegan Maher
d782d83db7 ensure that a version arg was given 2015-06-11 08:48:48 -07:00
Sipke Schoorstra
20fe55a458 Merge branch '1.9.x' into dev
Conflicts:
	src/Orchard.Web/Modules/Orchard.DynamicForms/Orchard.DynamicForms.csproj
	src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Forms.js
	src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Forms.min.js
	src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj
	src/Orchard.Web/Modules/Orchard.Layouts/Scripts/LayoutEditor.min.js
	src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.min.js
	src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.css
	src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.css.bundle
	src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor.min.css
	src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Editor.css
	src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Editor.min.css
	src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.css
	src/Orchard.Web/Modules/Orchard.Layouts/Styles/LayoutEditor/Popup.min.css
	src/Orchard.Web/Modules/Orchard.Layouts/Views/LayoutEditor.Template.Toolbox.cshtml
	src/Orchard/Tasks/BackgroundService.cs
2015-06-10 23:58:18 +03:00
Kegan Maher
298f30e628 adding 'export file' command for use in Orchard.exe for #4937 2015-06-10 13:02:41 -07:00
Lombiq
81dade1ab4 When a content type gets modified, its items will get re-indexed by a JobsQueue job instead of a custom queue-like implementation. Fixes #4729.
Since this adds a new dependency to Orchard.Indexing it requires #3132 to be fixed.
2015-06-09 14:16:16 +02:00
Lombiq
8a7a300414 Fixing that a JobsQueue job re-queuing itself caused a DB deadlock.
JobsQueueProcessor is a singleton, so every IDependency it gets injected should be wrapped into Work<T>.
2015-06-09 14:13:01 +02:00
Lombiq
31a325a810 Implementing alternating row colours for content type and part editors too, fixes #2665 2015-06-09 00:09:54 +02:00
paynecrl97
bde7d900c0 adds summary tags 2015-06-08 15:24:41 +01:00
paynecrl97
550b778b8b minor whitespace fix 2015-06-08 15:07:02 +01:00
paynecrl97
9893eb7430 Braces tidy up 2015-06-08 10:50:10 +01:00
paynecrl97
ffcccf7ae1 Adds ILayerEvaluationService and implementation.
The default implementation of this service is merely an abstraction of the logic that already existed in `WidgetFilter`
2015-06-08 10:47:16 +01:00
Skrypt
23f3f29a47 Creating Patterns and Default Patterns for each culture installed when attaching an AutoroutePart to a Content Type.
Related to issue #5195
2015-06-07 21:12:11 -04:00
Skrypt
60ce2d777c Adding fix when we create a new Content Type and that we don't save any Pattern. We should save default patterns to each culture when we assign an AutoroutePart to a content type. 2015-06-07 18:34:42 -04:00
Skrypt
f8ab1c509e Adding migration of AutorouteSettings.DefaultPatternIndex to AutorouteSettings.DefaultPatternDefinitions 2015-06-07 18:14:12 -04:00
oldrev
fb717b0e2e Add PostgreSQL RDBMS support 2015-06-07 09:39:49 +08:00
Sipke Schoorstra
56032dd815 Merge branch '1.9.x' into dev
Conflicts:
	src/Orchard.Web/Modules/Orchard.Layouts/Orchard.Layouts.csproj
	src/Orchard.Web/Modules/Orchard.Setup/SetupMode.cs
	src/Orchard.Web/Modules/Orchard.Taxonomies/Drivers/TaxonomyFieldDriver.cs
	src/Orchard/Mvc/HttpContextAccessor.cs
	src/Orchard/Mvc/IHttpContextAccessor.cs
	src/Orchard/Orchard.Framework.csproj
	src/Orchard/Tasks/BackgroundService.cs
2015-06-07 00:46:14 +02:00
Skrypt
a721352797 Work on Migrations.
Fixing view counter to check for pattern instead of pattern name since it can be empty.
2015-06-06 02:14:01 -04:00
Skrypt
ab8162347e Fixing small bug when creating a new content type. The use culture checkbox click event whas not working because the ID can change depending on the order the parts have been added. Replaced the jQuery selector to a class instead. 2015-06-04 20:55:57 -04:00
Sébastien Ros
6763bd8bb8 Merge pull request #5344 from gcsuk/5342
Added logging for invalid recipe files
2015-06-04 13:10:38 -07:00
Rob King
8f281ef9d9 Reverted unit test 2015-06-04 21:03:23 +01:00
Rob King
8421b2f7e8 Changed to log error details in addition to file name 2015-06-04 21:01:35 +01:00
Bertrand Le Roy
55f2fb24c2 Fix the case of protocol-less stylesheet URI.
.NET's Uri.IsWellFormedUriString doesn't understand protocol-less URI, resulting in the stylesheet binding strategy mistaking those for local resources, and trying to find alternates. This is wasteful and can lead to subtle bugs. If the method is ever fixed, the new code will die, and everything sill continue to work as expected.
2015-06-04 11:01:46 -07:00
Sipke Schoorstra
071733495e Fixed unit tests. 2015-06-04 11:33:53 +02:00
Skrypt
13b012d212 Fix unneeded files changes/add 2015-06-03 22:45:26 -04:00
Skrypt
202dbc3866 Adding the option to activate patterns per culture or not. Falling back to the default culture pattern(s) if not activated. 2015-06-03 22:37:29 -04:00
Sipke Schoorstra
ce630f980c #5305: Fixing the issue where httpcontext would be resolved from the wrong lifetime scope container in certain cases.
This changeset fixes a number of issues:
- Fixes the Autofac.Core.DependencyResolutionException: A delegate registered to create instances of 'System.Web.HttpContextBase' returned null error in VS 2015.
- Fixes indexing of layout part. The issue was that elements being rendered from a background task context and an element template uses an HTML helper, that would cause an exception since HttpContext.Current would normally be null.
- Replaces the need for injecting HttpContextBase with injecting IHttpContextAccessor (actually one should never inject HttpContextBase anymore - use IHttpContextAccessor instead).
2015-06-04 02:06:24 +02:00
Rob King
67de77fe08 Moved ToList after Where clause 2015-06-02 14:43:54 +01:00
Nicholas Mayne
6183c8783e Rescoping where allroles is created in post 2015-06-02 13:50:05 +01:00
Nicholas Mayne
bb13163ac3 Changing scope for looking up all roles to after authorization check in admin 2015-06-02 13:47:23 +01:00
Nicholas Mayne
7415d6d5cc Fixing issue where anon users can spam the SiteService on Content Authorization. Also changing scope of double part check. 2015-06-02 11:19:00 +01:00
Rob King
99f7285e80 Added logging for invalid recipe files 2015-06-02 11:03:13 +01:00
Skrypt
61fe66d806 Incremental work 2015-05-29 15:01:38 -04:00
Skrypt
4da549abf3 Merge branch 'dev' of https://github.com/OrchardCMS/Orchard into autoroute-patterns-localization 2015-05-27 19:38:57 -04:00
Sipke Schoorstra
1e83068b8c Fixed the immediate issue where setup fails.
This is a temporary fix falling back to original behavior of the HttpContextAccessor.
2015-05-28 00:59:48 +02:00
Skrypt
059b6c38e0 Merge branch 'dev' of https://github.com/OrchardCMS/Orchard into autoroute-patterns-localization 2015-05-27 14:55:39 -04:00
Sipke Schoorstra
34008c469e Merge branch 'dev' into issue/4607-httpcontextaccessor 2015-05-27 16:20:26 +02:00
Sipke Schoorstra
9bf6ac5718 #4607: Refactored HttpContextAccessor to return a valid HttpContextBase instance in background tasks. 2015-05-26 19:49:55 +02:00
Lombiq
801d58183a Fixing that JobsQueue doesn't actually use Task Lease to prevent multiple server nodes from executing the same jobs 2015-05-23 23:54:08 +02:00
Lombiq
443b03fd67 Removing unused folders from TaskLease 2015-05-23 21:49:41 +02:00
Sipke Schoorstra
09d232612a Removed unused enum values and consolidated SortDirection and OrderByDirection.
The unused enum values of the SortDirectionEnum were probably an artifact of a copy/paste operation.
2015-05-23 11:09:41 +02:00
Lombiq
d1ae7380e4 Removing empty Controllers folder from Autoroute 2015-05-22 00:19:16 +02:00
Lombiq
0283dc22c5 Warning users when they remove the home page, fixes #4843 2015-05-22 00:18:24 +02:00
Sébastien Ros
95221229ac Merge pull request #5257 from keesd/dev
Fix for bugs #2536 and #5024
2015-05-21 12:11:30 -07:00
Sipke Schoorstra
f5b9a76675 #5309: Simplified implementation and renamed helper method. 2015-05-21 13:53:55 +02:00
Sipke Schoorstra
5f30667df1 #5309: Updated OutputCacheFilter to include a check for the OutputCacheAttribute.Location value. 2015-05-21 13:47:14 +02:00
Bertrand Le Roy
8976cc11d1 Update Readme to reflect the most recent mission statement and version number. 2015-05-20 17:38:37 -07:00
Bertrand Le Roy
c3c8edf300 Move the chat badge down on readme. 2015-05-20 17:33:55 -07:00
Sipke Schoorstra
064ee72d6d Fixed versioning issues. 2015-05-21 00:12:46 +02:00
Sipke Schoorstra
cb7a52b25c Merge branch 'dev' into feature/dashboard 2015-05-20 23:47:19 +02:00
Sipke Schoorstra
bcf457d3f3 Fixed default dashboard layout string. 2015-05-20 19:12:38 +02:00
Sipke Schoorstra
22b961f7d4 Improved TokensFilter.
Since null is an allowed value anyway.
2015-05-20 18:56:19 +02:00
Sipke Schoorstra
f84361d231 Implemented a UrlHelper token provider.
This enables users to create hyperlinks based on route values that are dynamically turned into actual urls.
2015-05-20 18:55:28 +02:00
Lombiq
2a57a15363 Fixing that in Workflows localized outcomes were used as identifiers, breaking when a localization package was installed.
This is a breaking change for localized sites, see 1.10 release notes.
2015-05-20 01:31:15 +02:00
Sipke Schoorstra
316c6e3262 Simplifying dashboard management.
This removes the ability to edit multiple dashboards in favor of a simplified way for users to edit the default dashboard.
2015-05-20 01:27:53 +02:00
Lombiq
15ccba2b81 Fixing that Orchard.Email Workflows classes weren't actually under the corresponding feature 2015-05-20 00:27:57 +02:00
Lombiq
82602369c6 Formatting Taxonomies source files 2015-05-19 21:46:38 +02:00
Sébastien Ros
1f10abb9ea Merge pull request #5301 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-05-19 12:06:49 -07:00
The Gitter Badger
f98c5e27f6 Added Gitter badge 2015-05-19 19:05:45 +00:00
Lombiq
3c94d48f59 Adding paging when listing Taxonomies and Taxonomy terms, fixes #4506 2015-05-19 15:32:09 +02:00
Lombiq
d4a8df3e99 Fixing oversight in previous 2015-05-18 20:52:39 +02:00
Bertrand Le Roy
3e2dfe0609 Merge branch 'dev' of https://github.com/OrchardCMS/Orchard into dev 2015-05-18 11:28:22 -07:00
Bertrand Le Roy
52c897fd02 Make the default favicon not suck on Firefox. 2015-05-18 11:26:03 -07:00
Lombiq
7ebaf2fd5c Fixing that CombinedResult is not handled when updating an editor. 2015-05-18 17:19:54 +02:00
Lombiq
052a80474f Fixing that driver editor posts are executed if grouping was set from placement but the shape hidden 2015-05-18 17:11:21 +02:00
Sebastien Ros
f2b8d68345 Merge branch '1.9.x' into dev 2015-05-14 10:26:10 -07:00
Lombiq
301792f5ed Adding change password link to the dashboard #3588 2015-05-14 18:10:03 +02:00
Lombiq
3760e12029 Adding the ability to rename workflows, fixes #3570 2015-05-14 18:04:45 +02:00
Lombiq
1cfbfbce92 Indexing task creation now happens gradually in a background task, preventing timeout/out of memory when editing a content type with many items. Fixes #4729. 2015-05-14 12:51:57 +02:00
Zoltán Lehóczky
f932cc394f Adding Select all checkbox to all suitable admin lists, fixes #5026 2015-05-14 00:36:31 +02:00
Sipke Schoorstra
865f583be2 Incremental work on Dashboards. 2015-05-09 01:12:17 +02:00
Lombiq
c73d6c0a91 Removing empty RouteExtension, fixes #2509 2015-05-08 21:14:06 +02:00
Kees Damen
e963fac2b9 Merge branch 'dev' of https://github.com/OrchardCMS/Orchard into dev 2015-05-08 19:49:53 +02:00
Kees Damen
b4c578a2c5 Revert "added check for seeking-capability of inputStream in SaveStream before resetting the position"
This reverts commit 085feeb118.
2015-05-08 19:38:46 +02:00
Lombiq
9e66ee6560 Revert "Rolling back streams in storage providers, fixes #4860"
This reverts commit f8e82be4b9.

There are Stream implementation that don't support seeking so we can't do Position resetting just every time.
2015-05-08 16:30:26 +02:00
Sipke Schoorstra
55edf7ccfd Incremental work on Dashboards. 2015-05-08 00:38:03 +02:00
Kees Damen
085feeb118 added check for seeking-capability of inputStream in SaveStream before resetting the position 2015-05-07 23:36:21 +02:00
Kees Damen
92de1f7207 Merge branch '1.9-int' into dev 2015-05-07 21:42:13 +02:00
Daniel Stolt
9491a5750b Added support for era names to date formatting/parsing framework (fixes failing unit tests on Windows 10). 2015-05-07 16:44:41 +02:00
Daniel Stolt
635abd7456 Fixed unit tests not being discovered due to CopyLocal=false on core references.
Having CopyLocal=false on references to Orchard.Core and Orchard.Framework in unit test projects prevented VS from discovering unit tests (at least when using the NUnit Test Adapter for Visual Studio). This change resets CopyLocal=true for these references in all unit test projects.
2015-05-07 14:16:56 +02:00
Sipke Schoorstra
74a71321de Incremental work on Dashboards. 2015-05-07 00:08:06 +02:00
Sipke Schoorstra
fa3f1cbc70 Added NumericFieldBinding. 2015-05-06 21:38:41 +02:00
Sipke Schoorstra
2dc5448ee0 Incremental work on Dashboards. 2015-05-06 12:35:26 +02:00
Sebastien Ros
02b889a925 Merge branch '1.8.x' into 1.x 2015-05-05 21:42:52 -07:00
Sebastien Ros
2c45b9b13e Merge branch 'master' into 1.x 2015-05-05 21:40:02 -07:00
Sipke Schoorstra
5479fe9bcb Incremental work on Dashboards. 2015-05-04 19:40:11 +02:00
Sipke Schoorstra
e0aa89b668 Minor code file cleanup. 2015-05-04 18:00:55 +02:00
Sipke Schoorstra
ba409819f2 #5237: Consistified media library breadcrumbs. 2015-05-04 17:59:38 +02:00
Sipke Schoorstra
324214e812 Merge pull request #5232 from giannik/patch-2
Fix for issue #5219
2015-05-02 10:59:43 +02:00
yiannis kyriazidis
ba9e1679b8 Fix for issue #5219 2015-05-02 11:38:40 +03:00
Sipke Schoorstra
3311c9a8a4 Updated web.config files to fix intellisense for Razor view files.
This fixes the side effect of setting CopyLocal=False on the Orchard.Framework project references where Razor intellisense was broken.
Although not necessary in most cases, I also added Orchard.Core for free, for those rare cases where a service is directly consumed in a Razor view.
2015-05-02 10:14:29 +02:00
Nicholas Mayne
a11c92ae50 Merge pull request #5230 from dcinzona/1.x
Fix for issue #5228
2015-05-02 08:44:11 +01:00
Gustavo Tandeciarz
7689fe7394 Fix for issue OrchardCMS/Orchard#5228 2015-05-02 02:08:43 -04:00
Sipke Schoorstra
379ac040e1 Fixed binding issue for Enumeration field when using RadioList.
This fixes an issue when the Enumeration content field is configured to use radio buttons - in which case the editor shape will use the "Value" property instead of the "SelectedValues" property. Since the binding would only set the value through "SelectedValues", the stored value would be surrounded with a comma, which would not match with any of the enumeration values.
2015-05-01 16:39:50 +02:00
Sébastien Ros
cd479efdae Merge pull request #5213 from Skrypt/1.x
Workflow Definition fixes
2015-04-30 12:43:29 -07:00
Sébastien Ros
b86f7146f8 Merge pull request #5208 from RoyalVeterinaryCollege/4977
fixes #4977 Incorrect BlogPartArchive count
2015-04-30 12:39:23 -07:00
Sébastien Ros
fc09661fd6 Merge pull request #5206 from Ermesx/pr/deprecate-lazyField
Make Orchard.Core.Common.Utilities.LazyField<T> [Obsolete]
2015-04-30 12:37:26 -07:00
Sébastien Ros
1a9be8c57a Merge pull request #5202 from jtkech/patch-3
#5113: SecureSocketsLayer, incorrect Hostname when port number is included
2015-04-30 12:33:48 -07:00
Sébastien Ros
f2f9d8c1ca Merge pull request #5201 from thekaveman/1.8.x
Fix null exception in AzureBlobStorageProvider.GetStoragePath
2015-04-30 12:32:10 -07:00
Sipke Schoorstra
ceaa36c329 Fixed default layout data string for Form content type. 2015-04-30 18:09:52 +02:00
Sipke Schoorstra
ce6876eacf Revived default layout data initialization. 2015-04-30 18:09:26 +02:00
Sipke Schoorstra
a919aab936 Layout Canvas reusability improvements.
This enables child canvas elements to be moved around and removed.
2015-04-30 17:35:03 +02:00
Sipke Schoorstra
ff461b3945 Added MenuPart to Form content type by default. 2015-04-30 17:29:15 +02:00
Sipke Schoorstra
5a5d2f9ae8 Added URL referrer safety check. 2015-04-30 17:28:49 +02:00
Sipke Schoorstra
c7094ab46b #5215: Implemented import/export for *SearchFormPart*. 2015-04-29 20:32:50 +02:00
Sipke Schoorstra
e6b84ad587 #5216: Added call to *InitHelpers*.
This will cause various helpers to be initialized, such as the *Html* property.
2015-04-29 20:30:08 +02:00
Skrypt
af6282c275 Fixed #5118, #3998 : Adding Workflow Definition name string empty validation.
Fixed #4716, #4367 : Adding Workflow Definition bulk delete.
2015-04-28 23:56:21 -04:00
Skrypt
278c8c656a Merge branch '1.x' of https://github.com/OrchardCMS/Orchard into autoroute-patterns-localization
Conflicts:
	src/Orchard.Web/Modules/Orchard.Autoroute/Services/AutorouteService.cs
2015-04-28 18:32:40 -04:00
Kees Damen
3c0c903c10 Fixed UI (removed redundant div) 2015-04-28 22:20:08 +02:00
Kees Damen
67da9bce29 Fixed UI to Orchard standards 2015-04-28 22:10:37 +02:00
Kees Damen
1551a7dd81 Merge remote-tracking branch 'upstream/1.9-int' into 1.9-int 2015-04-28 21:15:43 +02:00
Skrypt
d2fc47eb2d Adding Horizontal Tab nagigation on Autoroute Patterns Localization settings.
Fixing Token Picker CSS (vertical position).
2015-04-28 13:49:48 -04:00
Sipke Schoorstra
8dbd003f61 Implemented import/export for element definitions. 2015-04-28 18:10:45 +02:00
Wojciech Gadziński
d273134df3 Fix formatting 2015-04-27 23:14:56 +02:00
Wojciech Gadziński
13fe3649a8 Added backward compatibility for LazyField 2015-04-27 18:32:47 +02:00
Jeff
d3f5765f5b fixes #4977 Incorrect BlogPartArchive count 2015-04-27 16:20:23 +01:00
Sipke Schoorstra
6b18883e24 Merge branch '1.9-int' into 1.x 2015-04-27 16:11:28 +02:00
Wojciech Gadziński
b9973d91d8 Move all usages of LazyField to Orchard.ContentManagement.Utilities.LazyField
There is one change which have to verify:
Orchard.ContentManagement.Handlers.StorageFilter
Orchard.ContentManagement.Handlers.StorageVersionFilter
because I removed _value parameter from loader delegate - it was pointless and used nowhere except above filters.
2015-04-26 23:56:04 +02:00
Wojciech Gadziński
6afbc78395 Make Orchard.Core.Common.Utilities.LazyField<T> [Obsolete] 2015-04-26 23:23:11 +02:00
Wojciech Gadziński
fa40f4d8b0 Cleanup formatting and references 2015-04-26 23:21:08 +02:00
Kees Damen
b771e3e67e Merge remote-tracking branch 'upstream/1.9-int' into 1.9-int 2015-04-25 22:06:15 +02:00
Kees Damen
a2df93bf39 Fixed formatting 2015-04-25 22:03:44 +02:00
Kees Damen
23e773910f Updated Smtp-settings: username/password auto-hide when windows-authentication is selected 2015-04-25 21:55:30 +02:00
Sipke Schoorstra
c9d30d6cc2 Merge branch '1.9-int' into 1.x 2015-04-25 10:31:55 +02:00
jtkech
6615ea961e #5113: SecureSocketsLayerService: Incorrect Hostname when port number is included
For example, with a hostname = "localhost:44300", the UriBuilder.Host becomes "44300"
2015-04-25 04:11:16 +02:00
Kegan Maher
6baf308b1f avoid null exception in AzureBlobStorageProvider.GetStoragePath, fixes #4402 2015-04-24 15:06:01 -07:00
Kees Damen
c91ff87773 Fixed the Orchard behavior of passing windows credentials to e-mail server when no credentials where entered.
Added an option to the smptsettings configuration to explicitly configure windows authentication.
This fixes bugs #2536 and #5024.
2015-04-24 23:15:46 +02:00
Sébastien Ros
21d80434e8 Merge pull request #5196 from fakedevil/feature/modified-by
Adding fallback to owner if VersionModifiedBy is not filled up
2015-04-24 11:10:30 -07:00
Sébastien Ros
c0a06becd0 Merge pull request #5199 from vairam-svs/1.x
Remove Duplicate code that could be cleanedup for better maintenance.
2015-04-24 11:09:49 -07:00
vairam-svs
41d3e13a71 Update WebViewPage.cs 2015-04-24 09:01:55 -07:00
vairam-svs
e72d4639db Update ViewPage.cs 2015-04-24 09:00:52 -07:00
vairam-svs
0c2e655c7e Update ViewUserControl.cs 2015-04-24 09:00:18 -07:00
vairam-svs
6932fdeac5 Update MetaEntry.cs 2015-04-24 08:58:19 -07:00
Bing Huan Chio
f9523a32b8 Removing unnecessary cast 2015-04-23 13:32:43 -07:00
Bing Huan Chio
84a7c1fccb Adding fallback to owner if VersionModifiedBy is not filled up 2015-04-23 13:13:14 -07:00
Sébastien Ros
3a1c4db64c Merge pull request #5192 from fakedevil/feature/modified-by
Adding modified by to common part
2015-04-23 12:54:29 -07:00
Sipke Schoorstra
5de70ecdef Fixed potential NRE issue with SearchSettingsPart export handler.
This issue occured if no SearchFields were stored yet and the user exports Site Settings.
2015-04-23 12:30:13 +02:00
Bing Huan Chio
0395d33f71 Updated UT and displaying last updated by correctly 2015-04-22 18:42:07 -07:00
Bing Huan Chio
df483c3a8e Adding modified by to common part 2015-04-22 12:22:00 -07:00
Skrypt
e508385dcb Fixing Migrations the right way. 2015-04-22 13:22:59 -04:00
Sipke Schoorstra
96b41fb9b7 Added autofocus to index creation screen. 2015-04-22 13:40:52 +02:00
Sipke Schoorstra
eb517fccaf Added default empty option.
This avoids confusion when the current default index is no longer present and thus another index is displayed.
2015-04-22 13:36:18 +02:00
Sipke Schoorstra
fcbd77c02a Removed unused namespace imports. 2015-04-22 13:10:24 +02:00
Sipke Schoorstra
c32d4f485b Merge branch 'feature/layoutzones' into 1.x
Conflicts:
	src/Orchard.Web/Modules/Orchard.Search/Handlers/SearchSettingsPartHandler.cs
2015-04-22 13:09:36 +02:00
Sipke Schoorstra
b639d893c0 Work on selectable container elements. 2015-04-21 23:08:29 +02:00
Sipke Schoorstra
5dabbf7aec Merge branch '1.9-int' into 1.x 2015-04-21 15:00:42 +02:00
Skrypt
a746532212 Adding changes to Migrations 2015-04-21 04:09:16 -04:00
Skrypt
201408bd59 Rebase on 1.x 2015-04-21 03:35:36 -04:00
Sébastien Ros
7c0f4500eb Merge pull request #5179 from Ermesx/pr/site-settings
Moving default SiteSettings values to a handler.
2015-04-20 21:23:57 -07:00
Sébastien Ros
af8df72f5e Merge pull request #5177 from sfmskywalker/feature/searchwidget
Search Widget Enhancements
2015-04-20 21:20:49 -07:00
Sipke Schoorstra
54c53b7a12 Incremental work on selectable elements. 2015-04-20 23:07:27 +02:00
Sipke Schoorstra
dd34d87ac9 Relaxed focus targets to allow pasting of elements into templated containers. 2015-04-19 22:18:43 +02:00
Sipke Schoorstra
dacdbdffb2 Canvas everywhere. 2015-04-19 22:13:09 +02:00
Sipke Schoorstra
8a300065c9 Fixed Form element design template. 2015-04-19 22:12:56 +02:00
Sipke Schoorstra
f5e4ef8fe5 Merged Rules with Properties. 2015-04-19 21:42:39 +02:00
Sipke Schoorstra
b239a492b4 Improved design view of Menu and Breadcrumbs elements. 2015-04-19 21:38:02 +02:00
Sipke Schoorstra
195d8711f9 Removed Zones integration. 2015-04-19 21:18:31 +02:00
Sipke Schoorstra
7be9428fac Implemented Menu and Breadcrumbs elements. 2015-04-19 21:12:28 +02:00
Sipke Schoorstra
df9eb83a6c Restored broken collapsible implementation. 2015-04-19 20:51:15 +02:00
Sipke Schoorstra
73ee4d1e37 Fixed Notifications issue by handling null HTTP contexts. 2015-04-19 19:33:10 +02:00
Sipke Schoorstra
8f84a011b6 Fixed popup CSS. 2015-04-19 19:30:43 +02:00
Sipke Schoorstra
a9df078ce3 Fixed a Notifications design display bug. 2015-04-19 18:45:53 +02:00
Sipke Schoorstra
838cd0a99a Added Notifications element. 2015-04-19 18:43:27 +02:00
Sipke Schoorstra
eb6285012a Added CreatingDisplay event to ElementDriver. 2015-04-19 18:43:05 +02:00
Sipke Schoorstra
65e951eee1 Core change: refactored NotifyFilter.
This change enables other parts of the system to access the notifications without removing them from TempData.
2015-04-19 18:42:28 +02:00
Sipke Schoorstra
bfa6f1326e Updated Snippet design shape template. 2015-04-19 17:26:02 +02:00
Sipke Schoorstra
1a889594d9 Improved UI element style. 2015-04-19 17:23:08 +02:00
Andre Rodrigues
21b1fb9105 Moving default SiteSettings values to a handler.
--HG--
branch : dev

Ermesx:
Added missing time zone data and fixed conflicts
2015-04-19 14:35:12 +02:00
Sipke Schoorstra
6727e61f6c Merge branch '1.9-int' into feature/layoutzones
Conflicts:
	src/Orchard.Web/Modules/Orchard.Layouts/Scripts/Models.min.js
	src/Orchard.Web/Modules/Orchard.Layouts/Views/Elements/Column.cshtml
	src/Orchard.Web/Modules/Orchard.Search/Handlers/SearchSettingsPartHandler.cs
2015-04-19 14:33:40 +02:00
Sipke Schoorstra
c525bda388 Added rule editor to other element types. 2015-04-19 11:40:13 +02:00
Sipke Schoorstra
d5f75a242d Implemented element rules. 2015-04-19 11:31:53 +02:00
Sipke Schoorstra
24776bf9ee Fixed copy/paste issue with Html element. 2015-04-18 20:48:50 +02:00
Sipke Schoorstra
79e4aa199f Reverted all Orchard.Widgets modifications. 2015-04-18 20:38:39 +02:00
Sipke Schoorstra
d6a0242433 Simplified Admin Search. 2015-04-18 20:16:40 +02:00
Sipke Schoorstra
b88d08b0ff Initial work on configurable search widget. 2015-04-18 19:48:25 +02:00
Sébastien Ros
456e2ccbbd Merge pull request #5174 from keesd/1.x
Fixed projectreference (copy local = false) for CodeGen generated Module...
2015-04-17 15:46:37 -07:00
Kees Damen
cbb5a2f9fc Fixed projectreference (copy local = false) for CodeGen generated Modules 2015-04-17 20:54:56 +02:00
Sipke Schoorstra
3e6043b6d7 Merge branch '1.9-int' into 1.x
Conflicts:
	src/Orchard.Web/Modules/Orchard.MediaLibrary/MediaFileName/MediaFileNameEditorSettings.cs
	src/Orchard.Web/Modules/Orchard.Search/Handlers/SearchSettingsPartHandler.cs
2015-04-17 15:12:28 +02:00
Sébastien Ros
3bb36ab010 Merge pull request #5156 from MpDzik/pr/users-consts2
Define constants for maximum username/email length
2015-04-16 12:57:47 -07:00
Sipke Schoorstra
0d9a4a295c Merge pull request #5170 from keesd/1.x
1.x
2015-04-16 16:56:07 +02:00
Kees Damen
ee1b7a5088 Merge branch '1.x' of https://github.com/keesd/Orchard into 1.x 2015-04-16 16:29:42 +02:00
Kees Damen
2cfcdfaa8b Fixed project references to Orchard.Core and Orchard.Framework 2015-04-16 16:23:12 +02:00
Sipke Schoorstra
bcb6f2c4ac Merge branch '1.9-int' into 1.x 2015-04-16 16:10:57 +02:00
Lombiq
db0c8c3d1f Changing all Codeplex issue links to GitHub links 2015-04-15 21:00:20 +02:00
Lombiq
06070fbb03 Wrapping stream usage into using() instead of manual Dispose() in FileSystemStorageProvider 2015-04-15 20:54:39 +02:00
Lombiq
f8e82be4b9 Rolling back streams in storage providers, fixes #4860 2015-04-15 20:45:11 +02:00
Lombiq
566d23ec55 Untabifying Text class 2015-04-15 20:34:28 +02:00
Nicholas Mayne
ef135d348c Fixes #5164 2015-04-15 16:35:59 +01:00
Nicholas Mayne
441e6056fa Fixes #4276 : removing Persist Security Info=True 2015-04-15 16:27:01 +01:00
Nicholas Mayne
1bc9adae0d Fixes #4301 : Renaming file 2015-04-15 16:24:31 +01:00
Nicholas Mayne
eca6f9177d Fixes #4295 - removing erroneous check in publish later part 2015-04-15 14:56:41 +01:00
Nicholas Mayne
e3249cc02c removing a dependency 2015-04-15 13:51:17 +01:00
Marek Dzikiewicz
c9ebd1db67 Define constants for maximum username/email length 2015-04-15 09:06:34 +02:00
Sipke Schoorstra
1729e73a73 Merge branch '1.9-int' into 1.x 2015-04-10 11:40:54 +02:00
Sipke Schoorstra
3241458017 Fixed a typo. 2015-04-05 14:08:51 +02:00
Sipke Schoorstra
8383572ce1 Optimized widget layer evaluation. 2015-04-05 14:06:43 +02:00
Sipke Schoorstra
1a02d106a8 Added unique zone name validation. 2015-04-05 13:49:39 +02:00
Sipke Schoorstra
c044118b3f Implemented blended positioned rendering. 2015-04-05 12:10:51 +02:00
Sipke Schoorstra
11dc9309f0 Implemented collapsible columns. 2015-04-04 17:22:17 +02:00
Sipke Schoorstra
42d7eeec18 Implemented layout zones caching and changed zone harvesting to collect zones from all layouts. 2015-04-04 15:08:29 +02:00
Sipke Schoorstra
ffd68ec5d6 Incremental work on collapsible columns. 2015-04-03 18:43:57 +02:00
Sipke Schoorstra
721004306d Merge branch '1.9-int' into feature/layoutzones 2015-04-03 17:44:23 +02:00
Sipke Schoorstra
804b4bbc7b Incremental work on blending layouts, zones and widgets. 2015-04-03 17:29:47 +02:00
Sipke Schoorstra
765c265977 Merge branch '1.9-int' into feature/layoutzones 2015-04-03 14:53:58 +02:00
Lombiq
68c0e67aee Fixing that during saving a content type definition, updating MediaFileNameEditorSettings caused an exception if the Stereotype is empty 2015-04-02 16:36:19 +02:00
Daniel Stolt
fac9080326 Removed JetBrains attributes from code base and removed suppression of CS0436 compiler warning. 2015-03-21 15:38:35 +01:00
Benedek Farkas
344d9d77be Tiny fix for the "Contribute back" paragraph on the Dashboard index page 2015-03-20 21:24:04 +01:00
770 changed files with 17049 additions and 4890 deletions

View File

@@ -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"

View File

@@ -1,6 +1,9 @@
# Orchard
Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
[![Join the chat at https://gitter.im/OrchardCMS/Orchard](https://badges.gitter.im/Join%20Chat.svg)](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 projects 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 projects 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
View 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.

Binary file not shown.

6502
lib/npgsql/Npgsql.XML Normal file

File diff suppressed because it is too large Load Diff

BIN
lib/npgsql/Npgsql.dll Normal file

Binary file not shown.

BIN
lib/npgsql/Npgsql.pdb Normal file

Binary file not shown.

52
lib/npgsql/README.md Normal file
View 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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -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>

View File

@@ -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"/>

View File

@@ -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));

View File

@@ -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]

View File

@@ -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>

View File

@@ -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

View File

@@ -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");

View File

@@ -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>

View File

@@ -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

View File

@@ -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"});

View File

@@ -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"));

View File

@@ -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>();

View File

@@ -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]

View File

@@ -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>

View File

@@ -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());
}

View File

@@ -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>();

View File

@@ -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);
}
}
}

View File

@@ -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");

View File

@@ -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>();

View File

@@ -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>();

View File

@@ -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");
}

View File

@@ -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}\""]);
}
}
}

View File

@@ -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>

View File

@@ -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;
}
}
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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) => {

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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));

View File

@@ -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;
}
}
}

View File

@@ -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) {

View File

@@ -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;
}
}
}

View File

@@ -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 {

View File

@@ -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; }
}
}

View File

@@ -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;
}

View File

@@ -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())

View File

@@ -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)))

View File

@@ -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))}&nbsp;&#124;&nbsp;
</li>
<li>@Display.CommonMetadataOwner(ContentPart: Model.ContentPart)</li>
</ul>
<li>
@if (modifiedUtc.HasValue) {
@T("Last modified: {0}", Display.DateTimeRelative(DateTimeUtc: modifiedUtc.Value))}&nbsp;&#124;&nbsp;
</li>
<li>@Display.CommonMetadataLastModified(ContentPart: Model.ContentPart)</li>
</ul>

View File

@@ -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;

View File

@@ -1,6 +0,0 @@
namespace Orchard.Core.Containers.Models {
public enum OrderByDirection {
Ascending,
Descending
}
}

View File

@@ -26,8 +26,6 @@ namespace Orchard.Core.Containers.ViewModels {
public enum SortDirection {
Ascending,
Descending,
Created,
DisplayText
Descending
}
}

View File

@@ -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>

View File

@@ -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) { }

View File

@@ -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())

View File

@@ -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">

View File

@@ -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") {

View File

@@ -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;

View File

@@ -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>();

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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));

View File

@@ -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;

View File

@@ -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;
}
}
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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>

View File

@@ -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)));
}
}
}

View File

@@ -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);
}
}
}

View File

@@ -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

View File

@@ -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())
}
};
}
}
}

View File

@@ -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>

View File

@@ -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;
}

View File

@@ -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; }
}
}

View File

@@ -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; }
}
}

View File

@@ -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>
}

View File

@@ -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>
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;
}
}
}

View File

@@ -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;

View File

@@ -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() {

View File

@@ -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>

View File

@@ -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)" />

View File

@@ -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'">

View File

@@ -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>

View File

@@ -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'">

View File

@@ -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>

View File

@@ -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