├── README.md ├── .nuget ├── NuGet.exe └── NuGet.Config ├── DevRainSolutions.KyivSmartCity.New ├── Views │ ├── _ViewStart.cshtml │ ├── UserMailer │ │ ├── _Layout.cshtml │ │ └── Welcome.cshtml │ ├── Home │ │ ├── About.cshtml │ │ ├── Thanks.cshtml │ │ ├── Contact.cshtml │ │ ├── Index.cshtml │ │ ├── Session2020.cshtml │ │ └── Forum2015.cshtml │ ├── Account │ │ ├── ExternalLoginFailure.cshtml │ │ ├── ForgotPasswordConfirmation.cshtml │ │ ├── ConfirmEmail.cshtml │ │ ├── ResetPasswordConfirmation.cshtml │ │ ├── SendCode.cshtml │ │ ├── ForgotPassword.cshtml │ │ ├── _ExternalLoginsListPartial.cshtml │ │ ├── VerifyCode.cshtml │ │ ├── ExternalLoginConfirmation.cshtml │ │ ├── Register.cshtml │ │ ├── ResetPassword.cshtml │ │ └── Login.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── Lockout.cshtml │ │ ├── _Footer.cshtml │ │ ├── NotFound.cshtml │ │ ├── _Feedback.cshtml │ │ ├── _GoogleAnalytics.cshtml │ │ ├── _Disqus.cshtml │ │ ├── EditorTemplates │ │ │ ├── HtmlEditor.cshtml │ │ │ └── tinymce_jquery_full.cshtml │ │ ├── _Aside.cshtml │ │ ├── _Social.cshtml │ │ └── _LoginPartial.cshtml │ ├── Groups │ │ └── Index.cshtml │ ├── News │ │ ├── Details.cshtml │ │ └── Index.cshtml │ ├── Projects │ │ ├── Details.cshtml │ │ └── Index.cshtml │ ├── Manage │ │ ├── AddPhoneNumber.cshtml │ │ ├── VerifyPhoneNumber.cshtml │ │ ├── SetPassword.cshtml │ │ ├── ChangePassword.cshtml │ │ └── ManageLogins.cshtml │ ├── Team │ │ └── Index.cshtml │ └── Web.config ├── Areas │ ├── Hackathon │ │ ├── Views │ │ │ ├── _ViewStart.cshtml │ │ │ └── web.config │ │ ├── Controllers │ │ │ └── HomeController.cs │ │ └── HachathonAreaRegistration.cs │ ├── Admin │ │ ├── Views │ │ │ ├── _ViewStart.cshtml │ │ │ ├── Experts │ │ │ │ ├── Create.cshtml │ │ │ │ ├── Edit.cshtml │ │ │ │ ├── Details.cshtml │ │ │ │ ├── Delete.cshtml │ │ │ │ ├── _CreateOrEdit.cshtml │ │ │ │ └── Index.cshtml │ │ │ ├── Groups │ │ │ │ ├── Create.cshtml │ │ │ │ ├── Edit.cshtml │ │ │ │ ├── Details.cshtml │ │ │ │ ├── Delete.cshtml │ │ │ │ ├── _CreateOrEdit.cshtml │ │ │ │ └── Index.cshtml │ │ │ ├── Projects │ │ │ │ ├── Create.cshtml │ │ │ │ ├── Edit.cshtml │ │ │ │ ├── Delete.cshtml │ │ │ │ ├── Details.cshtml │ │ │ │ ├── Index.cshtml │ │ │ │ └── _CreateOrEdit.cshtml │ │ │ ├── Documents │ │ │ │ ├── Create.cshtml │ │ │ │ ├── Edit.cshtml │ │ │ │ ├── Details.cshtml │ │ │ │ ├── Delete.cshtml │ │ │ │ ├── _CreateOrEdit.cshtml │ │ │ │ └── Index.cshtml │ │ │ ├── NewsItems │ │ │ │ ├── Create.cshtml │ │ │ │ ├── Edit.cshtml │ │ │ │ ├── Details.cshtml │ │ │ │ ├── Delete.cshtml │ │ │ │ ├── Index.cshtml │ │ │ │ └── _CreateOrEdit.cshtml │ │ │ ├── Volunteers │ │ │ │ ├── Create.cshtml │ │ │ │ ├── Edit.cshtml │ │ │ │ ├── Details.cshtml │ │ │ │ ├── Delete.cshtml │ │ │ │ ├── _CreateOrEdit.cshtml │ │ │ │ └── Index.cshtml │ │ │ ├── TeamMembers │ │ │ │ ├── Create.cshtml │ │ │ │ ├── Edit.cshtml │ │ │ │ ├── Details.cshtml │ │ │ │ ├── Delete.cshtml │ │ │ │ ├── Index.cshtml │ │ │ │ └── _CreateOrEdit.cshtml │ │ │ ├── Home │ │ │ │ └── Index.cshtml │ │ │ ├── Shared │ │ │ │ └── _Layout.cshtml │ │ │ └── web.config │ │ ├── Controllers │ │ │ ├── BaseAdminController.cs │ │ │ └── HomeController.cs │ │ ├── AdminAreaRegistration.cs │ │ └── Models │ │ │ ├── DevRainSolutionsKyivSmartCityNewContext.cs │ │ │ ├── ExpertRepository.cs │ │ │ ├── NewsItemRepository.cs │ │ │ ├── DocumentRepository.cs │ │ │ ├── VolunteerRepository.cs │ │ │ └── TeamMemberRepository.cs │ └── En │ │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── Groups │ │ │ └── Index.cshtml │ │ ├── Home │ │ │ ├── Index.cshtml │ │ │ └── Hackathon.cshtml │ │ └── web.config │ │ ├── Controllers │ │ ├── TeamController.cs │ │ ├── GroupsController.cs │ │ └── HomeController.cs │ │ └── EnAreaRegistration.cs ├── favicon.ico ├── Images │ ├── bg.png │ ├── kmcp.png │ ├── life.png │ ├── logo.png │ ├── lun.png │ ├── urban.png │ ├── hack-bg.jpg │ ├── lohika.jpg │ ├── prosto.jpg │ ├── Team │ │ ├── alex.png │ │ ├── anton.jpg │ │ ├── andriy.jpg │ │ ├── nazarov.jpg │ │ └── viktoria.png │ ├── bg-session.jpg │ ├── miratech.jpg │ ├── main-top-bg.jpg │ ├── wmd-buttons.png │ ├── LXFT_4_NB_New.png │ ├── SAP_grad_R_pref.jpg │ └── bg-openbudget.jpg ├── Global.asax ├── Models │ ├── BaseItem.cs │ ├── Volunteer.cs │ ├── Document.cs │ ├── Expert.cs │ ├── UrlHelperExtensions.cs │ ├── NewsItem.cs │ ├── TeamMember.cs │ ├── Project.cs │ ├── ReCaptchaClass.cs │ ├── IdentityModels.cs │ ├── TextBoxForExtensions.cs │ ├── SpamProtectionAttribute.cs │ └── ManageViewModels.cs ├── Mailers │ ├── UserMailer.cs │ └── IUserMailer.cs ├── Scripts │ ├── _references.js │ ├── mdd_gripper.png │ ├── mdd_toolbar.png │ ├── mdd_ajax_loader.gif │ ├── mdd_modal_background.png │ ├── MarkdownDeep License.txt │ └── MarkdownDeep Quick Reference.txt ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── App_Start │ ├── FilterConfig.cs │ ├── BundleConfig.cs │ └── RouteConfig.cs ├── Startup.cs ├── Controllers │ ├── TeamController.cs │ ├── GroupsController.cs │ ├── ProjectsController.cs │ ├── NewsController.cs │ ├── BaseController.cs │ └── HomeController.cs ├── Global.asax.cs ├── Web.Debug.config ├── Migrations │ └── Configuration.cs ├── Properties │ ├── AssemblyInfo.cs │ └── PublishProfiles │ │ ├── kyivsmartcity.pubxml │ │ └── kyivsmartcity-dev.pubxml └── Content │ └── Site.css ├── packages └── repositories.config ├── NotFoundMvc ├── PreApplicationStarter.cs ├── ActionInvokerSelector.cs ├── NotFoundController.cs ├── Properties │ └── AssemblyInfo.cs ├── NotFoundAsyncControllerActionInvoker.cs ├── NotFoundHandler.cs ├── ControllerFactoryWrapper.cs ├── ActionInvokerWrapper.cs ├── InstallerModule.cs └── NotFoundViewResult.cs ├── config ├── scaffolding.config ├── LICENSE ├── DevRainSolutions.KyivSmartCity.sln └── .gitattributes /README.md: -------------------------------------------------------------------------------- 1 | Веб-сайт Kyiv Smart City 2 | 3 | http://www.smart.kievcity.gov.ua 4 | -------------------------------------------------------------------------------- /.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/.nuget/NuGet.exe -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Hackathon/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/En/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Areas/En/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/UserMailer/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @RenderBody() 5 | 6 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/favicon.ico -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/bg.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/kmcp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/kmcp.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/life.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/life.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/logo.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/lun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/lun.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/urban.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/urban.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="DevRainSolutions.KyivSmartCity.New.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/hack-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/hack-bg.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/lohika.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/lohika.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/prosto.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/prosto.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/BaseItem.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Models/BaseItem.cs -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/Team/alex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/Team/alex.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/Team/anton.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/Team/anton.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/bg-session.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/bg-session.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/miratech.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/miratech.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Mailers/UserMailer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Mailers/UserMailer.cs -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/Volunteer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Models/Volunteer.cs -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/Team/andriy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/Team/andriy.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/Team/nazarov.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/Team/nazarov.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/main-top-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/main-top-bg.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/wmd-buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/wmd-buttons.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Scripts/_references.js -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Scripts/mdd_gripper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Scripts/mdd_gripper.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Scripts/mdd_toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Scripts/mdd_toolbar.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/LXFT_4_NB_New.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/LXFT_4_NB_New.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/SAP_grad_R_pref.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/SAP_grad_R_pref.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/Team/viktoria.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/Team/viktoria.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Images/bg-openbudget.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Images/bg-openbudget.jpg -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Scripts/mdd_ajax_loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Scripts/mdd_ajax_loader.gif -------------------------------------------------------------------------------- /.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Scripts/mdd_modal_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/Scripts/mdd_modal_background.png -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevRainSolutions/KyivSmartCity/HEAD/DevRainSolutions.KyivSmartCity.New/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Mailers/IUserMailer.cs: -------------------------------------------------------------------------------- 1 | using Mvc.Mailer; 2 | 3 | namespace DevRainSolutions.KyivSmartCity.New.Mailers 4 | { 5 | public interface IUserMailer 6 | { 7 | MvcMailMessage Welcome(string to); 8 | } 9 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |

Unsuccessful login with service.

8 |
9 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Locked Out"; 5 | } 6 | 7 |
8 |

Locked out.

9 |

This account has been locked out, please try again later.

10 |
11 | -------------------------------------------------------------------------------- /packages/repositories.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Forgot Password Confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Please check your email to reset your password. 11 |

12 |
13 | 14 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Confirm Email"; 3 | } 4 | 5 |

@ViewBag.Title.

6 |
7 |

8 | Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 9 |

10 |
11 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace DevRainSolutions.KyivSmartCity.New 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Hackathon/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Hackathon.Controllers 4 | { 5 | public class HomeController : Controller 6 | { 7 | // GET: Hachathon/Home 8 | public ActionResult Index() 9 | { 10 | return View(); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Controllers/BaseAdminController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Web.Mvc; 6 | 7 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Admin.Controllers 8 | { 9 | [Authorize] 10 | public abstract class BaseAdminController : Controller 11 | { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Owin; 3 | 4 | [assembly: OwinStartupAttribute(typeof(DevRainSolutions.KyivSmartCity.New.Startup))] 5 | namespace DevRainSolutions.KyivSmartCity.New 6 | { 7 | public partial class Startup 8 | { 9 | public void Configuration(IAppBuilder app) 10 | { 11 | ConfigureAuth(app); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Reset password confirmation"; 3 | } 4 | 5 |
6 |

@ViewBag.Title.

7 |
8 |
9 |

10 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 11 |

12 |
13 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/_Footer.cshtml: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Home/Thanks.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | ViewBag.Title = "Дякуємо тобі за активність!"; 4 | } 5 | 6 | 7 |
8 |
9 |

@ViewBag.Title

10 | 11 | 12 |

13 | Ми зв'яжемось з тобою найближчим часом і розкажемо деталі співпраці. 14 |

15 | 16 | 17 | 18 | 19 |
20 | 21 |
22 | 23 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/NotFound.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Page Not Found"; 3 | } 4 | 5 |

Page Not Found

6 |

Could not find the page: @ViewBag.RequestedUrl

7 | @if (ViewBag.ReferrerUrl != null) { 8 |

Go back to the previous page.

9 | } 10 | 11 | @* Error page must be longer than 512 bytes for IE and Chrome to show it. 12 | So add padding in case we're short. *@ 13 | @(new string(' ', 512)) -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/En/Controllers/TeamController.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Web.Mvc; 3 | using DevRainSolutions.KyivSmartCity.New.Controllers; 4 | 5 | namespace DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers 6 | { 7 | public class TeamController : BaseController 8 | { 9 | // GET: Team 10 | public ActionResult Index() 11 | { 12 | return View(db.TeamMembers.OrderBy(i=>i.Index)); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Admin.Controllers 8 | { 9 | public class HomeController : BaseAdminController 10 | { 11 | // GET: Admin/Home 12 | public ActionResult Index() 13 | { 14 | return View(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Controllers/TeamController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace DevRainSolutions.KyivSmartCity.New.Controllers 8 | { 9 | public class TeamController : BaseController 10 | { 11 | // GET: Team 12 | public ActionResult Index() 13 | { 14 | return View(db.TeamMembers.OrderBy(i=>i.Index)); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/_Feedback.cshtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Controllers/GroupsController.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Linq; 3 | using System.Web.Mvc; 4 | 5 | namespace DevRainSolutions.KyivSmartCity.New.Controllers 6 | { 7 | public class GroupsController :BaseController 8 | { 9 | public ActionResult Index() 10 | { 11 | return View(db.Groups.ToList()); 12 | } 13 | 14 | public ActionResult Details(int id) 15 | { 16 | var group = db.Groups.Find(id); 17 | return View(group); 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Experts/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Expert 2 | 3 | @{ 4 | ViewBag.Title = "Create"; 5 | } 6 | 7 |

Create

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | Expert 13 | 14 | @Html.Partial("_CreateOrEdit", Model) 15 | 16 |

17 | 18 |

19 |
20 | } 21 | 22 |
23 | @Html.ActionLink("Back to List", "Index") 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Groups/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Group 2 | 3 | @{ 4 | ViewBag.Title = "Create"; 5 | } 6 | 7 |

Create

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | Group 13 | 14 | @Html.Partial("_CreateOrEdit", Model) 15 | 16 |

17 | 18 |

19 |
20 | } 21 | 22 |
23 | @Html.ActionLink("Back to List", "Index") 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Projects/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Project 2 | 3 | @{ 4 | ViewBag.Title = "Create"; 5 | } 6 | 7 |

Create

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | Group 13 | 14 | @Html.Partial("_CreateOrEdit", Model) 15 | 16 |

17 | 18 |

19 |
20 | } 21 | 22 |
23 | @Html.ActionLink("Back to List", "Index") 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/_GoogleAnalytics.cshtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Documents/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Document 2 | 3 | @{ 4 | ViewBag.Title = "Create"; 5 | } 6 | 7 |

Create

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | Document 13 | 14 | @Html.Partial("_CreateOrEdit", Model) 15 | 16 |

17 | 18 |

19 |
20 | } 21 | 22 |
23 | @Html.ActionLink("Back to List", "Index") 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/NewsItems/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.NewsItem 2 | 3 | @{ 4 | ViewBag.Title = "Create"; 5 | } 6 | 7 |

Create

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | NewsItem 13 | 14 | @Html.Partial("_CreateOrEdit", Model) 15 | 16 |

17 | 18 |

19 |
20 | } 21 | 22 |
23 | @Html.ActionLink("Back to List", "Index") 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Volunteers/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Volunteer 2 | 3 | @{ 4 | ViewBag.Title = "Create"; 5 | } 6 | 7 |

Create

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | Volunteer 13 | 14 | @Html.Partial("_CreateOrEdit", Model) 15 | 16 |

17 | 18 |

19 |
20 | } 21 | 22 |
23 | @Html.ActionLink("Back to List", "Index") 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/TeamMembers/Create.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.TeamMember 2 | 3 | @{ 4 | ViewBag.Title = "Create"; 5 | } 6 | 7 |

