diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/ExampleWithModule/HostingControlPanel/Frame/App_GlobalResources/NewDefaultMenuRender.resx b/ExampleWithModule/HostingControlPanel/Frame/App_GlobalResources/NewDefaultMenuRender.resx index bf3af36..512b411 100644 --- a/ExampleWithModule/HostingControlPanel/Frame/App_GlobalResources/NewDefaultMenuRender.resx +++ b/ExampleWithModule/HostingControlPanel/Frame/App_GlobalResources/NewDefaultMenuRender.resx @@ -117,7 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Example + + Tickets \ No newline at end of file diff --git a/TicketExample/HostingControlPanel/Plugins/App_Data/NewDefaultMenuRender.resx b/TicketExample/HostingControlPanel/Plugins/App_Data/NewDefaultMenuRender.resx new file mode 100644 index 0000000..512b411 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/App_Data/NewDefaultMenuRender.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Tickets + + \ No newline at end of file diff --git a/TicketExample/HostingControlPanel/Plugins/App_Data/appConfig.Tickets.config b/TicketExample/HostingControlPanel/Plugins/App_Data/appConfig.Tickets.config new file mode 100644 index 0000000..10f83c8 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/App_Data/appConfig.Tickets.config @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets.csproj b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets.csproj new file mode 100644 index 0000000..10ba1c1 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets.csproj @@ -0,0 +1,113 @@ + + + + + Debug + AnyCPU + {7C6DD537-9899-4EA2-A55B-6BF209D83429} + Library + Properties + Atomia.Web.Plugin.Example + Atomia.Web.Plugin.Example + v4.6.1 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\References\Atomia.Common.dll + + + ..\..\References\Atomia.Common.Authorization.dll + + + ..\..\References\Atomia.Identity.Base.AuthorizationConstants.dll + + + ..\..\References\Atomia.Web.Base.dll + + + ..\..\References\Atomia.Web.Plugin.HCP.Authorization.dll + + + ..\..\References\Atomia.Web.Plugin.HCP.Common.dll + + + ..\..\References\Atomia.Web.Plugin.HCP.Provisioning.dll + + + ..\..\References\Atomia.Web.Plugin.ServiceReferences.dll + + + ..\..\References\Atomia.Web.Plugin.Validation.dll + + + False + ..\..\References\Microsoft.IdentityModel.dll + + + + + + + + + + + + + + + + + + + False + ..\..\References\System.Web.Mvc.dll + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Controllers/TicketsController.cs b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Controllers/TicketsController.cs new file mode 100644 index 0000000..680b025 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Controllers/TicketsController.cs @@ -0,0 +1,210 @@ +using Atomia.Web.Base.ActionFilters; +using Atomia.Web.Plugin.HCP.Authorization; +using Atomia.Web.Plugin.HCP.Authorization.ActionFilterAttributes; +using Atomia.Web.Plugin.HCP.Provisioning.ActionFilterAttributes; +using Atomia.Web.Plugin.HCP.Provisioning.Controllers; +using System.Web.Mvc; +using Atomia.Web.Plugin.ServiceReferences; +using System.Collections.Specialized; +using System.Data; +using System.Configuration; +using System.Data.SqlClient; +using Atomia.Web.Plugin.Example.Models; +using System.Collections.Generic; +using System; +using System.Web.Script.Serialization; +using Atomia.Web.Plugin.Example.Helpers; + +namespace Atomia.Web.Plugin.Example.Controllers +{ + [HCPHandleError(Order = 1)] + [AtomiaServiceChannel(Order = 2)] + [HCPInitialization(Order = 3)] + [Internationalization(Order = 4)] + public class TicketsController : MainController + { + [AcceptVerbs(System.Net.WebRequestMethods.Http.Get, System.Net.WebRequestMethods.Http.Post)] + public ActionResult Index() + { + return View(); + } + + [AcceptVerbs(System.Net.WebRequestMethods.Http.Get, System.Net.WebRequestMethods.Http.Post)] + public ActionResult ViewTicket(string ticketId) + { + ViewData["ticket"] = TicketHelper.getTicket(Int32.Parse(ticketId)); + return View(); + } + + [AcceptVerbs(HttpVerbs.Post), ValidateInput(false)] + public ActionResult AddTicket(string subject, string message, bool emergency) + { + bool result = addTicket(subject,message,emergency); + + if (result) + { + return Json(new { Success = true }); + } + else + { + return Json(new { Success = false, Errors = "Empty inputs" }); + } + + } + + [AcceptVerbs(HttpVerbs.Post), ValidateInput(false)] + public ActionResult AddReply(string reply) + { + bool result = addReply(reply); + + if (result) + { + return Json(new { Success = true }); + } + else + { + return Json(new { Success = false, Errors = "Empty inputs" }); + } + } + + public bool addTicket(string subject, string message, bool emergency) + { + + if (!String.IsNullOrEmpty(subject) && !String.IsNullOrEmpty(message)) + { + + int id = TicketsList.Instance.Count + 1; + + TicketModel ticket = new TicketModel(); + ticket.Ticketid = "10001"; + ticket.HiddenId = id; + ticket.Subject = subject; + ticket.Message = message; + ticket.Status = "Open"; + ticket.Emergency = emergency; + + TicketsList.Instance.Add(ticket); + return true; + } + else + { + return false; + } + } + + private bool addReply(string message) + { + + if (!String.IsNullOrEmpty(message)) + { + + int id = RepliesList.Instance.Count + 1; + + ReplyModel reply = new ReplyModel(); + reply.From = "Andjela"; + reply.Message = message; + RepliesList.Instance.Add(reply); + return true; + } + else + { + return false; + } + } + + [AcceptVerbs(HttpVerbs.Get)] + public ActionResult Search(string sSearch, string iDisplayStart, string iDisplayLength, string sEcho, string iSortCol_0, string sSortDir_0, string iFilter) + { + + var ticketData = new List(); + + List lista = new List(); + + if (TicketsList.Instance.Count < 1) + { + TicketHelper.createTickets(); + } + + + lista = TicketHelper.searchForResult(lista, sSearch); + + int br = 0; + int i = Int32.Parse(iDisplayStart); + while (i < lista.Count) + { + br++; + var data = new string[6]; + data[0] = lista[i].Ticketid; + data[1] = lista[i].Date.ToString(); + data[2] = lista[i].Subject; + data[3] = lista[i].Status; + data[4] = lista[i].Date.ToString(); + data[5] = this.Url.Action("ViewTicket", new { area = "Tickets", controller = "Tickets", ticketId = lista[i].HiddenId.ToString() }); + ticketData.Add(data); + + i++; + + if (br == Int32.Parse(iDisplayLength)) + { + break; + } + } + + var dataToReturn = new + { + sEcho, + iTotalRecords = lista.Count, + iTotalDisplayRecords = lista.Count, + aaData = ticketData.ToArray() + }; + + return Json(dataToReturn, JsonRequestBehavior.AllowGet); + } + + [AcceptVerbs(HttpVerbs.Get)] + public ActionResult SearchReplies(string sSearch, string iDisplayStart, string iDisplayLength, string sEcho, string iSortCol_0, string sSortDir_0, string iFilter) + { + var replyData = new List(); + + List lista = new List(); + + if (RepliesList.Instance.Count < 1) + { + TicketHelper.createReplies(); + } + + + lista = TicketHelper.searchForResultReply(lista, sSearch); + + int br = 0; + int i = Int32.Parse(iDisplayStart); + while (i < lista.Count) + { + br++; + var data = new string[4]; + data[0] = lista[i].From; + data[1] = lista[i].Date.ToString(); + data[2] = lista[i].Message; + data[3] = lista[i].Attachement; + replyData.Add(data); + + i++; + + if (br == Int32.Parse(iDisplayLength)) + { + break; + } + } + var dataToReturn = new + { + sEcho, + iTotalRecords = lista.Count, + iTotalDisplayRecords = lista.Count, + aaData = replyData.ToArray() + }; + + return Json(dataToReturn, JsonRequestBehavior.AllowGet); + } + + } +} diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Helpers/TicketHelper.cs b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Helpers/TicketHelper.cs new file mode 100644 index 0000000..d55c239 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Helpers/TicketHelper.cs @@ -0,0 +1,137 @@ +using Atomia.Web.Plugin.Example.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Atomia.Web.Plugin.Example.Helpers +{ + public static class TicketHelper + { + public static void createTickets() + { + TicketModel ticket = new TicketModel(); + ticket.Ticketid = "10001"; + ticket.HiddenId = 1; + ticket.Subject = "Ticket1"; + ticket.Message = "Some random message"; + ticket.Status = "Open"; + ticket.Emergency = true; + TicketsList.Instance.Add(ticket); + + ticket = new TicketModel(); + ticket.Ticketid = "10002"; + ticket.HiddenId = 2; + ticket.Subject = "Ticket2"; + ticket.Message = "Some random message"; + ticket.Status = "Open"; + ticket.Emergency = true; + TicketsList.Instance.Add(ticket); + + ticket = new TicketModel(); + ticket.Ticketid = "10003"; + ticket.HiddenId = 3; + ticket.Subject = "Ticket3"; + ticket.Message = "Some random message"; + ticket.Status = "Open"; + ticket.Emergency = true; + TicketsList.Instance.Add(ticket); + + ticket = new TicketModel(); + ticket.Ticketid = "10004"; + ticket.HiddenId = 4; + ticket.Subject = "Ticket4"; + ticket.Message = "Some random message"; + ticket.Status = "Open"; + ticket.Emergency = true; + TicketsList.Instance.Add(ticket); + + ticket = new TicketModel(); + ticket.Ticketid = "10005"; + ticket.HiddenId = 5; + ticket.Subject = "Ticket5"; + ticket.Message = "Some random message"; + ticket.Status = "Open"; + ticket.Emergency = true; + TicketsList.Instance.Add(ticket); + } + + public static void createReplies() + { + ReplyModel reply = new ReplyModel(); + reply.From = "Andjela"; + reply.HiddenId = 1; + reply.Attachement = "atch"; + reply.Message = "Random message"; + RepliesList.Instance.Add(reply); + + reply = new ReplyModel(); + reply.From = "Andjela"; + reply.HiddenId = 2; + reply.Attachement = "atch"; + reply.Message = "Random message"; + RepliesList.Instance.Add(reply); + + reply = new ReplyModel(); + reply.From = "Andjela"; + reply.HiddenId = 3; + reply.Attachement = "atch"; + reply.Message = "Random message"; + RepliesList.Instance.Add(reply); + + reply = new ReplyModel(); + reply.From = "Andjela"; + reply.HiddenId = 4; + reply.Attachement = "atch"; + reply.Message = "Random message"; + RepliesList.Instance.Add(reply); + } + + public static TicketModel getTicket(int id) + { + int index = id - 1; + return TicketsList.Instance[index]; + } + + public static List searchForResult(List lista, string sSearch) + { + if (String.IsNullOrEmpty(sSearch)) + { + return TicketsList.Instance; + } + else + { + foreach (TicketModel el in TicketsList.Instance) + { + if (el.Ticketid.Equals(sSearch) || el.Subject.Equals(sSearch) || el.Date.ToString().Equals(sSearch) || el.Message.Equals(sSearch) || el.Status.Equals(sSearch)) + { + lista.Add(el); + } + } + + return lista; + } + } + + public static List searchForResultReply(List lista, string sSearch) + { + if (String.IsNullOrEmpty(sSearch)) + { + return RepliesList.Instance; + } + else + { + foreach (ReplyModel el in RepliesList.Instance) + { + if (el.From.Equals(sSearch) || el.Message.Equals(sSearch) || el.Date.ToString().Equals(sSearch)) + { + lista.Add(el); + } + } + + return lista; + } + } + } +} diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/RepliesList.cs b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/RepliesList.cs new file mode 100644 index 0000000..a5b1649 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/RepliesList.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Atomia.Web.Plugin.Example.Models +{ + class RepliesList + { + private RepliesList() + { + } + public static bool sort { get; set; } + private static List instance = null; + public static List Instance + { + get + { + if (instance == null) + { + instance = new List(); + } + return instance; + } + } + } +} diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/ReplyModel.cs b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/ReplyModel.cs new file mode 100644 index 0000000..a189b0e --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/ReplyModel.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Atomia.Web.Plugin.Example.Models +{ + public class ReplyModel + { + public int HiddenId { get; set; } + + public string Message { get; set; } + + public string From { get; set; } + + public string Attachement { get; set; } + + private DateTime date; + public DateTime Date + { + get + { + if (date != default(DateTime)) + { + return date; + } + + date = DateTime.Now; + return date; + } + set + { + date = value; + } + } + + } +} diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/TicketModel.cs b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/TicketModel.cs new file mode 100644 index 0000000..1e7ea0e --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/TicketModel.cs @@ -0,0 +1,44 @@ +using Atomia.Web.Base.Validation.ValidationAttributes; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Atomia.Web.Plugin.Example.Models +{ + public class TicketModel + { + public string Ticketid { get; set; } + + public int HiddenId { get; set; } + + public string Subject { get; set; } + + public string Message { get; set; } + + public bool Emergency { get; set; } + + public string Status { get; set; } + + private DateTime date; + public DateTime Date + { + get + { + if (date != default(DateTime)) + { + return date; + } + + date = DateTime.Now; + return date; + } + set + { + date = value; + } + } + + } +} diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/TicketsList.cs b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/TicketsList.cs new file mode 100644 index 0000000..6a7f04d --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Models/TicketsList.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Atomia.Web.Plugin.Example.Models +{ + public class TicketsList + { + private TicketsList() + { + } + public static bool sort { get; set; } + private static List instance = null; + public static List Instance + { + get + { + if (instance == null) + { + instance = new List(); + } + return instance; + } + } + } +} diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Properties/AssemblyInfo.cs b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3931e83 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Atomia.Web.Plugin.Example")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Atomia.Web.Plugin.Example")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7c6dd537-9899-4ea2-a55b-6bf209d83429")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/App_LocalResources/Index.aspx.resx b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/App_LocalResources/Index.aspx.resx new file mode 100644 index 0000000..69eaa6e --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/App_LocalResources/Index.aspx.resx @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Actions + + + Add new ticket + + + All statuses + + + Attachments + + + Cancel + + + Date + + + Use the form below to create new ticket. If your ticket is related to one of your products, please select that product from the list. + + + Allows you to manage your tickets. You can create a new one, or reply to existing one. + + + Emergency + + + Tickets + + + Last Reply + + + Message + + + Product + + + Save + + + Select . . . + + + Status + + + Subject + + + Ticket ID + + + Ticket status + + + Tickets + + + View + + + (The emergency department is meant for urgent matters only related to one of yours server products.) + + + Internal error + + + An error happend when adding a ticket. Make sure, required fields are not empty. + + + Required fields can not be empty. + + + Success + + + Ticket successfully added. + + + Too many attachments + + + One or more attachments are too large + + + One or more attachments have unsupported file type + + + You must select appropriate product + + + You can select multiple files. Allowed extensions: {{extensions}} + {{extensions}} is place holder for list of extensions. + + + Department + + + All departments + + \ No newline at end of file diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/App_LocalResources/ViewTicket.aspx.resx b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/App_LocalResources/ViewTicket.aspx.resx new file mode 100644 index 0000000..2f2ead6 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/App_LocalResources/ViewTicket.aspx.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Add new reply + + + Internal error + + + An error happend when adding a reply. Make sure, required fields are not empty. + + + Success + + + Reply successfully added. + + + Attachments + + + Too many attachments + + + One or more attachments are too large + + + One or more attachments have unsupported file type + + + Cancel + + + Use the form below to post new ticket reply. + + + Ticket Details + + + Message + + + N/A + + + Attachments + + + Date + + + From + + + Message + + + Save + + + Attachement: + + + Date + + + Message: + + + Product: + + + Status: + + + Subject: + + + Ticket Details + + \ No newline at end of file diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/Index.aspx b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/Index.aspx new file mode 100644 index 0000000..3b90750 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/Index.aspx @@ -0,0 +1,128 @@ +<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> +<%@ Import Namespace="System.Web.Mvc" %> +<%@ Import Namespace="Atomia.Web.Plugin.Example.Models" %> +<%@ Import Namespace="System.Web.Mvc.Html" %> +<%@ Import Namespace="System.Web.Routing" %> + + + <%=Html.Resource("Title")%> + + + +
+

