From 7c6acfd1f9d760370570dcea65a5c2e676fd652c Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Thu, 10 Nov 2016 18:16:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=80=9A=E7=9F=A5=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=89=8D=E5=8F=B0=E4=B8=8E=E5=90=8E=E5=8F=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Bootstrap.Admin.csproj | 1 + Bootstrap.Admin/Content/css/admin.css | 4 +- Bootstrap.Admin/Content/css/tasks.css | 4 + Bootstrap.Admin/Models/HeaderBarModel.cs | 5 + Bootstrap.Admin/Scripts/News.js | 3 + Bootstrap.Admin/Scripts/_references.js | Bin 3210 -> 3278 bytes Bootstrap.Admin/Views/Admin/News.cshtml | 133 +++++++++++++----- Bootstrap.Admin/Views/Admin/Profiles.cshtml | 2 +- .../Bootstrap.DataAccess.csproj | 2 + Bootstrap.DataAccess/Notifications.cs | 31 ++++ Bootstrap.DataAccess/NotificationsHelper.cs | 23 +++ 11 files changed, 166 insertions(+), 42 deletions(-) create mode 100644 Bootstrap.Admin/Scripts/News.js create mode 100644 Bootstrap.DataAccess/Notifications.cs create mode 100644 Bootstrap.DataAccess/NotificationsHelper.cs diff --git a/Bootstrap.Admin/Bootstrap.Admin.csproj b/Bootstrap.Admin/Bootstrap.Admin.csproj index 4be1506f..d41df598 100644 --- a/Bootstrap.Admin/Bootstrap.Admin.csproj +++ b/Bootstrap.Admin/Bootstrap.Admin.csproj @@ -179,6 +179,7 @@ + diff --git a/Bootstrap.Admin/Content/css/admin.css b/Bootstrap.Admin/Content/css/admin.css index e791a8aa..413f58b0 100644 --- a/Bootstrap.Admin/Content/css/admin.css +++ b/Bootstrap.Admin/Content/css/admin.css @@ -202,11 +202,11 @@ ul.sidebar-menu { } /*cache*/ -a.cf { +.panel a.fa-refresh { font-size: 15px; } - a.cf:hover { + .panel a.fa-refresh:hover { -webkit-animation: fa-spin 2s infinite linear; animation: fa-spin 2s infinite linear; } diff --git a/Bootstrap.Admin/Content/css/tasks.css b/Bootstrap.Admin/Content/css/tasks.css index da1f7a7b..6e433aa3 100644 --- a/Bootstrap.Admin/Content/css/tasks.css +++ b/Bootstrap.Admin/Content/css/tasks.css @@ -61,6 +61,10 @@ padding-left: 16px; } + .tasks-widget .task-list li > .task-title .task-wrapper.notifi { + right: 70px; + } + .tasks-widget .task-list li > .task-title .task-wrapper span { display: inline-block; white-space: nowrap; diff --git a/Bootstrap.Admin/Models/HeaderBarModel.cs b/Bootstrap.Admin/Models/HeaderBarModel.cs index 90434b3a..85d71378 100644 --- a/Bootstrap.Admin/Models/HeaderBarModel.cs +++ b/Bootstrap.Admin/Models/HeaderBarModel.cs @@ -17,6 +17,7 @@ namespace Bootstrap.Admin.Models UserID = user.ID; HomeUrl = "~/"; Menus = MenuHelper.RetrieveLinksByUserName(UserName); + Notifications = NotificationsHelper.RetrieveNotifications(); } public string UserName { get; protected set; } /// @@ -39,5 +40,9 @@ namespace Bootstrap.Admin.Models /// 获得/设置 前台菜单 /// public IEnumerable Menus { get; private set; } + /// + /// + /// + public IEnumerable Notifications { get; set; } } } \ No newline at end of file diff --git a/Bootstrap.Admin/Scripts/News.js b/Bootstrap.Admin/Scripts/News.js new file mode 100644 index 00000000..d53d3763 --- /dev/null +++ b/Bootstrap.Admin/Scripts/News.js @@ -0,0 +1,3 @@ +$(function () { + $('.tooltips').tooltip(); +}); \ No newline at end of file diff --git a/Bootstrap.Admin/Scripts/_references.js b/Bootstrap.Admin/Scripts/_references.js index cfff2bd1a004ef77079a6e83a0b3c973354fba78..d10a5a9b7f2cdea13f3276a9e32cfd93ff799084 100644 GIT binary patch delta 22 dcmeB@JSVxqhnqEzA(f$gvLTQCW*=@lMgUKZ1~~u# delta 12 TcmX>n*(JHbhkNq`ZaYQ*A3p>i diff --git a/Bootstrap.Admin/Views/Admin/News.cshtml b/Bootstrap.Admin/Views/Admin/News.cshtml index 1e7eac3c..12d2f2cf 100644 --- a/Bootstrap.Admin/Views/Admin/News.cshtml +++ b/Bootstrap.Admin/Views/Admin/News.cshtml @@ -1,39 +1,94 @@ -@model NavigatorBarModel -@{ - ViewBag.Title = "通知管理"; - Layout = "~/Views/Shared/_Admin.cshtml"; -} -@section Javascript { - - -} -@section css { - -} -@section header { - @Html.Partial("Header", Model) -} -@section navigator { - @Html.Partial("Navigator", Model) -} -
-
新用户注册未授权通知
-
-
-
    -
  • -
    - 注册名:测试小王 - 注册时间:20016-9-18 - 注册描述:某某部门新入职员工 -
    - - -
    -
    -
  • -
-
-
-
- +@model NavigatorBarModel +@{ + ViewBag.Title = "通知管理"; + Layout = "~/Views/Shared/_Admin.cshtml"; +} +@section Javascript { + + +} +@section css { + +} +@section header { + @Html.Partial("Header", Model) +} +@section navigator { + @Html.Partial("Navigator", Model) +} +
+
用户注册
+
+
+
    + @foreach (var nofi in Model.Notifications) + { +
  • + +
    + @nofi.Title +
    + @nofi.Content +
    +
    + + +
    +
    +
  • + } +
+
+
+
+
+
程序错误
+
+
+
    + @foreach (var nofi in Model.Notifications) + { +
  • + +
    + @nofi.Title +
    + @nofi.Content +
    +
    + + +
    +
    +
  • + } +
+
+
+
+
+
数据库报警
+
+
+
    + @foreach (var nofi in Model.Notifications) + { +
  • + +
    + @nofi.Title +
    + @nofi.Content +
    +
    + + +
    +
    +
  • + } +
+
+
+
+ diff --git a/Bootstrap.Admin/Views/Admin/Profiles.cshtml b/Bootstrap.Admin/Views/Admin/Profiles.cshtml index 47968681..93c028b3 100644 --- a/Bootstrap.Admin/Views/Admin/Profiles.cshtml +++ b/Bootstrap.Admin/Views/Admin/Profiles.cshtml @@ -43,7 +43,7 @@
-
网站缓存
+
网站缓存
    diff --git a/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj b/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj index eed9ec65..6f5bcc8e 100644 --- a/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj +++ b/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj @@ -67,6 +67,8 @@ + + diff --git a/Bootstrap.DataAccess/Notifications.cs b/Bootstrap.DataAccess/Notifications.cs new file mode 100644 index 00000000..c1667989 --- /dev/null +++ b/Bootstrap.DataAccess/Notifications.cs @@ -0,0 +1,31 @@ +using System; + +namespace Bootstrap.DataAccess +{ + /// + /// + /// + public class Notifications + { + /// + /// + /// + public string Category { get; set; } + /// + /// + /// + public string Title { get; set; } + /// + /// + /// + public string Content { get; set; } + /// + /// + /// + public DateTime RegisterTime { get; set; } + /// + /// + /// + public string Status { get; set; } + } +} diff --git a/Bootstrap.DataAccess/NotificationsHelper.cs b/Bootstrap.DataAccess/NotificationsHelper.cs new file mode 100644 index 00000000..2ea768e0 --- /dev/null +++ b/Bootstrap.DataAccess/NotificationsHelper.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; + +namespace Bootstrap.DataAccess +{ + /// + /// + /// + public static class NotificationsHelper + { + /// + /// + /// + /// + public static IEnumerable RetrieveNotifications() + { + var ret = new List(); + ret.Add(new Notifications() { Title = "测试消息1", Content = "用户注册", RegisterTime = DateTime.Now }); + ret.Add(new Notifications() { Title = "测试消息2", Content = "用户注册", RegisterTime = DateTime.Now }); + return ret; + } + } +}