From 9f238cc47fd5b9ec546b37986371e73d6ed3c626 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 25 Mar 2017 15:59:50 -0400 Subject: Avatar system :smiley: --- Project-Unite/Views/Manage/Index.cshtml | 2 +- Project-Unite/Views/Manage/ListAvatars.cshtml | 22 ++++++++++++++++++++++ Project-Unite/Views/Manage/UploadAvatar.cshtml | 16 ++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Project-Unite/Views/Manage/ListAvatars.cshtml create mode 100644 Project-Unite/Views/Manage/UploadAvatar.cshtml (limited to 'Project-Unite/Views') diff --git a/Project-Unite/Views/Manage/Index.cshtml b/Project-Unite/Views/Manage/Index.cshtml index 45d097a..75204eb 100644 --- a/Project-Unite/Views/Manage/Index.cshtml +++ b/Project-Unite/Views/Manage/Index.cshtml @@ -27,7 +27,7 @@
- +
Full name:Full name: @using(Html.BeginForm("ChangeFullName", "Manage")) { diff --git a/Project-Unite/Views/Manage/ListAvatars.cshtml b/Project-Unite/Views/Manage/ListAvatars.cshtml new file mode 100644 index 0000000..d03ea88 --- /dev/null +++ b/Project-Unite/Views/Manage/ListAvatars.cshtml @@ -0,0 +1,22 @@ +@model IEnumerable + +@{ + ViewBag.Title = "Change avatar"; +} + +

Change avatar

+ +

You can choose a new avatar on this page - you can set an existing avatar that you've uploaded or upload a new one.

+ +
+
+ +
+ + @foreach(var avatar in Model.OrderByDescending(x=>x.UploadedAt)) + { +
+ +
+ } +
diff --git a/Project-Unite/Views/Manage/UploadAvatar.cshtml b/Project-Unite/Views/Manage/UploadAvatar.cshtml new file mode 100644 index 0000000..81e40c4 --- /dev/null +++ b/Project-Unite/Views/Manage/UploadAvatar.cshtml @@ -0,0 +1,16 @@ +@model Project_Unite.Models.UploadImageViewModel +@{ + ViewBag.Title = "Upload avatar"; +} + +

Upload an avatar

+ +

Let's put a face on your profile, shall we? Upload an image from your local computer and we'll display it as your avatar.

+ +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + @Html.ValidationSummary() +

File to upload: @Html.TextBoxFor(Model=>Model.Image, new { @class = "form-control", type = "file" })

+ +} \ No newline at end of file -- cgit v1.2.3