Feature #26: User Flags

Flags can be associated with Users. Includes minor updates to Job Queues
and improved visibility of user information.
This commit is contained in:
Gary Sharp
2014-06-10 17:16:24 +10:00
parent b64ac3b16f
commit 4c3a68da30
104 changed files with 8112 additions and 1623 deletions
+21
View File
@@ -22,6 +22,16 @@
@FriendlyDate(d, WithoutSuffix: WithoutSuffix);
@FriendlyUser(u, null, " by");
}
@helper FriendlyDateAndUser(DateTime? d, string UserId, string DateNullValue = "n/a", bool WithoutSuffix = false)
{
@FriendlyDate(d, DateNullValue, WithoutSuffix: WithoutSuffix);
@FriendlyUser(UserId, null, " by");
}
@helper FriendlyDateAndUser(DateTime d, string UserId, bool WithoutSuffix = false)
{
@FriendlyDate(d, WithoutSuffix: WithoutSuffix);
@FriendlyUser(UserId, null, " by");
}
@helper FriendlyDateAndTitleUser(DateTime? d, User u, string DateNullValue = "n/a", bool WithoutSuffix = false)
{
<span title="@d.ToFullDateTime(DateNullValue) by @u" data-livestamp="@d.ToUnixEpoc()" class="date nowrap@(WithoutSuffix ? " noMomentSuffix" : null)">@d.ToFullDateTime(DateNullValue)</span>
@@ -41,6 +51,17 @@
<span>@nullValue</span>
}
}
@helper FriendlyUser(string UserId, string nullValue = null, string prepend = null)
{
if (UserId != null)
{
@prepend <span>@Disco.Services.UserExtensions.FriendlyUserId(UserId)</span>
}
else
{
<span>@nullValue</span>
}
}
@helper RadioButtonList(string id, List<System.Web.Mvc.SelectListItem> items, int columns = 1)