Create

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | TeamMember 13 | 14 | @Html.Partial("_CreateOrEdit", Model) 15 | 16 |

17 | 18 |

19 |
20 | } 21 | 22 |
23 | @Html.ActionLink("Back to List", "Index") 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Groups/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Group 2 | 3 | @{ 4 | ViewBag.Title = "Edit"; 5 | } 6 | 7 |

Edit

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | Group 13 | 14 | @Html.HiddenFor(model => model.Id) 15 | @Html.Partial("_CreateOrEdit", Model) 16 | 17 |

18 | 19 |

20 |
21 | } 22 | 23 |
24 | @Html.ActionLink("Back to List", "Index") 25 |
26 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Experts/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Expert 2 | 3 | @{ 4 | ViewBag.Title = "Edit"; 5 | } 6 | 7 |

Edit

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | Expert 13 | 14 | @Html.HiddenFor(model => model.Id) 15 | @Html.Partial("_CreateOrEdit", Model) 16 | 17 |

18 | 19 |

20 |
21 | } 22 | 23 |
24 | @Html.ActionLink("Back to List", "Index") 25 |
26 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Projects/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Project 2 | 3 | @{ 4 | ViewBag.Title = "Edit"; 5 | } 6 | 7 |

Edit

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | Group 13 | 14 | @Html.HiddenFor(model => model.Id) 15 | @Html.Partial("_CreateOrEdit", Model) 16 | 17 |

18 | 19 |

