summaryrefslogtreecommitdiff
path: root/Project-Unite/Views/Blog/Index.cshtml
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-04-07 21:13:44 -0400
committerMichael <[email protected]>2017-04-07 21:13:44 -0400
commitb1e6d3dee9fa6519c65dd7564eac02b9e68bc3ce (patch)
treedbff9719e4e9985951127c65db2be28fc6a46605 /Project-Unite/Views/Blog/Index.cshtml
parent1de8bc4bd0af72646ed58ecd7619a8731c48b09d (diff)
downloadproject-unite-b1e6d3dee9fa6519c65dd7564eac02b9e68bc3ce.tar.gz
project-unite-b1e6d3dee9fa6519c65dd7564eac02b9e68bc3ce.tar.bz2
project-unite-b1e6d3dee9fa6519c65dd7564eac02b9e68bc3ce.zip
Developer blog
Diffstat (limited to 'Project-Unite/Views/Blog/Index.cshtml')
-rw-r--r--Project-Unite/Views/Blog/Index.cshtml27
1 files changed, 27 insertions, 0 deletions
diff --git a/Project-Unite/Views/Blog/Index.cshtml b/Project-Unite/Views/Blog/Index.cshtml
new file mode 100644
index 0000000..56af4ef
--- /dev/null
+++ b/Project-Unite/Views/Blog/Index.cshtml
@@ -0,0 +1,27 @@
+@model IEnumerable<Project_Unite.Models.BlogPost>
+@{
+ ViewBag.Title = "Blog";
+}
+
+<h2>Developer Blog</h2>
+
+<p>We ShiftOS devs have a lot going on. If you want to find out a bit more about what we do behind the scenes, this is the place for you. We'll post lots of things for you to read here.</p>
+
+@if(ACL.Granted(User.Identity.Name, "CanBlog"))
+{
+ <ul class="nav nav-pills">
+ <li><a href="@Url.Action("PostBlog")"><span class="glyphicon glyphicon-file"></span> Post</a></li>
+ </ul>
+}
+
+@foreach(var blog in Model)
+{
+ <div class="panel">
+ <div class="panel-body">
+ <h4>@blog.Name</h4>
+ <p>Posted by @Html.UserLink(blog.AuthorId) at @blog.PostedAt - @blog.Likes.Length likes, @blog.Dislikes.Length dislikes</p>
+ <p>@Html.Markdown(blog.Summary)</p>
+ @Html.ActionLink("Read more", "ViewBlog", "Blog", new { id = blog.Id }, new { @class = "btn btn-default" })
+ </div>
+ </div>
+} \ No newline at end of file