mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-26 12:03:16 +08:00
Posting bulk actions through Javascript
--HG-- branch : dev
This commit is contained in:
@@ -219,12 +219,12 @@ namespace Orchard.Packaging.Controllers {
|
||||
var routeData = new RouteData();
|
||||
routeData.Values.Add("Options.Order", options.Order);
|
||||
routeData.Values.Add("Options.SearchText", options.SearchText);
|
||||
routeData.Values.Add("Options.SourceId", options.SourceId);
|
||||
pagerShape.RouteData(routeData);
|
||||
|
||||
return View(packageType == DefaultExtensionTypes.Theme ? "Themes" : "Modules", new PackagingExtensionsViewModel {
|
||||
Extensions = extensions,
|
||||
Sources = _packagingSourceManager.GetSources().OrderBy(s => s.FeedTitle),
|
||||
SelectedSource = selectedSource,
|
||||
Pager = pagerShape,
|
||||
Options = options
|
||||
});
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace Orchard.Packaging.ViewModels {
|
||||
public class PackagingExtensionsViewModel {
|
||||
public IEnumerable<PackagingEntry> Extensions { get; set; }
|
||||
public IEnumerable<PackagingSource> Sources { get; set; }
|
||||
public PackagingSource SelectedSource { get; set; }
|
||||
public PackagingExtensionsOptions Options { get; set; }
|
||||
public dynamic Pager { get; set; }
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Modules", "Gallery"))) {
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="filterResults" class="bulk-filter">@T("Feed:")</label>
|
||||
<select id="sourceId" name="sourceId">
|
||||
@Html.SelectOption("", Model.SelectedSource == null, T("All feeds").ToString())
|
||||
<label for="sourceId">@T("Feed:")</label>
|
||||
<select id="sourceId" name="@Html.NameOf(m => m.Options.SourceId)">
|
||||
@Html.SelectOption(Model.Options.SourceId, null, T("All feeds").ToString())
|
||||
@foreach (var source in Model.Sources) {
|
||||
@Html.SelectOption(source.Id, Model.SelectedSource != null && Model.SelectedSource.Id == source.Id, source.FeedTitle)
|
||||
@Html.SelectOption(Model.Options.SourceId, source.Id, source.FeedTitle)
|
||||
}
|
||||
</select>
|
||||
</fieldset>
|
||||
@@ -27,7 +27,7 @@
|
||||
@Html.SelectOption(Model.Options.Order, PackagingExtensionsOrder.Alphanumeric, T("Alphanumeric").ToString())
|
||||
</select>
|
||||
|
||||
<button type="submit">@T("Apply")</button>
|
||||
<button id="apply-bulk-actions" type="submit">@T("Apply")</button>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="search-actions">
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Themes", "Gallery"))) {
|
||||
<fieldset class="bulk-actions">
|
||||
<label for="filterResults" class="bulk-filter">@T("Show")</label>
|
||||
<select id="sourceId" name="sourceId">
|
||||
@Html.SelectOption("", Model.SelectedSource == null, T("All feeds").ToString())
|
||||
<label for="sourceId">@T("Show")</label>
|
||||
<select id="sourceId" name="@Html.NameOf(m => m.Options.SourceId)">
|
||||
@Html.SelectOption(Model.Options.SourceId, null, T("All feeds").ToString())
|
||||
@foreach (var source in Model.Sources) {
|
||||
@Html.SelectOption(source.Id, Model.SelectedSource != null && Model.SelectedSource.Id == source.Id, source.FeedTitle)
|
||||
@Html.SelectOption(Model.Options.SourceId, source.Id, source.FeedTitle)
|
||||
}
|
||||
</select>
|
||||
</fieldset>
|
||||
@@ -27,7 +27,7 @@
|
||||
@Html.SelectOption(Model.Options.Order, PackagingExtensionsOrder.Alphanumeric, T("Alphanumeric").ToString())
|
||||
</select>
|
||||
|
||||
<button type="submit">@T("Apply")</button>
|
||||
<button id="apply-bulk-actions" type="submit">@T("Apply")</button>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="search-actions">
|
||||
|
||||
Reference in New Issue
Block a user