20 |
21 | } 22 | 23 |
24 | @Html.ActionLink("Back to List", "Index") 25 |
26 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/Document.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace DevRainSolutions.KyivSmartCity.New.Models 4 | { 5 | public class Document 6 | { 7 | [Key] 8 | public int Id { get; set; } 9 | 10 | [Required] 11 | public int GroupId { get; set; } 12 | 13 | public virtual Group Group { get; set; } 14 | 15 | [Required] 16 | [StringLength(300)] 17 | public string Title { get; set; } 18 | 19 | [Required] 20 | [StringLength(600)] 21 | public string Description { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/NewsItems/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.NewsItem 2 | 3 | @{ 4 | ViewBag.Title = "Edit"; 5 | } 6 | 7 |

Edit

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | NewsItem 13 | 14 | @Html.HiddenFor(model => model.Id) 15 | @Html.Partial("_CreateOrEdit", Model) 16 | 17 |

18 | 19 |

20 |
21 | } 22 | 23 |
24 | @Html.ActionLink("Back to List", "Index") 25 |
26 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Projects/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Project 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |

Delete

8 | 9 |

Are you sure you want to delete this?

10 |
11 | Group 12 | 13 |
Title
14 |
@Model.Title
15 | 16 | 17 |
18 | @using (Html.BeginForm()) { 19 |

20 | | 21 | @Html.ActionLink("Back to List", "Index") 22 |

23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/Expert.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace DevRainSolutions.KyivSmartCity.New.Models 4 | { 5 | public class Expert 6 | { 7 | 8 | [Key] 9 | public int Id { get; set; } 10 | 11 | [Required] 12 | public int GroupId { get; set; } 13 | 14 | public virtual Group Group { get; set; } 15 | 16 | [Required] 17 | [StringLength(300)] 18 | public string Title { get; set; } 19 | 20 | [Required] 21 | [StringLength(600)] 22 | public string Description { get; set; } 23 | 24 | } 25 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/_Disqus.cshtml: -------------------------------------------------------------------------------- 1 |
2 | 13 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/TeamMembers/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.TeamMember 2 | 3 | @{ 4 | ViewBag.Title = "Edit"; 5 | } 6 | 7 |

Edit

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | TeamMember 13 | 14 | @Html.HiddenFor(model => model.Id) 15 | @Html.Partial("_CreateOrEdit", Model) 16 | 17 |

18 | 19 |

20 |
21 | } 22 | 23 |
24 | @Html.ActionLink("Back to List", "Index") 25 |
26 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Volunteers/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Volunteer 2 | 3 | @{ 4 | ViewBag.Title = "Edit"; 5 | } 6 | 7 |

Edit

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | Volunteer 13 | 14 | @Html.HiddenFor(model => model.Id) 15 | @Html.Partial("_CreateOrEdit", Model) 16 | 17 |

18 | 19 |

20 |
21 | } 22 | 23 |
24 | @Html.ActionLink("Back to List", "Index") 25 |
26 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Projects/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Project 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 | Group 11 | 12 |
Title
13 |
@Model.Title
14 | 15 |
Description
16 |
@Model.Description
17 | 18 |
19 |

20 | @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) | 21 | @Html.ActionLink("Back to List", "Index") 22 |

23 | 24 | 25 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Documents/Edit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Document 2 | 3 | @{ 4 | ViewBag.Title = "Edit"; 5 | } 6 | 7 |

Edit

8 | 9 | @using (Html.BeginForm()) { 10 | @Html.ValidationSummary(true) 11 |
12 | Document 13 | 14 | @Html.HiddenFor(model => model.Id) 15 | @Html.Partial("_CreateOrEdit", Model) 16 | 17 |

18 | 19 |

20 |
21 | } 22 | 23 |
24 | @Html.ActionLink("Back to List", "Index") 25 |
26 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/UserMailer/Welcome.cshtml: -------------------------------------------------------------------------------- 1 |

Вітаємо!

2 | 3 |

4 | Команда Kyiv Smart City дякує Вам за цікавість до нашого проекту та бажання до нього долучитися. 5 | Вашу електронну адресу додано до нашої бази даних. Тепер Ви зможете стежити за новинами проекту, 6 | а також отримувати запрошення на громадські обговорення та експертні зустрічі. 7 | 8 |

9 | Якщо у Вас є цікаві проекти або пропозиції, звертайтеся за адресою: info@smart.kievcity.gov.ua. 10 |

11 | 12 |

13 | Наш сайт: http://www.smart.kievcity.gov.ua. 14 |

15 | 16 |

Наша сторінка в Facebook: https://www.facebook.com/kyivsmatrcity.

17 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/En/Views/Groups/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @{ 3 | ViewBag.Title = "Groups"; 4 | } 5 | 6 |

@ViewBag.Title

7 | 8 | 9 |
10 | 11 | @foreach (var i in Model) 12 | { 13 |
14 |

@i.Title

15 |

16 | @i.Description 17 |

18 |

19 | Learn more » 20 |

21 |
22 | } 23 | 24 |
-------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Groups/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @{ 3 | ViewBag.Title = "Групи"; 4 | } 5 | 6 |

@ViewBag.Title

7 | 8 | 9 | 10 |
11 | 12 | @foreach (var i in Model) 13 | { 14 |
15 |

@i.Title

16 |

17 | @i.Description 18 |

19 |

20 | Дізнатись більше » 21 |

22 |
23 | } 24 | 25 |
-------------------------------------------------------------------------------- /NotFoundMvc/PreApplicationStarter.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using Microsoft.Web.Infrastructure.DynamicModuleHelper; 3 | 4 | [assembly: PreApplicationStartMethod(typeof(NotFoundMvc.PreApplicationStarter), "Start")] 5 | 6 | namespace NotFoundMvc 7 | { 8 | /// 9 | /// Runs at web application start. 10 | /// 11 | public class PreApplicationStarter 12 | { 13 | static bool started; 14 | 15 | public static void Start() 16 | { 17 | if (started) return; // Only start once. 18 | started = true; 19 | 20 | DynamicModuleUtility.RegisterModule(typeof(InstallerModule)); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/En/Controllers/GroupsController.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Web.Mvc; 3 | using DevRainSolutions.KyivSmartCity.New.Controllers; 4 | using DevRainSolutions.KyivSmartCity.New.Models; 5 | 6 | namespace DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers 7 | { 8 | public class GroupsController :BaseController 9 | { 10 | public ActionResult Index() 11 | { 12 | return View(new EnDataSource().GetGroups()); 13 | } 14 | 15 | public ActionResult Details(int id) 16 | { 17 | return View(new EnDataSource().GetGroups().First(i=>i.Id == id)); 18 | } 19 | 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/EditorTemplates/HtmlEditor.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 | 4 |
5 | @Html.TextArea("", Model, new { @id = "wmd", @class="form-control", style="height: 300px;" }) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/UrlHelperExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | 5 | namespace DevRainSolutions.KyivSmartCity.New.Models 6 | { 7 | public static class UrlHelperExtensions 8 | { 9 | public static string ContentAbsUrl(this UrlHelper url, string relativeContentPath) 10 | { 11 | Uri contextUri = HttpContext.Current.Request.Url; 12 | 13 | var baseUri = string.Format("{0}://{1}{2}", contextUri.Scheme, 14 | contextUri.Host, contextUri.Port == 80 ? string.Empty : ":" + contextUri.Port); 15 | 16 | return string.Format("{0}{1}", baseUri, VirtualPathUtility.ToAbsolute(relativeContentPath)); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Controllers/ProjectsController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using PagedList; 7 | 8 | namespace DevRainSolutions.KyivSmartCity.New.Controllers 9 | { 10 | public class ProjectsController : BaseController 11 | { 12 | // GET: News 13 | public ActionResult Index(int? page) 14 | { 15 | var pageNumber = page ?? 1; 16 | 17 | return View(db.Projects.ToList() 18 | .ToPagedList(pageNumber, 12)); 19 | } 20 | 21 | public ActionResult Details(int id) 22 | { 23 | return View(db.Projects.ToList().FirstOrDefault(i => i.Id == id)); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Experts/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Expert 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 | Expert 11 | 12 |
Group
13 |
@(Model.Group == null ? "None" : Model.Group.Title)
14 | 15 |
Title
16 |
@Model.Title
17 | 18 |
Description
19 |
@Model.Description
20 |
21 |

22 | @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) | 23 | @Html.ActionLink("Back to List", "Index") 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Documents/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Document 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 | Document 11 | 12 |
Group
13 |
@(Model.Group == null ? "None" : Model.Group.Title)
14 | 15 |
Title
16 |
@Model.Title
17 | 18 |
Description
19 |
@Model.Description
20 |
21 |

22 | @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) | 23 | @Html.ActionLink("Back to List", "Index") 24 |

25 | 26 | 27 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Scripts/MarkdownDeep License.txt: -------------------------------------------------------------------------------- 1 | MarkdownDeep License 2 | ==================== 3 | 4 | MarkdownDeep - 5 | Copyright (C) 2010-2011 Topten Software 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this product except in 8 | compliance with the License. You may obtain a copy of the License at 9 | 10 | 11 | 12 | Unless required by applicable law or agreed to in writing, software distributed under the License is 13 | distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and limitations under the License. 15 | 16 | 17 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/En/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Web.Mvc; 6 | using System.Web.UI; 7 | using DevRainSolutions.KyivSmartCity.New.App_GlobalResources; 8 | using DevRainSolutions.KyivSmartCity.New.Controllers; 9 | using DevRainSolutions.KyivSmartCity.New.Models; 10 | 11 | namespace DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers 12 | { 13 | public class HomeController : BaseController 14 | { 15 | public ActionResult Index() 16 | { 17 | return View(new EnDataSource().GetGroups()); 18 | } 19 | 20 | public ActionResult Hackathon() 21 | { 22 | return View(); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/NewsItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.Web.Mvc; 4 | 5 | namespace DevRainSolutions.KyivSmartCity.New.Models 6 | { 7 | public class NewsItem 8 | { 9 | [Key] 10 | public int Id { get; set; } 11 | 12 | [Required] 13 | [StringLength(100)] 14 | public string Name { get; set; } 15 | 16 | public string Description { get; set; } 17 | 18 | public DateTime DatePublished { get; set; } 19 | 20 | public bool IsPublished { get; set; } 21 | 22 | [Required] 23 | [StringLength(300)] 24 | public string Image { get; set; } 25 | 26 | [UIHint("HtmlEditor"), AllowHtml] 27 | public string Body { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Controllers/NewsController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using PagedList; 7 | 8 | namespace DevRainSolutions.KyivSmartCity.New.Controllers 9 | { 10 | public class NewsController : BaseController 11 | { 12 | // GET: News 13 | public ActionResult Index(int? page) 14 | { 15 | var pageNumber = page ?? 1; 16 | 17 | return View(db.NewsItems.OrderByDescending(i=>i.DatePublished) 18 | .ToPagedList(pageNumber, PerPage)); 19 | } 20 | 21 | public ActionResult Details(int id) 22 | { 23 | return View(db.NewsItems.ToList().FirstOrDefault(i => i.Id == id && i.IsPublished)); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /NotFoundMvc/ActionInvokerSelector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | 4 | namespace NotFoundMvc 5 | { 6 | static class ActionInvokerSelector 7 | { 8 | static ActionInvokerSelector() 9 | { 10 | var mvcVersion = typeof (Controller).Assembly.GetName().Version.Major; 11 | Current = mvcVersion <= 3 ? _mvc3Invoker : _mvc4Invoker; 12 | } 13 | 14 | private static readonly Func _mvc3Invoker = 15 | originalActionInvoker => new ActionInvokerWrapper(originalActionInvoker); 16 | 17 | private readonly static Func _mvc4Invoker = 18 | originalActionInvoker => new NotFoundAsyncControllerActionInvoker(); 19 | 20 | public static Func Current { get; set; } 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/News/Details.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Collections 2 | @using System.Globalization 3 | @using MarkdownDeep 4 | @model DevRainSolutions.KyivSmartCity.New.Models.NewsItem 5 | @{ 6 | ViewBag.Title = Model.Name; 7 | ViewBag.OgImage = Model.Image; 8 | var md = new Markdown { SafeMode = false, ExtraMode = true }; 9 | } 10 |
11 |
12 | 13 |

@Model.Name

14 |

@Model.DatePublished.ToString("f", new CultureInfo("uk-UA"))

15 |

@Html.Partial("_Social")

16 | 17 |
18 | @Html.Raw(md.Transform(Model.Body)) 19 |
20 | 21 | @Html.Partial("_Disqus") 22 |
23 |
24 | @Html.Partial("_Aside") 25 |
26 |
27 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Experts/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Expert 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |

Delete

8 | 9 |

Are you sure you want to delete this?

10 |
11 | Expert 12 | 13 |
Group
14 |
@(Model.Group == null ? "None" : Model.Group.Title)
15 | 16 |
Title
17 |
@Model.Title
18 | 19 |
Description
20 |
@Model.Description
21 |
22 | @using (Html.BeginForm()) { 23 |

24 | | 25 | @Html.ActionLink("Back to List", "Index") 26 |

27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Documents/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Document 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |

Delete

8 | 9 |

Are you sure you want to delete this?

10 |
11 | Document 12 | 13 |
Group
14 |
@(Model.Group == null ? "None" : Model.Group.Title)
15 | 16 |
Title
17 |
@Model.Title
18 | 19 |
Description
20 |
@Model.Description
21 |
22 | @using (Html.BeginForm()) { 23 |

24 | | 25 | @Html.ActionLink("Back to List", "Index") 26 |

27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/AdminAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using LowercaseRoutesMVC; 3 | 4 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Admin 5 | { 6 | public class AdminAreaRegistration : AreaRegistration 7 | { 8 | public override string AreaName 9 | { 10 | get 11 | { 12 | return "Admin"; 13 | } 14 | } 15 | 16 | public override void RegisterArea(AreaRegistrationContext context) 17 | { 18 | context.MapRouteLowercase( 19 | "Admin_default", 20 | "Admin/{controller}/{action}/{id}", 21 | new { action = "Index", controller = "Home", id = UrlParameter.Optional }, 22 | new[] { "DevRainSolutions.KyivSmartCity.New.Areas.Admin.Controllers" } 23 | ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.SendCodeViewModel 2 | @{ 3 | ViewBag.Title = "Send"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("rememberMe", @Model.RememberMe) 11 |

Send verification code

12 |
13 |
14 |
15 | Select Two-Factor Authentication Provider: 16 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers) 17 | 18 |
19 |
20 | } 21 | 22 | @section Scripts { 23 | @Scripts.Render("~/bundles/jqueryval") 24 | } 25 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Hackathon/HachathonAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using LowercaseRoutesMVC; 3 | 4 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Hackathon 5 | { 6 | public class HachathonAreaRegistration : AreaRegistration 7 | { 8 | public override string AreaName 9 | { 10 | get 11 | { 12 | return "Hackathon"; 13 | } 14 | } 15 | 16 | public override void RegisterArea(AreaRegistrationContext context) 17 | { 18 | context.MapRouteLowercase( 19 | "Hackathon_default", 20 | "Hackathon/{controller}/{action}/{id}", 21 | new { action = "Index", controller="Home", id = UrlParameter.Optional }, 22 | new[] { "DevRainSolutions.KyivSmartCity.New.Areas.Hackathon.Controllers" } 23 | ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /config: -------------------------------------------------------------------------------- 1 | [core] 2 | bare = false 3 | repositoryformatversion = 0 4 | filemode = false 5 | symlinks = false 6 | ignorecase = true 7 | logallrefupdates = true 8 | [diff] 9 | tool = vsdiffmerge 10 | [difftool] 11 | prompt = true 12 | [difftool "vsdiffmerge"] 13 | cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$LOCAL\" \"$REMOTE\" //t 14 | keepbackup = false 15 | trustexistcode = true 16 | [merge] 17 | tool = vsdiffmerge 18 | [mergetool] 19 | prompt = true 20 | [mergetool "vsdiffmerge"] 21 | cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" //m 22 | keepbackup = false 23 | trustexistcode = true 24 | [remote "origin"] 25 | url = https://github.com/DevRainSolutions/KyivSmartCity.git 26 | fetch = +refs/heads/*:refs/remotes/origin/* 27 | [branch "master"] 28 | remote = origin 29 | merge = refs/heads/master -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/_Aside.cshtml: -------------------------------------------------------------------------------- 1 |
2 |
3 | 13 |
14 |
15 |
Kyiv SmartCity
16 |
17 |
18 | 19 |
-------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using System.Web.Mvc; 3 | using System.Web.Optimization; 4 | using System.Web.Routing; 5 | using DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models; 6 | using DevRainSolutions.KyivSmartCity.New.Migrations; 7 | 8 | namespace DevRainSolutions.KyivSmartCity.New 9 | { 10 | public class MvcApplication : System.Web.HttpApplication 11 | { 12 | protected void Application_Start() 13 | { 14 | Database.SetInitializer(new MigrateDatabaseToLatestVersion()); 15 | //Database.SetInitializer(new CreateDatabaseIfNotExists()); 16 | 17 | AreaRegistration.RegisterAllAreas(); 18 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 19 | RouteConfig.RegisterRoutes(RouteTable.Routes); 20 | BundleConfig.RegisterBundles(BundleTable.Bundles); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/TeamMember.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace DevRainSolutions.KyivSmartCity.New.Models 4 | { 5 | public class TeamMember 6 | { 7 | [Key] 8 | public int Id { get; set; } 9 | 10 | [Required] 11 | [StringLength(100)] 12 | public string Name { get; set; } 13 | 14 | [Required] 15 | [StringLength(300)] 16 | public string ImageUrl { get; set; } 17 | 18 | [Required] 19 | [StringLength(1000)] 20 | public string Description { get; set; } 21 | 22 | [StringLength(100)] 23 | public string Email { get; set; } 24 | 25 | [StringLength(200)] 26 | public string Twitter { get; set; } 27 | 28 | [StringLength(200)] 29 | public string Facebook { get; set; } 30 | 31 | [StringLength(200)] 32 | public string LinkedIn { get; set; } 33 | 34 | public int Index { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/Project.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Web.Mvc; 3 | 4 | namespace DevRainSolutions.KyivSmartCity.New.Models 5 | { 6 | public class Project 7 | { 8 | [Key] 9 | public int Id { get; set; } 10 | 11 | [Required] 12 | [StringLength(300)] 13 | public string Title { get; set; } 14 | 15 | [Required] 16 | [UIHint("HtmlEditor"), AllowHtml] 17 | public string Description { get; set; } 18 | 19 | [StringLength(300)] 20 | public string CurrentState { get; set; } 21 | 22 | [StringLength(300)] 23 | public string Topic { get; set; } 24 | 25 | 26 | [StringLength(300)] 27 | public string Head { get; set; } 28 | 29 | [StringLength(500)] 30 | [Url] 31 | public string PresentationUrl { get; set; } 32 | 33 | [StringLength(500)] 34 | [Url] 35 | public string ImageUrl { get; set; } 36 | } 37 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/_Social.cshtml: -------------------------------------------------------------------------------- 1 | @*
2 | 10 |
*@ 11 |
12 | 18 |
19 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @if (Request.IsAuthenticated) 3 | { 4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) 5 | { 6 | @Html.AntiForgeryToken() 7 | 8 | 14 | } 15 | } 16 | else 17 | { 18 | 22 | } 23 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Projects/Details.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Collections 2 | @using System.Globalization 3 | @using MarkdownDeep 4 | @model DevRainSolutions.KyivSmartCity.New.Models.Project 5 | @{ 6 | ViewBag.Title = Model.Title; 7 | ViewBag.OgImage = Model.ImageUrl; 8 | var md = new Markdown { SafeMode = false, ExtraMode = true }; 9 | } 10 |
11 |
12 | 13 |

@Model.Title

14 |

@Html.Partial("_Social")

15 |

16 |

Стан впровадження проекту:
17 | @Model.CurrentState 18 |

19 |

20 |

Сфера проекту:
21 | @Model.Topic 22 |

23 | 24 |
25 | @Html.Raw(md.Transform(Model.Description)) 26 |
27 | 28 | @Html.Partial("_Disqus") 29 |
30 |
31 | 32 |
33 |
34 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | ViewBag.Title = "Admin portal"; 4 | } 5 | 6 |

@ViewBag.Title

7 | 8 |

9 | Team members 10 | Documents 11 | Experts 12 | Groups 13 | News 14 | Volunteers 15 | Projects 16 | Download Volunteers 17 |

-------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Manage/AddPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.AddPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Add a phone number

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Number, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Number, new { @class = "form-control" }) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /scaffolding.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.ForgotPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Forgot your password?"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Enter your email.

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 18 |
19 |
20 |
21 |
22 | 23 |
24 |
25 | } 26 | 27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/NewsItems/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.NewsItem 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 | NewsItem 11 | 12 |
Name
13 |
@Model.Name
14 | 15 |
Description
16 |
@Model.Description
17 | 18 |
DatePublished
19 |
@String.Format("{0:g}", Model.DatePublished)
20 | 21 |
IsPublished
22 |
@Model.IsPublished
23 | 24 |
Image
25 |
@Model.Image
26 | 27 |
Body
28 |
@Model.Body
29 |
30 |

31 | @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) | 32 | @Html.ActionLink("Back to List", "Index") 33 |

34 | 35 | 36 | -------------------------------------------------------------------------------- /NotFoundMvc/NotFoundController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using System.Web.Routing; 3 | 4 | namespace NotFoundMvc 5 | { 6 | public class NotFoundController : IController, INotFoundController 7 | { 8 | public void Execute(RequestContext requestContext) 9 | { 10 | ExecuteNotFound(requestContext); 11 | } 12 | 13 | public void ExecuteNotFound(RequestContext requestContext) 14 | { 15 | new NotFoundViewResult().ExecuteResult( 16 | new ControllerContext(requestContext, new FakeController()) 17 | ); 18 | } 19 | 20 | public ActionResult NotFound() 21 | { 22 | return new NotFoundViewResult(); 23 | } 24 | 25 | // ControllerContext requires an object that derives from ControllerBase. 26 | // NotFoundController does not do this. 27 | // So the easiest workaround is this FakeController. 28 | class FakeController : Controller { } 29 | } 30 | 31 | public interface INotFoundController: IController 32 | { 33 | ActionResult NotFound(); 34 | } 35 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Experts/_CreateOrEdit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Expert 2 | 3 | @* This partial view defines form fields that will appear when creating and editing entities *@ 4 | 5 |
6 | @Html.LabelFor(model => model.Title) 7 |
8 |
9 | @Html.EditorFor(model => model.Title) 10 | @Html.ValidationMessageFor(model => model.Title) 11 |
12 | 13 |
14 | @Html.LabelFor(model => model.Description) 15 |
16 |
17 | @Html.EditorFor(model => model.Description) 18 | @Html.ValidationMessageFor(model => model.Description) 19 |
20 | 21 |
22 | Group 23 |
24 |
25 | @Html.DropDownListFor(model => model.GroupId, ((IEnumerable)ViewBag.PossibleGroups).Select(option => new SelectListItem { 26 | Text = (option == null ? "None" : option.Title), 27 | Value = option.Id.ToString(), 28 | Selected = (Model != null) && (option.Id == Model.GroupId) 29 | }), "Choose...") 30 | @Html.ValidationMessageFor(model => model.GroupId) 31 |
32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 sashaeve 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Manage/VerifyPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.VerifyPhoneNumberViewModel 2 | @{ 3 | ViewBag.Title = "Verify Phone Number"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | @Html.Hidden("phoneNumber", @Model.PhoneNumber) 12 |

Enter verification code

13 |
@ViewBag.Status
14 |
15 | @Html.ValidationSummary("", new { @class = "text-danger" }) 16 |
17 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 18 |
19 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 | } 28 | 29 | @section Scripts { 30 | @Scripts.Render("~/bundles/jqueryval") 31 | } 32 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/TeamMembers/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.TeamMember 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 | TeamMember 11 | 12 |
Name
13 |
@Model.Name
14 | 15 |
ImageUrl
16 |
@Model.ImageUrl
17 | 18 |
Description
19 |
@Model.Description
20 | 21 |
Email
22 |
@Model.Email
23 | 24 |
Twitter
25 |
@Model.Twitter
26 | 27 |
Facebook
28 |
@Model.Facebook
29 | 30 |
LinkedIn
31 |
@Model.LinkedIn
32 |
33 |

34 | @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) | 35 | @Html.ActionLink("Back to List", "Index") 36 |

37 | 38 | 39 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/NewsItems/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.NewsItem 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |

Delete

8 | 9 |

Are you sure you want to delete this?

10 |
11 | NewsItem 12 | 13 |
Name
14 |
@Model.Name
15 | 16 |
Description
17 |
@Model.Description
18 | 19 |
DatePublished
20 |
@String.Format("{0:g}", Model.DatePublished)
21 | 22 |
IsPublished
23 |
@Model.IsPublished
24 | 25 |
Image
26 |
@Model.Image
27 | 28 |
Body
29 |
@Model.Body
30 |
31 | @using (Html.BeginForm()) { 32 |

33 | | 34 | @Html.ActionLink("Back to List", "Index") 35 |

36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Groups/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Group 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 | Group 11 | 12 |
Title
13 |
@Model.Title
14 | 15 |
Description
16 |
@Model.Description
17 | 18 |
Body
19 |
@Model.Body
20 | 21 |
Experts
22 |
@(Model.Experts == null ? "None" : Model.Experts.Count.ToString())
23 | 24 |
Documents
25 |
@(Model.Documents == null ? "None" : Model.Documents.Count.ToString())
26 | 27 |
TeamMember
28 |
@(Model.TeamMember == null ? "None" : Model.TeamMember.Name)
29 |
30 |

31 | @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) | 32 | @Html.ActionLink("Back to List", "Index") 33 |

34 | 35 | 36 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Team/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @{ 3 | ViewBag.Title = "Команда"; 4 | } 5 | 6 |

@ViewBag.Title

7 | 8 |
9 | 10 | @foreach (var i in Model) 11 | { 12 |
13 |

14 | 15 |

16 |

17 | @i.Name 18 |

19 | 20 |

21 | @i.Description 22 |

23 |

24 | @* 25 | @if (!string.IsNullOrWhiteSpace(i.Twitter)) 26 | { 27 | twitter 28 | } 29 | 30 | @if (!string.IsNullOrWhiteSpace(i.Facebook)) 31 | { 32 | facebook 33 | }*@ 34 | 35 | @if (!string.IsNullOrWhiteSpace(i.Email)) 36 | { 37 | @i.Email 38 | } 39 |

40 |
41 | 42 | } 43 | 44 |
45 | 46 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Experts/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @using PagedList.Mvc; 3 | @using PagedList; 4 | 5 | @{ 6 | ViewBag.Title = "Index"; 7 | } 8 | 9 |

Index

10 | 11 |

12 | @Html.ActionLink("Create New", "Create") 13 |

14 | 15 | 16 | 17 | 20 | 23 | 26 | 27 | 28 | @foreach (var item in Model) { 29 | 30 | 35 | 38 | 41 | 44 | 45 | } 46 | 47 |
18 | Group 19 | 21 | Title 22 | 24 | Description 25 |
31 | @Html.ActionLink("Edit", "Edit", new { id=item.Id }) | 32 | @Html.ActionLink("Details", "Details", new { id=item.Id }) | 33 | @Html.ActionLink("Delete", "Delete", new { id=item.Id }) 34 | 36 | @(item.Group == null ? "None" : item.Group.Title) 37 | 39 | @item.Title 40 | 42 | @item.Description 43 |
48 | 49 | 50 | @Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page })) -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Documents/_CreateOrEdit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Document 2 | 3 | @* This partial view defines form fields that will appear when creating and editing entities *@ 4 | 5 |
6 | @Html.LabelFor(model => model.Title) 7 |
8 |
9 | @Html.TextBoxFor(model => model.Title, new{@class="form-control"}) 10 | @Html.ValidationMessageFor(model => model.Title) 11 |
12 | 13 |
14 | @Html.LabelFor(model => model.Description) 15 |
16 |
17 | @Html.TextBoxFor(model => model.Description, new { @class = "form-control" }) 18 | @Html.ValidationMessageFor(model => model.Description) 19 |
20 | 21 |
22 | @Html.LabelFor(model => model.GroupId) 23 |
24 |
25 | @Html.DropDownListFor(model => model.GroupId, ((IEnumerable)ViewBag.PossibleGroups).Select(option => new SelectListItem { 26 | Text = (option == null ? "None" : option.Title), 27 | Value = option.Id.ToString(), 28 | Selected = (Model != null) && (option.Id == Model.GroupId) 29 | }), "Choose...", new { @class = "form-control" }) 30 | @Html.ValidationMessageFor(model => model.GroupId) 31 |
32 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/TeamMembers/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.TeamMember 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |

Delete

8 | 9 |

Are you sure you want to delete this?

10 |
11 | TeamMember 12 | 13 |
Name
14 |
@Model.Name
15 | 16 |
ImageUrl
17 |
@Model.ImageUrl
18 | 19 |
Description
20 |
@Model.Description
21 | 22 |
Email
23 |
@Model.Email
24 | 25 |
Twitter
26 |
@Model.Twitter
27 | 28 |
Facebook
29 |
@Model.Facebook
30 | 31 |
LinkedIn
32 |
@Model.LinkedIn
33 |
34 | @using (Html.BeginForm()) { 35 |

36 | | 37 | @Html.ActionLink("Back to List", "Index") 38 |

39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/En/EnAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using LowercaseRoutesMVC; 3 | 4 | namespace DevRainSolutions.KyivSmartCity.New.Areas.En 5 | { 6 | public class EnAreaRegistration : AreaRegistration 7 | { 8 | public override string AreaName 9 | { 10 | get 11 | { 12 | return "En"; 13 | } 14 | } 15 | 16 | public override void RegisterArea(AreaRegistrationContext context) 17 | { 18 | context.MapRouteLowercase("Root_En", "en/{action}", 19 | new { controller = "Home", action = "Index" }, 20 | new { isMethodInHomeController = new RootRouteConstraint() }, 21 | new[] { "DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers" } 22 | ); 23 | 24 | 25 | context.MapRouteLowercase( 26 | "En_default", 27 | "En/{controller}/{action}/{id}", 28 | new { action = "Index", controller="Home", id = UrlParameter.Optional }, 29 | new[] { "DevRainSolutions.KyivSmartCity.New.Areas.En.Controllers" } 30 | ); 31 | 32 | 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/ReCaptchaClass.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace DevRainSolutions.KyivSmartCity.New.Models 5 | { 6 | public class ReCaptchaClass 7 | { 8 | public static string Validate(string encodedResponse) 9 | { 10 | var client = new System.Net.WebClient(); 11 | 12 | 13 | 14 | var GoogleReply = client.DownloadString( 15 | string.Format("https://www.google.com/recaptcha/api/siteverify?secret={0}&response={1}", 16 | Recaptcha.SecretKey, encodedResponse)); 17 | 18 | var captchaResponse = JsonConvert.DeserializeObject(GoogleReply); 19 | 20 | return captchaResponse.Success; 21 | } 22 | 23 | [JsonProperty("success")] 24 | public string Success 25 | { 26 | get { return m_Success; } 27 | set { m_Success = value; } 28 | } 29 | 30 | private string m_Success; 31 | [JsonProperty("error-codes")] 32 | public List ErrorCodes 33 | { 34 | get { return m_ErrorCodes; } 35 | set { m_ErrorCodes = value; } 36 | } 37 | 38 | 39 | private List m_ErrorCodes; 40 | } 41 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Groups/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Group 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |

Delete

8 | 9 |

Are you sure you want to delete this?

10 |
11 | Group 12 | 13 |
Title
14 |
@Model.Title
15 | 16 |
Description
17 |
@Model.Description
18 | 19 |
Body
20 |
@Model.Body
21 | 22 |
Experts
23 |
@(Model.Experts == null ? "None" : Model.Experts.Count.ToString())
24 | 25 |
Documents
26 |
@(Model.Documents == null ? "None" : Model.Documents.Count.ToString())
27 | 28 |
TeamMember
29 |
@(Model.TeamMember == null ? "None" : Model.TeamMember.Name)
30 |
31 | @using (Html.BeginForm()) { 32 |

33 | | 34 | @Html.ActionLink("Back to List", "Index") 35 |

36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Groups/_CreateOrEdit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Group 2 | 3 | @* This partial view defines form fields that will appear when creating and editing entities *@ 4 | 5 |
6 | @Html.LabelFor(model => model.Title) 7 |
8 |
9 | @Html.EditorFor(model => model.Title) 10 | @Html.ValidationMessageFor(model => model.Title) 11 |
12 | 13 |
14 | @Html.LabelFor(model => model.Description) 15 |
16 |
17 | @Html.EditorFor(model => model.Description) 18 | @Html.ValidationMessageFor(model => model.Description) 19 |
20 | 21 |
22 | @Html.LabelFor(model => model.Body) 23 |
24 |
25 | @Html.EditorFor(model => model.Body) 26 | @Html.ValidationMessageFor(model => model.Body) 27 |
28 | 29 |
30 | TeamMember 31 |
32 |
33 | @Html.DropDownListFor(model => model.TeamMemberId, ((IEnumerable)ViewBag.PossibleTeamMembers).Select(option => new SelectListItem { 34 | Text = (option == null ? "None" : option.Name), 35 | Value = option.Id.ToString(), 36 | Selected = (Model != null) && (option.Id == Model.TeamMemberId) 37 | }), "Choose...") 38 | @Html.ValidationMessageFor(model => model.TeamMemberId) 39 |
40 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @Styles.Render("~/Content/css") 8 | 9 | 10 | 26 | 27 |
28 |
29 | @RenderBody() 30 | @Html.Partial("_Footer") 31 |
32 | 33 | @Scripts.Render("~/bundles/jquery") 34 | @Scripts.Render("~/bundles/bootstrap") 35 | @RenderSection("scripts", required: false) 36 | 37 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Projects/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @using PagedList 3 | @using PagedList.Mvc 4 | @{ 5 | ViewBag.Title = "Index"; 6 | } 7 | 8 |

Index

9 | 10 |

11 | @Html.ActionLink("Create New", "Create") 12 |

13 | 14 | 15 | 16 | 19 | 22 | 23 | 26 | 29 | 30 | 31 | 32 | @foreach (var item in Model) { 33 | 34 | 39 | 42 | 45 | 46 | 49 | 52 | 53 | 54 | } 55 | 56 |
17 | Title 18 | 20 | CurrentState 21 | 24 | Topic 25 | 27 | Head 28 |
35 | @Html.ActionLink("Edit", "Edit", new { id=item.Id }) | 36 | @Html.ActionLink("Details", "Details", new { id=item.Id }) | 37 | @Html.ActionLink("Delete", "Delete", new { id=item.Id }) 38 | 40 | @item.Title 41 | 43 | @item.CurrentState 44 | 47 | @item.Topic 48 | 50 | @item.Head 51 |
57 | 58 | @Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page })) 59 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Volunteers/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Volunteer 2 | 3 | @{ 4 | ViewBag.Title = "Details"; 5 | } 6 | 7 |

Details

8 | 9 |
10 | Volunteer 11 | 12 |
Email
13 |
@Model.Email
14 | 15 |
FirstName
16 |
@Model.FirstName
17 | 18 |
LastName
19 |
@Model.LastName
20 | 21 |
RegistrationDate
22 |
@String.Format("{0:g}", Model.RegistrationDate)
23 | 24 |
City
25 |
@Model.City
26 | 27 |
Phone
28 |
@Model.Phone
29 | 30 |
Notes
31 |
@Model.Notes
32 | 33 |
Group
34 |
@(Model.Group == null ? "None" : Model.Group.Title)
35 |
36 |

37 | @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) | 38 | @Html.ActionLink("Back to List", "Index") 39 |

40 | 41 | 42 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.ExternalLoginListViewModel 2 | @using Microsoft.Owin.Security 3 | 4 |

Use another service to log in.

5 |
6 | @{ 7 | var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); 8 | if (loginProviders.Count() == 0) { 9 |
10 |

11 | There are no external authentication services configured. See this article 12 | for details on setting up this ASP.NET application to support logging in via external services. 13 |

14 |
15 | } 16 | else { 17 | using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) { 18 | @Html.AntiForgeryToken() 19 |
20 |

21 | @foreach (AuthenticationDescription p in loginProviders) { 22 | 23 | } 24 |

25 |
26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/En/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @{ 3 | ViewBag.Title = "Main"; 4 | ViewBag.IsMain = true; 5 | } 6 | 7 | 8 |
9 | 10 |
11 | 19 | 20 |
22 |
23 | 24 | 25 | 26 | 27 |
28 | 29 | @foreach (var i in Model) 30 | { 31 |
32 |

@i.Title

33 |

34 | @i.Description 35 |

36 |

37 | Learn more » 38 |

39 |
40 | } 41 | 42 |
43 | 44 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @{ 3 | ViewBag.Title = "Головна"; 4 | ViewBag.IsMain = true; 5 | } 6 | 7 | 8 |
9 | 10 |
11 | 19 | 20 |
22 |
23 | 24 | 25 | 26 | 27 |
28 | 29 | @foreach (var i in Model) 30 | { 31 |
32 |

@i.Title

33 |

34 | @i.Description 35 |

36 |

37 | Дізнатись більше » 38 |

39 |
40 | } 41 | 42 |
43 | 44 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Documents/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @using PagedList.Mvc; 3 | @using PagedList; 4 | 5 | @{ 6 | ViewBag.Title = "Documents"; 7 | } 8 | 9 |

@ViewBag.Title

10 | 11 |

12 | @Html.ActionLink("Create New", "Create") 13 |

14 | 15 | 16 | 17 | 20 | 23 | 26 | 27 | 28 | @foreach (var item in Model) 29 | { 30 | 31 | 36 | 39 | 42 | 45 | 46 | } 47 | 48 |
18 | Group 19 | 21 | Title 22 | 24 | Link 25 |
32 | @Html.ActionLink("Edit", "Edit", new { id = item.Id }) | 33 | @Html.ActionLink("Details", "Details", new { id = item.Id }) | 34 | @Html.ActionLink("Delete", "Delete", new { id = item.Id }) 35 | 37 | @(item.Group == null ? "None" : item.Group.Title) 38 | 40 | @item.Title 41 | 43 | Link 44 |
49 | 50 | 51 | @Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page })) -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/IdentityModels.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Entity; 2 | using System.Security.Claims; 3 | using System.Threading.Tasks; 4 | using Microsoft.AspNet.Identity; 5 | using Microsoft.AspNet.Identity.EntityFramework; 6 | 7 | namespace DevRainSolutions.KyivSmartCity.New.Models 8 | { 9 | // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more. 10 | public class ApplicationUser : IdentityUser 11 | { 12 | public async Task GenerateUserIdentityAsync(UserManager manager) 13 | { 14 | // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType 15 | var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie); 16 | // Add custom user claims here 17 | return userIdentity; 18 | } 19 | } 20 | 21 | public class ApplicationDbContext : IdentityDbContext 22 | { 23 | public ApplicationDbContext() 24 | : base("DefaultConnection", throwIfV1Schema: false) 25 | { 26 | } 27 | 28 | public static ApplicationDbContext Create() 29 | { 30 | return new ApplicationDbContext(); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Migrations/Configuration.cs: -------------------------------------------------------------------------------- 1 | using DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models; 2 | 3 | namespace DevRainSolutions.KyivSmartCity.New.Migrations 4 | { 5 | using System; 6 | using System.Data.Entity; 7 | using System.Data.Entity.Migrations; 8 | using System.Linq; 9 | 10 | internal sealed class Configuration : DbMigrationsConfiguration 11 | { 12 | public Configuration() 13 | { 14 | AutomaticMigrationsEnabled = true; 15 | ContextKey = "DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models.KyivSmartCityNewContext"; 16 | } 17 | 18 | protected override void Seed(DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models.KyivSmartCityNewContext context) 19 | { 20 | // This method will be called after migrating to the latest version. 21 | 22 | // You can use the DbSet.AddOrUpdate() helper extension method 23 | // to avoid creating duplicate seed data. E.g. 24 | // 25 | // context.People.AddOrUpdate( 26 | // p => p.FullName, 27 | // new Person { FullName = "Andrew Peters" }, 28 | // new Person { FullName = "Brice Lambson" }, 29 | // new Person { FullName = "Rowan Miller" } 30 | // ); 31 | // 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace DevRainSolutions.KyivSmartCity.New 5 | { 6 | public class BundleConfig 7 | { 8 | // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 9 | public static void RegisterBundles(BundleCollection bundles) 10 | { 11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 12 | "~/Scripts/jquery-{version}.js")); 13 | 14 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( 15 | "~/Scripts/jquery.validate*")); 16 | 17 | // Use the development version of Modernizr to develop with and learn from. Then, when you're 18 | // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. 19 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 20 | "~/Scripts/modernizr-*")); 21 | 22 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 23 | "~/Scripts/bootstrap.js", 24 | "~/Scripts/respond.js")); 25 | 26 | bundles.Add(new StyleBundle("~/Content/css").Include( 27 | "~/Content/bootstrap.css", 28 | "~/Content/site.css")); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/NewsItems/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @using PagedList 3 | @using PagedList.Mvc 4 | @{ 5 | ViewBag.Title = "Index"; 6 | } 7 | 8 |

Index

9 | 10 |

11 | @Html.ActionLink("Create New", "Create") 12 |

13 | 14 | 15 | 16 | 17 | 20 | 21 | 24 | 27 | 28 | 29 | 30 | @foreach (var item in Model) { 31 | 32 | 37 | 40 | 43 | 44 | 47 | 50 | 51 | 52 | } 53 | 54 |
18 | Name 19 | 22 | DatePublished 23 | 25 | IsPublished 26 |
33 | @Html.ActionLink("Edit", "Edit", new {id = item.Id}) | 34 | @Html.ActionLink("Details", "Details", new {id = item.Id}) | 35 | @Html.ActionLink("Delete", "Delete", new {id = item.Id}) 36 | 38 | 39 | 41 | @item.Name 42 | 45 | @String.Format("{0:g}", item.DatePublished) 46 | 48 | @item.IsPublished 49 |
55 | 56 | 57 | @Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page })) -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Volunteers/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Volunteer 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 |

Delete

8 | 9 |

Are you sure you want to delete this?

10 |
11 | Volunteer 12 | 13 |
Email
14 |
@Model.Email
15 | 16 |
FirstName
17 |
@Model.FirstName
18 | 19 |
LastName
20 |
@Model.LastName
21 | 22 |
RegistrationDate
23 |
@String.Format("{0:g}", Model.RegistrationDate)
24 | 25 |
City
26 |
@Model.City
27 | 28 |
Phone
29 |
@Model.Phone
30 | 31 |
Notes
32 |
@Model.Notes
33 | 34 |
Group
35 |
@(Model.Group == null ? "None" : Model.Group.Title)
36 |
37 | @using (Html.BeginForm()) { 38 |

39 | | 40 | @Html.ActionLink("Back to List", "Index") 41 |

42 | } 43 | 44 | 45 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/VerifyCode.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.VerifyCodeViewModel 2 | @{ 3 | ViewBag.Title = "Verify"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { 9 | @Html.AntiForgeryToken() 10 | @Html.Hidden("provider", @Model.Provider) 11 | @Html.Hidden("rememberMe", @Model.RememberMe) 12 |

Enter verification code

13 |
14 | @Html.ValidationSummary("", new { @class = "text-danger" }) 15 |
16 | @Html.LabelFor(m => m.Code, new { @class = "col-md-2 control-label" }) 17 |
18 | @Html.TextBoxFor(m => m.Code, new { @class = "form-control" }) 19 |
20 |
21 |
22 |
23 |
24 | @Html.CheckBoxFor(m => m.RememberBrowser) 25 | @Html.LabelFor(m => m.RememberBrowser) 26 |
27 |
28 |
29 |
30 |
31 | 32 |
33 |
34 | } 35 | 36 | @section Scripts { 37 | @Scripts.Render("~/bundles/jqueryval") 38 | } 39 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Manage/SetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.SetPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Create Password"; 4 | } 5 | 6 |

@ViewBag.Title.

7 |

8 | You do not have a local username/password for this site. Add a local 9 | account so you can log in without an external login. 10 |

11 | 12 | @using (Html.BeginForm("SetPassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 13 | { 14 | @Html.AntiForgeryToken() 15 | 16 |

Create Local Login

17 |
18 | @Html.ValidationSummary("", new { @class = "text-danger" }) 19 |
20 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 21 |
22 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 23 |
24 |
25 |
26 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 27 |
28 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 29 |
30 |
31 |
32 |
33 | 34 |
35 |
36 | } 37 | @section Scripts { 38 | @Scripts.Render("~/bundles/jqueryval") 39 | } -------------------------------------------------------------------------------- /NotFoundMvc/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("NotFoundMvc")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("Andrew Davey")] 11 | [assembly: AssemblyProduct("NotFoundMvc")] 12 | [assembly: AssemblyCopyright("Copyright © 2011 Andrew Davey")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("33cf3e0b-89ac-4d32-b751-4b1d7b5701c7")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.3.0.0")] 35 | [assembly: AssemblyFileVersion("1.3.0.0")] 36 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/ExternalLoginConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.ExternalLoginConfirmationViewModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 |

@ViewBag.Title.

6 |

Associate your @ViewBag.LoginProvider account.

7 | 8 | @using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | 12 |

Association Form

13 |
14 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 15 |

16 | You've successfully authenticated with @ViewBag.LoginProvider. 17 | Please enter a user name for this site below and click the Register button to finish 18 | logging in. 19 |

20 |
21 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 24 | @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | } 33 | 34 | @section Scripts { 35 | @Scripts.Render("~/bundles/jqueryval") 36 | } 37 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DevRainSolutions.KyivSmartCity.New")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DevRainSolutions.KyivSmartCity.New")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("47a52bb6-3a68-4bde-acd3-c47056e94e7e")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.RegisterViewModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Create a new account.

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 18 |
19 |
20 |
21 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 24 |
25 |
26 |
27 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 28 |
29 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 | } 38 | 39 | @section Scripts { 40 | @Scripts.Render("~/bundles/jqueryval") 41 | } 42 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Projects/_CreateOrEdit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Project 2 | 3 | 4 |
5 | @Html.LabelFor(model => model.Title) 6 |
7 |
8 | @Html.EditorFor(model => model.Title) 9 | @Html.ValidationMessageFor(model => model.Title) 10 |
11 | 12 |
13 | @Html.LabelFor(model => model.CurrentState) 14 |
15 |
16 | @Html.EditorFor(model => model.CurrentState) 17 | @Html.ValidationMessageFor(model => model.CurrentState) 18 |
19 | 20 |
21 | @Html.LabelFor(model => model.Topic) 22 |
23 |
24 | @Html.EditorFor(model => model.Topic) 25 | @Html.ValidationMessageFor(model => model.Topic) 26 |
27 | 28 |
29 | @Html.LabelFor(model => model.Description) 30 |
31 |
32 | @Html.EditorFor(model => model.Description) 33 | @Html.ValidationMessageFor(model => model.Description) 34 |
35 | 36 | 37 |
38 | @Html.LabelFor(model => model.Head) 39 |
40 |
41 | @Html.EditorFor(model => model.Head) 42 | @Html.ValidationMessageFor(model => model.Head) 43 |
44 | 45 |
46 | @Html.LabelFor(model => model.ImageUrl) 47 |
48 |
49 | @Html.EditorFor(model => model.ImageUrl) 50 | @Html.ValidationMessageFor(model => model.ImageUrl) 51 |
52 | 53 | 54 |
55 | @Html.LabelFor(model => model.PresentationUrl) 56 |
57 |
58 | @Html.EditorFor(model => model.PresentationUrl) 59 | @Html.ValidationMessageFor(model => model.PresentationUrl) 60 |
61 | 62 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/News/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Globalization 2 | @using DevRainSolutions.KyivSmartCity.New.Models 3 | @using PagedList 4 | @using PagedList.Mvc 5 | @model IEnumerable 6 | @{ 7 | ViewBag.Title = "Новини"; 8 | 9 | } 10 | 11 | 12 |
13 |
14 |

@ViewBag.Title

15 | 16 | @foreach (var i in Model) 17 | { 18 |
19 |
20 | 21 |
22 |
23 |
@i.DatePublished.ToString("f", new CultureInfo("uk-UA"))
24 | 25 |

@i.Name

26 |
27 | 28 | 29 |

30 | @i.Description.Summary(500) 31 |

32 | 33 |

34 | Читати повністю » 35 |

36 |
37 |
38 | 39 | 40 | } 41 | 42 |
43 | @Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page })) 44 |
45 |
46 |
47 | @Html.Partial("_Aside") 48 |
49 |
50 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Groups/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @using PagedList 3 | @using PagedList.Mvc 4 | @{ 5 | ViewBag.Title = "Index"; 6 | } 7 | 8 |

Index

9 | 10 |

11 | @Html.ActionLink("Create New", "Create") 12 |

13 | 14 | 15 | 16 | 19 | 22 | 23 | 26 | 29 | 32 | 33 | 34 | @foreach (var item in Model) { 35 | 36 | 41 | 44 | 47 | 48 | 51 | 54 | 57 | 58 | } 59 | 60 |
17 | Title 18 | 20 | Description 21 | 24 | Experts 25 | 27 | Documents 28 | 30 | TeamMember 31 |
37 | @Html.ActionLink("Edit", "Edit", new { id=item.Id }) | 38 | @Html.ActionLink("Details", "Details", new { id=item.Id }) | 39 | @Html.ActionLink("Delete", "Delete", new { id=item.Id }) 40 | 42 | @item.Title 43 | 45 | @item.Description 46 | 49 | @(item.Experts == null ? "None" : item.Experts.Count.ToString()) 50 | 52 | @(item.Documents == null ? "None" : item.Documents.Count.ToString()) 53 | 55 | @(item.TeamMember == null ? "None" : item.TeamMember.Name) 56 |
61 | 62 | @Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page })) 63 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/TeamMembers/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @using PagedList 3 | @using PagedList.Mvc 4 | @{ 5 | ViewBag.Title = "Index"; 6 | } 7 | 8 |

Index

9 | 10 |

11 | @Html.ActionLink("Create New", "Create") 12 |

13 | 14 | 15 | 16 | 19 | 22 | 25 | 28 | 31 | 32 | 33 | @foreach (var item in Model) { 34 | 35 | 40 | 43 | 46 | 49 | 58 | 61 | 62 | } 63 | 64 |
17 | Name 18 | 20 | ImageUrl 21 | 23 | Description 24 | 26 | Contact details 27 | 29 | Index 30 |
36 | @Html.ActionLink("Edit", "Edit", new { id=item.Id }) | 37 | @Html.ActionLink("Details", "Details", new { id=item.Id }) | 38 | @Html.ActionLink("Delete", "Delete", new { id=item.Id }) 39 | 41 | @item.Name 42 | 44 | @item.ImageUrl 45 | 47 | @item.Description 48 | 50 | @item.Email 51 |
52 | @item.Twitter 53 |
54 | @item.Facebook 55 |
56 | @item.LinkedIn 57 |
59 | @item.Index 60 |
65 | 66 | 67 | @Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page })) -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Manage/ChangePassword.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.ChangePasswordViewModel 2 | @{ 3 | ViewBag.Title = "Change Password"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ChangePassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Change Password Form

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 |
15 | @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" }) 18 |
19 |
20 |
21 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 24 |
25 |
26 |
27 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 28 |
29 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 | } 38 | @section Scripts { 39 | @Scripts.Render("~/bundles/jqueryval") 40 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/ResetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.ResetPasswordViewModel 2 | @{ 3 | ViewBag.Title = "Reset password"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Reset your password.

12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" }) 14 | @Html.HiddenFor(model => model.Code) 15 |
16 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 17 |
18 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 19 |
20 |
21 |
22 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 23 |
24 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 25 |
26 |
27 |
28 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 29 |
30 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 31 |
32 |
33 |
34 |
35 | 36 |
37 |
38 | } 39 | 40 | @section Scripts { 41 | @Scripts.Render("~/bundles/jqueryval") 42 | } 43 | -------------------------------------------------------------------------------- /NotFoundMvc/NotFoundAsyncControllerActionInvoker.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web.Mvc; 3 | using System.Web.Mvc.Async; 4 | 5 | namespace NotFoundMvc 6 | { 7 | public class NotFoundAsyncControllerActionInvoker : AsyncControllerActionInvoker 8 | { 9 | protected override ActionDescriptor FindAction(ControllerContext controllerContext, ControllerDescriptor controllerDescriptor, 10 | string actionName) 11 | { 12 | var result = base.FindAction(controllerContext, controllerDescriptor, actionName); 13 | if (result == null) 14 | { 15 | return new NotFoundActionDescriptor(); 16 | } 17 | return result; 18 | } 19 | } 20 | 21 | public class NotFoundActionDescriptor : ActionDescriptor 22 | { 23 | public override object Execute(ControllerContext controllerContext, IDictionary parameters) 24 | { 25 | INotFoundController notFound = NotFoundHandler.CreateNotFoundController(controllerContext.RequestContext); 26 | controllerContext.RouteData.Values["action"] = "NotFound"; 27 | return notFound.NotFound(); 28 | } 29 | 30 | public override ParameterDescriptor[] GetParameters() 31 | { 32 | return new ParameterDescriptor[] { }; 33 | } 34 | 35 | public override string ActionName 36 | { 37 | get { return "NotFound"; } 38 | } 39 | 40 | public override ControllerDescriptor ControllerDescriptor 41 | { 42 | get { return new ReflectedControllerDescriptor(typeof(NotFoundController)); } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /NotFoundMvc/NotFoundHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | using System.Web.Routing; 5 | 6 | namespace NotFoundMvc 7 | { 8 | public class NotFoundHandler : IHttpHandler 9 | { 10 | static Func _createNotFoundController = context => new NotFoundController(); 11 | 12 | public static Func CreateNotFoundController 13 | { 14 | get 15 | { 16 | return _createNotFoundController; 17 | } 18 | set 19 | { 20 | if (value == null) throw new ArgumentNullException(); 21 | _createNotFoundController = value; 22 | } 23 | } 24 | 25 | public void ProcessRequest(HttpContext context) 26 | { 27 | ProcessRequest(new HttpContextWrapper(context)); 28 | } 29 | 30 | void ProcessRequest(HttpContextBase context) 31 | { 32 | var requestContext = CreateRequestContext(context); 33 | var controller = _createNotFoundController(requestContext); 34 | controller.Execute(requestContext); 35 | } 36 | 37 | RequestContext CreateRequestContext(HttpContextBase context) 38 | { 39 | var routeData = new RouteData(); 40 | routeData.Values.Add("controller", "NotFound"); 41 | var requestContext = new RequestContext(context, routeData); 42 | return requestContext; 43 | } 44 | 45 | public bool IsReusable 46 | { 47 | get { return false; } 48 | } 49 | 50 | // ControllerContext requires an object that derives from ControllerBase. 51 | class FakeController : Controller { } 52 | } 53 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/TeamMembers/_CreateOrEdit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.TeamMember 2 | 3 | @* This partial view defines form fields that will appear when creating and editing entities *@ 4 | 5 |
6 | @Html.LabelFor(model => model.Name) 7 |
8 |
9 | @Html.EditorFor(model => model.Name) 10 | @Html.ValidationMessageFor(model => model.Name) 11 |
12 | 13 |
14 | @Html.LabelFor(model => model.ImageUrl) 15 |
16 |
17 | @Html.EditorFor(model => model.ImageUrl) 18 | @Html.ValidationMessageFor(model => model.ImageUrl) 19 |
20 | 21 |
22 | @Html.LabelFor(model => model.Description) 23 |
24 |
25 | @Html.EditorFor(model => model.Description) 26 | @Html.ValidationMessageFor(model => model.Description) 27 |
28 | 29 |
30 | @Html.LabelFor(model => model.Email) 31 |
32 |
33 | @Html.EditorFor(model => model.Email) 34 | @Html.ValidationMessageFor(model => model.Email) 35 |
36 | 37 |
38 | @Html.LabelFor(model => model.Twitter) 39 |
40 |
41 | @Html.EditorFor(model => model.Twitter) 42 | @Html.ValidationMessageFor(model => model.Twitter) 43 |
44 | 45 |
46 | @Html.LabelFor(model => model.Facebook) 47 |
48 |
49 | @Html.EditorFor(model => model.Facebook) 50 | @Html.ValidationMessageFor(model => model.Facebook) 51 |
52 | 53 |
54 | @Html.LabelFor(model => model.LinkedIn) 55 |
56 |
57 | @Html.EditorFor(model => model.LinkedIn) 58 | @Html.ValidationMessageFor(model => model.LinkedIn) 59 |
60 | 61 |
62 | @Html.LabelFor(model => model.Index) 63 |
64 |
65 | @Html.EditorFor(model => model.Index) 66 | @Html.ValidationMessageFor(model => model.Index) 67 |
68 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/En/Views/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Hackathon/Views/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-bottom: 20px; 3 | } 4 | 5 | /* Set padding to keep content from hitting the edges */ 6 | .body-content { 7 | padding-left: 15px; 8 | padding-right: 15px; 9 | } 10 | 11 | /* Override the default bootstrap behavior where horizontal description lists 12 | will truncate terms that are too long to fit in the left column 13 | */ 14 | .dl-horizontal dt { 15 | white-space: normal; 16 | } 17 | 18 | /* Set width on the form input elements since they're 100% wide by default */ 19 | input, 20 | select, 21 | textarea { 22 | 23 | } 24 | 25 | textarea { 26 | height: 300px; 27 | } 28 | 29 | .subheader { 30 | color: gray; 31 | } 32 | 33 | 34 | 35 | 36 | .round { 37 | border-radius: 50%; 38 | overflow: hidden; 39 | width: 175px; 40 | height: 175px; 41 | } 42 | 43 | 44 | .round.big, .big { 45 | width: 175px; 46 | height: 175px; 47 | } 48 | 49 | 50 | 51 | .round img { 52 | display: block; 53 | 54 | width: 175px; 55 | height: 175px; 56 | } 57 | 58 | .field-validation-error { 59 | color: red; 60 | } 61 | 62 | p.lead { 63 | color: white; 64 | } 65 | 66 | input[type=submit] { 67 | margin-top: 20px; 68 | } 69 | 70 | .navbar { 71 | padding: 10px 0; 72 | margin-bottom: 0; 73 | background: url(/Images/bg.png) top right no-repeat; 74 | } 75 | 76 | 77 | .promo { 78 | margin-top: 10px; 79 | background-color: #faf8ea; 80 | border-radius: 6px; 81 | border: 1px solid #f2eee0; 82 | padding: 8px 20px; 83 | } 84 | 85 | .margin { 86 | margin-top: 40px; 87 | } 88 | 89 | .mentors td img { 90 | max-width: 75px; 91 | border-radius: 50%; 92 | } 93 | 94 | .meta { 95 | font-size: 90%; 96 | color: gray; 97 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Models/DevRainSolutionsKyivSmartCityNewContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Web; 6 | 7 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models 8 | { 9 | public class KyivSmartCityNewContext : DbContext 10 | { 11 | public KyivSmartCityNewContext() 12 | : base("DefaultConnection") 13 | { 14 | 15 | } 16 | 17 | // You can add custom code to this file. Changes will not be overwritten. 18 | // 19 | // If you want Entity Framework to drop and regenerate your database 20 | // automatically whenever you change your model schema, add the following 21 | // code to the Application_Start method in your Global.asax file. 22 | // Note: this will destroy and re-create your database with every model change. 23 | // 24 | // System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges()); 25 | 26 | public DbSet TeamMembers { get; set; } 27 | 28 | public DbSet NewsItems { get; set; } 29 | 30 | public DbSet Groups { get; set; } 31 | 32 | public DbSet Experts { get; set; } 33 | 34 | public DbSet Documents { get; set; } 35 | 36 | public DbSet Volunteers { get; set; } 37 | 38 | public DbSet Projects { get; set; } 39 | } 40 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Home/Session2020.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Публічне обговорення візії і концептуального бачення Kyiv Smart City 2020"; 3 | } 4 | 5 | 6 | 7 |
8 |
9 | 10 |

@ViewBag.Title

11 | 12 | 13 |

14 | За останні місяці літа, з початку старту проекту розробки концепції Kyiv Smart City була проведена значна робота з експертами, представниками громадських ініціатив міста та волонтерами для формування підходів до розвитку «розумного міста» у столиці. 15 |

16 | У результаті дискусій громадськість Києва визначила основні смарт пріоритети розвитку міста. Також були отримані результати соціологічних досліджень серед киян по баченню ідеального міста. 17 |

18 | Тепер прийшов час визначити цілісне бачення Києва як смарт сіті і ключові цілі його розвитку на наступні 5 років. Бачення міста є одним з найважливіших чинників реалізації концепції та стратегії Kyiv Smart City і його повинна визначити громадськість міста. 19 |

20 | Саме для цього 10 вересня ми запрошуємо всіх прихильників команди Kyiv Smart City, всіх зацікавлених і активних киян для обговорення бачення розумного міста для Києва та обговорення ключових рішень, які запропонували наші експерти за пріоритетними напрямами. 21 |

22 | Нам дуже важливі Ваші ідеї, які допоможуть зробити Київ розумним містом. 23 |

24 | Приєднуйтесь! 25 |

26 | Чекаємо вас на стратегічну сесію в Часопис (бібліотека) 10 вересня в 17:45 27 |

28 | 29 | 30 | @Html.Partial("_Disqus") 31 |
32 |
33 | @Html.Partial("_Aside") 34 |
35 |
-------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Projects/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Globalization 2 | @using DevRainSolutions.KyivSmartCity.New.Models 3 | @using PagedList 4 | @using PagedList.Mvc 5 | @model IEnumerable 6 | @{ 7 | ViewBag.Title = "Проекти"; 8 | 9 | } 10 | 11 | 12 |
13 | @*
*@ 14 |

@ViewBag.Title

15 |
16 | @foreach (var i in Model) 17 | { 18 |
19 |

20 | 21 |

22 |
23 | @* 24 |
25 | 26 |

@i.Title

27 |
28 | 29 | 30 |

31 |

Стан впровадження проекту:
32 | @i.CurrentState 33 |

34 |

35 |

Сфера проекту:
36 | @i.Topic 37 |

38 |

39 | Читати повністю » 40 |

41 |
*@ 42 | 43 | 44 | 45 | } 46 |
47 | 48 |
49 | @Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page })) 50 |
51 |
52 | @*
53 | @Html.Partial("_Aside") 54 |
55 |
*@ 56 | -------------------------------------------------------------------------------- /NotFoundMvc/ControllerFactoryWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | using System.Web.Routing; 5 | using System.Web.SessionState; 6 | 7 | namespace NotFoundMvc 8 | { 9 | class ControllerFactoryWrapper : IControllerFactory 10 | { 11 | readonly IControllerFactory factory; 12 | 13 | public ControllerFactoryWrapper(IControllerFactory factory) 14 | { 15 | this.factory = factory; 16 | } 17 | 18 | public IController CreateController(RequestContext requestContext, string controllerName) 19 | { 20 | try 21 | { 22 | var controller = factory.CreateController(requestContext, controllerName); 23 | WrapControllerActionInvoker(controller); 24 | return controller; 25 | } 26 | catch (HttpException ex) 27 | { 28 | if (ex.GetHttpCode() == 404) 29 | { 30 | return NotFoundHandler.CreateNotFoundController(requestContext); 31 | } 32 | 33 | throw; 34 | } 35 | } 36 | 37 | void WrapControllerActionInvoker(IController controller) 38 | { 39 | var controllerWithInvoker = controller as Controller; 40 | if (controllerWithInvoker != null) 41 | { 42 | controllerWithInvoker.ActionInvoker = 43 | ActionInvokerSelector.Current(controllerWithInvoker.ActionInvoker); 44 | } 45 | } 46 | 47 | public SessionStateBehavior GetControllerSessionBehavior(RequestContext requestContext, string controllerName) 48 | { 49 | return factory.GetControllerSessionBehavior(requestContext, controllerName); 50 | } 51 | 52 | public void ReleaseController(IController controller) 53 | { 54 | factory.ReleaseController(controller); 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | using DevRainSolutions.KyivSmartCity.New.Controllers; 8 | using LowercaseRoutesMVC; 9 | 10 | namespace DevRainSolutions.KyivSmartCity.New 11 | { 12 | public class RouteConfig 13 | { 14 | public static void RegisterRoutes(RouteCollection routes) 15 | { 16 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 17 | 18 | routes.MapRouteLowercase("Root", "{action}", 19 | new { controller = "Home", action = "Index", area="" }, 20 | new { isMethodInHomeController = new RootRouteConstraint() }, 21 | new[] { "DevRainSolutions.KyivSmartCity.New.Controllers" }); 22 | 23 | routes.MapRouteLowercase("Details", "{controller}/{id}", 24 | new { action = "Details", area = "" }, 25 | new { id = @"\d+" }, 26 | new[] { "DevRainSolutions.KyivSmartCity.New.Controllers" }); 27 | 28 | routes.MapRouteLowercase( 29 | "Default", // Route name 30 | "{controller}/{action}/{id}", // URL with parameters 31 | new { controller = "Home", action = "Index", id = UrlParameter.Optional }, // Parameter defaults 32 | new[] { "DevRainSolutions.KyivSmartCity.New.Controllers" } 33 | ); 34 | } 35 | } 36 | 37 | public class RootRouteConstraint : IRouteConstraint 38 | { 39 | public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection) 40 | { 41 | var rootMethodNames = typeof(T).GetMethods().Select(x => x.Name.ToLower()); 42 | return rootMethodNames.Contains(values["action"].ToString().ToLower()); 43 | } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Controllers/BaseController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Net; 4 | using System.Threading; 5 | using System.Web; 6 | using System.Web.Mvc; 7 | using System.Xml.Linq; 8 | using System.Xml.XPath; 9 | using DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models; 10 | using DevRainSolutions.KyivSmartCity.New.Mailers; 11 | using Microsoft.AspNet.Identity.Owin; 12 | 13 | namespace DevRainSolutions.KyivSmartCity.New.Controllers 14 | { 15 | public class BaseController : Controller 16 | { 17 | protected ApplicationSignInManager _signInManager; 18 | protected ApplicationUserManager _userManager; 19 | 20 | protected KyivSmartCityNewContext db = new KyivSmartCityNewContext(); 21 | 22 | public int PerPage = 10; 23 | 24 | private IUserMailer _userMailer = new UserMailer(); 25 | public IUserMailer UserMailer 26 | { 27 | get { return _userMailer; } 28 | set { _userMailer = value; } 29 | } 30 | 31 | public ApplicationUserManager UserManager 32 | { 33 | get 34 | { 35 | return _userManager ?? HttpContext.GetOwinContext().GetUserManager(); 36 | } 37 | protected set 38 | { 39 | _userManager = value; 40 | } 41 | } 42 | 43 | public ApplicationSignInManager SignInManager 44 | { 45 | get 46 | { 47 | return _signInManager ?? HttpContext.GetOwinContext().Get(); 48 | } 49 | protected set 50 | { 51 | _signInManager = value; 52 | } 53 | } 54 | 55 | 56 | protected override void Dispose(bool disposing) 57 | { 58 | if (disposing) 59 | { 60 | // _repo.Dispose(); 61 | } 62 | base.Dispose(disposing); 63 | } 64 | } 65 | 66 | 67 | } -------------------------------------------------------------------------------- /NotFoundMvc/ActionInvokerWrapper.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace NotFoundMvc 5 | { 6 | /// 7 | /// Wraps another IActionInvoker except it handles the case of an action method 8 | /// not being found and invokes the NotFoundController instead. 9 | /// 10 | class ActionInvokerWrapper : IActionInvoker 11 | { 12 | readonly IActionInvoker actionInvoker; 13 | 14 | public ActionInvokerWrapper(IActionInvoker actionInvoker) 15 | { 16 | this.actionInvoker = actionInvoker; 17 | } 18 | 19 | public bool InvokeAction(ControllerContext controllerContext, string actionName) 20 | { 21 | if (InvokeActionWith404Catch(controllerContext, actionName)) 22 | return true; 23 | 24 | // No action method was found, or it was, but threw a 404 HttpException. 25 | ExecuteNotFoundControllerAction(controllerContext); 26 | 27 | return true; 28 | } 29 | 30 | static void ExecuteNotFoundControllerAction(ControllerContext controllerContext) 31 | { 32 | IController controller; 33 | if (NotFoundHandler.CreateNotFoundController != null) 34 | { 35 | controller = NotFoundHandler.CreateNotFoundController(controllerContext.RequestContext) ?? new NotFoundController(); 36 | } 37 | else 38 | { 39 | controller = new NotFoundController(); 40 | } 41 | 42 | controller.Execute(controllerContext.RequestContext); 43 | } 44 | 45 | bool InvokeActionWith404Catch(ControllerContext controllerContext, string actionName) 46 | { 47 | try 48 | { 49 | return actionInvoker.InvokeAction(controllerContext, actionName); 50 | } 51 | catch (HttpException ex) 52 | { 53 | if (ex.GetHttpCode() == 404) 54 | { 55 | return false; 56 | } 57 | throw; 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Properties/PublishProfiles/kyivsmartcity.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | MSDeploy 9 | Release 10 | Any CPU 11 | http://kyivsmartcity.azurewebsites.net 12 | True 13 | False 14 | kyivsmartcity.scm.azurewebsites.net:443 15 | kyivsmartcity 16 | 17 | True 18 | WMSVC 19 | True 20 | $kyivsmartcity 21 | <_SavePWD>True 22 | <_DestinationType>AzureWebSite 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/NewsItems/_CreateOrEdit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.NewsItem 2 | 3 | @* This partial view defines form fields that will appear when creating and editing entities *@ 4 | 5 |
6 | @Html.LabelFor(model => model.Name) 7 |
8 |
9 | @Html.EditorFor(model => model.Name, new 10 | { 11 | htmlAttributes = new 12 | { 13 | @class = "form-control" 14 | } 15 | }) 16 | @Html.ValidationMessageFor(model => model.Name) 17 |
18 | 19 |
20 | @Html.LabelFor(model => model.Description) 21 |
22 |
23 | @Html.EditorFor(model => model.Description, new 24 | { 25 | htmlAttributes = new 26 | { 27 | @class = "form-control" 28 | } 29 | }) 30 | @Html.ValidationMessageFor(model => model.Description) 31 |
32 | 33 |
34 | @Html.LabelFor(model => model.DatePublished) 35 |
36 |
37 | @Html.EditorFor(model => model.DatePublished, new 38 | { 39 | htmlAttributes = new 40 | { 41 | @class = "form-control", 42 | } 43 | }) 44 | @Html.ValidationMessageFor(model => model.DatePublished) 45 |
46 | 47 |
48 | @Html.LabelFor(model => model.IsPublished) 49 |
50 |
51 | @Html.EditorFor(model => model.IsPublished) 52 | @Html.ValidationMessageFor(model => model.IsPublished) 53 |
54 | 55 |
56 | @Html.LabelFor(model => model.Image) 57 |
58 |
59 | @Html.EditorFor(model => model.Image, new 60 | { 61 | htmlAttributes = new 62 | { 63 | @class = "form-control" 64 | } 65 | }) 66 | @Html.ValidationMessageFor(model => model.Image) 67 |
68 | 69 |
70 | @Html.LabelFor(model => model.Body) 71 |
72 |
73 | @Html.EditorFor(model => model.Body) 74 | @Html.ValidationMessageFor(model => model.Body) 75 |
76 | 77 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Properties/PublishProfiles/kyivsmartcity-dev.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | MSDeploy 9 | Release 10 | Any CPU 11 | http://kyivsmartcity-dev.azurewebsites.net 12 | True 13 | False 14 | kyivsmartcity-dev.scm.azurewebsites.net:443 15 | kyivsmartcity-dev 16 | 17 | True 18 | WMSVC 19 | True 20 | $kyivsmartcity-dev 21 | <_SavePWD>True 22 | <_DestinationType>AzureWebSite 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Models/ExpertRepository.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Linq.Expressions; 6 | using DevRainSolutions.KyivSmartCity.New.Models; 7 | 8 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models 9 | { 10 | public class ExpertRepository : IExpertRepository 11 | { 12 | KyivSmartCityNewContext context = new KyivSmartCityNewContext(); 13 | 14 | public IQueryable All 15 | { 16 | get { return context.Experts; } 17 | } 18 | 19 | public IQueryable AllIncluding(params Expression>[] includeProperties) 20 | { 21 | IQueryable query = context.Experts; 22 | foreach (var includeProperty in includeProperties) { 23 | query = query.Include(includeProperty); 24 | } 25 | return query; 26 | } 27 | 28 | public Expert Find(int id) 29 | { 30 | return context.Experts.Find(id); 31 | } 32 | 33 | public void InsertOrUpdate(Expert expert) 34 | { 35 | if (expert.Id == default(int)) { 36 | // New entity 37 | context.Experts.Add(expert); 38 | } else { 39 | // Existing entity 40 | context.Entry(expert).State = EntityState.Modified; 41 | } 42 | } 43 | 44 | public void Delete(int id) 45 | { 46 | var expert = context.Experts.Find(id); 47 | context.Experts.Remove(expert); 48 | } 49 | 50 | public void Save() 51 | { 52 | context.SaveChanges(); 53 | } 54 | 55 | public void Dispose() 56 | { 57 | context.Dispose(); 58 | } 59 | } 60 | 61 | public interface IExpertRepository : IDisposable 62 | { 63 | IQueryable All { get; } 64 | IQueryable AllIncluding(params Expression>[] includeProperties); 65 | Expert Find(int id); 66 | void InsertOrUpdate(Expert expert); 67 | void Delete(int id); 68 | void Save(); 69 | } 70 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Models/NewsItemRepository.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Data.Entity; 4 | using System.Linq; 5 | using System.Linq.Expressions; 6 | using DevRainSolutions.KyivSmartCity.New.Models; 7 | 8 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models 9 | { 10 | public class NewsItemRepository : INewsItemRepository 11 | { 12 | KyivSmartCityNewContext context = new KyivSmartCityNewContext(); 13 | 14 | public IQueryable All 15 | { 16 | get { return context.NewsItems; } 17 | } 18 | 19 | public IQueryable AllIncluding(params Expression>[] includeProperties) 20 | { 21 | IQueryable query = context.NewsItems; 22 | foreach (var includeProperty in includeProperties) { 23 | query = query.Include(includeProperty); 24 | } 25 | return query; 26 | } 27 | 28 | public NewsItem Find(int id) 29 | { 30 | return context.NewsItems.Find(id); 31 | } 32 | 33 | public void InsertOrUpdate(NewsItem newsitem) 34 | { 35 | if (newsitem.Id == default(int)) { 36 | // New entity 37 | context.NewsItems.Add(newsitem); 38 | } else { 39 | // Existing entity 40 | context.Entry(newsitem).State = EntityState.Modified; 41 | } 42 | } 43 | 44 | public void Delete(int id) 45 | { 46 | var newsitem = context.NewsItems.Find(id); 47 | context.NewsItems.Remove(newsitem); 48 | } 49 | 50 | public void Save() 51 | { 52 | context.SaveChanges(); 53 | } 54 | 55 | public void Dispose() 56 | { 57 | context.Dispose(); 58 | } 59 | } 60 | 61 | public interface INewsItemRepository : IDisposable 62 | { 63 | IQueryable All { get; } 64 | IQueryable AllIncluding(params Expression>[] includeProperties); 65 | NewsItem Find(int id); 66 | void InsertOrUpdate(NewsItem newsitem); 67 | void Delete(int id); 68 | void Save(); 69 | } 70 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Models/DocumentRepository.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | using System; 4 | using System.Data.Entity; 5 | using System.Linq; 6 | using System.Linq.Expressions; 7 | using DevRainSolutions.KyivSmartCity.New.Models; 8 | 9 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models 10 | { 11 | public class DocumentRepository : IDocumentRepository 12 | { 13 | KyivSmartCityNewContext context = new KyivSmartCityNewContext(); 14 | 15 | public IQueryable All 16 | { 17 | get { return context.Documents; } 18 | } 19 | 20 | public IQueryable AllIncluding(params Expression>[] includeProperties) 21 | { 22 | IQueryable query = context.Documents; 23 | foreach (var includeProperty in includeProperties) { 24 | query = query.Include(includeProperty); 25 | } 26 | return query; 27 | } 28 | 29 | public Document Find(int id) 30 | { 31 | return context.Documents.Find(id); 32 | } 33 | 34 | public void InsertOrUpdate(Document document) 35 | { 36 | if (document.Id == default(int)) { 37 | // New entity 38 | context.Documents.Add(document); 39 | } else { 40 | // Existing entity 41 | context.Entry(document).State = EntityState.Modified; 42 | } 43 | } 44 | 45 | public void Delete(int id) 46 | { 47 | var document = context.Documents.Find(id); 48 | context.Documents.Remove(document); 49 | } 50 | 51 | public void Save() 52 | { 53 | context.SaveChanges(); 54 | } 55 | 56 | public void Dispose() 57 | { 58 | context.Dispose(); 59 | } 60 | } 61 | 62 | public interface IDocumentRepository : IDisposable 63 | { 64 | IQueryable All { get; } 65 | IQueryable AllIncluding(params Expression>[] includeProperties); 66 | Document Find(int id); 67 | void InsertOrUpdate(Document document); 68 | void Delete(int id); 69 | void Save(); 70 | } 71 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Models/VolunteerRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using DevRainSolutions.KyivSmartCity.New.Models; 6 | 7 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models 8 | { 9 | public class VolunteerRepository : IVolunteerRepository 10 | { 11 | KyivSmartCityNewContext context = new KyivSmartCityNewContext(); 12 | 13 | public IQueryable All 14 | { 15 | get { return context.Volunteers; } 16 | } 17 | 18 | public IQueryable AllIncluding(params Expression>[] includeProperties) 19 | { 20 | IQueryable query = context.Volunteers; 21 | foreach (var includeProperty in includeProperties) { 22 | query = query.Include(includeProperty); 23 | } 24 | return query; 25 | } 26 | 27 | public Volunteer Find(int id) 28 | { 29 | return context.Volunteers.Find(id); 30 | } 31 | 32 | public void InsertOrUpdate(Volunteer volunteer) 33 | { 34 | if (volunteer.Id == default(int)) { 35 | // New entity 36 | context.Volunteers.Add(volunteer); 37 | } else { 38 | // Existing entity 39 | context.Entry(volunteer).State = EntityState.Modified; 40 | } 41 | } 42 | 43 | public void Delete(int id) 44 | { 45 | var volunteer = context.Volunteers.Find(id); 46 | context.Volunteers.Remove(volunteer); 47 | } 48 | 49 | public void Save() 50 | { 51 | context.SaveChanges(); 52 | } 53 | 54 | public void Dispose() 55 | { 56 | context.Dispose(); 57 | } 58 | } 59 | 60 | public interface IVolunteerRepository : IDisposable 61 | { 62 | IQueryable All { get; } 63 | IQueryable AllIncluding(params Expression>[] includeProperties); 64 | Volunteer Find(int id); 65 | void InsertOrUpdate(Volunteer volunteer); 66 | void Delete(int id); 67 | void Save(); 68 | } 69 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Models/TeamMemberRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using DevRainSolutions.KyivSmartCity.New.Models; 6 | 7 | 8 | namespace DevRainSolutions.KyivSmartCity.New.Areas.Admin.Models 9 | { 10 | public class TeamMemberRepository : ITeamMemberRepository 11 | { 12 | KyivSmartCityNewContext context = new KyivSmartCityNewContext(); 13 | 14 | public IQueryable All 15 | { 16 | get { return context.TeamMembers; } 17 | } 18 | 19 | public IQueryable AllIncluding(params Expression>[] includeProperties) 20 | { 21 | IQueryable query = context.TeamMembers; 22 | foreach (var includeProperty in includeProperties) { 23 | query = query.Include(includeProperty); 24 | } 25 | return query; 26 | } 27 | 28 | public TeamMember Find(int id) 29 | { 30 | return context.TeamMembers.Find(id); 31 | } 32 | 33 | public void InsertOrUpdate(TeamMember teammember) 34 | { 35 | if (teammember.Id == default(int)) { 36 | // New entity 37 | context.TeamMembers.Add(teammember); 38 | } else { 39 | // Existing entity 40 | context.Entry(teammember).State = EntityState.Modified; 41 | } 42 | } 43 | 44 | public void Delete(int id) 45 | { 46 | var teammember = context.TeamMembers.Find(id); 47 | context.TeamMembers.Remove(teammember); 48 | } 49 | 50 | public void Save() 51 | { 52 | context.SaveChanges(); 53 | } 54 | 55 | public void Dispose() 56 | { 57 | context.Dispose(); 58 | } 59 | } 60 | 61 | public interface ITeamMemberRepository : IDisposable 62 | { 63 | IQueryable All { get; } 64 | IQueryable AllIncluding(params Expression>[] includeProperties); 65 | TeamMember Find(int id); 66 | void InsertOrUpdate(TeamMember teammember); 67 | void Delete(int id); 68 | void Save(); 69 | } 70 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/TextBoxForExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using System.Web.Mvc; 6 | using System.Web.Mvc.Html; 7 | using System.Web.Routing; 8 | 9 | namespace DevRainSolutions.KyivSmartCity.New.Models 10 | { 11 | /// 12 | /// http://mvcdiary.com/2012/09/28/create-a-custom-htmlhelper-textboxfor-to-display-label-text-as-placeholder-integrated-with-twitter-bootstrap/ 13 | /// 14 | public static class TextBoxForExtensions 15 | { 16 | public static MvcHtmlString TextBoxPlaceHolderFor(this HtmlHelper html, Expression> expression, object htmlAttributes) 17 | { 18 | var dict = new RouteValueDictionary(htmlAttributes); 19 | return html.TextBoxPlaceHolderFor(expression, dict); 20 | } 21 | public static MvcHtmlString TextBoxPlaceHolderFor(this HtmlHelper html, Expression> expression) 22 | { 23 | var htmlAttributes = new Dictionary(); 24 | return html.TextBoxPlaceHolderFor(expression, htmlAttributes); 25 | } 26 | 27 | public static MvcHtmlString TextBoxPlaceHolderFor(this HtmlHelper html, Expression> expression, IDictionary htmlAttributes) 28 | { 29 | ModelMetadata metadata = ModelMetadata.FromLambdaExpression(expression, html.ViewData); 30 | 31 | string htmlFieldName = ExpressionHelper.GetExpressionText(expression); 32 | string labelText = metadata.DisplayName ?? metadata.PropertyName ?? htmlFieldName.Split('.').Last(); 33 | 34 | if (!String.IsNullOrEmpty(labelText)) 35 | { 36 | if (htmlAttributes == null) 37 | { 38 | htmlAttributes = new Dictionary(); 39 | } 40 | 41 | if (metadata.IsRequired) 42 | { 43 | labelText += " *"; 44 | } 45 | 46 | htmlAttributes.Add("placeholder", labelText); 47 | } 48 | 49 | return html.TextBoxFor(expression, htmlAttributes); 50 | } 51 | 52 | } 53 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Volunteers/_CreateOrEdit.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.Volunteer 2 | 3 | @* This partial view defines form fields that will appear when creating and editing entities *@ 4 | 5 |
6 | @Html.LabelFor(model => model.Email) 7 |
8 |
9 | @Html.EditorFor(model => model.Email) 10 | @Html.ValidationMessageFor(model => model.Email) 11 |
12 | 13 |
14 | @Html.LabelFor(model => model.FirstName) 15 |
16 |
17 | @Html.EditorFor(model => model.FirstName) 18 | @Html.ValidationMessageFor(model => model.FirstName) 19 |
20 | 21 | 22 |
23 | @Html.LabelFor(model => model.MiddleName) 24 |
25 |
26 | @Html.EditorFor(model => model.MiddleName) 27 | @Html.ValidationMessageFor(model => model.MiddleName) 28 |
29 | 30 |
31 | @Html.LabelFor(model => model.LastName) 32 |
33 |
34 | @Html.EditorFor(model => model.LastName) 35 | @Html.ValidationMessageFor(model => model.LastName) 36 |
37 | 38 |
39 | @Html.LabelFor(model => model.RegistrationDate) 40 |
41 |
42 | @Html.EditorFor(model => model.RegistrationDate) 43 | @Html.ValidationMessageFor(model => model.RegistrationDate) 44 |
45 | 46 |
47 | @Html.LabelFor(model => model.City) 48 |
49 |
50 | @Html.EditorFor(model => model.City) 51 | @Html.ValidationMessageFor(model => model.City) 52 |
53 | 54 |
55 | @Html.LabelFor(model => model.Phone) 56 |
57 |
58 | @Html.EditorFor(model => model.Phone) 59 | @Html.ValidationMessageFor(model => model.Phone) 60 |
61 | 62 |
63 | @Html.LabelFor(model => model.Notes) 64 |
65 |
66 | @Html.EditorFor(model => model.Notes) 67 | @Html.ValidationMessageFor(model => model.Notes) 68 |
69 | 70 |
71 | Group 72 |
73 |
74 | @Html.DropDownListFor(model => model.GroupId, ((IEnumerable)ViewBag.PossibleGroups).Select(option => new SelectListItem { 75 | Text = (option == null ? "None" : option.Title), 76 | Value = option.Id.ToString(), 77 | Selected = (Model != null) && (option.Id == Model.GroupId) 78 | }), "Choose...") 79 | @Html.ValidationMessageFor(model => model.GroupId) 80 |
81 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Shared/EditorTemplates/tinymce_jquery_full.cshtml: -------------------------------------------------------------------------------- 1 | @* 2 | Don't forget to reference the JQuery Library here, inside your view or layout. 3 | 4 | *@ 5 | 6 | 7 | 8 | 49 | 50 | @Html.TextArea(string.Empty, /* Name suffix */ 51 | ViewData.TemplateInfo.FormattedModelValue /* Initial value */ 52 | ) 53 | 54 |
55 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D1CCBCC7-52F7-45F3-85A8-2A499B257CCD}" 7 | ProjectSection(SolutionItems) = preProject 8 | .nuget\NuGet.Config = .nuget\NuGet.Config 9 | .nuget\NuGet.exe = .nuget\NuGet.exe 10 | .nuget\NuGet.targets = .nuget\NuGet.targets 11 | EndProjectSection 12 | EndProject 13 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotFoundMvc", "NotFoundMvc\NotFoundMvc.csproj", "{3D01830A-45E9-471A-B8A4-E15BA1B26E33}" 14 | EndProject 15 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevRainSolutions.KyivSmartCity.New", "DevRainSolutions.KyivSmartCity.New\DevRainSolutions.KyivSmartCity.New.csproj", "{69F01B39-6A7D-4070-8E7B-5324C12F7185}" 16 | EndProject 17 | Global 18 | GlobalSection(TeamFoundationVersionControl) = preSolution 19 | SccNumberOfProjects = 3 20 | SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} 21 | SccTeamFoundationServer = https://devrain.visualstudio.com/defaultcollection 22 | SccLocalPath0 = . 23 | SccProjectUniqueName1 = DevRainSolutions.KyivSmartCity.New\\DevRainSolutions.KyivSmartCity.New.csproj 24 | SccProjectName1 = DevRainSolutions.KyivSmartCity.New 25 | SccLocalPath1 = DevRainSolutions.KyivSmartCity.New 26 | SccProjectUniqueName2 = NotFoundMvc\\NotFoundMvc.csproj 27 | SccProjectName2 = NotFoundMvc 28 | SccLocalPath2 = NotFoundMvc 29 | EndGlobalSection 30 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 31 | Debug|Any CPU = Debug|Any CPU 32 | Release|Any CPU = Release|Any CPU 33 | EndGlobalSection 34 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 35 | {3D01830A-45E9-471A-B8A4-E15BA1B26E33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 36 | {3D01830A-45E9-471A-B8A4-E15BA1B26E33}.Debug|Any CPU.Build.0 = Debug|Any CPU 37 | {3D01830A-45E9-471A-B8A4-E15BA1B26E33}.Release|Any CPU.ActiveCfg = Release|Any CPU 38 | {3D01830A-45E9-471A-B8A4-E15BA1B26E33}.Release|Any CPU.Build.0 = Release|Any CPU 39 | {69F01B39-6A7D-4070-8E7B-5324C12F7185}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 40 | {69F01B39-6A7D-4070-8E7B-5324C12F7185}.Debug|Any CPU.Build.0 = Debug|Any CPU 41 | {69F01B39-6A7D-4070-8E7B-5324C12F7185}.Release|Any CPU.ActiveCfg = Release|Any CPU 42 | {69F01B39-6A7D-4070-8E7B-5324C12F7185}.Release|Any CPU.Build.0 = Release|Any CPU 43 | EndGlobalSection 44 | GlobalSection(SolutionProperties) = preSolution 45 | HideSolutionNode = FALSE 46 | EndGlobalSection 47 | EndGlobal 48 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Scripts/MarkdownDeep Quick Reference.txt: -------------------------------------------------------------------------------- 1 | MarkdownDeep Quick Reference 2 | ============================ 3 | 4 | Setting up the Client Side Editor 5 | --------------------------------- 6 | 7 | The following assumes you've installed the full edition MarkdownDeep using NuGet and explains how to setup 8 | a client side editor with toolbar, resize bar, real-time preview and syntax reference help. 9 | 10 | 1. In either your master view page, or in the view containing the editor ensure the following references are in place: 11 | 12 | 13 | 14 | 15 | 16 | 2. Insert the following markup at the location you want the editor to appear: 17 | 18 |
19 | <%=Html.TextArea("content", new { @class="mdd_editor" }) %> 20 |
21 |
22 | 23 | Note, the mdd_toolbar, mdd_resizer and mdd_preview divs are all optional. If ommitted, the jQuery plugin will 24 | create them however this may cause the page to appear to "jump" as it loads. By using the above divs and the 25 | associated mdd_styles.css stylesheet, the correct sizing can be in-place immediately, eliminating these jumps. 26 | 27 | 3. Use the jQuery plugin to convert the textarea into a Markdown editor. For more options, see below. 28 | 29 | $(function () { 30 | $("textarea.mdd_editor").MarkdownDeep({ 31 | help_location:"/Scripts/mdd_help.htm", 32 | ExtraMode: true 33 | }); 34 | }) 35 | 36 | See for more information on configuring the editor. 37 | 38 | Server Side Translation 39 | ----------------------- 40 | 41 | The above steps allow you to create forms where the user can enter and preview Markdown content. This section 42 | explains how to perform the equivalent translation of the entered content server side. 43 | 44 | 1. When you installed MarkdownDeep to your project with NuGet, a reference to MarkdownDeep.dll would already have 45 | been created. 46 | 47 | 2. To translate Markdown, instantiate an instance of the MarkdownDeep class and call it's Translate method to 48 | do the translation: 49 | 50 | // Instantiate 51 | var md=new MarkdownDeep.Markdown(); 52 | 53 | // Set options 54 | md.ExtraMode=true; 55 | 56 | // Translate 57 | var html=md.Transform(plaintext); 58 | 59 | 60 | See for other methods and properties. 61 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/SpamProtectionAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | 5 | namespace DevRainSolutions.KyivSmartCity.New.Models 6 | { 7 | /// 8 | /// Verifies that a form has not been submitted in a too short timespan. 9 | /// Used in POST scenarios to ensure that no spam-bot is performing the request. 10 | /// 11 | public sealed class SpamProtectionAttribute : FilterAttribute, IAuthorizationFilter 12 | { 13 | /// 14 | /// Initializes a new instance of the class. 15 | /// 16 | public SpamProtectionAttribute() 17 | : this(1) 18 | { 19 | } 20 | 21 | /// 22 | /// Initializes a new instance of the class. 23 | /// 24 | /// The he minimum timespan between GET- and POST-request. 25 | public SpamProtectionAttribute(int timespan) 26 | { 27 | this.Timespan = timespan; 28 | } 29 | 30 | /// 31 | /// Gets the minimum timespan between GET- and POST-request. 32 | /// 33 | public int Timespan { get; private set; } 34 | 35 | /// 36 | /// Called when a process requests authorization. 37 | /// 38 | /// The filter context. 39 | public void OnAuthorization(AuthorizationContext filterContext) 40 | { 41 | long timestamp = long.MaxValue; 42 | var request = filterContext.RequestContext.HttpContext.Request; 43 | 44 | if (long.TryParse(request.Form["SpamProtectionTimeStamp"], out timestamp)) 45 | { 46 | long currentTime = (long)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds; 47 | 48 | if (currentTime <= timestamp + this.Timespan) 49 | { 50 | throw new HttpException(string.Format("Invalid form submission. At least {0} seconds have to pass before form submission ({1}).", this.Timespan, request.Params.ToString())); 51 | } 52 | } 53 | else 54 | { 55 | throw new HttpException("Invalid form submission. Invalid timestamp parameter."); 56 | } 57 | 58 | if (!string.IsNullOrEmpty(request.Form["website"])) 59 | { 60 | throw new HttpException(string.Format("Invalid form submission.", request.Form["website"], request.Params.ToString())); 61 | } 62 | } 63 | } 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Web; 6 | using System.Web.Mvc; 7 | using DevRainSolutions.KyivSmartCity.New.App_GlobalResources; 8 | using DevRainSolutions.KyivSmartCity.New.Mailers; 9 | using DevRainSolutions.KyivSmartCity.New.Models; 10 | using Newtonsoft.Json; 11 | 12 | namespace DevRainSolutions.KyivSmartCity.New.Controllers 13 | { 14 | public class HomeController : BaseController 15 | { 16 | public ActionResult Index() 17 | { 18 | return View(db.Groups.ToList()); 19 | } 20 | 21 | 22 | public ActionResult Thanks() 23 | { 24 | return View(); 25 | } 26 | 27 | public ActionResult Session2020() 28 | { 29 | return View(); 30 | } 31 | 32 | 33 | public ActionResult Forum2015() 34 | { 35 | return View(); 36 | } 37 | 38 | public ActionResult Join() 39 | { 40 | ViewBag.PossibleGroups = db.Groups.ToList(); 41 | return View(); 42 | 43 | } 44 | 45 | 46 | [HttpPost] 47 | //[SpamProtection] 48 | public async Task Join(Volunteer model) 49 | { 50 | model.RegistrationDate = DateTime.Now; 51 | 52 | string encodedResponse = Request.Form["g-Recaptcha-Response"]; 53 | bool isCaptchaValid = (ReCaptchaClass.Validate(encodedResponse) == "True"); 54 | 55 | if (!isCaptchaValid) 56 | { 57 | ModelState.AddModelError("captcha", "Ви не пройшли перевірку, спробуйте ще раз."); 58 | ViewBag.PossibleGroups = db.Groups.ToList(); 59 | return View(model); 60 | } 61 | 62 | 63 | if (ModelState.IsValid) 64 | { 65 | var count = db.Volunteers.Count(i => i.Email.Equals(model.Email, StringComparison.InvariantCultureIgnoreCase)); 66 | 67 | if (count > 0) 68 | { 69 | ViewBag.PossibleGroups = db.Groups.ToList(); 70 | ModelState.AddModelError("Email", ValidationResources.VolunteerExists); 71 | return View(model); 72 | } 73 | 74 | db.Volunteers.Add(model); 75 | db.SaveChanges(); 76 | 77 | await UserMailer.Welcome(model.Email).SendAsync(); 78 | 79 | return RedirectToAction("Thanks"); 80 | } 81 | 82 | ViewBag.PossibleGroups = db.Groups.ToList(); 83 | return View(model); 84 | } 85 | 86 | } 87 | } -------------------------------------------------------------------------------- /NotFoundMvc/InstallerModule.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | using System.Web.Routing; 4 | 5 | namespace NotFoundMvc 6 | { 7 | class InstallerModule : IHttpModule 8 | { 9 | static bool _installed; 10 | static readonly object InstallerLock = new object(); 11 | 12 | public void Init(HttpApplication application) 13 | { 14 | if (_installed) return; 15 | lock (InstallerLock) 16 | { 17 | if (_installed) return; 18 | Install(); 19 | _installed = true; 20 | } 21 | } 22 | 23 | void Install() 24 | { 25 | WrapControllerBuilder(); 26 | 27 | var routes = RouteTable.Routes; 28 | using (routes.GetWriteLock()) 29 | { 30 | AddNotFoundRoute(routes); 31 | AddCatchAllRoute(routes); 32 | } 33 | } 34 | 35 | void WrapControllerBuilder() 36 | { 37 | ControllerBuilder.Current.SetControllerFactory( 38 | new ControllerFactoryWrapper( 39 | ControllerBuilder.Current.GetControllerFactory() 40 | ) 41 | ); 42 | } 43 | 44 | void AddNotFoundRoute(RouteCollection routes) 45 | { 46 | // To allow IIS to execute "/notfound" when requesting something which is disallowed, 47 | // such as /bin or /add_data. 48 | var route = new Route( 49 | "notfound", 50 | new RouteValueDictionary(new {controller = "NotFound", action = "NotFound"}), 51 | new RouteValueDictionary(new {incoming = new IncomingRequestRouteConstraint()}), 52 | new MvcRouteHandler() 53 | ); 54 | 55 | // Insert at start of route table. This means the application can still create another route like "{name}" that won't capture "/notfound". 56 | routes.Insert(0, route); 57 | } 58 | 59 | void AddCatchAllRoute(RouteCollection routes) 60 | { 61 | routes.MapRoute( 62 | "NotFound-Catch-All", 63 | "{*any}", 64 | new { controller = "NotFound", action = "NotFound" } 65 | ); 66 | } 67 | 68 | public void Dispose() { } 69 | 70 | class IncomingRequestRouteConstraint : IRouteConstraint 71 | { 72 | public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection) 73 | { 74 | return routeDirection == RouteDirection.IncomingRequest; 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/Admin/Views/Volunteers/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @using PagedList 3 | @using PagedList.Mvc 4 | @{ 5 | ViewBag.Title = "Volunteers"; 6 | } 7 | 8 |

@ViewBag.Title

9 | 10 | 11 | 12 | 13 | 14 | 17 | 20 | 23 | 26 | 29 | 32 | 35 | 38 | 39 | 40 | @foreach (var item in Model) 41 | { 42 | 43 | 48 | 51 | 54 | 57 | 60 | 63 | 66 | 69 | 72 | 73 | } 74 | 75 |
15 | Email 16 | 18 | FirstName 19 | 21 | LastName 22 | 24 | RegistrationDate 25 | 27 | City 28 | 30 | Phone 31 | 33 | Notes 34 | 36 | Group 37 |
44 | @Html.ActionLink("Edit", "Edit", new { id = item.Id }) | 45 | @Html.ActionLink("Details", "Details", new { id = item.Id }) | 46 | @Html.ActionLink("Delete", "Delete", new { id = item.Id }) 47 | 49 | @item.Email 50 | 52 | @item.FirstName 53 | 55 | @item.LastName 56 | 58 | @String.Format("{0:g}", item.RegistrationDate) 59 | 61 | @item.City 62 | 64 | @item.Phone 65 | 67 | @item.Notes 68 | 70 | @(item.Group == null ? "None" : item.Group.Title) 71 |
76 | 77 | @Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { page })) 78 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Home/Forum2015.cshtml: -------------------------------------------------------------------------------- 1 | 2 | @{ 3 | ViewBag.Title = "Kyiv Smaty City Forum 2015"; 4 | } 5 | 6 |

@ViewBag.Title

7 |
8 | 9 |
10 | 11 | 12 | 13 |

ДАТА ПРОВЕДЕННЯ: кінець вересня 2015

14 |

15 | Цільова аудиторія - це громадськість міста, 16 | громадські організації, бізнес партнери 17 | (вендори, локальні компанії, інвестори). 18 |

19 | 20 |

21 | В якості СПІКЕРІВ будуть запрошені: міська 22 | влада, міжнародні організації, представники 23 | фондів, громадські організації, міжнародні 24 | наукові центри, вендори. 25 |

26 | 27 |

ЗАХОДИ будуть заплановані на 3 дні:

28 |
    29 |
  1. 30 | 1-й день - відкриття, заходи організовані тільки 31 | для кола учасників, виступ представників міської 32 | влади; 33 |
  2. 34 |
  3. 35 | 2-й день - проведення конференцій, демонстрація 36 | рішень, виступи, презентації учасників, відкриття для 37 | широкої публіки; 38 |
  4. 39 |
  5. 40 | 3-й - інтерактивні, розважальні заходи. 41 | У демо-зоні кожен з учасників зможе представити 42 | свої рішення для міста (інфраструктурні, організацій- 43 | ні) в рамках руху «Київ Смарт Сіті». 44 |
  6. 45 |
46 | 47 |

48 | КОНТАКТИ: 49 | Барило Максим, 50 | тел.: (096) 767 39 09 51 | 52 |

53 | 54 |
55 |
56 | 57 | 58 |
59 | Друзі, сучасний запит суспільства підвів нас до того, що настав час активно рухатися вперед, 60 | бути в ногу з часом і допомогти місту Києву стати в один ряд з прогресивними містами світу. Тож, 61 | запрошуємо Вас взяти участь у головному заході IT-спільноти міста Києва - «Київ Смарт Сіті Форум 62 | 2015».

63 | Наша мета—привернути увагу громадськості до руху «Київ Смарт Сіті», розповісти про наші 64 | проекти і показати реальну користь, яку зможе відчути на собі кожен житель Києва. Також, ми хоче- 65 | мо запросити IT-бізнес, розробників, виробників до побудови «розумного» міста, надати вільний прос- 66 | тір для спілкування, дати можливість показати учасникам свої розробки та рішення, які допоможуть 67 | зробити життя в місті Києві простіше, безпечніше, цікавіше. 68 |

69 | З повагою,
70 | команда "KYIV SMART CITY" 71 |
72 |
73 | 74 |
75 |
76 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Account/Login.cshtml: -------------------------------------------------------------------------------- 1 | @using DevRainSolutions.KyivSmartCity.New.Models 2 | @model LoginViewModel 3 | @{ 4 | ViewBag.Title = "Log in"; 5 | } 6 | 7 |

@ViewBag.Title.

8 |
9 |
10 |
11 | @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 12 | { 13 | @Html.AntiForgeryToken() 14 |

Use a local account to log in.

15 |
16 | @Html.ValidationSummary(true, "", new { @class = "text-danger" }) 17 |
18 | @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) 19 |
20 | @Html.TextBoxFor(m => m.Email, new { @class = "form-control" }) 21 | @Html.ValidationMessageFor(m => m.Email, "", new { @class = "text-danger" }) 22 |
23 |
24 |
25 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 26 |
27 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 28 | @Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" }) 29 |
30 |
31 |
32 |
33 |
34 | @Html.CheckBoxFor(m => m.RememberMe) 35 | @Html.LabelFor(m => m.RememberMe) 36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 |

45 | @Html.ActionLink("Register as a new user", "Register") 46 |

47 | @* Enable this once you have account confirmation enabled for password reset functionality 48 |

49 | @Html.ActionLink("Forgot your password?", "ForgotPassword") 50 |

*@ 51 | } 52 |
53 |
54 |
55 |
56 | @Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl }) 57 |
58 |
59 |
60 | 61 | @section Scripts { 62 | @Scripts.Render("~/bundles/jqueryval") 63 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Models/ManageViewModels.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | using Microsoft.AspNet.Identity; 4 | using Microsoft.Owin.Security; 5 | 6 | namespace DevRainSolutions.KyivSmartCity.New.Models 7 | { 8 | public class IndexViewModel 9 | { 10 | public bool HasPassword { get; set; } 11 | public IList Logins { get; set; } 12 | public string PhoneNumber { get; set; } 13 | public bool TwoFactor { get; set; } 14 | public bool BrowserRemembered { get; set; } 15 | } 16 | 17 | public class ManageLoginsViewModel 18 | { 19 | public IList CurrentLogins { get; set; } 20 | public IList OtherLogins { get; set; } 21 | } 22 | 23 | public class FactorViewModel 24 | { 25 | public string Purpose { get; set; } 26 | } 27 | 28 | public class SetPasswordViewModel 29 | { 30 | [Required] 31 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 32 | [DataType(DataType.Password)] 33 | [Display(Name = "New password")] 34 | public string NewPassword { get; set; } 35 | 36 | [DataType(DataType.Password)] 37 | [Display(Name = "Confirm new password")] 38 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] 39 | public string ConfirmPassword { get; set; } 40 | } 41 | 42 | public class ChangePasswordViewModel 43 | { 44 | [Required] 45 | [DataType(DataType.Password)] 46 | [Display(Name = "Current password")] 47 | public string OldPassword { get; set; } 48 | 49 | [Required] 50 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 51 | [DataType(DataType.Password)] 52 | [Display(Name = "New password")] 53 | public string NewPassword { get; set; } 54 | 55 | [DataType(DataType.Password)] 56 | [Display(Name = "Confirm new password")] 57 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] 58 | public string ConfirmPassword { get; set; } 59 | } 60 | 61 | public class AddPhoneNumberViewModel 62 | { 63 | [Required] 64 | [Phone] 65 | [Display(Name = "Phone Number")] 66 | public string Number { get; set; } 67 | } 68 | 69 | public class VerifyPhoneNumberViewModel 70 | { 71 | [Required] 72 | [Display(Name = "Code")] 73 | public string Code { get; set; } 74 | 75 | [Required] 76 | [Phone] 77 | [Display(Name = "Phone Number")] 78 | public string PhoneNumber { get; set; } 79 | } 80 | 81 | public class ConfigureTwoFactorViewModel 82 | { 83 | public string SelectedProvider { get; set; } 84 | public ICollection Providers { get; set; } 85 | } 86 | } -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Areas/En/Views/Home/Hackathon.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @{ 3 | ViewBag.Title = "Kyiv Smart City Hackathon"; 4 | ViewBag.IsMain = true; 5 | } 6 | 7 |

Date & Place

8 |

September 05, 10:00 – September 06, 18:00
9 | Place: FreeGen SPACE
10 | 12, Baseina Street, Kyiv

11 | 12 |

About hackathon

13 |

14 | The goal – to gather under the same roof the talented people, concerned about the future of Kyiv city. The mission of the Hackathon Project is development of the services and mobile applications on the basis of the open data and API of the city with purpose to improve the life of Kyiviens and to promote the development of Kyiv as “smart city”. 15 |

16 | 17 |

18 | Whom this event is meant for? 19 | 20 |

21 |
    22 |
  • 23 | the developers, ІТ professionals and designers, ready to join the development of services and mobile applications for the city; 24 |
  • 25 |
  • 26 | the representatives of the press; 27 |
  • 28 |
  • the non-governmental organisations, requiring the IT assistance or expertise to improve their own projects; 29 | 30 |
  • 31 | the ІТ companies, wishing to be the partners or sponsors of the event, as well as the companies, experienced in development and implementation of the Smart City projects and wishing to share their own experience; 32 |
  • 33 |
  • the volunteers and activists.
  • 34 |
35 | 36 | 37 |

38 | 39 | We have developed the interesting and highly topical program, and You may rest assured, that You will have fun with it. Particularly, within the scope of this event You will have the opportunity to: 40 | 41 |

42 |
    43 |
  • meet the ideologists of the Kyiv Smart City initiative; 44 |
  • 45 | develop the service or the mobile application of the basis of the open data, the API of the city or to realize Your own original idea; 46 |
  • 47 |
  • 48 | tell about Your idea, project or prototype and to hear the opinions of our experts; 49 |
  • 50 |
  • 51 | learn about the successful case stories of the Ukrainian cities, and of the most progressive cities of the world; 52 |
  • 53 |
  • have a lively time and to communicate with kindred spirits.
  • 54 | 55 |
56 | 57 |

What Kyiv needs?

58 |

EVERYTHIG, what may improve the everyday’s life of Kyiviens. It may be the guide for tourists, 59 | the schedule of the city transport, the map of the road works, the payment system for the 60 | municipal services, the monitoring system to control and supervise the work of the government 61 | officials and the municipal services, or the other smart solution, which will be really 62 | useful for city people.

63 | 64 |

Registration

65 |

66 | The participation in event is free, You just need to register. 67 | 68 |

69 |

70 | You can direct all Your questions at: info@devrain.com. 71 |

72 | -------------------------------------------------------------------------------- /DevRainSolutions.KyivSmartCity.New/Views/Manage/ManageLogins.cshtml: -------------------------------------------------------------------------------- 1 | @model DevRainSolutions.KyivSmartCity.New.Models.ManageLoginsViewModel 2 | @using Microsoft.Owin.Security 3 | @{ 4 | ViewBag.Title = "Manage your external logins"; 5 | } 6 | 7 |

@ViewBag.Title.

8 | 9 |

@ViewBag.StatusMessage

10 | @{ 11 | var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); 12 | if (loginProviders.Count() == 0) { 13 |
14 |

15 | There are no external authentication services configured. See this article 16 | for details on setting up this ASP.NET application to support logging in via external services. 17 |

18 |
19 | } 20 | else 21 | { 22 | if (Model.CurrentLogins.Count > 0) 23 | { 24 |

Registered Logins

25 | 26 | 27 | @foreach (var account in Model.CurrentLogins) 28 | { 29 | 30 | 31 | 49 | 50 | } 51 | 52 |
@account.LoginProvider 32 | @if (ViewBag.ShowRemoveButton) 33 | { 34 | using (Html.BeginForm("RemoveLogin", "Manage")) 35 | { 36 | @Html.AntiForgeryToken() 37 |
38 | @Html.Hidden("loginProvider", account.LoginProvider) 39 | @Html.Hidden("providerKey", account.ProviderKey) 40 | 41 |
42 | } 43 | } 44 | else 45 | { 46 | @:   47 | } 48 |
53 | } 54 | if (Model.OtherLogins.Count > 0) 55 | { 56 | using (Html.BeginForm("LinkLogin", "Manage")) 57 | { 58 | @Html.AntiForgeryToken() 59 |
60 |

61 | @foreach (AuthenticationDescription p in Model.OtherLogins) 62 | { 63 | 64 | } 65 |

66 |
67 | } 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /NotFoundMvc/NotFoundViewResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | 5 | namespace NotFoundMvc 6 | { 7 | /// 8 | /// Renders a view called "NotFound" and sets the response status code to 404. 9 | /// View data is assigned for "RequestedUrl" and "ReferrerUrl". 10 | /// 11 | public class NotFoundViewResult : HttpNotFoundResult 12 | { 13 | public NotFoundViewResult() 14 | { 15 | ViewName = "NotFound"; 16 | ViewData = new ViewDataDictionary(); 17 | } 18 | 19 | /// 20 | /// The name of the view to render. Defaults to "NotFound". 21 | /// 22 | public string ViewName { get; set; } 23 | 24 | /// 25 | /// The view data passed to the NotFound view. 26 | /// 27 | public ViewDataDictionary ViewData { get; set; } 28 | 29 | public override void ExecuteResult(ControllerContext context) 30 | { 31 | var response = context.HttpContext.Response; 32 | var request = context.HttpContext.Request; 33 | 34 | ViewData["RequestedUrl"] = GetRequestedUrl(request); 35 | ViewData["ReferrerUrl"] = GetReferrerUrl(request, request.Url.OriginalString); 36 | 37 | response.StatusCode = 404; 38 | // Prevent IIS7 from overwriting our error page! 39 | response.TrySkipIisCustomErrors = true; 40 | 41 | var viewResult = new ViewResult 42 | { 43 | ViewName = ViewName, 44 | ViewData = ViewData 45 | }; 46 | response.Clear(); 47 | viewResult.ExecuteResult(context); 48 | } 49 | 50 | string GetRequestedUrl(HttpRequestBase request) 51 | { 52 | return request.AppRelativeCurrentExecutionFilePath == "~/notfound" 53 | ? ExtractOriginalUrlFromExecuteUrlModeErrorRequest(request.Url) 54 | : request.Url.OriginalString; 55 | } 56 | 57 | string GetReferrerUrl(HttpRequestBase request, string url) 58 | { 59 | return request.UrlReferrer != null && request.UrlReferrer.OriginalString != url 60 | ? request.UrlReferrer.OriginalString 61 | : null; 62 | } 63 | 64 | /// 65 | /// Handles the case when a web.config <error statusCode="404" path="/notfound" responseMode="ExecuteURL" /> is triggered. 66 | /// The original URL is passed via the querystring. 67 | /// 68 | string ExtractOriginalUrlFromExecuteUrlModeErrorRequest(Uri url) 69 | { 70 | // Expected format is "?404;http://hostname.com/some/path" 71 | var start = url.Query.IndexOf(';'); 72 | if (0 <= start && start < url.Query.Length - 1) 73 | { 74 | return url.Query.Substring(start + 1); 75 | } 76 | else 77 | { 78 | // Unexpected format, so just return the full URL! 79 | return url.ToString(); 80 | } 81 | } 82 | } 83 | } --------------------------------------------------------------------------------