summaryrefslogtreecommitdiff
path: root/Project-Unite/Views
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-25 15:59:50 -0400
committerMichael <[email protected]>2017-03-25 15:59:50 -0400
commit9f238cc47fd5b9ec546b37986371e73d6ed3c626 (patch)
treee1d9175d58999ca99d5308c2b42749bab5806581 /Project-Unite/Views
parent84285d2ffb84f470ab7b09708075427ae31541f0 (diff)
downloadproject-unite-9f238cc47fd5b9ec546b37986371e73d6ed3c626.tar.gz
project-unite-9f238cc47fd5b9ec546b37986371e73d6ed3c626.tar.bz2
project-unite-9f238cc47fd5b9ec546b37986371e73d6ed3c626.zip
Avatar system :smiley:
Diffstat (limited to 'Project-Unite/Views')
-rw-r--r--Project-Unite/Views/Manage/Index.cshtml2
-rw-r--r--Project-Unite/Views/Manage/ListAvatars.cshtml22
-rw-r--r--Project-Unite/Views/Manage/UploadAvatar.cshtml16
3 files changed, 39 insertions, 1 deletions
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 @@
<div class="tab-pane active" id="t_profile">
<table class="table">
<tr>
- <td><strong>Full name:</strong></td>
+ <td style="width:35%;"><strong>Full name:</strong></td>
<td>
@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<Project_Unite.Models.Avatar>
+
+@{
+ ViewBag.Title = "Change avatar";
+}
+
+<h2>Change avatar</h2>
+
+<p>You can choose a new avatar on this page - you can set an existing avatar that you've uploaded or upload a new one.</p>
+
+<div class="row">
+ <div class="col-sm-2">
+ <a href="@Url.Action("UploadAvatar")" class="btn btn-default" style="width:128px;height:128px;"><span class="glyphicon glyphicon-plus"></span></a>
+ </div>
+
+ @foreach(var avatar in Model.OrderByDescending(x=>x.UploadedAt))
+ {
+ <div class="col-sm-2">
+ <a href="@Url.Action("SetAvatar", "Manage", new { id = avatar.Id })")"><img src="@avatar.AvatarUrl" width="128" height="128" /></a>
+ </div>
+ }
+</div>
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";
+}
+
+<h2>Upload an avatar</h2>
+
+<p>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.</p>
+
+@using (Html.BeginForm())
+{
+ @Html.AntiForgeryToken()
+ @Html.ValidationSummary()
+ <p><strong>File to upload: </strong>@Html.TextBoxFor(Model=>Model.Image, new { @class = "form-control", type = "file" })</p>
+ <input type="submit" class="form-control" value="Upload!" />
+} \ No newline at end of file