* Web.csproj:
* ThanksHelper.cs: * YavscHelpers.cs: * Period.cs: * YaEvent.cs: * OpenDay.cs: * WeekDay.cs: * Schedule.cs: * Position.cs: * EventPub.cs: * Periodicity.cs: * ProvidedEvent.cs: * CalendarController.cs: * FrontOfficeController.cs: * PositionAndKeyphrase.cs: * ProviderPublicInfo.cs: refactoring * PaypalApiController.cs: adds a package reference to payPal buttons * T.cs: xml doc * App.master: yet another thanks giving * style.css: Yet another impact on style sheet * Web.config: adds a circle provider section * packages.config: Adds PayPal Button manager package reference
This commit is contained in:
parent
4ba20187e8
commit
ccc3b2ffff
24 changed files with 148 additions and 79 deletions
|
|
@ -28,7 +28,11 @@ namespace Yavsc.Helpers
|
|||
string tr = LocalizedText.ResourceManager.GetString (msg.Replace (" ", "_"));
|
||||
return tr==null?msg:tr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Translate the specified helper and text.
|
||||
/// </summary>
|
||||
/// <param name="helper">Helper.</param>
|
||||
/// <param name="text">Text.</param>
|
||||
public static string Translate(this HtmlHelper helper, string text)
|
||||
{
|
||||
// Just call the other one, to avoid having two copies (we don't use the HtmlHelper).
|
||||
|
|
|
|||
60
web/Helpers/ThanksHelper.cs
Normal file
60
web/Helpers/ThanksHelper.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Link.
|
||||
/// </summary>
|
||||
public class Link {
|
||||
/// <summary>
|
||||
/// Gets or sets the text.
|
||||
/// </summary>
|
||||
/// <value>The text.</value>
|
||||
public string Text { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the URL.
|
||||
/// </summary>
|
||||
/// <value>The URL.</value>
|
||||
public string Url { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the image.
|
||||
/// </summary>
|
||||
/// <value>The image.</value>
|
||||
public string Image { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Thanks helper.
|
||||
/// </summary>
|
||||
public static class ThanksHelper {
|
||||
|
||||
static private ThanksConfigurationSection configurationSection=null;
|
||||
/// <summary>
|
||||
/// Gets the configuration section.
|
||||
/// </summary>
|
||||
/// <value>The configuration section.</value>
|
||||
static public ThanksConfigurationSection ConfigurationSection {
|
||||
get {
|
||||
if (configurationSection==null)
|
||||
configurationSection = (ThanksConfigurationSection) ConfigurationManager.GetSection ("system.web/thanks");
|
||||
return configurationSection;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Html code for each entry
|
||||
/// </summary>
|
||||
public static Link[] Thanks (this HtmlHelper helper)
|
||||
{
|
||||
List<Link> result = new List<Link>() ;
|
||||
if (ConfigurationSection == null) return result.ToArray();
|
||||
if (ConfigurationSection.To == null) return result.ToArray();
|
||||
foreach (ThanksConfigurationElement e in ConfigurationSection.To)
|
||||
result.Add( new Link { Url = e.Url, Image=e.Image, Text = e.Name });
|
||||
return result.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -96,8 +96,8 @@ namespace Yavsc.Helpers
|
|||
/// <summary>
|
||||
/// Resets the password.
|
||||
/// </summary>
|
||||
/// <param name="modelState">Model state.</param>
|
||||
/// <param name="model">Model.</param>
|
||||
/// <param name="errors">Errors.</param>
|
||||
public static void ResetPassword(LostPasswordModel model, out StringDictionary errors)
|
||||
{
|
||||
MembershipUserCollection users = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue