lib/generators/red_base/templates/angularjs/new.html.erb in red_base-0.5.1 vs lib/generators/red_base/templates/angularjs/new.html.erb in red_base-0.6.0

- old
+ new

@@ -6,11 +6,11 @@ <% first = true %> <% fields.each do |field_name, field_type| %> <% if first %><div class="row"><% end %> <div class="small-4 columns <% if not first %>float-left small-offset-2<% end %>"> - <label translate><%= field_name.to_s.capitalize %> :</label> + <label translate><%= field_name.to_s.humanize.capitalize %> :</label> <% case field_type when "belongs_to" %> <select ng-model="<%= field_name %>" name="<%= field_name %>"> <option ng-repeat="item in all_<%= field_type.resource_name %>" value="{{ item.id }}" title="{{ item.name || item }}" ng-selected="item.id === <%= field_name %>.id">{{ item.name || item }}</option> </select> @@ -18,9 +18,13 @@ <select ng-model="<%= field_name %>" name="<%= field_name %>" multiple> <option ng-repeat="item in all_<%= field_type.resource_name %>" value="{{ item.id }}" title="{{ item.name || item }}" ng-selected="have('<%= field_name %>', item.id)">{{ item.name || item }}</option> </select> <% when "text" %> <textarea ng-model="<%= field_name %>"></textarea> + <% when "boolean" %> + <input ng-model="<%= field_name %>" type="checkbox" class="<%= field_type %>_field" /> + <% when "datetime" %> + <datepicker ng-model="<%= field_name %>" class="datetime_field" placeholder="{{ 'Click to pick a date' | translate }}" /> <% when "string", nil %> <input ng-model="<%= field_name %>" type="text" class="<%= field_type %>_field" /> <% else %> <input ng-model="<%= field_name %>" type="<%= field_type %>" class="<%= field_type %>_field" /> <% end %>