-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #523 from adamjez/fix/optional-param-url-builder
Fixed generation of url with optional parameter and without default value
- Loading branch information
Showing
10 changed files
with
136 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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
7 changes: 7 additions & 0 deletions
7
src/DotVVM.Samples.Common/ViewModels/ControlSamples/RouteLink/RouteLinkUrlGenViewModel.cs
This file contains 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,7 @@ | ||
namespace DotVVM.Samples.BasicSamples.ViewModels.ControlSamples.RouteLink | ||
{ | ||
public class RouteLinkUrlGenViewModel | ||
{ | ||
public int RouteParameter { get; set; } = 1; | ||
} | ||
} |
This file contains 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
62 changes: 62 additions & 0 deletions
62
src/DotVVM.Samples.Common/Views/ControlSamples/RouteLink/RouteLinkUrlGen.dothtml
This file contains 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,62 @@ | ||
@viewModel DotVVM.Samples.BasicSamples.ViewModels.ControlSamples.RouteLink.RouteLinkUrlGenViewModel | ||
|
||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>Hello from DotVVM!</title> | ||
<style> | ||
.invalid { | ||
color: red; | ||
} | ||
</style> | ||
<dot:RequiredResource Name="globalize:cs-CZ" /> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>RouteLink url generation demo</h1> | ||
<p> | ||
<dot:RouteLink RenderSettings.Mode="Client" RouteName="RepeaterRouteLink-PageDetail_IdOptional" | ||
Text="Client rendered: Optional parameter" data-ui="optional-parameter-client" /> | ||
</p> | ||
<p> | ||
<dot:RouteLink RenderSettings.Mode="Server" RouteName="RepeaterRouteLink-PageDetail_IdOptional" | ||
Text="Server rendered: Optional parameter" data-ui="optional-parameter-server" /> | ||
</p> | ||
<p> | ||
<dot:RouteLink RouteName="Default" Text="0 parameters" data-ui="0-parameters" /> | ||
</p> | ||
<p> | ||
<dot:RouteLink RenderSettings.Mode="Client" RouteName="RepeaterRouteLink-PageDetail_IdOptionalPrefixed" | ||
Text="Client rendered: Optional parameter (Prefixed)" data-ui="optional-parameter-prefixed-client" /> | ||
</p> | ||
<p> | ||
<dot:RouteLink RenderSettings.Mode="Server" RouteName="RepeaterRouteLink-PageDetail_IdOptionalPrefixed" | ||
Text="Server rendered: Optional parameter (Prefixed)" data-ui="optional-parameter-prefixed-server" /> | ||
</p> | ||
<p> | ||
<dot:RouteLink RenderSettings.Mode="Client" RouteName="RepeaterRouteLink-PageDetail_IdOptionalPrefixed" Param-Id="{value: RouteParameter}" | ||
Text="Client rendered: Parameter (Prefixed)" data-ui="parameter-prefixed-client" /> | ||
</p> | ||
<p> | ||
<dot:RouteLink RenderSettings.Mode="Server" RouteName="RepeaterRouteLink-PageDetail_IdOptionalPrefixed" Param-Id="{value: RouteParameter}" | ||
Text="Server rendered: Parameter (Prefixed)" data-ui="parameter-prefixed-server" /> | ||
</p> | ||
<p> | ||
<dot:RouteLink RenderSettings.Mode="Client" RouteName="RepeaterRouteLink-PageDetail_IdOptionalAtStart" | ||
Text="Client rendered: Optional parameter (at start)" data-ui="optional-parameter-at-start-client" /> | ||
</p> | ||
<p> | ||
<dot:RouteLink RenderSettings.Mode="Server" RouteName="RepeaterRouteLink-PageDetail_IdOptionalAtStart" | ||
Text="Server rendered: Optional parameter (at start)" data-ui="optional-parameter-at-start-server" /> | ||
</p> | ||
<p> | ||
<dot:RouteLink RenderSettings.Mode="Client" RouteName="RepeaterRouteLink-PageDetail_IdOptionalAtStart" Param-Id="{value: RouteParameter}" | ||
Text="Client rendered: Optional prefixed parameter (at start)" data-ui="optional-prefixed-parameter-at-start-client" /> | ||
</p> | ||
<p> | ||
<dot:RouteLink RenderSettings.Mode="Server" RouteName="RepeaterRouteLink-PageDetail_IdOptionalAtStart" Param-Id="{value: RouteParameter}" | ||
Text="Server rendered: Optional prefixed parameter (at start)" data-ui="optional-prefix-parameter-at-start-server" /> | ||
</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains 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 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