Skip to content

Commit 70fea1c

Browse files
authored
Adjust for modal view in task and logs. (#68)
1 parent 729f305 commit 70fea1c

6 files changed

Lines changed: 50 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# 0.20.3 <small>2026-05-08</small>
2+
3+
## 🐛 Bug Fixes
4+
- Fix `Task/Review` not hiding nav and footer when displayed in a modal.
5+
- Fix shared `Log` view not hiding nav/footer, not showing a Close button, and reserving excess vertical space when displayed in a modal.
6+
- Fix README gif path after `samples` folder was relocated out of `App_Data`.
7+
8+
<!-- CHANGELOG_BOUNDARY -->
9+
110
# 0.20.2 <small>2026-05-05</small>
211

312
## 🐛 Bug Fixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ There are recipes for MSSQL, PostgreSql, and SQLite for the above tasks. Initial
6565
Putting it all together, here is a GIF showing a report (with map) that has a bulk
6666
action to change color associated with the record.
6767

68-
![bogus report](src/Site/App_Data/samples/sacramento-crime/criminal-bulk-actions.gif)
68+
![bogus report](src/Site/samples/sacramento-crime/criminal-bulk-actions.gif)
6969

7070
`TODO: Link to arrangement here.`
7171

src/OrchardCore.Transformalize/OrchardCore.Transformalize.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<TargetFramework>net10.0</TargetFramework>
44
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
55
<RootNamespace>TransformalizeModule</RootNamespace>
6-
<Version>0.20.2</Version>
7-
<FileVersion>0.20.2</FileVersion>
8-
<AssemblyVersion>0.20.2</AssemblyVersion>
6+
<Version>0.20.3</Version>
7+
<FileVersion>0.20.3</FileVersion>
8+
<AssemblyVersion>0.20.3</AssemblyVersion>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1010
<Authors>Dale Newman</Authors>
1111
<Copyright>Copyright © 2013-2026</Copyright>

src/OrchardCore.Transformalize/Views/Shared/Log.cshtml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
var auth = Context.RequestServices.GetService<IAuthorizationService>();
99
var returnUrl = string.Empty;
1010
var target = "_self";
11+
var isModal = Context.Request.Query["modal"] == "1";
1112
if (Model.Item != null) {
1213
// You might not want to re-run your task automatically
1314
if (Model.Item.ContentType == "TransformalizeTask") {
@@ -17,6 +18,21 @@
1718
}
1819
}
1920
}
21+
22+
@if (isModal) {
23+
<style>
24+
nav {
25+
display: none !important;
26+
}
27+
footer {
28+
display: none !important;
29+
}
30+
div.table-responsive {
31+
min-height: auto !important;
32+
}
33+
</style>
34+
}
35+
2036
<style>
2137
.table-sm > tbody > tr > td {
2238
padding: 2px;
@@ -31,10 +47,14 @@
3147
}
3248
</style>
3349

34-
@if (Model.Item != null && await auth.AuthorizeAsync(Context.User, OrchardCore.Contents.Permissions.EditContent, Model.Item)) {
50+
@if (!isModal && Model.Item != null && await auth.AuthorizeAsync(Context.User, OrchardCore.Contents.Permissions.EditContent, Model.Item)) {
3551
<button title="edit this report" type="button" class="btn btn-warning btn-sm float-end" onclick="window.open('@(Url.Content("~/Admin/Contents/ContentItems/" + Model.Item.ContentItemId + "/Edit?" + Common.ReturnUrlName + "=" + returnUrl))', '@target');">
3652
<span class="fas fa-edit"></span>
3753
</button>
3854
}
3955

40-
@Html.Partial("LogDetail", Model)
56+
@Html.Partial("LogDetail", Model)
57+
58+
@if (isModal) {
59+
<a href="javascript:void()" class="btn btn-secondary active" role="button" aria-pressed="true" onclick="window.parent.postMessage({ action: 'closeModal', reason: 'confirmed' }, '*');">Close</a>
60+
}

src/OrchardCore.Transformalize/Views/Task/Review.cshtml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@
1111
var isModal = Context.Request.Query["modal"] == "1";
1212
}
1313

14+
@if (isModal) {
15+
<style>
16+
nav {
17+
display: none !important;
18+
}
19+
footer {
20+
display: none !important;
21+
}
22+
</style>
23+
}
24+
1425
<script asp-name="jQuery" at="Head"></script>
1526
<script asp-name="jQuery-ui" at="Head"></script>
1627
<script asp-name="block-ui" version="2.70.0" at="Foot"></script>

src/Site/Site.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
88
<DockerfileContext>..\..</DockerfileContext>
99
<DockerfileTag>transformalize.orchard</DockerfileTag>
10-
<Version>0.20.2</Version>
11-
<FileVersion>0.20.2</FileVersion>
12-
<AssemblyVersion>0.20.2</AssemblyVersion>
13-
<ReleaseVersion>0.20.2</ReleaseVersion>
10+
<Version>0.20.3</Version>
11+
<FileVersion>0.20.3</FileVersion>
12+
<AssemblyVersion>0.20.3</AssemblyVersion>
13+
<ReleaseVersion>0.20.3</ReleaseVersion>
1414
<RazorRuntimeCompilation>true</RazorRuntimeCompilation>
1515
<CopyRefAssembliesToPublishDirectory>true</CopyRefAssembliesToPublishDirectory>
1616
<Nullable>enable</Nullable>

0 commit comments

Comments
 (0)