Mercurial > altnet-hispano
changeset 155:23aaf98b8377
Generalizando editores en EditorDefault basando los textos en recursos
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Resources/Agendas.Resources.csproj Wed Aug 03 01:02:42 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Resources/Agendas.Resources.csproj Wed Aug 03 09:38:23 2011 -0300 @@ -41,6 +41,11 @@ </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Properties\LayoutResources.Designer.cs"> + <DependentUpon>LayoutResources.resx</DependentUpon> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + </Compile> <Compile Include="Properties\DataAnnotationResources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> @@ -48,6 +53,10 @@ </Compile> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="Properties\LayoutResources.resx"> + <Generator>PublicResXFileCodeGenerator</Generator> + <LastGenOutput>LayoutResources.Designer.cs</LastGenOutput> + </EmbeddedResource> <EmbeddedResource Include="Properties\DataAnnotationResources.resx"> <Generator>PublicResXFileCodeGenerator</Generator> <LastGenOutput>DataAnnotationResources.Designer.cs</LastGenOutput>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Agendas/trunk/src/Agendas.Resources/Properties/LayoutResources.Designer.cs Wed Aug 03 09:38:23 2011 -0300 @@ -0,0 +1,225 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.235 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace AltNetHispano.Agendas.Resources.Properties { + using System; + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class LayoutResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal LayoutResources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AltNetHispano.Agendas.Resources.Properties.LayoutResources", typeof(LayoutResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// <summary> + /// Looks up a localized string similar to Cancelar. + /// </summary> + public static string CancelButton { + get { + return ResourceManager.GetString("CancelButton", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Complete los datos del evento a agendar. + /// </summary> + public static string EventoAgendarModelDescription { + get { + return ResourceManager.GetString("EventoAgendarModelDescription", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to datos del evento. + /// </summary> + public static string EventoAgendarModelLegend { + get { + return ResourceManager.GetString("EventoAgendarModelLegend", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Agendar evento. + /// </summary> + public static string EventoAgendarModelTitle { + get { + return ResourceManager.GetString("EventoAgendarModelTitle", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Cambie los datos que desea y presione el botón guardar. + /// </summary> + public static string EventoEditModelDescription { + get { + return ResourceManager.GetString("EventoEditModelDescription", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to datos del evento. + /// </summary> + public static string EventoEditModelLegend { + get { + return ResourceManager.GetString("EventoEditModelLegend", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Modificar evento. + /// </summary> + public static string EventoEditModelTitle { + get { + return ResourceManager.GetString("EventoEditModelTitle", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Ingrese los datos del nuevo evento. + /// </summary> + public static string EventoNewModelDescription { + get { + return ResourceManager.GetString("EventoNewModelDescription", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to datos del evento. + /// </summary> + public static string EventoNewModelLegend { + get { + return ResourceManager.GetString("EventoNewModelLegend", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Nuevo evento. + /// </summary> + public static string EventoNewModelTitle { + get { + return ResourceManager.GetString("EventoNewModelTitle", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Modifique los datos que desea corregir y presione guardar. + /// </summary> + public static string PersonaEditModelDescription { + get { + return ResourceManager.GetString("PersonaEditModelDescription", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Personas. + /// </summary> + public static string PersonaEditModelTitle { + get { + return ResourceManager.GetString("PersonaEditModelTitle", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Complete los siguiente datos para registrar una nueva persona. + /// </summary> + public static string PersonaNewModelDescription { + get { + return ResourceManager.GetString("PersonaNewModelDescription", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Personas. + /// </summary> + public static string PersonaNewModelTitle { + get { + return ResourceManager.GetString("PersonaNewModelTitle", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Ingrese los datos del evento a proponer. + /// </summary> + public static string PropuestaNewModelDescription { + get { + return ResourceManager.GetString("PropuestaNewModelDescription", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Proponer evento. + /// </summary> + public static string PropuestaNewModelTitle { + get { + return ResourceManager.GetString("PropuestaNewModelTitle", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Guardar. + /// </summary> + public static string SaveButton { + get { + return ResourceManager.GetString("SaveButton", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Los datos ingresados no son validos, por favor verifíquelos. + /// </summary> + public static string ValidationSummaryDefault { + get { + return ResourceManager.GetString("ValidationSummaryDefault", resourceCulture); + } + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Agendas/trunk/src/Agendas.Resources/Properties/LayoutResources.resx Wed Aug 03 09:38:23 2011 -0300 @@ -0,0 +1,174 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="CancelButton" xml:space="preserve"> + <value>Cancelar</value> + </data> + <data name="EventoAgendarModelDescription" xml:space="preserve"> + <value>Complete los datos del evento a agendar</value> + </data> + <data name="EventoAgendarModelLegend" xml:space="preserve"> + <value>datos del evento</value> + </data> + <data name="EventoAgendarModelTitle" xml:space="preserve"> + <value>Agendar evento</value> + </data> + <data name="EventoEditModelDescription" xml:space="preserve"> + <value>Cambie los datos que desea y presione el botón guardar</value> + </data> + <data name="EventoEditModelLegend" xml:space="preserve"> + <value>datos del evento</value> + </data> + <data name="EventoEditModelTitle" xml:space="preserve"> + <value>Modificar evento</value> + </data> + <data name="EventoNewModelDescription" xml:space="preserve"> + <value>Ingrese los datos del nuevo evento</value> + </data> + <data name="EventoNewModelLegend" xml:space="preserve"> + <value>datos del evento</value> + </data> + <data name="EventoNewModelTitle" xml:space="preserve"> + <value>Nuevo evento</value> + </data> + <data name="PersonaEditModelDescription" xml:space="preserve"> + <value>Modifique los datos que desea corregir y presione guardar</value> + </data> + <data name="PersonaEditModelTitle" xml:space="preserve"> + <value>Personas</value> + </data> + <data name="PersonaNewModelDescription" xml:space="preserve"> + <value>Complete los siguiente datos para registrar una nueva persona</value> + </data> + <data name="PersonaNewModelTitle" xml:space="preserve"> + <value>Personas</value> + </data> + <data name="PropuestaNewModelDescription" xml:space="preserve"> + <value>Ingrese los datos del evento a proponer</value> + </data> + <data name="PropuestaNewModelTitle" xml:space="preserve"> + <value>Proponer evento</value> + </data> + <data name="SaveButton" xml:space="preserve"> + <value>Guardar</value> + </data> + <data name="ValidationSummaryDefault" xml:space="preserve"> + <value>Los datos ingresados no son validos, por favor verifíquelos</value> + </data> +</root> \ No newline at end of file
--- a/Agendas/trunk/src/Agendas.Web/Agendas.Web.csproj Wed Aug 03 01:02:42 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Agendas.Web.csproj Wed Aug 03 09:38:23 2011 -0300 @@ -69,6 +69,7 @@ <Compile Include="Controllers\PerfilController.cs" /> <Compile Include="Controllers\PersonaController.cs" /> <Compile Include="DataProviders.cs" /> + <Compile Include="EditorDefaultExtensions.cs" /> <Compile Include="Global.asax.cs"> <DependentUpon>Global.asax</DependentUpon> </Compile> @@ -154,12 +155,7 @@ <Folder Include="App_Data\" /> </ItemGroup> <ItemGroup> - <Content Include="Views\Evento\Modificar.cshtml" /> <Content Include="Views\Evento\Index.cshtml" /> - <Content Include="Views\Evento\Nuevo.cshtml" /> - </ItemGroup> - <ItemGroup> - <Content Include="Views\Evento\Proponer.cshtml" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Agendas.Domain\Agendas.Domain.csproj"> @@ -198,9 +194,6 @@ <Content Include="Views\Shared\_Messages.cshtml" /> </ItemGroup> <ItemGroup> - <Content Include="Views\Evento\Agendar.cshtml" /> - </ItemGroup> - <ItemGroup> <Content Include="Views\Historico\Index.cshtml" /> </ItemGroup> <ItemGroup> @@ -210,17 +203,14 @@ <Content Include="Views\Persona\Index.cshtml" /> </ItemGroup> <ItemGroup> - <Content Include="Views\Persona\Nueva.cshtml" /> - </ItemGroup> - <ItemGroup> - <Content Include="Views\Persona\Modificar.cshtml" /> - </ItemGroup> - <ItemGroup> <Content Include="Views\Shared\EditorTemplates\Ponente.cshtml" /> </ItemGroup> <ItemGroup> <Content Include="Views\Shared\EditorTemplates\DateTime.cshtml" /> </ItemGroup> + <ItemGroup> + <Content Include="Views\Shared\DefaultEditor.cshtml" /> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
--- a/Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs Wed Aug 03 01:02:42 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs Wed Aug 03 09:38:23 2011 -0300 @@ -39,8 +39,8 @@ [Authorize] public ActionResult Nuevo() { - var eventoModel = new EventoNewModel {Fecha = DateTime.Now}; - return View(eventoModel); + var model = new EventoNewModel {Fecha = DateTime.Now}; + return View("Defaulteditor", model); } [HttpPost] @@ -60,7 +60,7 @@ } ModelState.AddModelError("error", r.ToString()); } - return View(model); + return View("Defaulteditor", model); } [Authorize] @@ -97,7 +97,7 @@ Fecha = evento.Fecha, UrlInvitacion = evento.UrlInvitacion }; - return View(model); + return View("Defaulteditor", model); } [HttpPost] @@ -116,7 +116,7 @@ } ModelState.AddModelError("error", r.ToString()); } - return View(model); + return View("Defaulteditor", model); } [Authorize] @@ -133,7 +133,7 @@ Fecha = evento.Fecha, UrlInvitacion = evento.UrlInvitacion }; - return View(model); + return View("Defaulteditor", model); } [HttpPost] @@ -152,13 +152,14 @@ } ModelState.AddModelError("error", r.ToString()); } - return View(model); + return View("Defaulteditor", model); } [Authorize] public ActionResult Proponer() { - return View(new PropuestaNewModel()); + var model = new PropuestaNewModel(); + return View("Defaulteditor", model); } [HttpPost] @@ -174,7 +175,7 @@ return RedirectToAction("Index"); ModelState.AddModelError("error", r.ToString()); } - return View(model); + return View("Defaulteditor", model); } [Authorize]
--- a/Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs Wed Aug 03 01:02:42 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Controllers/PersonaController.cs Wed Aug 03 09:38:23 2011 -0300 @@ -19,7 +19,8 @@ public ActionResult Nueva() { - return View(); + var model = new PersonaNewModel(); + return View("Defaulteditor", model); } [HttpPost] @@ -38,7 +39,7 @@ this.AddError(r.Message); } - return View(model); + return View("Defaulteditor", model); } public ActionResult Modificar(string id) @@ -54,8 +55,8 @@ var model = new PersonaEditModel {Id = persona.Id.ToString(), Nombre = persona.Nombre, Twitter = persona.Twitter, EMail = persona.Mail}; - - return View(model); + + return View("Defaulteditor", model); } [HttpPost] @@ -74,7 +75,7 @@ this.AddError(r.Message); } - return View(model); + return View("Defaulteditor", model); } } } \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Agendas/trunk/src/Agendas.Web/EditorDefaultExtensions.cs Wed Aug 03 09:38:23 2011 -0300 @@ -0,0 +1,36 @@ +using System.Web; +using System.Web.Mvc; + +namespace AltNetHispano.Agendas.Web +{ + public static class EditorDefaultExtensions + { + public static HtmlString GetTitleForModel<T>(this HtmlHelper<T> helper) + { + return new HtmlString(SearchResource(helper.ViewData.Model.GetType().Name + "Title")); + } + + public static HtmlString GetDescriptionForModel<T>(this HtmlHelper<T> helper) + { + return new HtmlString(SearchResource(helper.ViewData.Model.GetType().Name + "Description")); + } + + public static HtmlString GetLegendForModel<T>(this HtmlHelper<T> helper) + { + return new HtmlString(SearchResource(helper.ViewData.Model.GetType().Name + "Legend")); + } + + private static string SearchResource(string resourceName) + { + string displayName = null; + var resourceType = typeof(Resources.Properties.LayoutResources); + var prop = resourceType.GetProperty(resourceName); + if (prop != null) + { + var value = prop.GetValue(resourceType, null); + displayName = value != null ? value.ToString() : resourceName; + } + return displayName ?? string.Empty; + } + } +} \ No newline at end of file
--- a/Agendas/trunk/src/Agendas.Web/Views/Evento/Agendar.cshtml Wed Aug 03 01:02:42 2011 -0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -@model AltNetHispano.Agendas.Web.Models.EventoAgendarModel -<h2>Agenda</h2> -<p> - Modifique los datos que desea corregir y presione guardar -</p> - -<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> -<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> - -@using (Html.BeginForm()) -{ - @Html.ValidationSummary(true, "Los datos ingresados no son validos, por favor verifíquelos") - <div> - <fieldset> - <legend>Datos del evento:</legend> - @Html.EditorForModel() - <p> - <input type="submit" value="Guardar" /> - @Html.ActionLink("Cancelar", "Index") - </p> - </fieldset> - </div> -} \ No newline at end of file
--- a/Agendas/trunk/src/Agendas.Web/Views/Evento/Modificar.cshtml Wed Aug 03 01:02:42 2011 -0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -@model AltNetHispano.Agendas.Web.Models.EventoEditModel -<h2>Agenda</h2> -<p> - Modifique los datos que desea corregir y presione guardar -</p> - -<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> -<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> - -@using (Html.BeginForm()) -{ - @Html.ValidationSummary(true, "Los datos ingresados no son validos, por favor verifíquelos") - <div> - <fieldset> - <legend>Datos del evento:</legend> - @Html.EditorForModel() - <p> - <input type="submit" value="Guardar" /> - @Html.ActionLink("Cancelar", "Index") - </p> - </fieldset> - </div> -} \ No newline at end of file
--- a/Agendas/trunk/src/Agendas.Web/Views/Evento/Nuevo.cshtml Wed Aug 03 01:02:42 2011 -0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -@model AltNetHispano.Agendas.Web.Models.EventoNewModel -<h2>Agenda</h2> -<p> - Complete los siguiente datos para agendar un nuevo evento -</p> - -<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> -<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> - -@using (Html.BeginForm()) -{ - @Html.ValidationSummary(true, "Los datos ingresados no son validos, por favor verifíquelos") - <div> - <fieldset> - <legend>Datos del evento:</legend> - @Html.EditorForModel() - <p> - <input type="submit" value="Guardar" /> - @Html.ActionLink("Cancelar", "Index") - </p> - </fieldset> - </div> -} \ No newline at end of file
--- a/Agendas/trunk/src/Agendas.Web/Views/Evento/Proponer.cshtml Wed Aug 03 01:02:42 2011 -0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -@model AltNetHispano.Agendas.Web.Models.PropuestaNewModel -<h2>Agenda</h2> -<p> - Complete los siguiente datos para proponer un nuevo tema -</p> - -<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> -<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> - -@using (Html.BeginForm()) -{ - @Html.ValidationSummary(true, "Los datos ingresados no son validos, por favor verifíquelos") - <div> - <fieldset> - <legend>Datos de la propuesta:</legend> - @Html.EditorForModel() - <p> - <input type="submit" value="Guardar" /> - @Html.ActionLink("Cancelar", "Index") - </p> - </fieldset> - </div> -} \ No newline at end of file
--- a/Agendas/trunk/src/Agendas.Web/Views/Persona/Modificar.cshtml Wed Aug 03 01:02:42 2011 -0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -@model AltNetHispano.Agendas.Web.Models.PersonaEditModel -<h2>Personas</h2> -<p> - Modifique los datos que desea corregir y presione guardar -</p> - -<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> -<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> - -@using (Html.BeginForm()) -{ - @Html.ValidationSummary(true, "Los datos ingresados no son validos, por favor verifíquelos") - <div> - <fieldset> - <legend>Datos de la persona:</legend> - @Html.EditorForModel() - <p> - <input type="submit" value="Guardar" /> - @Html.ActionLink("Cancelar", "Index") - </p> - </fieldset> - </div> -} \ No newline at end of file
--- a/Agendas/trunk/src/Agendas.Web/Views/Persona/Nueva.cshtml Wed Aug 03 01:02:42 2011 -0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -@model AltNetHispano.Agendas.Web.Models.PersonaNewModel -<h2>Personas</h2> -<p> - Complete los siguiente datos para registrar una nueva persona -</p> - -<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> -<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> - -@using (Html.BeginForm()) -{ - @Html.ValidationSummary(true, "Los datos ingresados no son validos, por favor verifíquelos") - <div> - <fieldset> - <legend>Datos de la persona:</legend> - @Html.EditorForModel() - <p> - <input type="submit" value="Guardar" /> - @Html.ActionLink("Cancelar", "Index") - </p> - </fieldset> - </div> -} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Agendas/trunk/src/Agendas.Web/Views/Shared/DefaultEditor.cshtml Wed Aug 03 09:38:23 2011 -0300 @@ -0,0 +1,22 @@ +<h2>@Html.GetTitleForModel()</h2> +<p> + @Html.GetDescriptionForModel() +</p> + +<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> +<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> + +@using (Html.BeginForm()) +{ + @Html.ValidationSummary(true, @LayoutResources.ValidationSummaryDefault) + <div> + <fieldset> + <legend>@Html.GetLegendForModel()</legend> + @Html.EditorForModel() + <p> + <input type="submit" value="@LayoutResources.SaveButton" /> + @Html.ActionLink(@LayoutResources.CancelButton, "Index") + </p> + </fieldset> + </div> +} \ No newline at end of file
--- a/Agendas/trunk/src/Agendas.Web/Views/Web.config Wed Aug 03 01:02:42 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Views/Web.config Wed Aug 03 09:38:23 2011 -0300 @@ -17,6 +17,7 @@ <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="AltNetHispano.Agendas.Web"/> + <add namespace="AltNetHispano.Agendas.Resources.Properties"/> </namespaces> </pages> </system.web.webPages.razor>