andrewtobin/Twitter-Bootstrap-MVC — pull request #5 by gazk (2012-05-08 13:52:22+00:00)
Title: Bootstrap-MVC

I was just going to send the html helpers but I have also included the other commits aswell as the T4 templates have been updated to use these new helpers.

There are some new editor templates (@Html.EditorFor) found under Views\Shared\EditorTemplates. The DateTime template will generate a jquery calendar picker. The string template checks the StringLength attribute and changes the size of the text box to fit.

There is a new HelperText attribute which will generate a @Html.BootstrapFormHelpTextBlockFor (maps to a Bootstrap "help-block")

Example model :-

```csharp
[Required]
[StringLength(20)]
[HelperText("Some helper text")]
[Display(Name = "Forename")]
public string FirstName { get; set; }

[Required]
[DataType(DataType.Date)]
[Display(Name = "Start Date")]
public DateTime? StartDate { get; set; }
```

The jquery calendar is using a twitter bootstrap theme. The bootstrap-datepicker-format.js file is currently set to dd/mm/yyyy format. Its simple to change to support other formats.

There is a new datatables (http://datatables.net) template called List-DataTables.tt. I renamed the original list template to List-Standard.tt.

The validation has been changed to use the bootstrap class names rather than copying the css into the equivalent asp.net mvc css classes. This is just to make maintenance easier when upgrading bootstrap. The labels also change colour when validation fails.

Anyway if you just want the extensions then that is fine.