Removed untyped contructor from ComponentRegistration and add a protected setter.
[castle.git] / Experiments / Generator / Generators / Scaffold / Templates / views / list.brail
blob00632505a952e52c1182e630a9ff69228815f3a7
1 <div class="actions">\r
2         ${HtmlHelper.LinkTo('Add a new <%= SingularHumanName %>', '<%= ControllerLink %>', 'new')}\r
3 </div>\r
4 \r
5 <?brail if not ScaffoldHelper.HasItems(<%= PluralVarName %>): ?>\r
6         <p>No <%= SingularHumanName %></p>\r
7 <?brail else: ?>\r
8         <table class="list">\r
9                 <tr>\r
10                         <!-- Show each column -->\r
11                         <?brail for prop in ScaffoldHelper.GetProperties(<%= PluralVarName %>): ?>\r
12                                 <th>${ScaffoldHelper.ToColumnName(prop)}</th>\r
13                         <?brail end ?>\r
14                         <th></th>\r
15                 </tr>\r
16         \r
17                 <?brail \r
18                 alt = 0 \r
19                 for <%= SingularVarName %> in <%= PluralVarName %>: ?>\r
20                         <tr id="<%= SingularVarName %>${<%= SingularVarName %>.Id}" class="item${alt}">\r
21                                 \r
22                                 <!-- Show each <%= SingularVarName %> -->\r
23                                 <?brail for prop in ScaffoldHelper.GetProperties(<%= SingularVarName %>.GetType()): ?>\r
24                                         <td>${ScaffoldHelper.GetPropertyValue(<%= SingularVarName %>, prop)}</td>\r
25                                 <?brail end ?>\r
26                                 \r
27                                 <!-- <%= SingularVarName %> specific actions -->\r
28                                 <td class="actions">\r
29                                         ${HtmlHelper.LinkTo('View', '<%= ControllerLink %>', 'view', <%= SingularVarName %>.Id)}\r
30                                         ${HtmlHelper.LinkTo('Edit', '<%= ControllerLink %>', 'edit', <%= SingularVarName %>.Id)}\r
31                                         ${AjaxHelper.LinkToRemote('Delete', 'delete.<%= ActionExtension %>', DictHelper.CreateDict('with=\'id=' + <%= SingularVarName %>.Id +'\'', 'condition=confirm(\'Delete?\')', 'onsuccess=new Effect.Fade(\'<%= SingularVarName %>' + <%= SingularVarName %>.Id + '\')'))}\r
32                                 </td>\r
33                         \r
34                         </tr>\r
35                         <?brail alt = 1 - alt ?>\r
36                 <?brail end ?>\r
37         \r
38                 <!-- Pages browser -->\r
39                 <tr class="pages">\r
40                         <th class="currentpage" colspan="$ScaffoldHelper.GetProperties(<%= PluralVarName %>).Length">\r
41                                 <%= PluralHumanName %> ${<%= PluralVarName %>.FirstItem} - ${<%= PluralVarName %>.LastItem} of ${<%= PluralVarName %>.TotalItems}\r
42                         </th>\r
43                         <th class="pagebrowser" align="right">\r
44                                 ${ScaffoldHelper.PageBrowser(<%= PluralVarName %>)}\r
45                         </th>\r
46                 </tr>\r
47         </table>\r
48 <?brail end ?>\r