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:
@@ -0,0 +1,114 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Users.UserFlags;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public partial class UserFlagAssignmentController : AuthorizedDatabaseController
|
||||
{
|
||||
const string pComments = "comments";
|
||||
|
||||
public virtual ActionResult Update(int id, string key, string value = null, Nullable<bool> redirect = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (id < 0)
|
||||
throw new ArgumentOutOfRangeException("id");
|
||||
if (string.IsNullOrEmpty(key))
|
||||
throw new ArgumentNullException("key");
|
||||
var userFlagAssignment = Database.UserFlagAssignments.FirstOrDefault(a => a.Id == id);
|
||||
if (userFlagAssignment != null)
|
||||
{
|
||||
switch (key.ToLower())
|
||||
{
|
||||
case pComments:
|
||||
UpdateComments(userFlagAssignment, value);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Invalid Update Key");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("Invalid User Flag Assignment Id");
|
||||
}
|
||||
if (redirect.HasValue && redirect.Value)
|
||||
return Redirect(string.Format("{0}#UserDetailTab-Flags", Url.Action(MVC.User.Show(userFlagAssignment.UserId))));
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect.HasValue && redirect.Value)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
|
||||
#region Update Shortcut Methods
|
||||
[DiscoAuthorizeAny(Claims.User.Actions.EditFlags)]
|
||||
public virtual ActionResult UpdateComments(int id, string Comments = null, Nullable<bool> redirect = null)
|
||||
{
|
||||
return Update(id, pComments, Comments, redirect);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Properties
|
||||
private void UpdateComments(UserFlagAssignment userFlagAssignment, string Comments)
|
||||
{
|
||||
if (!userFlagAssignment.CanEditComments())
|
||||
throw new InvalidOperationException("Editing comments for user flags is denied");
|
||||
|
||||
userFlagAssignment.OnEditComments(Comments);
|
||||
Database.SaveChanges();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Actions
|
||||
|
||||
[DiscoAuthorizeAny(Claims.User.Actions.AddFlags)]
|
||||
public virtual ActionResult AddUser(int id, string UserId, string Comments)
|
||||
{
|
||||
var userFlag = UserFlagService.GetUserFlag(id);
|
||||
if (userFlag == null)
|
||||
throw new ArgumentException("Invalid User Flag Id", "id");
|
||||
|
||||
var user = Database.Users.Include("UserFlagAssignments").FirstOrDefault(u => u.UserId == UserId);
|
||||
if (user == null)
|
||||
throw new ArgumentException("Invalid User Id", "UserId");
|
||||
|
||||
if (!user.CanAddUserFlag(userFlag))
|
||||
throw new InvalidOperationException("Adding user flag is denied");
|
||||
|
||||
var userFlagAssignment = user.OnAddUserFlag(Database, userFlag, CurrentUser, Comments);
|
||||
Database.SaveChanges();
|
||||
|
||||
return Redirect(string.Format("{0}#UserDetailTab-Flags", Url.Action(MVC.User.Show(user.UserId))));
|
||||
}
|
||||
|
||||
[DiscoAuthorizeAny(Claims.User.Actions.RemoveFlags)]
|
||||
public virtual ActionResult RemoveUser(int id)
|
||||
{
|
||||
var userFlagAssignment = Database.UserFlagAssignments.FirstOrDefault(a => a.Id == id);
|
||||
if (userFlagAssignment == null)
|
||||
throw new ArgumentException("Invalid User Flag Assignment Id", "id");
|
||||
|
||||
if (!userFlagAssignment.CanRemove())
|
||||
throw new InvalidOperationException("Removing user flag assignment is denied");
|
||||
|
||||
userFlagAssignment.OnRemove(CurrentUser);
|
||||
Database.SaveChanges();
|
||||
|
||||
return Redirect(string.Format("{0}#UserDetailTab-Flags", Url.Action(MVC.User.Show(userFlagAssignment.UserId))));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Users.UserFlags;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public partial class UserFlagController : AuthorizedDatabaseController
|
||||
{
|
||||
const string pName = "name";
|
||||
const string pDescription = "description";
|
||||
const string pIcon = "icon";
|
||||
const string pIconColour = "iconcolour";
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult Update(int id, string key, string value = null, Nullable<bool> redirect = null)
|
||||
{
|
||||
Authorization.Require(Claims.Config.UserFlag.Configure);
|
||||
|
||||
try
|
||||
{
|
||||
if (id < 0)
|
||||
throw new ArgumentOutOfRangeException("id");
|
||||
if (string.IsNullOrEmpty(key))
|
||||
throw new ArgumentNullException("key");
|
||||
var flag = Database.UserFlags.Find(id);
|
||||
if (flag != null)
|
||||
{
|
||||
switch (key.ToLower())
|
||||
{
|
||||
case pName:
|
||||
UpdateName(flag, value);
|
||||
break;
|
||||
case pDescription:
|
||||
UpdateDescription(flag, value);
|
||||
break;
|
||||
case pIcon:
|
||||
UpdateIcon(flag, value);
|
||||
break;
|
||||
case pIconColour:
|
||||
UpdateIconColour(flag, value);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Invalid Update Key");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("Invalid User Flag Id");
|
||||
}
|
||||
if (redirect.HasValue && redirect.Value)
|
||||
return RedirectToAction(MVC.Config.UserFlag.Index(flag.Id));
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect.HasValue && redirect.Value)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
|
||||
#region Update Shortcut Methods
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateName(int id, string FlagName = null, Nullable<bool> redirect = null)
|
||||
{
|
||||
return Update(id, pName, FlagName, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateDescription(int id, string Description = null, Nullable<bool> redirect = null)
|
||||
{
|
||||
return Update(id, pDescription, Description, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateIcon(int id, string Icon = null, Nullable<bool> redirect = null)
|
||||
{
|
||||
return Update(id, pIcon, Icon, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateIconColour(int id, string IconColour = null, Nullable<bool> redirect = null)
|
||||
{
|
||||
return Update(id, pIconColour, IconColour, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateIconAndColour(int id, string Icon = null, string IconColour = null, bool redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (id < 0)
|
||||
throw new ArgumentOutOfRangeException("id");
|
||||
|
||||
var UserFlag = Database.UserFlags.Find(id);
|
||||
if (UserFlag != null)
|
||||
{
|
||||
UpdateIconAndColour(UserFlag, Icon, IconColour);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json("Invalid User Flag Id", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
if (redirect)
|
||||
return RedirectToAction(MVC.Config.UserFlag.Index(UserFlag.Id));
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Update Properties
|
||||
private void UpdateIconAndColour(UserFlag UserFlag, string Icon, string IconColour)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Icon))
|
||||
throw new ArgumentNullException("Icon");
|
||||
if (string.IsNullOrWhiteSpace(IconColour))
|
||||
throw new ArgumentNullException("IconColour");
|
||||
|
||||
UserFlag.Icon = Icon;
|
||||
UserFlag.IconColour = IconColour;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
}
|
||||
private void UpdateIcon(UserFlag UserFlag, string Icon)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Icon))
|
||||
throw new ArgumentNullException("Icon");
|
||||
|
||||
UserFlag.Icon = Icon;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
}
|
||||
private void UpdateIconColour(UserFlag UserFlag, string IconColour)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(IconColour))
|
||||
throw new ArgumentNullException("IconColour");
|
||||
|
||||
UserFlag.IconColour = IconColour;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
}
|
||||
|
||||
private void UpdateName(UserFlag UserFlag, string Name)
|
||||
{
|
||||
UserFlag.Name = Name;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
}
|
||||
|
||||
private void UpdateDescription(UserFlag UserFlag, string Description)
|
||||
{
|
||||
UserFlag.Description = Description;
|
||||
UserFlagService.Update(Database, UserFlag);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Actions
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Delete)]
|
||||
public virtual ActionResult Delete(int id, Nullable<bool> redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
var jq = Database.UserFlags.Find(id);
|
||||
if (jq != null)
|
||||
{
|
||||
|
||||
var status = UserFlagDeleteTask.ScheduleNow(id);
|
||||
status.SetFinishedUrl(Url.Action(MVC.Config.UserFlag.Index(null)));
|
||||
|
||||
if (redirect.HasValue && redirect.Value)
|
||||
return RedirectToAction(MVC.Config.Logging.TaskStatus(status.SessionId));
|
||||
else
|
||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
throw new Exception("Invalid User Flag Id");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (redirect.HasValue && redirect.Value)
|
||||
throw;
|
||||
else
|
||||
return Json(string.Format("Error: {0}", ex.Message), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ namespace Disco.Web.Areas.API.Models.Job
|
||||
public string Author { get; set; }
|
||||
public DateTime Timestamp { get; set; }
|
||||
public string Comments { get; set; }
|
||||
public string HtmlComments { get; set; }
|
||||
public long TimestampUnixEpoc { get { return this.Timestamp.ToUnixEpoc(); } }
|
||||
public string TimestampFull { get { return Timestamp.ToFullDateTime(); } }
|
||||
|
||||
@@ -27,7 +28,8 @@ namespace Disco.Web.Areas.API.Models.Job
|
||||
AuthorId = jl.TechUserId,
|
||||
Author = jl.TechUser.ToString(),
|
||||
Timestamp = jl.Timestamp,
|
||||
Comments = jl.Comments
|
||||
Comments = jl.Comments,
|
||||
HtmlComments = jl.Comments.ToHtmlComment().ToString()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -114,6 +114,16 @@ namespace Disco.Web.Areas.Config
|
||||
"Config/JobQueue/{id}",
|
||||
new { controller = "JobQueue", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_UserFlag_Create",
|
||||
"Config/UserFlag/Create",
|
||||
new { controller = "UserFlag", action = "Create", id = UrlParameter.Optional }
|
||||
);
|
||||
context.MapRoute(
|
||||
"Config_UserFlag",
|
||||
"Config/UserFlag/{id}",
|
||||
new { controller = "UserFlag", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
|
||||
context.MapRoute(
|
||||
"Config_Plugins",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Disco.Models.Services.Jobs.JobQueues;
|
||||
using Disco.Models.UI.Config.JobQueue;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Extensions;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using Disco.Services.Jobs.JobQueues;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
@@ -50,6 +51,8 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
if (Authorization.Has(Claims.Config.JobQueue.Configure))
|
||||
{
|
||||
m.JobTypes = Database.JobTypes.Include("JobSubTypes").ToList();
|
||||
m.Icons = UIHelpers.Icons;
|
||||
m.ThemeColours = UIHelpers.ThemeColours;
|
||||
}
|
||||
|
||||
// UI Extensions
|
||||
@@ -83,8 +86,8 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
JobQueue = new Disco.Models.Repository.JobQueue()
|
||||
{
|
||||
Icon = JobQueueService.RandomIcon(),
|
||||
IconColour = JobQueueService.RandomIconColour(),
|
||||
Icon = JobQueueService.RandomUnusedIcon(),
|
||||
IconColour = JobQueueService.RandomUnusedThemeColour(),
|
||||
Priority = JobQueuePriority.Normal
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.UI.Config.UserFlag;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Extensions;
|
||||
using Disco.Services.Plugins.Features.UIExtension;
|
||||
using Disco.Services.Users.UserFlags;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
public partial class UserFlagController : AuthorizedDatabaseController
|
||||
{
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Show)]
|
||||
public virtual ActionResult Index(int? id)
|
||||
{
|
||||
if (id.HasValue)
|
||||
{
|
||||
// Show
|
||||
var m = Database.UserFlags.Where(f => f.Id == id.Value).Select(f =>
|
||||
new Models.UserFlag.ShowModel()
|
||||
{
|
||||
UserFlag = f,
|
||||
CurrentAssignmentCount = f.UserFlagAssignments.Count(a => !a.RemovedDate.HasValue),
|
||||
TotalAssignmentCount = f.UserFlagAssignments.Count()
|
||||
}).FirstOrDefault();
|
||||
|
||||
if (m == null)
|
||||
throw new ArgumentException("Invalid User Flag Id");
|
||||
|
||||
if (Authorization.Has(Claims.Config.UserFlag.Configure))
|
||||
{
|
||||
m.Icons = UIHelpers.Icons;
|
||||
m.ThemeColours = UIHelpers.ThemeColours;
|
||||
}
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigUserFlagShowModel>(this.ControllerContext, m);
|
||||
|
||||
return View(MVC.Config.UserFlag.Views.Show, m);
|
||||
}
|
||||
else
|
||||
{
|
||||
// List Index
|
||||
var m = new Models.UserFlag.IndexModel()
|
||||
{
|
||||
UserFlags = Database.UserFlags.OrderBy(f => f.Name).ToList()
|
||||
};
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigUserFlagIndexModel>(this.ControllerContext, m);
|
||||
|
||||
return View(m);
|
||||
}
|
||||
}
|
||||
|
||||
[DiscoAuthorizeAll(Claims.Config.UserFlag.Create, Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult Create()
|
||||
{
|
||||
// Default Queue
|
||||
var m = new Models.UserFlag.CreateModel()
|
||||
{
|
||||
UserFlag = new UserFlag()
|
||||
{
|
||||
Icon = UserFlagService.RandomUnusedIcon(),
|
||||
IconColour = UserFlagService.RandomUnusedThemeColour()
|
||||
}
|
||||
};
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigUserFlagCreateModel>(this.ControllerContext, m);
|
||||
|
||||
return View(m);
|
||||
}
|
||||
|
||||
[DiscoAuthorizeAll(Claims.Config.UserFlag.Create, Claims.Config.UserFlag.Configure), HttpPost]
|
||||
public virtual ActionResult Create(Models.UserFlag.CreateModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
// Check for Existing
|
||||
var existing = Database.UserFlags.Where(m => m.Name == model.UserFlag.Name).FirstOrDefault();
|
||||
if (existing == null)
|
||||
{
|
||||
var flag = UserFlagService.CreateUserFlag(Database, model.UserFlag);
|
||||
|
||||
return RedirectToAction(MVC.Config.UserFlag.Index(flag.Id));
|
||||
}
|
||||
else
|
||||
{
|
||||
ModelState.AddModelError("Name", "A User Flag with this name already exists.");
|
||||
}
|
||||
}
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigUserFlagCreateModel>(this.ControllerContext, model);
|
||||
|
||||
return View(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,9 @@ namespace Disco.Web.Areas.Config.Models.JobQueue
|
||||
public int OpenJobCount { get; set; }
|
||||
public int TotalJobCount { get; set; }
|
||||
|
||||
public IEnumerable<KeyValuePair<string, string>> Icons { get; set; }
|
||||
public IEnumerable<KeyValuePair<string, string>> ThemeColours { get; set; }
|
||||
|
||||
public List<Disco.Models.Repository.JobType> JobTypes { get; set; }
|
||||
|
||||
public bool CanDelete { get; set; }
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
using Disco.Models.UI.Config.UserFlag;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.UserFlag
|
||||
{
|
||||
public class CreateModel : ConfigUserFlagCreateModel
|
||||
{
|
||||
public Disco.Models.Repository.UserFlag UserFlag { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Disco.Models.UI.Config.UserFlag;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.UserFlag
|
||||
{
|
||||
public class IndexModel : ConfigUserFlagIndexModel
|
||||
{
|
||||
public List<Disco.Models.Repository.UserFlag> UserFlags { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using Disco.Models.UI.Config.UserFlag;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.UserFlag
|
||||
{
|
||||
public class ShowModel : ConfigUserFlagShowModel
|
||||
{
|
||||
public Disco.Models.Repository.UserFlag UserFlag { get; set; }
|
||||
|
||||
public int CurrentAssignmentCount { get; set; }
|
||||
public int TotalAssignmentCount { get; set; }
|
||||
|
||||
public IEnumerable<KeyValuePair<string, string>> Icons { get; set; }
|
||||
public IEnumerable<KeyValuePair<string, string>> ThemeColours { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,9 @@
|
||||
}
|
||||
<table id="pageMenu">
|
||||
<tr>
|
||||
@if (Authorization.HasAny(Claims.Config.System.Show, Claims.Config.Organisation.Show, Claims.DiscoAdminAccount, Claims.Config.Logging.Show))
|
||||
{
|
||||
<td>
|
||||
<td>
|
||||
@if (Authorization.HasAny(Claims.Config.System.Show, Claims.Config.Organisation.Show, Claims.DiscoAdminAccount, Claims.Config.Logging.Show, Claims.Config.Plugin.Show))
|
||||
{
|
||||
<div class="pageMenuArea">
|
||||
<h2>Hosting</h2>
|
||||
@if (Authorization.Has(Claims.Config.System.Show))
|
||||
@@ -24,6 +24,13 @@
|
||||
Update the Organisation Name, Logo and Addresses associated with this organisation.
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Config.Plugin.Show))
|
||||
{
|
||||
<i class="fa fa-cog"></i>@Html.ActionLinkClass("Plugins", MVC.Config.Plugins.Index(), "config")
|
||||
<div class="pageMenuBlurb">
|
||||
Manage extensions to the Disco platform.
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.Has(Claims.DiscoAdminAccount))
|
||||
{
|
||||
<i class="fa fa-cog"></i>@Html.ActionLinkClass("Authorization Roles", MVC.Config.AuthorizationRole.Index(), "config")
|
||||
@@ -39,8 +46,8 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
@if (Authorization.HasAny(Claims.Config.DeviceModel.Show, Claims.Config.DeviceBatch.Show, Claims.Config.DeviceProfile.Show, Claims.Config.Enrolment.Show))
|
||||
{
|
||||
<td>
|
||||
@@ -78,7 +85,7 @@
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
@if (Authorization.HasAny(Claims.Config.JobPreferences.Show, Claims.Config.JobQueue.Show, Claims.Config.DocumentTemplate.Show, Claims.Config.Plugin.Show))
|
||||
@if (Authorization.HasAny(Claims.Config.JobPreferences.Show, Claims.Config.JobQueue.Show, Claims.Config.UserFlag.Show, Claims.Config.DocumentTemplate.Show))
|
||||
{
|
||||
<td>
|
||||
@if (Authorization.HasAny(Claims.Config.JobPreferences.Show, Claims.Config.JobQueue.Show))
|
||||
@@ -101,10 +108,22 @@
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Authorization.HasAny(Claims.Config.DocumentTemplate.Show, Claims.Config.Plugin.Show))
|
||||
@if (Authorization.HasAny(Claims.Config.UserFlag.Show))
|
||||
{
|
||||
<div class="pageMenuArea">
|
||||
<div class="pageMenuArea noSeperator">
|
||||
<h2>Users</h2>
|
||||
@if (Authorization.Has(Claims.Config.UserFlag.Show))
|
||||
{
|
||||
<i class="fa fa-cog"></i>@Html.ActionLinkClass("User Flags", MVC.Config.UserFlag.Index(), "config")
|
||||
<div class="pageMenuBlurb">
|
||||
Create and manage user flags.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.HasAny(Claims.Config.DocumentTemplate.Show))
|
||||
{
|
||||
<div class="pageMenuArea noSeperator">
|
||||
<h2>Features</h2>
|
||||
@if (Authorization.Has(Claims.Config.DocumentTemplate.Show))
|
||||
{
|
||||
@@ -114,13 +133,6 @@
|
||||
and Users.
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Config.Plugin.Show))
|
||||
{
|
||||
<i class="fa fa-cog"></i>@Html.ActionLinkClass("Plugins", MVC.Config.Plugins.Index(), "config")
|
||||
<div class="pageMenuBlurb">
|
||||
Manage extensions to the Disco platform.
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
|
||||
@@ -57,23 +57,23 @@ WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" id=\"pageMenu\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n");
|
||||
WriteLiteral(">\r\n <tr>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 8 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
#line 9 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.System.Show, Claims.Config.Organisation.Show, Claims.DiscoAdminAccount, Claims.Config.Logging.Show))
|
||||
{
|
||||
#line 9 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.System.Show, Claims.Config.Organisation.Show, Claims.DiscoAdminAccount, Claims.Config.Logging.Show, Claims.Config.Plugin.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n <div");
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"pageMenuArea\"");
|
||||
|
||||
@@ -187,6 +187,56 @@ WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.Plugin.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-cog\"");
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Plugins", MVC.Config.Plugins.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"pageMenuBlurb\"");
|
||||
|
||||
WriteLiteral(">\r\n Manage extensions to the Disco platform.\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.DiscoAdminAccount))
|
||||
{
|
||||
|
||||
@@ -200,20 +250,20 @@ WriteLiteral(" class=\"fa fa-cog\"");
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Authorization Roles", MVC.Config.AuthorizationRole.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -227,7 +277,7 @@ WriteLiteral(">\r\n Configure roles and permissions f
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 40 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -236,7 +286,7 @@ WriteLiteral(">\r\n Configure roles and permissions f
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 41 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.Logging.Show))
|
||||
{
|
||||
|
||||
@@ -250,20 +300,20 @@ WriteLiteral(" class=\"fa fa-cog\"");
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 43 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 43 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Logging", MVC.Config.Logging.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 43 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -277,25 +327,31 @@ WriteLiteral(">\r\n Export Log files from various Dis
|
||||
"ew Live Logging.\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 47 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n </td>\r\n");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
#line 49 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 44 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 51 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.DeviceModel.Show, Claims.Config.DeviceBatch.Show, Claims.Config.DeviceProfile.Show, Claims.Config.Enrolment.Show))
|
||||
{
|
||||
|
||||
@@ -309,13 +365,13 @@ WriteLiteral(" class=\"pageMenuArea\"");
|
||||
WriteLiteral(">\r\n <h2>Devices</h2>\r\n");
|
||||
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 56 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 56 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.DeviceModel.Show))
|
||||
{
|
||||
|
||||
@@ -329,20 +385,20 @@ WriteLiteral(" class=\"fa fa-cog\"");
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 58 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 58 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Models", MVC.Config.DeviceModel.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 58 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -356,7 +412,7 @@ WriteLiteral(">\r\n Configure Components, Product Ima
|
||||
"ettings for Device Models.\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 55 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 62 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -365,7 +421,7 @@ WriteLiteral(">\r\n Configure Components, Product Ima
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 63 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.DeviceBatch.Show))
|
||||
{
|
||||
|
||||
@@ -379,20 +435,20 @@ WriteLiteral(" class=\"fa fa-cog\"");
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 65 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 65 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Batches", MVC.Config.DeviceBatch.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 65 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -406,7 +462,7 @@ WriteLiteral(">\r\n Create and Configure Device Batch
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 62 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 69 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -415,7 +471,7 @@ WriteLiteral(">\r\n Create and Configure Device Batch
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 63 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 70 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.DeviceProfile.Show))
|
||||
{
|
||||
|
||||
@@ -429,20 +485,20 @@ WriteLiteral(" class=\"fa fa-cog\"");
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 65 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 72 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 65 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 72 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Profiles", MVC.Config.DeviceProfile.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 65 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 72 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -457,7 +513,7 @@ WriteLiteral(">\r\n Configure Device Profiles includi
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 70 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 77 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -466,7 +522,7 @@ WriteLiteral(">\r\n Configure Device Profiles includi
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 78 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.Enrolment.Show))
|
||||
{
|
||||
|
||||
@@ -480,20 +536,20 @@ WriteLiteral(" class=\"fa fa-cog\"");
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 80 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 80 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Enrolment", MVC.Config.Enrolment.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 80 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -507,7 +563,7 @@ WriteLiteral(">\r\n Configure Enrolment settings incl
|
||||
"entials.\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 84 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -516,7 +572,7 @@ WriteLiteral(">\r\n Configure Enrolment settings incl
|
||||
WriteLiteral(" </div>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 80 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 87 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -525,8 +581,8 @@ WriteLiteral(" </div>\r\n </td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 81 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.JobPreferences.Show, Claims.Config.JobQueue.Show, Claims.Config.DocumentTemplate.Show, Claims.Config.Plugin.Show))
|
||||
#line 88 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.JobPreferences.Show, Claims.Config.JobQueue.Show, Claims.Config.UserFlag.Show, Claims.Config.DocumentTemplate.Show))
|
||||
{
|
||||
|
||||
|
||||
@@ -535,13 +591,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
|
||||
#line 84 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 91 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 84 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 91 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.JobPreferences.Show, Claims.Config.JobQueue.Show))
|
||||
{
|
||||
|
||||
@@ -555,13 +611,13 @@ WriteLiteral(" class=\"pageMenuArea noSeperator\"");
|
||||
WriteLiteral(">\r\n <h2>Jobs</h2>\r\n");
|
||||
|
||||
|
||||
#line 88 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 95 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 95 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.JobPreferences.Show))
|
||||
{
|
||||
|
||||
@@ -575,20 +631,20 @@ WriteLiteral(" class=\"fa fa-cog\"");
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 90 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 97 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 90 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 97 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("General Preferences", MVC.Config.JobPreferences.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 90 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 97 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -602,7 +658,7 @@ WriteLiteral(">\r\n Configure general preferences
|
||||
"\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 94 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 101 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -611,7 +667,7 @@ WriteLiteral(">\r\n Configure general preferences
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 95 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 102 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.JobQueue.Show))
|
||||
{
|
||||
|
||||
@@ -625,20 +681,20 @@ WriteLiteral(" class=\"fa fa-cog\"");
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 97 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 104 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 97 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 104 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Job Queues", MVC.Config.JobQueue.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 97 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 104 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -652,7 +708,7 @@ WriteLiteral(">\r\n Create and manage job queues
|
||||
"ies and queue members.\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 101 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 108 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -661,23 +717,17 @@ WriteLiteral(">\r\n Create and manage job queues
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 103 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 110 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 105 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 105 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.DocumentTemplate.Show, Claims.Config.Plugin.Show))
|
||||
#line 111 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.UserFlag.Show))
|
||||
{
|
||||
|
||||
|
||||
@@ -685,18 +735,97 @@ WriteLiteral("\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"pageMenuArea\"");
|
||||
WriteLiteral(" class=\"pageMenuArea noSeperator\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Features</h2>\r\n");
|
||||
WriteLiteral(">\r\n <h2>Users</h2>\r\n");
|
||||
|
||||
|
||||
#line 109 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 115 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 109 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 115 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.UserFlag.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-cog\"");
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 117 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 117 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("User Flags", MVC.Config.UserFlag.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 117 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"pageMenuBlurb\"");
|
||||
|
||||
WriteLiteral(">\r\n Create and manage user flags.\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 121 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 123 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 124 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.DocumentTemplate.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"pageMenuArea noSeperator\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Features</h2>\r\n");
|
||||
|
||||
|
||||
#line 128 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 128 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.DocumentTemplate.Show))
|
||||
{
|
||||
|
||||
@@ -710,20 +839,20 @@ WriteLiteral(" class=\"fa fa-cog\"");
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 111 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 130 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 111 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 130 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Document Templates", MVC.Config.DocumentTemplate.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 111 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 130 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -738,57 +867,7 @@ WriteLiteral(">\r\n Create, Update and Bulk Gener
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 116 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 117 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.Plugin.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-cog\"");
|
||||
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 119 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 119 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Html.ActionLinkClass("Plugins", MVC.Config.Plugins.Index(), "config"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 119 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"pageMenuBlurb\"");
|
||||
|
||||
WriteLiteral(">\r\n Manage extensions to the Disco platform.\r\n " +
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 123 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 135 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -797,7 +876,7 @@ WriteLiteral(">\r\n Manage extensions to the Disc
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 125 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 137 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -806,7 +885,7 @@ WriteLiteral(" </div>\r\n");
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 127 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 139 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -815,7 +894,7 @@ WriteLiteral(" </td>\r\n");
|
||||
WriteLiteral(" </tr>\r\n</table>\r\n");
|
||||
|
||||
|
||||
#line 130 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 142 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
if (Model.UpdateAvailable)
|
||||
{
|
||||
@@ -833,14 +912,14 @@ WriteLiteral(" class=\"fa fa-cloud-download info\"");
|
||||
|
||||
WriteLiteral("></i>\r\n <div>An updated version of Disco is available</div>\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 7166), Tuple.Create("\"", 7202)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 7810), Tuple.Create("\"", 7846)
|
||||
|
||||
#line 136 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7173), Tuple.Create<System.Object, System.Int32>(Model.UpdateResponse.UrlLink
|
||||
#line 148 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7817), Tuple.Create<System.Object, System.Int32>(Model.UpdateResponse.UrlLink
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7173), false)
|
||||
, 7817), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"button small alert\"");
|
||||
@@ -850,7 +929,7 @@ WriteLiteral(" target=\"_blank\"");
|
||||
WriteLiteral(">Download v");
|
||||
|
||||
|
||||
#line 136 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 148 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
Write(Model.UpdateResponse.Version);
|
||||
|
||||
|
||||
@@ -867,13 +946,13 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 144 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 156 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 144 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 156 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
|
||||
if (Model.UpdateResponse.VersionReleasedTimestamp < DateTime.Now.AddDays(-14))
|
||||
{
|
||||
@@ -889,7 +968,7 @@ WriteLiteral("\r\n updateAvailableContainer.effect(\"shake\", { t
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 150 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 162 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -898,7 +977,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral("\r\n });\r\n })();\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 155 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
#line 167 "..\..\Areas\Config\Views\Config\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -665,9 +665,9 @@
|
||||
{
|
||||
@Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Batch, Model.DeviceBatch.Id))
|
||||
}
|
||||
if (Authorization.Has(Claims.Device.Search))
|
||||
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
@Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch"))
|
||||
@Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch"))
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -2025,7 +2025,7 @@ WriteLiteral(" ");
|
||||
#line 666 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
||||
|
||||
}
|
||||
if (Authorization.Has(Claims.Device.Search))
|
||||
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
|
||||
|
||||
@@ -2033,21 +2033,21 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
|
||||
#line 670 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch")));
|
||||
Write(Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceBatch.Id.ToString(), "DeviceBatch")));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 670 "..\..\Areas\Config\Views\DeviceBatch\Show.cshtml"
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
WriteLiteral("</div>");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,9 +252,9 @@
|
||||
{
|
||||
@Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Model, Model.DeviceModel.Id))
|
||||
}
|
||||
if (Authorization.Has(Claims.Device.Search))
|
||||
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
@Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel"))
|
||||
@Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel"))
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -732,7 +732,7 @@ WriteLiteral(" ");
|
||||
#line 253 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
|
||||
|
||||
}
|
||||
if (Authorization.Has(Claims.Device.Search))
|
||||
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
|
||||
|
||||
@@ -740,14 +740,14 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
|
||||
#line 257 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel")));
|
||||
Write(Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceModel.Id.ToString(), "DeviceModel")));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 257 "..\..\Areas\Config\Views\DeviceModel\Show.cshtml"
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -737,8 +737,8 @@
|
||||
{
|
||||
@Html.ActionLinkButton("Export Devices", MVC.Device.Export(null, Disco.Models.Services.Devices.Exporting.DeviceExportTypes.Profile, Model.DeviceProfile.Id))
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.Search))
|
||||
@if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
@Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile"))
|
||||
@Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile"))
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -2049,7 +2049,7 @@ WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 740 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Search))
|
||||
if (Authorization.Has(Claims.Device.Search) && Model.DeviceCount > 0)
|
||||
{
|
||||
|
||||
|
||||
@@ -2057,14 +2057,14 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
|
||||
#line 742 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("View Devices", MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile")));
|
||||
Write(Html.ActionLinkButton(string.Format("View {0} Device{1}", Model.DeviceCount, (Model.DeviceCount != 1 ? "s" : null)), MVC.Search.Query(Model.DeviceProfile.Id.ToString(), "DeviceProfile")));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 742 "..\..\Areas\Config\Views\DeviceProfile\Show.cshtml"
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -97,13 +97,13 @@
|
||||
<div id="Config_JobQueues_Icon_Update_Dialog" class="dialog" title="Job Queue Icon">
|
||||
<div>
|
||||
<div class="icons">
|
||||
@foreach (var icon in JobQueueService.Icons)
|
||||
@foreach (var icon in Model.Icons)
|
||||
{
|
||||
<i data-icon="@(icon.Key)" class="fa fa-@(icon.Key)" title="@icon.Value"></i>
|
||||
}
|
||||
</div>
|
||||
<div class="colours">
|
||||
@foreach (var colour in JobQueueService.IconColours)
|
||||
@foreach (var colour in Model.ThemeColours)
|
||||
{
|
||||
<i data-colour="@(colour.Key)" class="fa fa-square d-@(colour.Key)" title="@colour.Value"></i>
|
||||
}
|
||||
@@ -629,43 +629,49 @@
|
||||
@if (canDelete || canShowJobs)
|
||||
{
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Delete", MVC.API.JobQueue.Delete(Model.Token.JobQueue.Id, true), "Config_JobQueues_Actions_Delete_Button")
|
||||
<div id="Config_JobQueues_Actions_Delete_Dialog" title="Delete this Job Queue?">
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg warning"></i>
|
||||
This item will be permanently deleted and cannot be recovered.<br />
|
||||
<br />
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Config_JobQueues_Actions_Delete_Button');
|
||||
var buttonDialog = $('#Config_JobQueues_Actions_Delete_Dialog');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Delete": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
@if (canDelete)
|
||||
{
|
||||
@Html.ActionLinkButton("Delete", MVC.API.JobQueue.Delete(Model.Token.JobQueue.Id, true), "Config_JobQueues_Actions_Delete_Button")
|
||||
<div id="Config_JobQueues_Actions_Delete_Dialog" title="Delete this Job Queue?">
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg warning"></i>
|
||||
This item will be permanently deleted and cannot be recovered.<br />
|
||||
<br />
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Config_JobQueues_Actions_Delete_Button');
|
||||
var buttonDialog = $('#Config_JobQueues_Actions_Delete_Dialog');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Delete": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@Html.ActionLinkButton(string.Format("Show {0} job{1}", Model.OpenJobCount, (Model.OpenJobCount == 1 ? null : "s")), MVC.Job.Queue(Model.Token.JobQueue.Id), "Config_JobQueues_Actions_ShowJobs_Button")
|
||||
</script>
|
||||
}
|
||||
@if (canShowJobs)
|
||||
{
|
||||
@Html.ActionLinkButton(string.Format("Show {0} job{1}", Model.OpenJobCount, (Model.OpenJobCount == 1 ? null : "s")), MVC.Job.Queue(Model.Token.JobQueue.Id), "Config_JobQueues_Actions_ShowJobs_Button")
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@@ -450,7 +450,7 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 100 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
foreach (var icon in JobQueueService.Icons)
|
||||
foreach (var icon in Model.Icons)
|
||||
{
|
||||
|
||||
|
||||
@@ -469,26 +469,26 @@ WriteLiteral(" data-icon=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4256), Tuple.Create("\"", 4281)
|
||||
, Tuple.Create(Tuple.Create("", 4264), Tuple.Create("fa", 4264), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4266), Tuple.Create("fa-", 4267), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4246), Tuple.Create("\"", 4271)
|
||||
, Tuple.Create(Tuple.Create("", 4254), Tuple.Create("fa", 4254), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4256), Tuple.Create("fa-", 4257), true)
|
||||
|
||||
#line 102 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4270), Tuple.Create<System.Object, System.Int32>(icon.Key
|
||||
, Tuple.Create(Tuple.Create("", 4260), Tuple.Create<System.Object, System.Int32>(icon.Key
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4270), false)
|
||||
, 4260), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4282), Tuple.Create("\"", 4301)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4272), Tuple.Create("\"", 4291)
|
||||
|
||||
#line 102 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4290), Tuple.Create<System.Object, System.Int32>(icon.Value
|
||||
, Tuple.Create(Tuple.Create("", 4280), Tuple.Create<System.Object, System.Int32>(icon.Value
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4290), false)
|
||||
, 4280), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
@@ -514,7 +514,7 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 106 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
foreach (var colour in JobQueueService.IconColours)
|
||||
foreach (var colour in Model.ThemeColours)
|
||||
{
|
||||
|
||||
|
||||
@@ -533,27 +533,27 @@ WriteLiteral(" data-colour=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4642), Tuple.Create("\"", 4678)
|
||||
, Tuple.Create(Tuple.Create("", 4650), Tuple.Create("fa", 4650), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4652), Tuple.Create("fa-square", 4653), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4662), Tuple.Create("d-", 4663), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4623), Tuple.Create("\"", 4659)
|
||||
, Tuple.Create(Tuple.Create("", 4631), Tuple.Create("fa", 4631), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4633), Tuple.Create("fa-square", 4634), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4643), Tuple.Create("d-", 4644), true)
|
||||
|
||||
#line 108 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4665), Tuple.Create<System.Object, System.Int32>(colour.Key
|
||||
, Tuple.Create(Tuple.Create("", 4646), Tuple.Create<System.Object, System.Int32>(colour.Key
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4665), false)
|
||||
, 4646), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4679), Tuple.Create("\"", 4700)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4660), Tuple.Create("\"", 4681)
|
||||
|
||||
#line 108 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4687), Tuple.Create<System.Object, System.Int32>(colour.Value
|
||||
, Tuple.Create(Tuple.Create("", 4668), Tuple.Create<System.Object, System.Int32>(colour.Value
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4687), false)
|
||||
, 4668), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
@@ -658,27 +658,27 @@ WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 9454), Tuple.Create("\"", 9502)
|
||||
, Tuple.Create(Tuple.Create("", 9462), Tuple.Create("fa", 9462), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 9464), Tuple.Create("d-priority-", 9465), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 9435), Tuple.Create("\"", 9483)
|
||||
, Tuple.Create(Tuple.Create("", 9443), Tuple.Create("fa", 9443), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 9445), Tuple.Create("d-priority-", 9446), true)
|
||||
|
||||
#line 201 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 9476), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
|
||||
, Tuple.Create(Tuple.Create("", 9457), Tuple.Create<System.Object, System.Int32>(priorityValue.ToLower()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 9476), false)
|
||||
, 9457), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 9503), Tuple.Create("\"", 9536)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 9484), Tuple.Create("\"", 9517)
|
||||
|
||||
#line 201 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 9511), Tuple.Create<System.Object, System.Int32>(priorityValue
|
||||
, Tuple.Create(Tuple.Create("", 9492), Tuple.Create<System.Object, System.Int32>(priorityValue
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 9511), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 9527), Tuple.Create("Priority", 9528), true)
|
||||
, 9492), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 9508), Tuple.Create("Priority", 9509), true)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
@@ -1003,14 +1003,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 14510), Tuple.Create("\"", 14550)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 14491), Tuple.Create("\"", 14531)
|
||||
|
||||
#line 306 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 14518), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
, Tuple.Create(Tuple.Create("", 14499), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 14518), false)
|
||||
, 14499), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -1054,14 +1054,14 @@ WriteLiteral("></i>");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 14990), Tuple.Create("\"", 15032)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 14971), Tuple.Create("\"", 15013)
|
||||
|
||||
#line 312 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 14997), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.User.Show(sg.Id))
|
||||
, Tuple.Create(Tuple.Create("", 14978), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.User.Show(sg.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 14997), false)
|
||||
, 14978), false)
|
||||
);
|
||||
|
||||
WriteLiteral("><i");
|
||||
@@ -1164,14 +1164,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 16166), Tuple.Create("\"", 16206)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 16147), Tuple.Create("\"", 16187)
|
||||
|
||||
#line 328 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 16174), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
, Tuple.Create(Tuple.Create("", 16155), Tuple.Create<System.Object, System.Int32>(sg.IsGroup ? "group" : "user"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 16174), false)
|
||||
, 16155), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-subjectid=\"");
|
||||
@@ -1286,14 +1286,14 @@ WriteLiteral(">Add</a>\r\n </div>\r\n
|
||||
|
||||
WriteLiteral(" id=\"Config_JobQueues_Subjects_Update_Dialog_Form\"");
|
||||
|
||||
WriteAttribute("action", Tuple.Create(" action=\"", 17597), Tuple.Create("\"", 17689)
|
||||
WriteAttribute("action", Tuple.Create(" action=\"", 17578), Tuple.Create("\"", 17670)
|
||||
|
||||
#line 343 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 17606), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.JobQueue.UpdateSubjects(Model.Token.JobQueue.Id, null, true))
|
||||
, Tuple.Create(Tuple.Create("", 17587), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.JobQueue.UpdateSubjects(Model.Token.JobQueue.Id, null, true))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 17606), false)
|
||||
, 17587), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" method=\"post\"");
|
||||
@@ -1618,15 +1618,15 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 28953), Tuple.Create("\"", 28975)
|
||||
, Tuple.Create(Tuple.Create("", 28958), Tuple.Create("trJobType", 28958), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 28934), Tuple.Create("\"", 28956)
|
||||
, Tuple.Create(Tuple.Create("", 28939), Tuple.Create("trJobType", 28939), true)
|
||||
|
||||
#line 548 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 28967), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 28948), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 28967), false)
|
||||
, 28948), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobTypes\"");
|
||||
@@ -1634,29 +1634,29 @@ WriteLiteral(" class=\"jobTypes\"");
|
||||
WriteLiteral(">\r\n <h4>\r\n <inp" +
|
||||
"ut");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 29076), Tuple.Create("\"", 29095)
|
||||
, Tuple.Create(Tuple.Create("", 29081), Tuple.Create("Types_", 29081), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 29057), Tuple.Create("\"", 29076)
|
||||
, Tuple.Create(Tuple.Create("", 29062), Tuple.Create("Types_", 29062), true)
|
||||
|
||||
#line 550 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 29087), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 29068), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 29087), false)
|
||||
, 29068), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobType\"");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 29128), Tuple.Create("\"", 29144)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 29109), Tuple.Create("\"", 29125)
|
||||
|
||||
#line 550 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 29136), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 29117), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 29136), false)
|
||||
, 29117), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
@@ -1670,15 +1670,15 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 29215), Tuple.Create("\"", 29235)
|
||||
, Tuple.Create(Tuple.Create("", 29221), Tuple.Create("Types_", 29221), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 29196), Tuple.Create("\"", 29216)
|
||||
, Tuple.Create(Tuple.Create("", 29202), Tuple.Create("Types_", 29202), true)
|
||||
|
||||
#line 550 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 29227), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 29208), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 29227), false)
|
||||
, 29208), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -1692,15 +1692,15 @@ WriteLiteral(">");
|
||||
#line hidden
|
||||
WriteLiteral("</label></h4>\r\n <div");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 29303), Tuple.Create("\"", 29325)
|
||||
, Tuple.Create(Tuple.Create("", 29308), Tuple.Create("SubTypes_", 29308), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 29284), Tuple.Create("\"", 29306)
|
||||
, Tuple.Create(Tuple.Create("", 29289), Tuple.Create("SubTypes_", 29289), true)
|
||||
|
||||
#line 551 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 29317), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 29298), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 29317), false)
|
||||
, 29298), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobSubTypes\"");
|
||||
@@ -1813,74 +1813,118 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 632 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Delete", MVC.API.JobQueue.Delete(Model.Token.JobQueue.Id, true), "Config_JobQueues_Actions_Delete_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 632 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
if (canDelete)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 634 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Delete", MVC.API.JobQueue.Delete(Model.Token.JobQueue.Id, true), "Config_JobQueues_Actions_Delete_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <div");
|
||||
|
||||
#line 634 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Config_JobQueues_Actions_Delete_Dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Delete this Job Queue?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <i");
|
||||
WriteLiteral(">\r\n <p>\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg warning\"");
|
||||
|
||||
WriteLiteral("></i>\r\n This item will be permanently deleted and cannot be recove" +
|
||||
"red.<br />\r\n <br />\r\n Are you sure?\r\n <" +
|
||||
"/p>\r\n </div>\r\n <script");
|
||||
WriteLiteral("></i>\r\n This item will be permanently deleted and cannot be re" +
|
||||
"covered.<br />\r\n <br />\r\n Are you sure?\r\n " +
|
||||
" </p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var button = $('#Config_JobQueues_Actions_Delete_Button');
|
||||
var buttonDialog = $('#Config_JobQueues_Actions_Delete_Dialog');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
""Delete"": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog(""disable"");
|
||||
$this.dialog(""option"", ""buttons"", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog(""close"");
|
||||
$(function () {
|
||||
var button = $('#Config_JobQueues_Actions_Delete_Button');
|
||||
var buttonDialog = $('#Config_JobQueues_Actions_Delete_Dialog');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
""Delete"": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog(""disable"");
|
||||
$this.dialog(""option"", ""buttons"", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog(""close"");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 669 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
Write(Html.ActionLinkButton(string.Format("Show {0} job{1}", Model.OpenJobCount, (Model.OpenJobCount == 1 ? null : "s")), MVC.Job.Queue(Model.Token.JobQueue.Id), "Config_JobQueues_Actions_ShowJobs_Button"));
|
||||
#line 671 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 671 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
#line 672 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
if (canShowJobs)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 674 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
Write(Html.ActionLinkButton(string.Format("Show {0} job{1}", Model.OpenJobCount, (Model.OpenJobCount == 1 ? null : "s")), MVC.Job.Queue(Model.Token.JobQueue.Id), "Config_JobQueues_Actions_ShowJobs_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 674 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 677 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
@model Disco.Web.Areas.Config.Models.UserFlag.CreateModel
|
||||
@{
|
||||
Authorization.RequireAll(Claims.Config.JobQueue.Create, Claims.Config.JobQueue.Configure);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null), "Create");
|
||||
}
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.HiddenFor(m => m.UserFlag.Icon)
|
||||
@Html.HiddenFor(m => m.UserFlag.IconColour)
|
||||
<div class="form" style="width: 450px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.UserFlag.Name)<br />@Html.ValidationMessageFor(model => model.UserFlag.Name)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description:
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(model => model.UserFlag.Description)<br />@Html.ValidationMessageFor(model => model.UserFlag.Description)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="actions">
|
||||
<input type="submit" class="button" value="Create" />
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#UserFlag_Name').focus().select();
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/UserFlag/Create.cshtml")]
|
||||
public partial class Create : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.UserFlag.CreateModel>
|
||||
{
|
||||
public Create()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
|
||||
Authorization.RequireAll(Claims.Config.JobQueue.Create, Claims.Config.JobQueue.Configure);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null), "Create");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
using (Html.BeginForm())
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.UserFlag.Icon));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.UserFlag.IconColour));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>Name:\r\n " +
|
||||
"</th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 16 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
Write(Html.EditorFor(model => model.UserFlag.Name));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />");
|
||||
|
||||
|
||||
#line 16 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.UserFlag.Name));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">Description:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 23 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
Write(Html.EditorFor(model => model.UserFlag.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />");
|
||||
|
||||
|
||||
#line 23 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.UserFlag.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Create\"");
|
||||
|
||||
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n $(\'#UserFlag_Name\').focus().select();\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Create.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,46 @@
|
||||
@model Disco.Web.Areas.Config.Models.UserFlag.IndexModel
|
||||
@{
|
||||
Authorization.RequireAll(Claims.Config.UserFlag.Create, Claims.Config.UserFlag.Configure);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null));
|
||||
}
|
||||
<div id="Config_UserFlags_Index">
|
||||
@if (Model.UserFlags.Count == 0)
|
||||
{
|
||||
<div class="form" style="width: 450px; padding: 100px 0;">
|
||||
<h2>No user flags are configured</h2>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="tableData">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.UserFlags)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<a href="@Url.Action(MVC.Config.UserFlag.Index(item.Id))">
|
||||
<i class="fa fa-@(item.Icon) fa-lg d-@(item.IconColour)"></i>
|
||||
@item.Name
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="smallMessage">@if (string.IsNullOrWhiteSpace(item.Description))
|
||||
{
|
||||
<text><none></text>
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.Description.ToMultilineString()
|
||||
}</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
}
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Create User Flag", MVC.Config.UserFlag.Create())
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,242 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/UserFlag/Index.cshtml")]
|
||||
public partial class Index : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.UserFlag.IndexModel>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
Authorization.RequireAll(Claims.Config.UserFlag.Create, Claims.Config.UserFlag.Configure);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"Config_UserFlags_Index\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (Model.UserFlags.Count == 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px; padding: 100px 0;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>No user flags are configured</h2>\r\n </div> \r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>Name</th>\r\n <th>Descripti" +
|
||||
"on</th>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 20 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 20 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
foreach (var item in Model.UserFlags)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 815), Tuple.Create("\"", 869)
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 822), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.UserFlag.Index(item.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 822), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 903), Tuple.Create("\"", 956)
|
||||
, Tuple.Create(Tuple.Create("", 911), Tuple.Create("fa", 911), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 913), Tuple.Create("fa-", 914), true)
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 917), Tuple.Create<System.Object, System.Int32>(item.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 917), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 929), Tuple.Create("fa-lg", 930), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 935), Tuple.Create("d-", 936), true)
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 938), Tuple.Create<System.Object, System.Int32>(item.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 938), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(item.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </a>\r\n </td>\r\n <t" +
|
||||
"d>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (string.IsNullOrWhiteSpace(item.Description))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("<none>");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(item.Description.ToMultilineString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 42 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 44 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create User Flag", MVC.Config.UserFlag.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -0,0 +1,250 @@
|
||||
@model Disco.Web.Areas.Config.Models.UserFlag.ShowModel
|
||||
@using Disco.Services.Users.UserFlags;
|
||||
@{
|
||||
Authorization.Require(Claims.Config.UserFlag.Show);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null), Model.UserFlag.ToString());
|
||||
|
||||
var canConfig = Authorization.Has(Claims.Config.UserFlag.Configure);
|
||||
var canDelete = Authorization.Has(Claims.Config.UserFlag.Delete);
|
||||
var canShowUsers = Model.CurrentAssignmentCount > 0 && Authorization.HasAll(Claims.User.Search, Claims.User.ShowFlagAssignments);
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
}
|
||||
<div id="Config_UserFlags_Show" class="form" style="width: 550px">
|
||||
<table>
|
||||
<tr>
|
||||
<th style="width: 150px">Id:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DisplayFor(model => model.UserFlag.Id)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name:
|
||||
</th>
|
||||
<td>@if (canConfig)
|
||||
{@Html.EditorFor(model => model.UserFlag.Name)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#UserFlag_Name'),
|
||||
'Invalid Name',
|
||||
'@(Url.Action(MVC.API.UserFlag.UpdateName(Model.UserFlag.Id)))',
|
||||
'FlagName'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.UserFlag.Name
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description:
|
||||
</th>
|
||||
<td>@if (canConfig)
|
||||
{@Html.EditorFor(model => model.UserFlag.Description)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#UserFlag_Description'),
|
||||
'Invalid Description',
|
||||
'@(Url.Action(MVC.API.UserFlag.UpdateDescription(Model.UserFlag.Id)))',
|
||||
'Description'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<pre>
|
||||
@if (string.IsNullOrEmpty(Model.UserFlag.Description))
|
||||
{
|
||||
<text><None></text>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.UserFlag.Description
|
||||
}
|
||||
</pre>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Statistics:
|
||||
</th>
|
||||
<td>
|
||||
<div><strong>@Model.CurrentAssignmentCount user@(Model.CurrentAssignmentCount != 1 ? "s" : null) currently assigned</strong></div>
|
||||
<div>@Model.TotalAssignmentCount total user historical assignment@(Model.TotalAssignmentCount != 1 ? "s" : null)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Icon:
|
||||
</th>
|
||||
<td>
|
||||
<i id="Config_UserFlags_Icon" data-icon="@(Model.UserFlag.Icon)" data-colour="@(Model.UserFlag.IconColour)" class="fa fa-@(Model.UserFlag.Icon) fa-4x d-@(Model.UserFlag.IconColour)"></i>
|
||||
@if (canConfig)
|
||||
{
|
||||
<div>
|
||||
<a id="Config_UserFlags_Icon_Update" href="#" class="button small">Update</a>
|
||||
<div id="Config_UserFlags_Icon_Update_Dialog" class="dialog" title="User Flag Icon">
|
||||
<div>
|
||||
<div class="icons">
|
||||
@foreach (var icon in Model.Icons)
|
||||
{
|
||||
<i data-icon="@(icon.Key)" class="fa fa-@(icon.Key)" title="@icon.Value"></i>
|
||||
}
|
||||
</div>
|
||||
<div class="colours">
|
||||
@foreach (var colour in Model.ThemeColours)
|
||||
{
|
||||
<i data-colour="@(colour.Key)" class="fa fa-square d-@(colour.Key)" title="@colour.Value"></i>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
var dialog, icon, colours, icons;
|
||||
|
||||
function showDialog() {
|
||||
if (!dialog) {
|
||||
dialog = $('#Config_UserFlags_Icon_Update_Dialog').dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
width: 750,
|
||||
height: 650,
|
||||
buttons: {
|
||||
"Save": save,
|
||||
Cancel: cancel
|
||||
}
|
||||
});
|
||||
|
||||
colours = dialog.find('.colours');
|
||||
icons = dialog.find('.icons');
|
||||
|
||||
colours.on('click', 'i', selectColour);
|
||||
icons.on('click', 'i', selectIcon);
|
||||
}
|
||||
|
||||
colours.find('i[data-colour="' + icon.attr('data-colour') + '"]').each(selectColour);
|
||||
icons.find('i[data-icon="' + icon.attr('data-icon') + '"]').each(selectIcon);
|
||||
|
||||
dialog.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function selectColour() {
|
||||
var $this = $(this),
|
||||
colourCode = $this.attr('data-colour'),
|
||||
previousColourCode = icons.attr('data-colour');
|
||||
|
||||
|
||||
colours.find('i').removeClass('selected fa-check-square').addClass('fa-square');
|
||||
$this.removeClass('fa-square').addClass('fa-check-square selected');
|
||||
|
||||
if (previousColourCode)
|
||||
icons.removeClass('d-' + previousColourCode);
|
||||
icons.attr('data-colour', colourCode)
|
||||
icons.addClass('d-' + colourCode);
|
||||
}
|
||||
function selectIcon() {
|
||||
var $this = $(this),
|
||||
iconCode = $this.attr('data-icon');
|
||||
|
||||
icons.find('i').removeClass('selected');
|
||||
$this.addClass('selected');
|
||||
}
|
||||
|
||||
function save() {
|
||||
var url = '@(Url.Action(MVC.API.UserFlag.UpdateIconAndColour(id: Model.UserFlag.Id, redirect: true)))',
|
||||
data = {
|
||||
Icon: icons.find('i.selected').attr('data-icon'),
|
||||
IconColour: colours.find('i.selected').attr('data-colour')
|
||||
};
|
||||
window.location.href = url + '&' + $.param(data);
|
||||
|
||||
dialog.dialog("disable");
|
||||
dialog.dialog("option", "buttons", null);
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
|
||||
$(function () {
|
||||
icon = $('#Config_UserFlags_Icon');
|
||||
$('#Config_UserFlags_Icon_Update').click(showDialog);
|
||||
});
|
||||
}());
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@if (canDelete || canShowUsers)
|
||||
{
|
||||
<div class="actionBar">
|
||||
@if (canDelete)
|
||||
{
|
||||
@Html.ActionLinkButton("Delete", MVC.API.UserFlag.Delete(Model.UserFlag.Id, true), "Config_UserFlags_Actions_Delete_Button")
|
||||
<div id="Config_UserFlags_Actions_Delete_Dialog" title="Delete this User Flag?">
|
||||
<p>
|
||||
<i class="fa fa-exclamation-triangle fa-lg warning"></i>
|
||||
This item will be permanently deleted and cannot be recovered.<br />
|
||||
<br />
|
||||
@if (Model.CurrentAssignmentCount > 0)
|
||||
{
|
||||
<strong>@Model.CurrentAssignmentCount user@(Model.CurrentAssignmentCount != 1 ? "s are" : " is") currently assigned</strong>
|
||||
<br />
|
||||
<br />
|
||||
}
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var button = $('#Config_UserFlags_Actions_Delete_Button');
|
||||
var buttonDialog = $('#Config_UserFlags_Actions_Delete_Dialog');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
"Delete": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (canShowUsers)
|
||||
{
|
||||
@Html.ActionLinkButton(string.Format("Show {0} user{1}", Model.CurrentAssignmentCount, (Model.CurrentAssignmentCount == 1 ? null : "s")), MVC.Search.Query(Model.UserFlag.Id.ToString(), "UserFlag"), "Config_UserFlags_Actions_ShowUsers_Button")
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@@ -0,0 +1,826 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Mvc.Ajax;
|
||||
using System.Web.Mvc.Html;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
|
||||
#line 2 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
using Disco.Services.Users.UserFlags;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/UserFlag/Show.cshtml")]
|
||||
public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.UserFlag.ShowModel>
|
||||
{
|
||||
public Show()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 3 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Config.UserFlag.Show);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags", MVC.Config.UserFlag.Index(null), Model.UserFlag.ToString());
|
||||
|
||||
var canConfig = Authorization.Has(Claims.Config.UserFlag.Configure);
|
||||
var canDelete = Authorization.Has(Claims.Config.UserFlag.Delete);
|
||||
var canShowUsers = Model.CurrentAssignmentCount > 0 && Authorization.HasAll(Claims.User.Search, Claims.User.ShowFlagAssignments);
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"Config_UserFlags_Show\"");
|
||||
|
||||
WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 550px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 150px\"");
|
||||
|
||||
WriteLiteral(">Id:\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 20 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.DisplayFor(model => model.UserFlag.Id));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Name:\r\n " +
|
||||
" </th>\r\n <td>");
|
||||
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.EditorFor(model => model.UserFlag.Name));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
||||
"ctions.PropertyChangeHelper(\r\n $(\'#UserFlag_Name\'),\r\n" +
|
||||
" \'Invalid Name\',\r\n \'");
|
||||
|
||||
|
||||
#line 35 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateName(Model.UserFlag.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'FlagName\'\r\n );\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Description:\r\n " +
|
||||
" </th>\r\n <td>");
|
||||
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.EditorFor(model => model.UserFlag.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
||||
"ctions.PropertyChangeHelper(\r\n $(\'#UserFlag_Descripti" +
|
||||
"on\'),\r\n \'Invalid Description\',\r\n " +
|
||||
" \'");
|
||||
|
||||
|
||||
#line 59 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateDescription(Model.UserFlag.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'Description\'\r\n );\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <pre>\r\n");
|
||||
|
||||
|
||||
#line 68 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (string.IsNullOrEmpty(Model.UserFlag.Description))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("<None>");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 71 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </pre>\r\n");
|
||||
|
||||
|
||||
#line 77 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th>Statistics:\r\n " +
|
||||
" </th>\r\n <td>\r\n <div><strong>");
|
||||
|
||||
|
||||
#line 84 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" user");
|
||||
|
||||
|
||||
#line 84 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" currently assigned</strong></div>\r\n <div>");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.TotalAssignmentCount);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" total user historical assignment");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.TotalAssignmentCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Icon:\r\n " +
|
||||
" </th>\r\n <td>\r\n <i");
|
||||
|
||||
WriteLiteral(" id=\"Config_UserFlags_Icon\"");
|
||||
|
||||
WriteLiteral(" data-icon=\"");
|
||||
|
||||
|
||||
#line 92 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.Icon);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(" data-colour=\"");
|
||||
|
||||
|
||||
#line 92 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.UserFlag.IconColour);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3604), Tuple.Create("\"", 3677)
|
||||
, Tuple.Create(Tuple.Create("", 3612), Tuple.Create("fa", 3612), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3614), Tuple.Create("fa-", 3615), true)
|
||||
|
||||
#line 92 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3618), Tuple.Create<System.Object, System.Int32>(Model.UserFlag.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3618), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 3640), Tuple.Create("fa-4x", 3641), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3646), Tuple.Create("d-", 3647), true)
|
||||
|
||||
#line 92 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3649), Tuple.Create<System.Object, System.Int32>(Model.UserFlag.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3649), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 93 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 93 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canConfig)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>\r\n <a");
|
||||
|
||||
WriteLiteral(" id=\"Config_UserFlags_Icon_Update\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">Update</a>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"Config_UserFlags_Icon_Update_Dialog\"");
|
||||
|
||||
WriteLiteral(" class=\"dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"User Flag Icon\"");
|
||||
|
||||
WriteLiteral(">\r\n <div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"icons\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 100 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 100 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
foreach (var icon in Model.Icons)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" data-icon=\"");
|
||||
|
||||
|
||||
#line 102 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(icon.Key);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4242), Tuple.Create("\"", 4267)
|
||||
, Tuple.Create(Tuple.Create("", 4250), Tuple.Create("fa", 4250), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4252), Tuple.Create("fa-", 4253), true)
|
||||
|
||||
#line 102 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4256), Tuple.Create<System.Object, System.Int32>(icon.Key
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4256), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4268), Tuple.Create("\"", 4287)
|
||||
|
||||
#line 102 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4276), Tuple.Create<System.Object, System.Int32>(icon.Value
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4276), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 103 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"colours\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 106 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 106 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
foreach (var colour in Model.ThemeColours)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" data-colour=\"");
|
||||
|
||||
|
||||
#line 108 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(colour.Key);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4619), Tuple.Create("\"", 4655)
|
||||
, Tuple.Create(Tuple.Create("", 4627), Tuple.Create("fa", 4627), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4629), Tuple.Create("fa-square", 4630), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 4639), Tuple.Create("d-", 4640), true)
|
||||
|
||||
#line 108 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4642), Tuple.Create<System.Object, System.Int32>(colour.Key
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4642), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4656), Tuple.Create("\"", 4677)
|
||||
|
||||
#line 108 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4664), Tuple.Create<System.Object, System.Int32>(colour.Value
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4664), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 109 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n </div>\r\n " +
|
||||
" </div>\r\n <script>\r\n " +
|
||||
" (function () {\r\n var dialog, icon, colou" +
|
||||
"rs, icons;\r\n\r\n function showDialog() {\r\n " +
|
||||
" if (!dialog) {\r\n " +
|
||||
" dialog = $(\'#Config_UserFlags_Icon_Update_Dialog\').dialog({\r\n " +
|
||||
" resizable: false,\r\n " +
|
||||
" modal: true,\r\n autoOpen: f" +
|
||||
"alse,\r\n width: 750,\r\n " +
|
||||
" height: 650,\r\n " +
|
||||
" buttons: {\r\n \"Save\": save,\r" +
|
||||
"\n Cancel: cancel\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" colours = dialog.find(\'.colours\');\r\n " +
|
||||
" icons = dialog.find(\'.icons\');\r\n\r\n " +
|
||||
" colours.on(\'click\', \'i\', selectColour);\r\n " +
|
||||
" icons.on(\'click\', \'i\', selectIcon);\r\n " +
|
||||
" }\r\n\r\n colours.find(\'i[" +
|
||||
"data-colour=\"\' + icon.attr(\'data-colour\') + \'\"]\').each(selectColour);\r\n " +
|
||||
" icons.find(\'i[data-icon=\"\' + icon.attr(\'data-icon\') +" +
|
||||
" \'\"]\').each(selectIcon);\r\n\r\n dialog.dialog(\'o" +
|
||||
"pen\');\r\n\r\n return false;\r\n " +
|
||||
" }\r\n\r\n function selectColour() {\r\n " +
|
||||
" var $this = $(this),\r\n " +
|
||||
" colourCode = $this.attr(\'data-colour\'),\r\n " +
|
||||
" previousColourCode = icons.attr(\'data-colour\');\r\n\r\n\r\n " +
|
||||
" colours.find(\'i\').removeClass(\'selected fa-check-square" +
|
||||
"\').addClass(\'fa-square\');\r\n $this.removeClass" +
|
||||
"(\'fa-square\').addClass(\'fa-check-square selected\');\r\n\r\n " +
|
||||
" if (previousColourCode)\r\n icon" +
|
||||
"s.removeClass(\'d-\' + previousColourCode);\r\n i" +
|
||||
"cons.attr(\'data-colour\', colourCode)\r\n icons." +
|
||||
"addClass(\'d-\' + colourCode);\r\n }\r\n " +
|
||||
" function selectIcon() {\r\n va" +
|
||||
"r $this = $(this),\r\n iconCode = $this.att" +
|
||||
"r(\'data-icon\');\r\n\r\n icons.find(\'i\').removeCla" +
|
||||
"ss(\'selected\');\r\n $this.addClass(\'selected\');" +
|
||||
"\r\n }\r\n\r\n function " +
|
||||
"save() {\r\n var url = \'");
|
||||
|
||||
|
||||
#line 169 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Url.Action(MVC.API.UserFlag.UpdateIconAndColour(id: Model.UserFlag.Id, redirect: true)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
data = {
|
||||
Icon: icons.find('i.selected').attr('data-icon'),
|
||||
IconColour: colours.find('i.selected').attr('data-colour')
|
||||
};
|
||||
window.location.href = url + '&' + $.param(data);
|
||||
|
||||
dialog.dialog(""disable"");
|
||||
dialog.dialog(""option"", ""buttons"", null);
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
$(this).dialog(""close"");
|
||||
}
|
||||
|
||||
$(function () {
|
||||
icon = $('#Config_UserFlags_Icon');
|
||||
$('#Config_UserFlags_Icon_Update').click(showDialog);
|
||||
});
|
||||
}());
|
||||
</script>
|
||||
</div>
|
||||
");
|
||||
|
||||
|
||||
#line 191 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 196 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canDelete || canShowUsers)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 199 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 199 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canDelete)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 201 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.ActionLinkButton("Delete", MVC.API.UserFlag.Delete(Model.UserFlag.Id, true), "Config_UserFlags_Actions_Delete_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 201 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Config_UserFlags_Actions_Delete_Dialog\"");
|
||||
|
||||
WriteLiteral(" title=\"Delete this User Flag?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg warning\"");
|
||||
|
||||
WriteLiteral("></i>\r\n This item will be permanently deleted and cannot be re" +
|
||||
"covered.<br />\r\n <br />\r\n");
|
||||
|
||||
|
||||
#line 207 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 207 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (Model.CurrentAssignmentCount > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <strong>");
|
||||
|
||||
|
||||
#line 209 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" user");
|
||||
|
||||
|
||||
#line 209 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Model.CurrentAssignmentCount != 1 ? "s are" : " is");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" currently assigned</strong>\r\n");
|
||||
|
||||
WriteLiteral(" <br />\r\n");
|
||||
|
||||
WriteLiteral(" <br />\r\n");
|
||||
|
||||
|
||||
#line 212 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var button = $('#Config_UserFlags_Actions_Delete_Button');
|
||||
var buttonDialog = $('#Config_UserFlags_Actions_Delete_Dialog');
|
||||
var buttonLink = button.attr('href');
|
||||
button.attr('href', '#');
|
||||
button.click(function () {
|
||||
buttonDialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
buttonDialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
buttons: {
|
||||
""Delete"": function () {
|
||||
var $this = $(this);
|
||||
$this.dialog(""disable"");
|
||||
$this.dialog(""option"", ""buttons"", null);
|
||||
window.location.href = buttonLink;
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog(""close"");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 244 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 245 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
if (canShowUsers)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 247 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
Write(Html.ActionLinkButton(string.Format("Show {0} user{1}", Model.CurrentAssignmentCount, (Model.CurrentAssignmentCount == 1 ? null : "s")), MVC.Search.Query(Model.UserFlag.Id.ToString(), "UserFlag"), "Config_UserFlags_Actions_ShowUsers_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 247 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 250 "..\..\Areas\Config\Views\UserFlag\Show.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
Reference in New Issue
Block a user