Items { get; set; }
+
+ public string Cabecera { get; set; }
+ }
+
+ public class RecordatorioItem
+ {
+ public RecordatorioItem(DateTime momento, string mensaje)
+ {
+ Fecha = momento.ToString("dd/MM/yyyy");
+ Hora = momento.ToString("HH:mm");
+ Mensaje = mensaje;
+ }
+
+ public string Mensaje { get; set; }
+ public string Hora { get; set; }
+ public string Fecha { get; set; }
+ }
+}
\ No newline at end of file
diff -r 8a8c35302b81 -r c4c60e034103 Agendas/trunk/src/Agendas.Twitter/TwitterStringHelper.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Agendas/trunk/src/Agendas.Twitter/TwitterStringHelper.cs Tue Sep 06 18:09:43 2011 -0300
@@ -0,0 +1,33 @@
+using System;
+using AltNetHispano.Agendas.Domain;
+
+namespace AltNetHispano.Agendas.Twitter
+{
+ public static class TwitterStringHelper
+ {
+ public static string TipoEvento(TipoEvento tipo)
+ {
+ switch (tipo)
+ {
+ case Domain.TipoEvento.Van:
+ return "La VAN";
+ case Domain.TipoEvento.Cafe:
+ return "El " + tipo;
+ case Domain.TipoEvento.GrupoEstudio:
+ return "El Grupo de estudio";
+ default:
+ return string.Empty;
+ }
+ }
+
+ public static string Ponente(Persona ponente)
+ {
+ return "@"+ponente.Twitter;
+ }
+
+ public static string Hora(DateTime fechaInicio)
+ {
+ return fechaInicio.Minute == 0 ? fechaInicio.Hour + "GMT" : fechaInicio.Hour + ":" + fechaInicio.Minute + "GMT";
+ }
+ }
+}
\ No newline at end of file
diff -r 8a8c35302b81 -r c4c60e034103 Agendas/trunk/src/Agendas.Web/Agendas.Web.csproj
--- a/Agendas/trunk/src/Agendas.Web/Agendas.Web.csproj Mon Sep 05 20:43:32 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Agendas.Web.csproj Tue Sep 06 18:09:43 2011 -0300
@@ -237,7 +237,7 @@
-
+
diff -r 8a8c35302b81 -r c4c60e034103 Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs
--- a/Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs Mon Sep 05 20:43:32 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs Tue Sep 06 18:09:43 2011 -0300
@@ -3,6 +3,7 @@
using System.Web.Mvc;
using AltNetHispano.Agendas.Domain;
using AltNetHispano.Agendas.Factories;
+using AltNetHispano.Agendas.Twitter;
using AltNetHispano.Agendas.Web.Models;
namespace AltNetHispano.Agendas.Web.Controllers
@@ -74,8 +75,8 @@
var model = new EventoConfirmModel
{
Id = id,
- Titulo = evento.Titulo/*,
- Mensaje = "Recuerde agendar los eventos en http://twuffer.com/ u otro servicio similar."*/
+ Titulo = evento.Titulo,
+ Recordatorios = new Recordatorios(evento)
};
return View("Defaulteditor", model);
}
diff -r 8a8c35302b81 -r c4c60e034103 Agendas/trunk/src/Agendas.Web/Models/EventoModel.cs
--- a/Agendas/trunk/src/Agendas.Web/Models/EventoModel.cs Mon Sep 05 20:43:32 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Models/EventoModel.cs Tue Sep 06 18:09:43 2011 -0300
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
+using AltNetHispano.Agendas.Twitter;
using DataAnnotationsExtensions;
namespace AltNetHispano.Agendas.Web.Models
@@ -113,7 +114,8 @@
public string Titulo { get; set; }
[HiddenInput]
- public string EventoConfirma { get; set; }
+ [UIHint("Recordatorios")]
+ public Recordatorios Recordatorios { get; set; }
}
public class EventoDto
diff -r 8a8c35302b81 -r c4c60e034103 Agendas/trunk/src/Agendas.Web/Views/Shared/EditorTemplates/Recordatorios.cshtml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Agendas/trunk/src/Agendas.Web/Views/Shared/EditorTemplates/Recordatorios.cshtml Tue Sep 06 18:09:43 2011 -0300
@@ -0,0 +1,28 @@
+@model AltNetHispano.Agendas.Twitter.Recordatorios
+
+
+@Model.Cabecera
+@if (!string.IsNullOrWhiteSpace(Model.CabeceraLink)) {
+servicio recomendado
+}
+
+
+
+
+
+ Fecha |
+ Hora |
+ Mensaje |
+
+
+
+@foreach (var item in Model.Items)
+{
+
+ @item.Fecha |
+ @item.Hora |
+ @item.Mensaje |
+
+}
+
+
\ No newline at end of file