<%= Html.Resource("HeaderText") %>

+ + + + + +
+

", "sProcessing": "<%= Html.Resource("Datatables, Processing") %>", "sZeroRecords": "<%= Html.Resource("Datatables, ZeroRecords") %>", "sInfo": "<%= Html.Resource("Datatables, Info") %>", "sInfoEmpty": "<%= Html.Resource("Datatables, InfoEmpty") %>", "sInfoFiltered": "<%= Html.Resource("Datatables, InfoFilter") %>", "sSearch": "<%= Html.Resource("Datatables, Search") %>", "sView": "View" }' + ><%= Html.Resource("DescriptionTickets") %>

+ + + +
+ " aria-controls="filteringResellerDomainTable" type="search" id="searchbox" /> + + <%= Html.Resource("AddNewTicket") %> + + +
+ + + + + + + + + + + + + + + + +
+ <%= Html.Resource("TicketID") %> + + <%= Html.Resource("Date")%> + + <%= Html.Resource("Subject")%> + + <%= Html.Resource("Status")%> + + <%= Html.Resource("LastReply")%> + + <%= Html.Resource("Actions")%> +
+
+ +
+ +
+ +
+ + + + + <% Html.RenderPartial("_formScripts"); %> + <% Html.RenderPartial("_ticketScripts"); %> + + + \ No newline at end of file diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/ViewTicket.aspx b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/ViewTicket.aspx new file mode 100644 index 0000000..5ee9951 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/ViewTicket.aspx @@ -0,0 +1,137 @@ +<%@ Import Namespace="Atomia.Web.Plugin.Example.Models" %> +<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> +<%@ Import Namespace="System.Web.Mvc" %> +<%@ Import Namespace="System.Web.Mvc.Html" %> +<%@ Import Namespace="System.Web.Routing" %> + + + <%=Html.Resource("Title")%> + + + + <% TicketModel ticket = (TicketModel)ViewData["ticket"]; %> + +
+

