shaml 0.5.0.beta.2 → 0.5.0.rc
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shaml/command.rb +49 -15
- data/lib/shaml/templates/Create.aspx +8 -0
- data/lib/shaml/templates/Delete.aspx +15 -0
- data/lib/shaml/templates/Delete.haml +2 -3
- data/lib/shaml/templates/Edit.aspx +9 -0
- data/lib/shaml/templates/Index.aspx +33 -0
- data/lib/shaml/templates/Index.haml +7 -6
- data/lib/shaml/templates/Show.aspx +15 -0
- data/lib/shaml/templates/Show.haml +2 -2
- data/lib/shaml/templates/WebSampleForm.ascx +25 -0
- data/lib/shaml/templates/WebSamplesController.cs +24 -10
- data/lib/shaml/templates/WebSamplesControllerTests.cs +4 -3
- data/lib/shaml/templates/_WebSampleForm.haml +4 -4
- data/lib/shaml/templates/shaml_base_template.dat +0 -0
- metadata +35 -13
data/lib/shaml/command.rb
CHANGED
@@ -118,9 +118,11 @@ class CommandLoader
|
|
118
118
|
puts "Where command might be:"
|
119
119
|
puts " generate"
|
120
120
|
puts " app AppName : Create new shaml application"
|
121
|
-
puts " resource ResName
|
121
|
+
puts " resource ResName "
|
122
|
+
puts " {haml|asp} [desc] : Create new CRUD resource with"
|
122
123
|
puts " a model, a view and a controller"
|
123
|
-
puts " controller Controller
|
124
|
+
puts " controller Controller "
|
125
|
+
puts " {haml|asp} [desc] : Create a standalone controller"
|
124
126
|
puts " model Model [desc] : Create a standalone model"
|
125
127
|
puts
|
126
128
|
puts " compile : Compiles the solution using {ms|x}build"
|
@@ -185,6 +187,13 @@ class CommandLoader
|
|
185
187
|
puts
|
186
188
|
when "resource"
|
187
189
|
desc = ARGV.shift || nil
|
190
|
+
type = "haml"
|
191
|
+
if desc=~/^asp([x])?/ then
|
192
|
+
type="asp"
|
193
|
+
desc = ARGV.shift || nil
|
194
|
+
elsif desc=~/^haml/ then
|
195
|
+
desc = ARGV.shift || nil
|
196
|
+
end
|
188
197
|
appname = getappname
|
189
198
|
xmlname = File.join("App","Core","#{appname}.Core.csproj")
|
190
199
|
copy_file(File.join(TEMPLATEDIR,"WebSample.cs"),File.join("App","Core","WebSample.cs"),appname,name,desc,xmlname,:compile)
|
@@ -192,13 +201,22 @@ class CommandLoader
|
|
192
201
|
copy_file(File.join(TEMPLATEDIR,"WebSampleMap.cs"),File.join("App","Data","WebSampleMap.cs"),appname,name,desc,xmlname,:compile)
|
193
202
|
xmlname = File.join("App","Controllers","#{appname}.Controllers.csproj")
|
194
203
|
copy_file(File.join(TEMPLATEDIR,"WebSamplesController.cs"),File.join("App","Controllers","WebSamplesController.cs"),appname,name,desc,xmlname,:compile)
|
195
|
-
xmlname = "#{appname}.csproj"
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
204
|
+
xmlname = "#{appname}.csproj"
|
205
|
+
if type=="haml" then
|
206
|
+
copy_file(File.join(TEMPLATEDIR,"_WebSampleForm.haml"),File.join("App","Views","WebSamples","_WebSampleForm.haml"),appname,name,desc,xmlname,:content)
|
207
|
+
copy_file(File.join(TEMPLATEDIR,"Create.haml"),File.join("App","Views","WebSamples","Create.haml"),appname,name,desc,xmlname,:content)
|
208
|
+
copy_file(File.join(TEMPLATEDIR,"Delete.haml"),File.join("App","Views","WebSamples","Delete.haml"),appname,name,desc,xmlname,:content)
|
209
|
+
copy_file(File.join(TEMPLATEDIR,"Edit.haml"),File.join("App","Views","WebSamples","Edit.haml"),appname,name,desc,xmlname,:content)
|
210
|
+
copy_file(File.join(TEMPLATEDIR,"Index.haml"),File.join("App","Views","WebSamples","Index.haml"),appname,name,desc,xmlname,:content)
|
211
|
+
copy_file(File.join(TEMPLATEDIR,"Show.haml"),File.join("App","Views","WebSamples","Show.haml"),appname,name,desc,xmlname,:content)
|
212
|
+
else
|
213
|
+
copy_file(File.join(TEMPLATEDIR,"WebSampleForm.ascx"),File.join("App","Views","WebSamples","WebSampleForm.ascx"),appname,name,desc,xmlname,:content)
|
214
|
+
copy_file(File.join(TEMPLATEDIR,"Create.aspx"),File.join("App","Views","WebSamples","Create.aspx"),appname,name,desc,xmlname,:content)
|
215
|
+
copy_file(File.join(TEMPLATEDIR,"Delete.aspx"),File.join("App","Views","WebSamples","Delete.aspx"),appname,name,desc,xmlname,:content)
|
216
|
+
copy_file(File.join(TEMPLATEDIR,"Edit.aspx"),File.join("App","Views","WebSamples","Edit.aspx"),appname,name,desc,xmlname,:content)
|
217
|
+
copy_file(File.join(TEMPLATEDIR,"Index.aspx"),File.join("App","Views","WebSamples","Index.aspx"),appname,name,desc,xmlname,:content)
|
218
|
+
copy_file(File.join(TEMPLATEDIR,"Show.aspx"),File.join("App","Views","WebSamples","Show.aspx"),appname,name,desc,xmlname,:content)
|
219
|
+
end
|
202
220
|
xmlname = File.join("Tests","#{appname}.Tests.csproj")
|
203
221
|
copy_file(File.join(TEMPLATEDIR,"WebSampleTests.cs"),File.join("Tests","Core","WebSampleTests.cs"),appname,name,desc,xmlname,:compile)
|
204
222
|
copy_file(File.join(TEMPLATEDIR,"WebSamplesControllerTests.cs"),File.join("Tests","Controllers","WebSamplesControllerTests.cs"),appname,name,desc,xmlname,:compile)
|
@@ -215,16 +233,32 @@ class CommandLoader
|
|
215
233
|
fix_with_model(name)
|
216
234
|
when "controller"
|
217
235
|
desc = ARGV.shift || nil
|
236
|
+
type = "haml"
|
237
|
+
if desc=~/^asp([x])?/ then
|
238
|
+
type="asp"
|
239
|
+
desc = ARGV.shift || nil
|
240
|
+
elsif desc=~/^haml/ then
|
241
|
+
desc = ARGV.shift || nil
|
242
|
+
end
|
218
243
|
appname = getappname
|
219
244
|
xmlname = File.join("App","Controllers","#{appname}.Controllers.csproj")
|
220
245
|
copy_file(File.join(TEMPLATEDIR,"WebSamplesController.cs"),File.join("App","Controllers","WebSamplesController.cs"),appname,name,desc,xmlname,:compile)
|
221
246
|
xmlname = "#{appname}.csproj"
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
247
|
+
if type=="haml" then
|
248
|
+
copy_file(File.join(TEMPLATEDIR,"_WebSampleForm.haml"),File.join("App","Views","WebSamples","_WebSampleForm.haml"),appname,name,desc,xmlname,:content)
|
249
|
+
copy_file(File.join(TEMPLATEDIR,"Create.haml"),File.join("App","Views","WebSamples","Create.haml"),appname,name,desc,xmlname,:content)
|
250
|
+
copy_file(File.join(TEMPLATEDIR,"Delete.haml"),File.join("App","Views","WebSamples","Delete.haml"),appname,name,desc,xmlname,:content)
|
251
|
+
copy_file(File.join(TEMPLATEDIR,"Edit.haml"),File.join("App","Views","WebSamples","Edit.haml"),appname,name,desc,xmlname,:content)
|
252
|
+
copy_file(File.join(TEMPLATEDIR,"Index.haml"),File.join("App","Views","WebSamples","Index.haml"),appname,name,desc,xmlname,:content)
|
253
|
+
copy_file(File.join(TEMPLATEDIR,"Show.haml"),File.join("App","Views","WebSamples","Show.haml"),appname,name,desc,xmlname,:content)
|
254
|
+
else
|
255
|
+
copy_file(File.join(TEMPLATEDIR,"WebSampleForm.ascx"),File.join("App","Views","WebSamples","WebSampleForm.ascx"),appname,name,desc,xmlname,:content)
|
256
|
+
copy_file(File.join(TEMPLATEDIR,"Create.aspx"),File.join("App","Views","WebSamples","Create.aspx"),appname,name,desc,xmlname,:content)
|
257
|
+
copy_file(File.join(TEMPLATEDIR,"Delete.aspx"),File.join("App","Views","WebSamples","Delete.aspx"),appname,name,desc,xmlname,:content)
|
258
|
+
copy_file(File.join(TEMPLATEDIR,"Edit.aspx"),File.join("App","Views","WebSamples","Edit.aspx"),appname,name,desc,xmlname,:content)
|
259
|
+
copy_file(File.join(TEMPLATEDIR,"Index.aspx"),File.join("App","Views","WebSamples","Index.aspx"),appname,name,desc,xmlname,:content)
|
260
|
+
copy_file(File.join(TEMPLATEDIR,"Show.aspx"),File.join("App","Views","WebSamples","Show.aspx"),appname,name,desc,xmlname,:content)
|
261
|
+
end
|
228
262
|
xmlname = File.join("Tests","#{appname}.Tests.csproj")
|
229
263
|
copy_file(File.join(TEMPLATEDIR,"WebSamplesControllerTests.cs"),File.join("Tests","Controllers","WebSamplesControllerTests.cs"),appname,name,desc,xmlname,:compile)
|
230
264
|
else
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%@ Page Title="Create WebSample" Language="C#" MasterPageFile="~/App/Views/Shared/Site.master" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage<WebBase.Controllers.WebSamplesController.WebSampleFormViewModel>" %>
|
2
|
+
|
3
|
+
<asp:Content ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
|
4
|
+
<div>
|
5
|
+
<h2>Create WebSample</h2>
|
6
|
+
<% Html.RenderPartial("WebSampleForm", ViewData); %>
|
7
|
+
</div>
|
8
|
+
</asp:Content>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%@ Page Title="Create WebSample" Language="C#" MasterPageFile="~/App/Views/Shared/Site.master" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage<WebSample>" %>
|
2
|
+
|
3
|
+
<asp:Content ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
|
4
|
+
|
5
|
+
<div>
|
6
|
+
<h2>Delete WebSample</h2>
|
7
|
+
<p>Are you sure?</p>
|
8
|
+
<% using (Html.BeginForm("DeleteConfirmed","WebSamples",new { Id = ViewData.Model.Id })) { %>
|
9
|
+
<% // Html.AntiForgeryToken() %>
|
10
|
+
<input type="submit" value="Yes" />
|
11
|
+
<input type="button" name="No" value="No" onclick=""javascript:history.go(-1);"}
|
12
|
+
<% } %>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
</asp:Content>
|
@@ -1,11 +1,10 @@
|
|
1
1
|
@namespace=WebBase.Core
|
2
2
|
@namespace=WebBase.Controllers
|
3
|
-
@namespace=Microsoft.Web.Mvc
|
4
3
|
@type=WebSample
|
5
4
|
%div
|
6
5
|
%h2 Delete WebSample
|
7
6
|
%p Are you sure?
|
8
|
-
- using (Html.BeginForm
|
9
|
-
/=
|
7
|
+
- using (Html.BeginForm("DeleteConfirmed","WebSamples",new { Id = ViewData.Model.Id }))
|
8
|
+
/=Html.AntiForgeryToken()
|
10
9
|
%input{ type="submit" value="Yes" }
|
11
10
|
%input{ type="button" name="No" value="No" onclick="javascript:history.go(-1);"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%@ Page Title="Create WebSample" Language="C#" MasterPageFile="~/App/Views/Shared/Site.master" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage<WebBase.Controllers.WebSamplesController.WebSampleFormViewModel>" %>
|
2
|
+
|
3
|
+
<asp:Content ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
|
4
|
+
<div>
|
5
|
+
<h2>Edit WebSample</h2>
|
6
|
+
<% Html.RenderPartial("WebSampleForm", ViewData); %>
|
7
|
+
</div>
|
8
|
+
</asp:Content>
|
9
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%@ Page Title="Create WebSample" Language="C#" MasterPageFile="~/App/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<List<WebSample>>" %>
|
2
|
+
<%@ Import Namespace="WebBase.Core" %>
|
3
|
+
<%@ Import Namespace="WebBase.Controllers" %>
|
4
|
+
<%@ Import Namespace="Shaml.Web.HtmlHelpers" %>
|
5
|
+
|
6
|
+
<asp:Content ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
|
7
|
+
<h1>WebSamples</h1>
|
8
|
+
<% if (ViewContext.TempData["message"] != null) { %>
|
9
|
+
<p id="pageMessage"><%= ViewContext.TempData["message"].ToString() %></p>
|
10
|
+
<% } %>
|
11
|
+
<table>
|
12
|
+
<thead>
|
13
|
+
<tr>
|
14
|
+
<!-- __BEGIN__PROPERTY__ -->
|
15
|
+
<th><%= Html.SwitchOrderLink("Property","Property") %></th>
|
16
|
+
<!-- __END__PROPERTY__ -->
|
17
|
+
<th colspan="3">Action</th>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
<% foreach (WebSample websample in ViewData.Model) { %>
|
21
|
+
<tr>
|
22
|
+
<!-- __BEGIN__PROPERTY__ -->
|
23
|
+
<td><%= websample.Property %></td>
|
24
|
+
<!-- __END__PROPERTY__ -->
|
25
|
+
<td><%= Html.ActionLink("Details", "Show", "WebSamples", new { Id = websample.Id }, new { }) %></td>
|
26
|
+
<td><%= Html.ActionLink("Edit", "Edit", "WebSamples", new { Id = websample.Id }, new { }) %></td>
|
27
|
+
<td><%= Html.ActionLink("Delete", "Delete", "WebSamples", new { Id = websample.Id }, new { }) %></td>
|
28
|
+
</tr>
|
29
|
+
<%} %>
|
30
|
+
</table>
|
31
|
+
<p><%= Html.RenderPagination(ViewData["Pagination"] as PaginationData); %></p>
|
32
|
+
<p><%= Html.ActionLink("Create new WebSample", "Create", "WebSamples") %></p>
|
33
|
+
</asp:Content>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
@namespace=WebBase.Core
|
2
2
|
@namespace=WebBase.Controllers
|
3
|
-
@namespace=
|
3
|
+
@namespace=Shaml.Web.HtmlHelpers
|
4
4
|
@type=List<WebSample>
|
5
5
|
%div
|
6
6
|
%h2 WebSamples
|
@@ -10,7 +10,7 @@
|
|
10
10
|
%thead
|
11
11
|
%tr
|
12
12
|
-// __BEGIN__PROPERTY__
|
13
|
-
%th Property
|
13
|
+
%th= Html.SwitchOrderLink("Property","Property")
|
14
14
|
-// __END__PROPERTY__
|
15
15
|
%th{ colspan=3 } Action
|
16
16
|
%tbody
|
@@ -20,9 +20,10 @@
|
|
20
20
|
%td= websample.Property
|
21
21
|
-// __END__PROPERTY__
|
22
22
|
%td
|
23
|
-
= Html.ActionLink
|
23
|
+
= Html.ActionLink("Details", "Show", "WebSamples", new { Id = websample.Id }, new { })
|
24
24
|
%td
|
25
|
-
= Html.ActionLink
|
25
|
+
= Html.ActionLink("Edit", "Edit", "WebSamples", new { Id = websample.Id }, new { })
|
26
26
|
%td
|
27
|
-
= Html.ActionLink
|
28
|
-
%p= Html.
|
27
|
+
= Html.ActionLink("Delete", "Delete", "WebSamples", new { Id = websample.Id }, new { })
|
28
|
+
%p= Html.RenderPagination(ViewData["Pagination"] as PaginationData)
|
29
|
+
%p= Html.ActionLink("Create new WebSample", "Create", "WebSamples")
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%@ Page Inherits="System.Web.Mvc.ViewPage<WebSample>" Title="Create WebSample" Language="C#" MasterPageFile="~/App/Views/Shared/Site.master" AutoEventWireup="true" %>
|
2
|
+
|
3
|
+
<asp:Content ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
|
4
|
+
<div>
|
5
|
+
<h2>WebSample Details</h2>
|
6
|
+
<ul>
|
7
|
+
<!-- __BEGIN__PROPERTY__ -->
|
8
|
+
<li>
|
9
|
+
<label for="WebSample_Property">Property:</label>
|
10
|
+
<span id="WebSample_Property"><%= Server.HtmlEncode(ViewData.Model.Property.ToString()) %></span>
|
11
|
+
</li>
|
12
|
+
<!-- __END__PROPERTY__ -->
|
13
|
+
</ul>
|
14
|
+
</div>
|
15
|
+
</asp:Content>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%@ Import Namespace="WebBase.Core" %>
|
2
|
+
<%@ Import Namespace="WebBase.Controllers" %>
|
3
|
+
<%@ Control Language="C#" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewUserControl<WebBase.Controllers.WebSamplesController.WebSampleFormViewModel>" %>
|
4
|
+
|
5
|
+
<%= Html.ValidationSummary() %>
|
6
|
+
<% using (Html.BeginForm()) { %>
|
7
|
+
<% // Html.AntiForgeryToken() %>
|
8
|
+
<%= Html.Hidden("WebSample.Id", (Model.WebSample != null) ? Model.WebSample.Id : 0) %>
|
9
|
+
<ul>
|
10
|
+
<!-- __BEGIN__PROPERTY__ -->
|
11
|
+
<li>
|
12
|
+
<label for="WebSample_Property">Property:</label>
|
13
|
+
<div>
|
14
|
+
<%= Html.TextBox("WebSample.Property", (Model.WebSample != null) ? Model.WebSample.Property.ToString() : "" ) %>
|
15
|
+
<%= Html.ValidationMessage("WebSample.Property") %>
|
16
|
+
</div>
|
17
|
+
</li>
|
18
|
+
<!-- __END__PROPERTY__ -->
|
19
|
+
<li>
|
20
|
+
<input type="submit" name="btnSave" value="Save WebSample" />
|
21
|
+
<button name="btnCancel" onClick="window.location.href = '/WebSamples';">Cancel</button>
|
22
|
+
</li>
|
23
|
+
</ul>
|
24
|
+
<% } %>
|
25
|
+
|
@@ -1,30 +1,44 @@
|
|
1
|
+
using System;
|
1
2
|
using System.Web.Mvc;
|
2
|
-
using WebBase.Core;
|
3
|
-
using Shaml.Core.PersistenceSupport;
|
4
|
-
using Shaml.Core.DomainModel;
|
5
3
|
using System.Collections.Generic;
|
6
|
-
using System;
|
7
|
-
using Shaml.Web.NHibernate;
|
8
|
-
using NHibernate.Validator.Engine;
|
9
4
|
using System.Text;
|
5
|
+
using System.Linq.Expressions;
|
6
|
+
|
7
|
+
using NHibernate.Validator.Engine;
|
8
|
+
|
10
9
|
using Shaml.Web.CommonValidator;
|
10
|
+
using Shaml.Web.NHibernate;
|
11
|
+
using Shaml.Web.HtmlHelpers;
|
11
12
|
using Shaml.Core;
|
12
|
-
using
|
13
|
+
using Shaml.Core.PersistenceSupport;
|
14
|
+
using Shaml.Core.DomainModel;
|
15
|
+
using Shaml.Core.PersistenceSupport.NHibernate;
|
16
|
+
|
17
|
+
using WebBase.Core;
|
13
18
|
|
14
19
|
namespace WebBase.Controllers
|
15
20
|
{
|
16
21
|
[HandleError]
|
17
22
|
public class WebSamplesController : Controller
|
18
23
|
{
|
19
|
-
public WebSamplesController(
|
24
|
+
public WebSamplesController(INHibernateQueryRepository<WebSample> WebSampleRepository) {
|
20
25
|
Check.Require(WebSampleRepository != null, "WebSampleRepository may not be null");
|
21
26
|
|
22
27
|
this.WebSampleRepository = WebSampleRepository;
|
23
28
|
}
|
24
29
|
|
25
30
|
[Transaction]
|
26
|
-
public ActionResult Index() {
|
27
|
-
|
31
|
+
public ActionResult Index(int? Page, string OrderBy, bool? Desc) {
|
32
|
+
long numResults;
|
33
|
+
int page = 0;
|
34
|
+
if (Page != null)
|
35
|
+
{
|
36
|
+
page = (int)Page;
|
37
|
+
}
|
38
|
+
IList<WebSample> WebSamples = null;
|
39
|
+
WebSamples = WebSampleRepository.GetAll(20, page, out numResults, WebSampleRepository.CreateOrder(OrderBy,Desc==true));
|
40
|
+
PaginationData pd = new ThreeWayPaginationData(page, 20, numResults);
|
41
|
+
ViewData["Pagination"] = pd;
|
28
42
|
return View(WebSamples);
|
29
43
|
}
|
30
44
|
|
@@ -12,6 +12,7 @@ using WebBase;
|
|
12
12
|
using WebBase.Config;
|
13
13
|
using WebBase.Core;
|
14
14
|
using WebBase.Controllers;
|
15
|
+
using Shaml.Core.PersistenceSupport.NHibernate;
|
15
16
|
|
16
17
|
namespace Tests.Blog.Web.Controllers
|
17
18
|
{
|
@@ -30,7 +31,7 @@ namespace Tests.Blog.Web.Controllers
|
|
30
31
|
/// </summary>
|
31
32
|
[Test]
|
32
33
|
public void CanListWebSamples() {
|
33
|
-
ViewResult result = controller.Index().AssertViewRendered();
|
34
|
+
ViewResult result = controller.Index(null,null,null).AssertViewRendered();
|
34
35
|
|
35
36
|
result.ViewData.Model.ShouldNotBeNull();
|
36
37
|
(result.ViewData.Model as List<WebSample>).Count.ShouldEqual(0);
|
@@ -102,9 +103,9 @@ namespace Tests.Blog.Web.Controllers
|
|
102
103
|
|
103
104
|
#region Create Mock WebSample Repository
|
104
105
|
|
105
|
-
private
|
106
|
+
private INHibernateQueryRepository<WebSample> CreateMockWebSampleRepository() {
|
106
107
|
|
107
|
-
|
108
|
+
INHibernateQueryRepository<WebSample> mockedRepository = MockRepository.GenerateMock<INHibernateQueryRepository<WebSample>>();
|
108
109
|
mockedRepository.Expect(mr => mr.GetAll()).Return(CreateWebSamples());
|
109
110
|
mockedRepository.Expect(mr => mr.Get(1)).IgnoreArguments().Return(CreateWebSample());
|
110
111
|
mockedRepository.Expect(mr => mr.SaveOrUpdate(null)).IgnoreArguments().Return(CreateWebSample());
|
@@ -8,10 +8,10 @@
|
|
8
8
|
// __BEGIN__PROPERTY__
|
9
9
|
%li
|
10
10
|
%label{ for="WebSample_Property" }Property:
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
%div
|
12
|
+
= Html.TextBox("WebSample.Property", (Model.WebSample != null) ? Model.WebSample.Property.ToString() : "" )
|
13
|
+
= Html.ValidationMessage("WebSample.Property")
|
14
14
|
// __END__PROPERTY__
|
15
15
|
%li
|
16
16
|
%input{ type="submit" name="btnSave" value="Save WebSample"}/
|
17
|
-
|
17
|
+
%button{ name="btnCancel" onClick="window.location.href = '/WebSamples';"} Cancel
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: true
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 5
|
8
|
+
- 0
|
9
|
+
- rc
|
10
|
+
version: 0.5.0.rc
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Zsolt Sz. Sztupak
|
@@ -9,29 +15,37 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-04-
|
18
|
+
date: 2010-04-15 00:00:00 +02:00
|
13
19
|
default_executable: shaml
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: rubyzip
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
25
|
requirements:
|
21
26
|
- - ">="
|
22
27
|
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
- 9
|
31
|
+
- 1
|
23
32
|
version: 0.9.1
|
24
|
-
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
25
35
|
- !ruby/object:Gem::Dependency
|
26
36
|
name: compass
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
39
|
requirements:
|
31
40
|
- - ">="
|
32
41
|
- !ruby/object:Gem::Version
|
42
|
+
segments:
|
43
|
+
- 0
|
44
|
+
- 6
|
45
|
+
- 15
|
33
46
|
version: 0.6.15
|
34
|
-
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id002
|
35
49
|
description: Shaml is an ASP.NET MVC 2 framework with NHibernate 2.1 for mono 2.4.4+
|
36
50
|
email: mail@sztupy.hu
|
37
51
|
executables:
|
@@ -52,6 +66,12 @@ files:
|
|
52
66
|
- lib/shaml/templates/Index.haml
|
53
67
|
- lib/shaml/templates/Show.haml
|
54
68
|
- lib/shaml/templates/_WebSampleForm.haml
|
69
|
+
- lib/shaml/templates/WebSampleForm.ascx
|
70
|
+
- lib/shaml/templates/Create.aspx
|
71
|
+
- lib/shaml/templates/Delete.aspx
|
72
|
+
- lib/shaml/templates/Edit.aspx
|
73
|
+
- lib/shaml/templates/Index.aspx
|
74
|
+
- lib/shaml/templates/Show.aspx
|
55
75
|
- lib/shaml/templates/WebSample.cs
|
56
76
|
- lib/shaml/templates/WebSampleMap.cs
|
57
77
|
- lib/shaml/templates/WebSamplesController.cs
|
@@ -70,18 +90,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
70
90
|
requirements:
|
71
91
|
- - ">="
|
72
92
|
- !ruby/object:Gem::Version
|
93
|
+
segments:
|
94
|
+
- 0
|
73
95
|
version: "0"
|
74
|
-
version:
|
75
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
97
|
requirements:
|
77
98
|
- - ">="
|
78
99
|
- !ruby/object:Gem::Version
|
100
|
+
segments:
|
101
|
+
- 0
|
79
102
|
version: "0"
|
80
|
-
version:
|
81
103
|
requirements: []
|
82
104
|
|
83
105
|
rubyforge_project: shaml
|
84
|
-
rubygems_version: 1.3.
|
106
|
+
rubygems_version: 1.3.6
|
85
107
|
signing_key:
|
86
108
|
specification_version: 3
|
87
109
|
summary: ASP.NET MVC on mono
|