Skip to content
This repository has been archived by the owner on Oct 24, 2021. It is now read-only.

Commit

Permalink
Web - Admin - School
Browse files Browse the repository at this point in the history
  • Loading branch information
Fjarik committed Feb 1, 2020
1 parent 9ffdc12 commit 3dea137
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 28 deletions.
23 changes: 12 additions & 11 deletions ZolikyWeb/Areas/Global/Controllers/UserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,18 @@ public async Task<JsonResult> UsersJson()
timeS = x.MemberSince.GetJsTimestamp(),
regIp = x.RegistrationIp
},
lastLogin = x.LastLogin == null
? new {
date = "",
timeS = 0.0,
project = ""
}
: new {
date = x.LastLogin.Date.ToString("dd.MM.yyyy"),
timeS = x.LastLogin.Date.GetJsTimestamp(),
project = ((Projects) x.LastLogin.ProjectID).GetDescription()
},
school = x.SchoolName,
//lastLogin = x.LastLogin == null
// ? new {
// date = "",
// timeS = 0.0,
// project = ""
// }
// : new {
// date = x.LastLogin.Date.ToString("dd.MM.yyyy"),
// timeS = x.LastLogin.Date.GetJsTimestamp(),
// project = ((Projects) x.LastLogin.ProjectID).GetDescription()
// },
x.IsBanned,
x.IsEnabled,
actions = new {
Expand Down
47 changes: 31 additions & 16 deletions ZolikyWeb/Areas/Global/Views/User/Dashboard.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@
data.grad}">${data.name}</span>`;
}
},
{
title: "Škola",
type: "html",
className: "text-truncate",
data: "school",
render: (data) => {
if (!data) {
return "-";
}
if (data.length < 33) {
return data;
}
return `<span class="c-help" data-toggle="tooltip" data-original-title="${data}">${data.substr(0, 33)}...</span>`;
}
},
{
title: "Role",
data: "roles",
Expand Down Expand Up @@ -84,23 +99,23 @@
}
}
},
{
title: "Poslední přihlášení",
type: "html ",
data: "lastLogin",
searchable: false,
render: {
_: "timeS",
display: (data) => {
if (!data) {
return "";
}
return `<span class="c-help" data-toggle="tooltip" data-original-title="${data.project
}">${data.date}</span>`;
}
}
//{
// title: "Poslední přihlášení",
// type: "html ",
// data: "lastLogin",
// searchable: false,
// render: {
// _: "timeS",
// display: (data) => {
// if (!data) {
// return "";
// }
// return `<span class="c-help" data-toggle="tooltip" data-original-title="${data.project
// }">${data.date}</span>`;
// }
// }
},
//},
{
title: "Akce",
type: "html",
Expand Down
2 changes: 1 addition & 1 deletion ZolikyWeb/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.6.14.0")]
[assembly: AssemblyVersion("2.6.15.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguage("cs-CZ")]

0 comments on commit 3dea137

Please sign in to comment.