* IValueProvider.cs:
* TemplateException.cs: * Login.aspx: * Profile.aspx: * WebApiConfig.cs: * MyProfile.aspx: * IValueProvider.cs: * BlogsController.cs: * BasketController.cs: * ModuleController.cs: * AccountController.cs: * TemplateException.cs: * WorkFlowController.cs: * BlogsApiController.cs: * PaypalApiController.cs: * BasketController.cs: * BlogsApiController.cs: * WorkFlowController.cs: * PaypalApiController.cs: * FrontOfficeApiController.cs: * FrontOfficeApiController.cs: refactoring * jquery-ui.js: may be usefull at taking a date * Web.csproj: * WebApiConfig.cs: * App.master: added a spacer for a better rendering * style.css: better style * DateQuery.aspx: may use the jQuery "full calendar" * FreeDate.cs: refactoring
This commit is contained in:
@ -43,35 +43,15 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
return View ();
|
||||
}
|
||||
/// <summary>
|
||||
/// Login the specified returnUrl.
|
||||
/// </summary>
|
||||
/// <param name="returnUrl">Return URL.</param>
|
||||
public ActionResult Login (string returnUrl)
|
||||
{
|
||||
ViewData ["returnUrl"] = returnUrl;
|
||||
return View ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the profile.
|
||||
/// </summary>
|
||||
/// <returns>The profile.</returns>
|
||||
/// <param name="user">User.</param>
|
||||
public static Profile GetProfile (string user)
|
||||
{
|
||||
return new Profile (ProfileBase.Create (user));
|
||||
}
|
||||
|
||||
|
||||
// TODO [ValidateAntiForgeryToken]
|
||||
/// <summary>
|
||||
/// Dos the login.
|
||||
/// Does login.
|
||||
/// </summary>
|
||||
/// <returns>The login.</returns>
|
||||
/// <param name="model">Model.</param>
|
||||
/// <param name="returnUrl">Return URL.</param>
|
||||
public ActionResult DoLogin (LoginModel model, string returnUrl)
|
||||
public ActionResult Login (LoginModel model, string returnUrl)
|
||||
{
|
||||
if (ModelState.IsValid) {
|
||||
if (Membership.ValidateUser (model.UserName, model.Password)) {
|
||||
@ -88,7 +68,7 @@ namespace Yavsc.Controllers
|
||||
ViewData ["returnUrl"] = returnUrl;
|
||||
|
||||
// If we got this far, something failed, redisplay form
|
||||
return View ("Login", model);
|
||||
return View (model);
|
||||
}
|
||||
/// <summary>
|
||||
/// Register the specified model and returnUrl.
|
||||
@ -255,11 +235,11 @@ namespace Yavsc.Controllers
|
||||
/// <param name="model">Model.</param>
|
||||
[Authorize]
|
||||
[HttpGet]
|
||||
public ActionResult MyProfile (Profile model)
|
||||
public ActionResult Profile (Profile model)
|
||||
{
|
||||
string username = Membership.GetUser ().UserName;
|
||||
ViewData ["UserName"] = username;
|
||||
model = GetProfile (username);
|
||||
model = new Profile (ProfileBase.Create (username));
|
||||
model.RememberMe = FormsAuthentication.GetAuthCookie (username, true) == null;
|
||||
return View (model);
|
||||
}
|
||||
@ -272,7 +252,7 @@ namespace Yavsc.Controllers
|
||||
[Authorize]
|
||||
[HttpPost]
|
||||
// ASSERT("Membership.GetUser ().UserName is made of simple characters, no slash nor backslash"
|
||||
public ActionResult MyProfile (Profile model, HttpPostedFileBase AvatarFile)
|
||||
public ActionResult Profile (Profile model, HttpPostedFileBase AvatarFile)
|
||||
{
|
||||
string username = Membership.GetUser ().UserName;
|
||||
ViewData ["UserName"] = username;
|
||||
|
@ -121,7 +121,7 @@ namespace Yavsc.Controllers
|
||||
// find entries
|
||||
BlogEntryCollection c = BlogManager.FindPost (user, sf, pageIndex, pageSize, out tr);
|
||||
// Get author's meta data
|
||||
Profile bupr = AccountController.GetProfile (user);
|
||||
Profile bupr = new Profile (ProfileBase.Create (user));
|
||||
ViewData ["BlogUserProfile"] = bupr;
|
||||
// Inform of listing meta data
|
||||
ViewData ["BlogTitle"] = bupr.BlogTitle;
|
||||
@ -155,7 +155,7 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
if (e == null)
|
||||
return View ("TitleNotFound");
|
||||
Profile pr = AccountController.GetProfile (e.UserName);
|
||||
Profile pr = new Profile (ProfileBase.Create (e.UserName));
|
||||
if (pr==null)
|
||||
return View ("TitleNotFound");
|
||||
ViewData ["BlogUserProfile"] = pr;
|
||||
|
@ -1,36 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Yavsc.Model;
|
||||
using System.Configuration;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Module controller.
|
||||
/// </summary>
|
||||
public class ModuleController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialize the specified requestContext.
|
||||
/// </summary>
|
||||
/// <param name="requestContext">Request context.</param>
|
||||
protected override void Initialize (System.Web.Routing.RequestContext requestContext)
|
||||
{
|
||||
base.Initialize (requestContext);
|
||||
ConfigurationManager.GetSection ("ymodules");
|
||||
|
||||
}
|
||||
|
||||
// List<IModule> modules = new List<IModule> ();
|
||||
/// <summary>
|
||||
/// Index this instance.
|
||||
/// </summary>
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View ();
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Yavsc.Model;
|
||||
using System.Configuration;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Module controller.
|
||||
/// </summary>
|
||||
public class ModuleController : Controller
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialize the specified requestContext.
|
||||
/// </summary>
|
||||
/// <param name="requestContext">Request context.</param>
|
||||
protected override void Initialize (System.Web.Routing.RequestContext requestContext)
|
||||
{
|
||||
base.Initialize (requestContext);
|
||||
ConfigurationManager.GetSection ("ymodules");
|
||||
|
||||
}
|
||||
|
||||
// List<IModule> modules = new List<IModule> ();
|
||||
/// <summary>
|
||||
/// Index this instance.
|
||||
/// </summary>
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,12 +48,11 @@
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
<aside>
|
||||
<asp:ContentPlaceHolder ID="MASContent" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
|
||||
<div id="login">
|
||||
<div id="login" >
|
||||
<% if (Membership.GetUser()==null) { %>
|
||||
<%= Html.ActionLink( YavscHelpers.SiteName, "Index", "Home" ,null, new { @class="actionlink" } ) %>
|
||||
<span class="hidcom"> Page d'accueil </span>
|
||||
@ -64,7 +63,7 @@
|
||||
</a>
|
||||
<span class="hidcom">S'authentifier avec son compte Google+</span>
|
||||
<% } else { %>
|
||||
<%= Html.ActionLink(HttpContext.Current.User.Identity.Name, "MyProfile", "Account", null, new { @class="actionlink" }) %>
|
||||
<%= Html.ActionLink(HttpContext.Current.User.Identity.Name, "Profile", "Account", null, new { @class="actionlink" }) %>
|
||||
<span class="hidcom"> Édition de votre profile </span>
|
||||
@ <%= Html.ActionLink( YavscHelpers.SiteName, "Index", "Home" ,null, new { @class="actionlink" }) %>
|
||||
<span class="hidcom"> Page d'accueil </span>
|
||||
@ -72,9 +71,12 @@
|
||||
<span class="hidcom"> Édition d'un nouveau billet </span>
|
||||
<%= Html.ActionLink( "Deconnexion", "Logout", "Account", new { returnUrl=Request.Url.PathAndQuery }, new { @class="actionlink" }) %>
|
||||
<% } %>
|
||||
</div>
|
||||
</aside>
|
||||
<footer>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<div style="float:right; height:5em; z-index:-1;"></div>
|
||||
<footer>
|
||||
<%= Html.ActionLink("Contact","Contact","Home",null, new { @class="footerlink" }) %> <br/>
|
||||
<% foreach ( string link in Yavsc.ThanksHelper.Links()) { %>
|
||||
<%= link %>
|
||||
|
16582
web/Scripts/jquery-ui.js
vendored
Normal file
16582
web/Scripts/jquery-ui.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,6 @@ body {
|
||||
background-repeat: no-repeat;
|
||||
color: #D0FFD0;
|
||||
font-family: 'Arial', cursive;
|
||||
padding-bottom:2.5em;
|
||||
}
|
||||
|
||||
textarea {
|
||||
@ -20,9 +19,10 @@ input, textarea, checkbox {
|
||||
main {
|
||||
background-color: rgba(17,0,23,0.65);
|
||||
float:left;
|
||||
margin-bottom:3em;
|
||||
}
|
||||
|
||||
footer:after {
|
||||
content: '';
|
||||
}
|
||||
.panel,.bshpanel,aside {
|
||||
background-color: rgba(32,16,16,0.8);
|
||||
border-radius:5px; border: solid 1px #000060;
|
||||
@ -31,36 +31,43 @@ main {
|
||||
|
||||
.bsh { float: right; }
|
||||
|
||||
|
||||
video,img {
|
||||
max-width:100%;
|
||||
max-height:75%;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
|
||||
|
||||
footer {
|
||||
position:fixed;
|
||||
bottom:0;
|
||||
left:0;
|
||||
right:0;
|
||||
background-color:rgba(0,16,0,0.8);
|
||||
height:3em;
|
||||
background-color:rgba(16,0,0,0.8);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
z-index:-1;
|
||||
}
|
||||
|
||||
#login {
|
||||
position:fixed;
|
||||
width:7em;
|
||||
top:0;
|
||||
right:0;
|
||||
background-color:rgba(0,16,0,0.8);
|
||||
background-color:rgba(16,16,0,0.8);
|
||||
justify-content: space-around;
|
||||
padding:1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
header {
|
||||
background-color:rgba(16,16,0,0.8);
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
text-align: center;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
h1 img { vertical-align: text-top; }
|
||||
|
||||
footer img { max-height: 2em; }
|
||||
|
||||
a {
|
||||
@ -121,8 +128,7 @@ padding-left: 20px;
|
||||
color: #B0B080;
|
||||
border-radius:5px;
|
||||
background-color:rgba(0,0,32,0.8);
|
||||
font-size:x-small;
|
||||
z-index:1;
|
||||
font-size:large;
|
||||
cursor: pointer;
|
||||
font-family: 'Arial', cursive;
|
||||
}
|
||||
@ -206,19 +212,19 @@ padding-left: 20px;
|
||||
display: none;
|
||||
}
|
||||
footer img {
|
||||
max-height: 1em;
|
||||
max-height: 1.2em;
|
||||
}
|
||||
footer {
|
||||
font-size: small;
|
||||
height: 1.5em;
|
||||
}
|
||||
|
||||
body { margin-bottom:1em; font-size: smaller; }
|
||||
|
||||
body { font-size: smaller; }
|
||||
}
|
||||
|
||||
@media all and (max-width: 350px) {
|
||||
footer img { max-height: 0.8em; }
|
||||
footer { font-size: x-small; }
|
||||
footer { font-size: x-small; height: 1em; }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<%@ Page Title="Login" Language="C#" Inherits="System.Web.Mvc.ViewPage<LoginModel>" MasterPageFile="~/Models/App.master" %>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<%= Html.ValidationSummary("Ouverture de session") %>
|
||||
<% using(Html.BeginForm("DoLogin", "Account")) %>
|
||||
<% using(Html.BeginForm("Login", "Account")) %>
|
||||
<% { %>
|
||||
<%= Html.LabelFor(model => model.UserName) %>
|
||||
<%= Html.TextBox( "UserName" ) %>
|
||||
|
@ -11,16 +11,45 @@ table.layout { border-width: 0; }
|
||||
table.layout TR TD { max-width:40%; }
|
||||
</style>
|
||||
<%= Html.ValidationSummary() %>
|
||||
<% using(Html.BeginForm("MyProfile", "Account", FormMethod.Post, new { enctype = "multipart/form-data" })) %>
|
||||
<% using(Html.BeginForm("Profile", "Account", FormMethod.Post, new { enctype = "multipart/form-data" })) %>
|
||||
<% { %>
|
||||
<fieldset><legend>Informations générales</legend>
|
||||
<fieldset><legend>Informations publiques</legend>
|
||||
|
||||
<table class="layout">
|
||||
<tr><td align="right" style="">
|
||||
<%= Html.LabelFor(model => model.Name) %></td><td>
|
||||
<%= Html.TextBox("Name") %>
|
||||
<%= Html.ValidationMessage("Name", "*") %></td></tr>
|
||||
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.WebSite) %></td><td>
|
||||
<%= Html.TextBox("WebSite") %>
|
||||
<%= Html.ValidationMessage("WebSite", "*") %></td></tr>
|
||||
|
||||
<tr><td align="right">
|
||||
Avatar </td><td> <img class="avatar" src="<%=Model.avatar%>" alt=""/>
|
||||
<input type="file" id="AvatarFile" name="AvatarFile"/>
|
||||
<%= Html.ValidationMessage("AvatarFile", "*") %></td></tr>
|
||||
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset><legend>Blog</legend>
|
||||
<table class="layout">
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.BlogVisible) %></td><td>
|
||||
<%= Html.CheckBox("BlogVisible") %>
|
||||
<%= Html.ValidationMessage("BlogVisible", "*") %></td></tr>
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.BlogTitle) %></td><td>
|
||||
<%= Html.TextBox("BlogTitle") %>
|
||||
<%= Html.ValidationMessage("BlogTitle", "*") %></td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset><legend>Contact</legend>
|
||||
<table class="layout">
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.Phone) %></td><td>
|
||||
<%= Html.TextBox("Phone") %>
|
||||
<%= Html.ValidationMessage("Phone", "*") %></td></tr>
|
||||
@ -44,30 +73,23 @@ table.layout TR TD { max-width:40%; }
|
||||
<%= Html.LabelFor(model => model.Country) %></td><td>
|
||||
<%= Html.TextBox("Country") %>
|
||||
<%= Html.ValidationMessage("Country", "*") %></td></tr>
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.WebSite) %></td><td>
|
||||
<%= Html.TextBox("WebSite") %>
|
||||
<%= Html.ValidationMessage("WebSite", "*") %></td></tr>
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.BlogVisible) %></td><td>
|
||||
<%= Html.CheckBox("BlogVisible") %>
|
||||
<%= Html.ValidationMessage("BlogVisible", "*") %></td></tr>
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.BlogTitle) %></td><td>
|
||||
<%= Html.TextBox("BlogTitle") %>
|
||||
<%= Html.ValidationMessage("BlogTitle", "*") %></td></tr>
|
||||
<tr><td align="right">
|
||||
Avatar </td><td> <img class="avatar" src="<%=Model.avatar%>" alt=""/>
|
||||
<input type="file" id="AvatarFile" name="AvatarFile"/>
|
||||
<%= Html.ValidationMessage("AvatarFile", "*") %></td></tr>
|
||||
<tr><td align="right">
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset><legend>Disponibilité</legend>
|
||||
|
||||
<table class="layout">
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.GoogleCalendar) %>:
|
||||
</td>
|
||||
<td> <%= Html.Encode(Model.GoogleCalendar) %>
|
||||
<%= Html.ActionLink("Choisir l'agenda","ChooseCalendar","Google",new { returnUrl= Request.Url.AbsolutePath }, new { @class="actionlink" }) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset><legend>Informations de facturation</legend>
|
@ -2,8 +2,11 @@
|
||||
|
||||
|
||||
<asp:Content ContentPlaceHolderID="head" ID="headContent" runat="server">
|
||||
|
||||
<link rel='stylesheet' href='/Scripts/fullcalendar/fullcalendar.css' />
|
||||
<script type="text/javascript" src="/Scripts/jquery-2.1.3.min.js"></script>
|
||||
<script src='/Scripts/fullcalendar/lib/moment.min.js'></script>
|
||||
<script src='/Scripts/fullcalendar/fullcalendar.js'></script>
|
||||
|
||||
<script type="text/javascript" src="/Scripts/jquery.mousewheel.js"></script>
|
||||
<script type="text/javascript" src="/Scripts/jquery-ui.js"></script>
|
||||
<script type="text/javascript" src="/Scripts/jquery.timepicker.js"></script>
|
||||
|
@ -135,6 +135,7 @@
|
||||
<Folder Include="users\" />
|
||||
<Folder Include="xmldoc\" />
|
||||
<Folder Include="Views\PayPal\" />
|
||||
<Folder Include="ApiControllers\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
@ -154,12 +155,8 @@
|
||||
<Compile Include="Admin\TaskOutput.cs" />
|
||||
<Compile Include="Controllers\FileSystemController.cs" />
|
||||
<Compile Include="CatExts\WebCatalogExtensions.cs" />
|
||||
<Compile Include="Controllers\WorkFlowController.cs" />
|
||||
<Compile Include="Controllers\FrontOfficeApiController.cs" />
|
||||
<Compile Include="Helpers\YavscHelpers.cs" />
|
||||
<Compile Include="Controllers\BasketController.cs" />
|
||||
<Compile Include="FileInfoCollection.cs" />
|
||||
<Compile Include="Controllers\BlogsApiController.cs" />
|
||||
<Compile Include="Controllers\AdminController.cs" />
|
||||
<Compile Include="Helpers\T.cs" />
|
||||
<Compile Include="templates\Estim.cs">
|
||||
@ -169,7 +166,6 @@
|
||||
<Compile Include="Formatters\EstimToPdfFormatter.cs" />
|
||||
<Compile Include="Formatters\SimpleFormatter.cs" />
|
||||
<Compile Include="ValidateAjaxAttribute.cs" />
|
||||
<Compile Include="Controllers\IValueProvider.cs" />
|
||||
<Compile Include="Controllers\GoogleController.cs" />
|
||||
<Compile Include="Controllers\ModuleController.cs" />
|
||||
<Compile Include="Settings\ThanksConfigurationSection.cs" />
|
||||
@ -185,13 +181,18 @@
|
||||
<Compile Include="Helpers\Google\OAuth2.cs" />
|
||||
<Compile Include="Helpers\Google\EntityQuery.cs" />
|
||||
<Compile Include="Helpers\Google\ApiClient.cs" />
|
||||
<Compile Include="Controllers\TemplateException.cs" />
|
||||
<Compile Include="Helpers\Google\CalendarApi.cs" />
|
||||
<Compile Include="Formatters\ErrorHtmlFormatter.cs" />
|
||||
<Compile Include="Formatters\RssFeedsFormatter.cs" />
|
||||
<Compile Include="Controllers\PaypalApiController.cs" />
|
||||
<Compile Include="Formatters\TexToPdfFormatter.cs" />
|
||||
<Compile Include="Controllers\WebApiConfig.cs" />
|
||||
<Compile Include="ApiControllers\BasketController.cs" />
|
||||
<Compile Include="ApiControllers\BlogsApiController.cs" />
|
||||
<Compile Include="ApiControllers\FrontOfficeApiController.cs" />
|
||||
<Compile Include="ApiControllers\PaypalApiController.cs" />
|
||||
<Compile Include="WebApiConfig.cs" />
|
||||
<Compile Include="ApiControllers\WorkFlowController.cs" />
|
||||
<Compile Include="TemplateException.cs" />
|
||||
<Compile Include="IValueProvider.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Web.config" />
|
||||
@ -670,11 +671,12 @@
|
||||
<Content Include="Scripts\img\map-load.gif" />
|
||||
<Content Include="Scripts\jquery.googlemaps.js" />
|
||||
<Content Include="Scripts\jquery.googlemaps.min.js" />
|
||||
<Content Include="Views\Account\MyProfile.aspx" />
|
||||
<Content Include="Views\FrontOffice\Basket.aspx" />
|
||||
<Content Include="Theme\dark\rect.png" />
|
||||
<Content Include="Views\Google\ChooseADate.aspx" />
|
||||
<Content Include="Scripts\stupidtable.js" />
|
||||
<Content Include="Scripts\jquery-ui.js" />
|
||||
<Content Include="Views\Account\Profile.aspx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
|
@ -41,13 +41,18 @@ namespace Yavsc.Model.Google
|
||||
/// Gets or sets the attendees.
|
||||
/// </summary>
|
||||
/// <value>The attendees.</value>
|
||||
public string Attendees { get; set; }
|
||||
public string UserName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the location.
|
||||
/// </summary>
|
||||
/// <value>The location.</value>
|
||||
public string Location { get; set; }
|
||||
|
||||
static FreeDateSet CreateFromCalAndQuery(CalendarEventList cal, AskForADate query)
|
||||
{
|
||||
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user