-
Notifications
You must be signed in to change notification settings - Fork 550
Add Message Templates management to Grand.Web.Store #694
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
Merged
KrzysztofPajak
merged 24 commits into
develop
from
copilot/add-message-template-controller
May 17, 2026
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
1f517b5
Add MessageTemplate management for Store area (controller + CRUD views)
Copilot 100ba4b
Fix implicit global variable in MessageTemplate partial view
Copilot c81b017
Prevent duplicate message templates per store in Create action
Copilot 081fb18
Potential fix for pull request finding 'Generic catch clause'
KrzysztofPajak e720b1a
Add missing resource string for duplicate template name validation
Copilot f4681db
Block copy when template with same name already exists for current store
Copilot 54f4377
Fix false positive duplicate check when copying global message templates
Copilot 74c5fa1
Add missing resource strings for message template tabs (store/global)
Copilot fb220b8
Block copy of store-specific templates (LimitedToStores=true) in Copy…
Copilot 5195dd8
Fix duplicate copy check and add missing admin.content.messagetemplat…
Copilot d90c92a
Optimize duplicate check in message template copy
KrzysztofPajak d3f4a12
Potential fix for pull request finding
KrzysztofPajak 3cd28d8
Add server-side pagination to ListGlobal and ListStore grid actions
Copilot 2668755
Fix false-positive duplicate check in Create action to allow store-sp…
Copilot 09a5d27
Simplify ListStore to use GetAllMessageTemplates("") with explicit st…
Copilot 71c0a6c
Improve GetAllMessageTemplates: remove cache, add keywords search and…
Copilot 4cb89b4
Fix case-insensitive keywords search in GetAllMessageTemplates
Copilot 60a6373
Extend GetAllMessageTemplates keyword search to match Name or Subject
Copilot cc37fc2
Fix admin MessageTemplate List grid pagination controls
Copilot d9f4c6d
Add edit link to global list Name column; show global templates read-…
Copilot 58447a3
Extract isReadOnly variable in Edit.cshtml to avoid duplication
Copilot e8a74ed
Refactor string comparison in MessageTemplateService
KrzysztofPajak ea374dd
Add pageSize to Kendo UI grid configuration
KrzysztofPajak 18ef6ea
Update package versions and project references
KrzysztofPajak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/Web/Grand.Web.Store/Areas/Store/Views/MessageTemplate/Create.cshtml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| @model MessageTemplateModel | ||
| @{ | ||
| ViewBag.Title = Loc["Admin.Content.MessageTemplates.AddNew"]; | ||
| Layout = Constants.LayoutStore; | ||
| } | ||
| <form asp-area="@Constants.AreaStore" asp-controller="MessageTemplate" asp-action="Create" method="post"> | ||
|
|
||
| <div class="row"> | ||
| <div class="col-md-12"> | ||
| <div class="x_panel light form-fit"> | ||
| <div class="x_title"> | ||
| <div class="caption"> | ||
| <i class="fa fa-envelope-o"></i> | ||
| @Loc["Admin.Content.MessageTemplates.AddNew"] | ||
| <small> | ||
| <i class="fa fa-arrow-circle-left"></i>@Html.ActionLink(Loc["Admin.Content.MessageTemplates.BackToList"], "List") | ||
| </small> | ||
| </div> | ||
| <div class="actions"> | ||
| <div class="btn-group btn-group-devided"> | ||
| <button class="btn btn-success" type="submit" name="save"> | ||
| <i class="fa fa-check"></i> @Loc["Admin.Common.Save"] | ||
| </button> | ||
| <button class="btn btn-success" type="submit" name="save-continue"> | ||
| <i class="fa fa-check-circle"></i> @Loc["Admin.Common.SaveContinue"] | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="x_content form"> | ||
| <partial name="Partials/CreateOrUpdate" model="Model"/> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </form> |
48 changes: 48 additions & 0 deletions
48
src/Web/Grand.Web.Store/Areas/Store/Views/MessageTemplate/Edit.cshtml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| @model MessageTemplateModel | ||
| @{ | ||
| ViewBag.Title = Loc["Admin.Content.MessageTemplates.EditMessageTemplateDetails"]; | ||
| Layout = Constants.LayoutStore; | ||
| var isReadOnly = (bool)(ViewBag.IsReadOnly ?? false); | ||
| } | ||
| <form asp-area="@Constants.AreaStore" asp-controller="MessageTemplate" asp-action="Edit" method="post"> | ||
|
|
||
| <div class="row"> | ||
| <div class="col-md-12"> | ||
| <div class="x_panel light form-fit"> | ||
| <div class="x_title"> | ||
| <div class="caption"> | ||
| <i class="fa fa-envelope-o"></i> | ||
| @Loc["Admin.Content.MessageTemplates.EditMessageTemplateDetails"] - @Model.Name | ||
| <small> | ||
| <i class="fa fa-arrow-circle-left"></i>@Html.ActionLink(Loc["Admin.Content.MessageTemplates.BackToList"], "List") | ||
| </small> | ||
| </div> | ||
| <div class="actions"> | ||
| <div class="btn-group btn-group-devided"> | ||
| @if (!isReadOnly) | ||
| { | ||
| <button class="btn btn-success" type="submit" name="save"> | ||
| <i class="fa fa-check"></i> @Loc["Admin.Common.Save"] | ||
| </button> | ||
| <button class="btn btn-success" type="submit" name="save-continue"> | ||
| <i class="fa fa-check-circle"></i> @Loc["Admin.Common.SaveContinue"] | ||
| </button> | ||
| <input type="submit" name="message-template-copy" asp-action="CopyTemplate" class="btn blue" value="@Loc["Admin.Content.MessageTemplates.Copy"]" onclick="return confirm('@Loc["Admin.Common.AreYouSure"]');"/> | ||
| <span id="message-template-delete" class="btn red"> | ||
| <i class="fa fa-trash-o"></i> @Loc["Admin.Common.Delete"] | ||
| </span> | ||
| } | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="x_content form"> | ||
| <partial name="Partials/CreateOrUpdate" model="Model"/> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </form> | ||
| @if (!isReadOnly) | ||
| { | ||
| <admin-delete-confirmation button-id="message-template-delete"/> | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.