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

Cleanup Archive/Publish Later and remove unnecessary assets and resources #14441

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 0 additions & 9 deletions src/OrchardCore.Modules/OrchardCore.ArchiveLater/Assets.json

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
Expand Down Expand Up @@ -37,7 +36,7 @@ public override IDisplayResult Display(ArchiveLaterPart part, BuildPartDisplayCo
public override IDisplayResult Edit(ArchiveLaterPart part, BuildPartEditorContext context)
=> Initialize<ArchiveLaterPartViewModel>(
GetEditorShapeType(context),
model => PopulateViewModel(part, model)).Location("Actions:10");
model => PopulateViewModel(part, model)).Location("Actions:10.5");

public override async Task<IDisplayResult> UpdateAsync(ArchiveLaterPart part, IUpdateModel updater, UpdatePartEditorContext context)
{
Expand Down Expand Up @@ -68,6 +67,6 @@ private async ValueTask PopulateViewModel(ArchiveLaterPart part, ArchiveLaterPar
viewModel.ScheduledArchiveUtc = part.ScheduledArchiveUtc;
viewModel.ScheduledArchiveLocalDateTime = part.ScheduledArchiveUtc.HasValue
? (await _localClock.ConvertToLocalAsync(part.ScheduledArchiveUtc.Value)).DateTime
: (DateTime?)null;
: null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@

@inject IAuthorizationService AuthorizationService

<style asp-src="~/OrchardCore.ArchiveLater/Styles/archive-later.min.css" debug-src="~/OrchardCore.ArchiveLater/Styles/archive-later.css"></style>

@if (await AuthorizationService.AuthorizeAsync(User, CommonPermissions.PublishContent, Model.ContentItem))
{
<div class="btn-group">
<input asp-for="ScheduledArchiveLocalDateTime" type="datetime-local" class="form-control content-preview-select" />
<button class="btn btn-primary btn-archive-later" type="submit" name="submit.Publish" value="submit.ArchiveLater">@T["Archive Later"]</button>
<div class="btn-group mb-1">
<div class="input-group">
<input asp-for="ScheduledArchiveLocalDateTime" type="datetime-local" class="form-control content-preview-select" />
<button class="btn btn-outline-primary text-nowrap btn-archive-later" type="submit" name="submit.Publish" value="submit.ArchiveLater">@T["Archive Later"]</button>
</div>
</div>

@if (Model.ScheduledArchiveUtc.HasValue)
{
<div class="btn-group">
<button class="btn btn-primary btn-archive-later" type="submit" name="submit.Publish" value="submit.CancelArchiveLater">@T["Cancel Archive Later"]</button>
<div class="btn-group mb-1">
<button class="btn btn-warning text-nowrap btn-archive-later" type="submit" name="submit.Publish" value="submit.CancelArchiveLater">@T["Cancel Archive Later"]</button>
</div>
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@if (hasPreviewPermission)
{
<a id="previewButton" target="_blank" class="btn btn-info" href="@Url.Action("Index", "Preview", new { area = "OrchardCore.ContentPreview", id = previewId })">@T["Preview"]</a>
<a id="previewButton" target="_blank" class="btn btn-info mb-1" href="@Url.Action("Index", "Preview", new { area = "OrchardCore.ContentPreview", id = previewId })">@T["Preview"]</a>
}

<div id="renderPreviewUrl" style="display:none" data-value="@Url.Action("Render", "Preview", new { area = "OrchardCore.ContentPreview" })"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

@if (!string.IsNullOrWhiteSpace(returnUrl) && Url.IsLocalUrl(returnUrl))
{
<a class="btn btn-secondary cancel" role="button" href="@returnUrl">@T["Cancel"]</a>
<a class="btn btn-secondary cancel mb-1" role="button" href="@returnUrl">@T["Cancel"]</a>
}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

@if (string.IsNullOrWhiteSpace(returnUrl))
{
<button type="submit" name="submit.Publish" class="btn btn-success publish" value="submit.Publish">@T["Publish"]</button>
<button type="submit" name="submit.Publish" class="btn btn-success publish mb-1" value="submit.Publish">@T["Publish"]</button>
}
else
{
<div class="btn-group">
<div class="btn-group mb-1">
<button class="btn btn-success publish" type="submit" name="submit.Publish" value="submit.Publish">@T["Publish"]</button>
<button type="button" class="btn btn-success dropdown-toggle dropdown-toggle-split" data-reference="parent" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="visually-hidden">@T["Toggle Dropdown"]</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

@if (string.IsNullOrWhiteSpace(returnUrl))
{
<button class="primaryAction btn btn-primary draft" type="submit" name="submit.Save" value="submit.Save">@T["Save Draft"]</button>
<button class="primaryAction btn btn-primary draft mb-1" type="submit" name="submit.Save" value="submit.Save">@T["Save Draft"]</button>
}
else
{
<div class="btn-group">
<div class="btn-group mb-1">
<button class="btn btn-primary draft" type="submit" name="submit.Save" value="submit.Save">@T["Save Draft"]</button>
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-reference="parent" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="visually-hidden">@T["Toggle Dropdown"]</span>
Expand Down
9 changes: 0 additions & 9 deletions src/OrchardCore.Modules/OrchardCore.PublishLater/Assets.json

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@

@inject IAuthorizationService AuthorizationService

<style asp-src="~/OrchardCore.PublishLater/Styles/publish-later.min.css" debug-src="~/OrchardCore.PublishLater/Styles/publish-later.css"></style>

@if (await AuthorizationService.AuthorizeAsync(User, CommonPermissions.PublishContent, Model.ContentItem))
{
<div class="btn-group">
<div class="btn-group mb-1">
<div class="input-group">
<input asp-for="ScheduledPublishLocalDateTime" type="datetime-local" class="form-control content-preview-select" />
<button class="btn btn-outline-success btn-publish-later" type="submit" name="submit.Save" value="submit.PublishLater">@T["Publish Later"]</button>
<button class="btn btn-outline-success text-nowrap btn-publish-later" type="submit" name="submit.Save" value="submit.PublishLater">@T["Publish Later"]</button>
</div>
</div>

@if (Model.ScheduledPublishUtc.HasValue)
{
<div class="btn-group">
<button class="btn btn-warning btn-publish-later" type="submit" name="submit.Save" value="submit.CancelPublishLater">@T["Cancel Publish Later"]</button>
<div class="btn-group mb-1">
<button class="btn btn-warning text-nowrap btn-publish-later" type="submit" name="submit.Save" value="submit.CancelPublishLater">@T["Cancel Publish Later"]</button>
</div>
}
}

This file was deleted.

This file was deleted.