mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
Renamed templatepro filter "query" to "fromquery"
Some checks failed
TOC Generator / TOC Generator (push) Has been cancelled
Some checks failed
TOC Generator / TOC Generator (push) Has been cancelled
This commit is contained in:
parent
f9d5850914
commit
bc065284f8
@ -79,7 +79,7 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
if TDuckTypedList.CanBeWrappedAsList(aValue.AsObject, lWrappedList) then
|
||||
if (aValue.AsObject <> nil) and TDuckTypedList.CanBeWrappedAsList(aValue.AsObject, lWrappedList) then
|
||||
begin
|
||||
Result := lWrappedList.Count;
|
||||
end
|
||||
@ -176,7 +176,7 @@ begin
|
||||
end;
|
||||
lCompiledTemplate.AddFilter('json', DumpAsJSONString);
|
||||
lCompiledTemplate.AddFilter('count', GetDataSetOrObjectListCount);
|
||||
lCompiledTemplate.AddFilter('query',
|
||||
lCompiledTemplate.AddFilter('fromquery',
|
||||
function (const aValue: TValue; const aParameters: TArray<string>): TValue
|
||||
begin
|
||||
if Length(aParameters) = 1 then
|
||||
|
@ -923,6 +923,7 @@ type
|
||||
/// PageFragment ignore header and footer views
|
||||
/// </summary>
|
||||
function Page(const AViewNames: TArray<string>; const UseCommonHeadersAndFooters: Boolean = True): string; overload; inline;
|
||||
function Page(const AViewName: string; const UseCommonHeadersAndFooters: Boolean = True): string; overload; inline;
|
||||
|
||||
/// <summary>
|
||||
/// Page calls GetRenderedView with sensible defaults.
|
||||
@ -4392,6 +4393,11 @@ begin
|
||||
Result := GetRenderedView(AViewNames, JSONModel)
|
||||
end;
|
||||
|
||||
function TMVCController.Page(const AViewName: string; const UseCommonHeadersAndFooters: Boolean): string;
|
||||
begin
|
||||
Result := Page([AViewName], UseCommonHeadersAndFooters);
|
||||
end;
|
||||
|
||||
function TMVCController.PageFragment(const AViewNames: TArray<string>;
|
||||
const JSONModel: TJSONObject): string;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user