Merge branch 'Aaen-OUR-316'

This commit is contained in:
Sebastiaan Janssen
2015-10-30 11:24:10 +01:00
2 changed files with 59 additions and 9 deletions
@@ -53,6 +53,14 @@
}
}
.utility-actions.thread-bottom {
@media (min-width: $md) {
margin: 0 0 0 auto;
}
}
.container {
padding: 0;
@@ -67,7 +67,7 @@
{
var comm = comment;
Html.RenderPartial("forum/comment", comm, new ViewDataDictionary {{"level", 1}, {"answer", topic.Answer}});
Html.RenderPartial("forum/comment", comm, new ViewDataDictionary { { "level", 1 }, { "answer", topic.Answer } });
if (comm.HasChildren)
{
@@ -75,7 +75,7 @@
foreach (var child in children.Where(c => c.ParentCommentId == comm.Id))
{
Html.RenderPartial("forum/comment", child, new ViewDataDictionary {{"level", 2}, {"answer", topic.Answer}});
Html.RenderPartial("forum/comment", child, new ViewDataDictionary { { "level", 2 }, { "answer", topic.Answer } });
}
}
}
@@ -85,6 +85,48 @@
{
if (Model.Content.NewTopicsAllowed())
{
<div class="utilities">
<div class="utility-actions thread-bottom">
@if (Members.IsLoggedIn())
{
var mem = Members.GetCurrentMember();
var subscribed = false;
if (mem != null)
{
subscribed = NotificationsWeb.Library.Utils.IsSubscribedToForumTopic(topic.Id, mem.Id);
}
if (Members.IsAdmin())
{
<a href="#" class="delete-thread button" data-id="@topic.Id">
<i class="icon-Delete-key"></i><span>Delete thread</span>
</a>
}
if (subscribed)
{
<a href="#" class="follow button following" data-id="@topic.Id" data-controller="topic">
<i class="icon-Bookmark"></i><span>Following</span>
</a>
}
else
{
<a href="#" class="follow button transparent" data-id="@topic.Id" data-controller="topic">
<i class="icon-Bookmark"></i><span>Follow</span>
</a>
}
}
@if (topic.Answer > 0)
{
<a href="#comment-@topic.Answer.ToString()" class="go-to-solution button transparent">
<i class="icon-Check"></i><span>Go to solution</span>
</a>
}
</div>
</div>
<div class="replybutton">
<a href="#" class="button green large reply forum-reply" data-author="@topic.AuthorName" data-topic="@topic.Id" data-controller="comment">Reply to topic</a>
</div>
@@ -98,12 +140,12 @@
}
else
{
<div class="replybutton notloggedin">
Please <a href="/member/login?redirectUrl=@(Server.UrlEncode(Request.Url.AbsoluteUri))">Sign in</a> or <a href="/member/signup">register</a> to post replies
</div>
}
}
else
<div class="replybutton notloggedin">
Please <a href="/member/login?redirectUrl=@(Server.UrlEncode(Request.Url.AbsoluteUri))">Sign in</a> or <a href="/member/signup">register</a> to post replies
</div>
}
}
else
{
<p>This topic no longer exists.</p>
<p>This topic no longer exists.</p>
}