Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/7352 content picker localization upgrades culture dropdown #7388

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c9e14f9
Modified the OutputCache Module based on the enhancement proposed in …
MatteoPiovanelli Oct 17, 2016
58e59e2
- added EventHandler in order to partecipate in cachekey generation
HermesSbicego-Laser Oct 19, 2016
b7ee130
Merge remote-tracking branch 'remotes/Laser.Orchard/feature/5790_part…
HermesSbicego-Laser Oct 19, 2016
350cbbd
- typo chaching > caching
HermesSbicego-Laser Oct 19, 2016
1dcee8a
- typo chaching > caching
HermesSbicego-Laser Oct 19, 2016
794b9b0
Merge branch 'feature/5790_partecipate_in_cache_key_generation' of ht…
HermesSbicego-Laser Oct 19, 2016
54a1bdf
Merge remote-tracking branch 'remotes/Laser.Orchard/feature/5790_part…
HermesSbicego-Laser Oct 19, 2016
548b5d7
- Method renamed
HermesSbicego-Laser Oct 21, 2016
297e586
Merge branch 'feature/5790_partecipate_in_cache_key_generation' into …
HermesSbicego-Laser Oct 21, 2016
2bb81ee
- Added attachments logic
HermesSbicego-Laser Oct 21, 2016
d4d4a32
Merge branch 'feature/6196_SupportForAttachments' into 1.10.x
HermesSbicego-Laser Oct 21, 2016
a4c816b
- missing Attachments Key fix
HermesSbicego-Laser Oct 21, 2016
67af300
Merge branch 'feature/6196_SupportForAttachments' into 1.10.x
HermesSbicego-Laser Oct 21, 2016
580b79c
- Added attachments logic
HermesSbicego-Laser Oct 21, 2016
bf2201c
Merge branch 'feature/6196_SupportForAttachments' into 1.10.x
HermesSbicego-Laser Oct 21, 2016
f6cfe32
Merge remote-tracking branch 'remotes/Laser.Orchard/1.10.x' into 1.10.x
MatteoPiovanelli Oct 24, 2016
e50bd60
- Formatted Code (Rebracer)
HermesSbicego-Laser Oct 25, 2016
c1b1c4d
Merge remote-tracking branch 'remotes/Laser.Orchard/feature/6196_Supp…
HermesSbicego-Laser Oct 25, 2016
60aa1cc
Merge branch '1.10.x' of https://github.com/OrchardCMS/Orchard into 1…
HermesSbicego-Laser Oct 25, 2016
9f42664
Merge branch '1.10.x' of https://github.com/LaserSrl/Orchard into 1.10.x
HermesSbicego-Laser Oct 25, 2016
ce8a61e
Fixes #7346
MatteoPiovanelli Oct 26, 2016
1b511b2
- Implement what described in #6688
HermesSbicego-Laser Oct 26, 2016
f8cbc63
Merge branch 'feature/6688_RequestTokens_Chaintext' into 1.10.x
HermesSbicego-Laser Oct 26, 2016
17ebdd2
- typo
HermesSbicego-Laser Oct 26, 2016
927d18b
Merge remote-tracking branch 'remotes/Laser.Orchard/feature/6688_Requ…
HermesSbicego-Laser Oct 26, 2016
7b09747
inserted a better explanation on how to use the chains
HermesSbicego-Laser Oct 27, 2016
0daad70
Merge remote-tracking branch 'remotes/Laser.Orchard/feature/6688_Requ…
HermesSbicego-Laser Oct 27, 2016
a15557e
Merge branch 'issues/7346_WidgetsViewQueryString' into Laser/1.10.x
MatteoPiovanelli Oct 27, 2016
f095dea
Merge remote-tracking branch 'remotes/OrchardCMS.Orchard/1.10.x' into…
HermesSbicego-Laser Oct 28, 2016
e3a7059
- Addition of an existing png (OrchardLogo.png) as attachment within …
HermesSbicego-Laser Oct 28, 2016
5fe0b69
Merge branch 'feature/6196_SupportForAttachments' into Laser/1.10.x
HermesSbicego-Laser Oct 28, 2016
708ed79
Merge branch '1.10.x' of https://github.com/LaserSrl/Orchard into Las…
HermesSbicego-Laser Oct 28, 2016
395976f
Merge branch 'Laser/1.10.x' of https://github.com/LaserSrl/Orchard in…
HermesSbicego-Laser Oct 28, 2016
3c53ffb
- replaced Regex.Replace with String.Trim(char[]) as suggested
HermesSbicego-Laser Nov 4, 2016
578b21b
Merge branch 'feature/6688_RequestTokens_Chaintext' into Laser/1.10.x
HermesSbicego-Laser Nov 4, 2016
b90629d
Merge remote-tracking branch 'remotes/OrchardCMS.Orchard/1.10.x' into…
MatteoPiovanelli Nov 8, 2016
14111a1
Added a dropdown allowing language selection/filtering for the list o…
MatteoPiovanelli Nov 8, 2016
ba5d96b
Added a dropdown allowing language selection/filtering for the list o…
MatteoPiovanelli Nov 8, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Orchard.Core.Contents.ViewModels;
using Orchard.DisplayManagement;
using Orchard.Localization;
using Orchard.Localization.Services;
using Orchard.Mvc;
using Orchard.Settings;
using Orchard.Themes;
Expand All @@ -22,16 +23,22 @@ public class AdminController : Controller {
private readonly ISiteService _siteService;
private readonly IContentDefinitionManager _contentDefinitionManager;
private readonly INavigationManager _navigationManager;
private readonly ICultureManager _cultureManager;
private readonly ICultureFilter _cultureFilter;

public AdminController(
IOrchardServices orchardServices,
ISiteService siteService,
IContentDefinitionManager contentDefinitionManager,
INavigationManager navigationManager) {
INavigationManager navigationManager,
ICultureManager cultureManager,
ICultureFilter cultureFilter) {
_siteService = siteService;
_contentDefinitionManager = contentDefinitionManager;
_navigationManager = navigationManager;
Services = orchardServices;
_cultureManager = cultureManager;
_cultureFilter = cultureFilter;

T = NullLocalizer.Instance;
}
Expand Down Expand Up @@ -123,10 +130,16 @@ public ActionResult Index(ListContentsViewModel model, PagerParameters pagerPara
break;
}

if (!String.IsNullOrWhiteSpace(model.Options.SelectedCulture)) {
query = _cultureFilter.FilterCulture(query, model.Options.SelectedCulture);
}

model.Options.FilterOptions = contentTypes
.Select(ctd => new KeyValuePair<string, string>(ctd.Name, ctd.DisplayName))
.ToList().OrderBy(kvp => kvp.Value);

model.Options.Cultures = _cultureManager.ListCultures();

var pagerShape = Services.New.Pager(pager).TotalItemCount(query.Count());
var pageOfContentItems = query.Slice(pager.GetStartIndex(), pager.PageSize).ToList();
var list = Services.New.List();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
@using Orchard.Core.Contents.ViewModels;
@{
Script.Require("SelectableContentTab");

var typeDisplayName = Model.TypeDisplayName;
var pageTitle = T("Recent Content");

if (!string.IsNullOrWhiteSpace(typeDisplayName)) {
pageTitle = T("Manage {0} Content", typeDisplayName);
}

IEnumerable<string> cultures = Model.Options.Cultures;

Layout.Title = pageTitle;

}

<div class="manage">
Expand All @@ -25,6 +27,17 @@
@Html.SelectOption((string)Model.Options.SelectedFilter, (string)filterOption.Key, (string)filterOption.Value)
}
</select>

@if (cultures.Count() > 1) {
<label for="filterCultures" class="bulk-culture">@T("Culture")</label>
<select id="filterCultures" name="Options.SelectedCulture">
@Html.SelectOption((string)Model.Options.SelectedCulture, "", T("any (show all)").ToString())
@foreach (string culture in cultures) {
@Html.SelectOption((string)Model.Options.SelectedCulture, culture, System.Globalization.CultureInfo.GetCultureInfo(culture).DisplayName)
}
</select>
}

<label for="orderResults" class="bulk-order">@T("Ordered by")</label>
<select id="orderResults" name="Options.OrderBy">
@Html.SelectOption((ContentsOrder)Model.Options.OrderBy, ContentsOrder.Created, T("recently created").ToString())
Expand Down