shaml 0.5.0.rc → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shaml/templates/WebSample.cs +2 -0
- data/lib/shaml/templates/WebSampleForm.ascx +3 -2
- data/lib/shaml/templates/WebSamplesController.cs +1 -1
- data/lib/shaml/templates/WebSamplesControllerTests.cs +2 -1
- data/lib/shaml/templates/_WebSampleForm.haml +4 -2
- data/lib/shaml/templates/shaml_base_template.dat +0 -0
- metadata +3 -4
@@ -2,6 +2,7 @@
|
|
2
2
|
<%@ Import Namespace="WebBase.Controllers" %>
|
3
3
|
<%@ Control Language="C#" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewUserControl<WebBase.Controllers.WebSamplesController.WebSampleFormViewModel>" %>
|
4
4
|
|
5
|
+
<% Html.EnableClientValidation(); %>
|
5
6
|
<%= Html.ValidationSummary() %>
|
6
7
|
<% using (Html.BeginForm()) { %>
|
7
8
|
<% // Html.AntiForgeryToken() %>
|
@@ -11,8 +12,8 @@
|
|
11
12
|
<li>
|
12
13
|
<label for="WebSample_Property">Property:</label>
|
13
14
|
<div>
|
14
|
-
<%= Html.
|
15
|
-
<%= Html.
|
15
|
+
<%= Html.TextBoxFor(x => x.WebSample.Property ) %>
|
16
|
+
<%= Html.ValidationMessageFor(x => x.WebSample.Property) %>
|
16
17
|
</div>
|
17
18
|
</li>
|
18
19
|
<!-- __END__PROPERTY__ -->
|
@@ -158,7 +158,7 @@ namespace WebBase.Controllers
|
|
158
158
|
public WebSample WebSample { get; internal set; }
|
159
159
|
}
|
160
160
|
|
161
|
-
private readonly
|
161
|
+
private readonly INHibernateQueryRepository<WebSample> WebSampleRepository;
|
162
162
|
}
|
163
163
|
}
|
164
164
|
|
@@ -106,7 +106,8 @@ namespace Tests.Blog.Web.Controllers
|
|
106
106
|
private INHibernateQueryRepository<WebSample> CreateMockWebSampleRepository() {
|
107
107
|
|
108
108
|
INHibernateQueryRepository<WebSample> mockedRepository = MockRepository.GenerateMock<INHibernateQueryRepository<WebSample>>();
|
109
|
-
|
109
|
+
long outres;
|
110
|
+
mockedRepository.Expect(mr => mr.GetAll(0, 0, out outres, null)).IgnoreArguments().Return(CreateWebSamples());
|
110
111
|
mockedRepository.Expect(mr => mr.Get(1)).IgnoreArguments().Return(CreateWebSample());
|
111
112
|
mockedRepository.Expect(mr => mr.SaveOrUpdate(null)).IgnoreArguments().Return(CreateWebSample());
|
112
113
|
mockedRepository.Expect(mr => mr.Delete(null)).IgnoreArguments();
|
@@ -1,6 +1,7 @@
|
|
1
1
|
@namespace=WebBase.Controllers
|
2
2
|
@type=WebSamplesController.WebSampleFormViewModel
|
3
3
|
= Html.ValidationSummary()
|
4
|
+
- Html.EnableClientValidation();
|
4
5
|
- using (Html.BeginForm())
|
5
6
|
/= Html.AntiForgeryToken()
|
6
7
|
= Html.Hidden("WebSample.Id", (Model.WebSample != null) ? Model.WebSample.Id : 0)
|
@@ -9,9 +10,10 @@
|
|
9
10
|
%li
|
10
11
|
%label{ for="WebSample_Property" }Property:
|
11
12
|
%div
|
12
|
-
= Html.
|
13
|
-
= Html.
|
13
|
+
= Html.TextBoxFor( x => x.WebSample.Property )
|
14
|
+
= Html.ValidationMessageFor( x => x.WebSample.Property )
|
14
15
|
// __END__PROPERTY__
|
15
16
|
%li
|
16
17
|
%input{ type="submit" name="btnSave" value="Save WebSample"}/
|
17
18
|
%button{ name="btnCancel" onClick="window.location.href = '/WebSamples';"} Cancel
|
19
|
+
|
Binary file
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
4
|
+
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
8
|
- 0
|
9
|
-
|
10
|
-
version: 0.5.0.rc
|
9
|
+
version: 0.5.0
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Zsolt Sz. Sztupak
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-20 00:00:00 +02:00
|
19
18
|
default_executable: shaml
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|