<%= Html.Resource("HeaderText") %> - <%= ticket.Ticketid %>

+ + + + + +
+ +
+ +
+ <%= ticket.Subject %> +
+
+ +
+ +
+ <%= ticket.Message %> +
+
+ +
+ +
+ <%= ticket.Date %> +
+
+ +
+ +
+ <%= ticket.Status %> +
+
+ +

", "sAjaxSource": "<%=Url.Action("SearchReplies", new {area="Tickets", controller = "Tickets"})%>", "sProcessing": "<%= Html.Resource("Datatables, Processing") %>", "sZeroRecords": "<%= Html.Resource("Datatables, ZeroRecords") %>", "sInfo": "<%= Html.Resource("Datatables, Info") %>", "sInfoEmpty": "<%= Html.Resource("Datatables, InfoEmpty") %>", "sInfoFiltered": "<%= Html.Resource("Datatables, InfoFilter") %>", "sSearch": "<%= Html.Resource("Datatables, Search") %>" }' + >Replies

+ + + +
+ " aria-controls="filteringResellerDomainTable" type="search" id="searchbox1" /> + <%= Html.Resource("AddNewReply") %> +
+ + + + + + + + + + + + + +
+ <%= Html.Resource("ReplyFrom")%> + + <%= Html.Resource("ReplyDate")%> + + <%= Html.Resource("ReplyMessage")%> + + <%= Html.Resource("ReplyAttachments")%> +
+
+ +
+ +
+ +
+ + + + <% Html.RenderPartial("_formScripts"); %> + <% Html.RenderPartial("_ticketScripts"); %> + + + \ No newline at end of file diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/_formScripts.ascx b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/_formScripts.ascx new file mode 100644 index 0000000..a96a96c --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/_formScripts.ascx @@ -0,0 +1,135 @@ +<%@ Import Namespace="System.Web.Script.Serialization" %> +<%@ Import Namespace="Atomia.Web.Plugin.ServiceReferences.AccountAPI" %> + + diff --git a/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/_ticketScripts.ascx b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/_ticketScripts.ascx new file mode 100644 index 0000000..c5d3db5 --- /dev/null +++ b/TicketExample/HostingControlPanel/Plugins/Atomia.Web.Plugin.Tickets/Atomia.Web.Plugin.Tickets/Tickets/_ticketScripts.ascx @@ -0,0 +1,197 @@ +<%@ Import Namespace="System.Web.Script.Serialization" %> +<%@ Import Namespace="Atomia.Web.Plugin.ServiceReferences.AccountAPI" %> + + +