mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 12:03:51 +08:00
Migrating Reports
--HG-- branch : theming
This commit is contained in:
@@ -307,8 +307,8 @@
|
||||
<Content Include="PublishLater\Styles\ui.timepickr.css" />
|
||||
<Content Include="PublishLater\Views\EditorTemplates\Parts\PublishLater.ascx" />
|
||||
<Content Include="Reports\Module.txt" />
|
||||
<Content Include="Reports\Views\Admin\Display.aspx" />
|
||||
<Content Include="Reports\Views\Admin\Index.aspx" />
|
||||
<None Include="Reports\Views\Admin\Display.cshtml" />
|
||||
<None Include="Reports\Views\Admin\Index.cshtml" />
|
||||
<Content Include="Localization\Module.txt" />
|
||||
<Content Include="Localization\Views\Admin\Translate.ascx" />
|
||||
<Content Include="Localization\Views\DisplayTemplates\Parts\Localization.ContentTranslations.SummaryAdmin.ascx" />
|
||||
|
||||
@@ -17,13 +17,13 @@ namespace Orchard.Core.Reports.Controllers {
|
||||
public ActionResult Index() {
|
||||
var model = new ReportsAdminIndexViewModel { Reports = _reportsManager.GetReports().ToList() };
|
||||
|
||||
return View(Shape.Model(model));
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public ActionResult Display(int id) {
|
||||
var model = new DisplayReportViewModel { Report = _reportsManager.Get(id) };
|
||||
|
||||
return View(Shape.Model(model));
|
||||
return View(model);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<DisplayReportViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Reports.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Display Report").ToString())%></h1>
|
||||
<% using(Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<table class="items" summary="<%: T("This is a table of the reports in your application") %>">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><%: T("Type")%></th>
|
||||
<th scope="col"><%: T("Message")%></th>
|
||||
<th scope="col"><%: T("Date")%></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%
|
||||
foreach (var reportEntry in Model.Report.Entries) {
|
||||
%>
|
||||
<tr>
|
||||
<td>
|
||||
<%:reportEntry.Type %>
|
||||
</td>
|
||||
<td>
|
||||
<%:reportEntry.Message %>
|
||||
</td>
|
||||
<td>
|
||||
<%:reportEntry.Utc.ToLocalTime().ToShortDateString()%> <%:reportEntry.Utc.ToLocalTime().ToShortTimeString()%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}%>
|
||||
</table>
|
||||
</fieldset>
|
||||
<% } %>
|
||||
37
src/Orchard.Web/Core/Reports/Views/Admin/Display.cshtml
Normal file
37
src/Orchard.Web/Core/Reports/Views/Admin/Display.cshtml
Normal file
@@ -0,0 +1,37 @@
|
||||
@model DisplayReportViewModel
|
||||
@using Orchard.Core.Reports.ViewModels
|
||||
<h1>@Html.TitleForPage(T("Display Report").ToString())</h1>
|
||||
@using(Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<table class="items" summary="@T("This is a table of the reports in your application")">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">@T("Type")</th>
|
||||
<th scope="col">@T("Message")</th>
|
||||
<th scope="col">@T("Date")</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var reportEntry in Model.Report.Entries) {
|
||||
<tr>
|
||||
<td>
|
||||
@reportEntry.Type
|
||||
</td>
|
||||
<td>
|
||||
@reportEntry.Message
|
||||
</td>
|
||||
<td>
|
||||
@reportEntry.Utc.ToLocalTime().ToShortDateString() @reportEntry.Utc.ToLocalTime().ToShortTimeString()
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</fieldset>
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<ReportsAdminIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Core.Reports.ViewModels"%>
|
||||
<h1><%: Html.TitleForPage(T("Manage Reports").ToString())%></h1>
|
||||
<% using(Html.BeginFormAntiForgeryPost()) { %>
|
||||
<%: Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<table class="items" summary="<%: T("This is a table of the reports in your application") %>">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><%: T("Name")%></th>
|
||||
<th scope="col"><%: T("Title")%></th>
|
||||
<th scope="col"><%: T("Date")%></th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<%
|
||||
foreach (var report in Model.Reports) {
|
||||
%>
|
||||
<tr>
|
||||
<td>
|
||||
<%: Html.ActionLink(Html.Encode(report.ActivityName), "Display", new {id = report.ReportId}) %>
|
||||
</td>
|
||||
<td>
|
||||
<%:report.Title%>
|
||||
</td>
|
||||
<td>
|
||||
<%:report.Utc.ToLocalTime().ToShortDateString()%> <%:report.Utc.ToLocalTime().ToShortTimeString()%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}%>
|
||||
</table>
|
||||
</fieldset>
|
||||
<% } %>
|
||||
37
src/Orchard.Web/Core/Reports/Views/Admin/Index.cshtml
Normal file
37
src/Orchard.Web/Core/Reports/Views/Admin/Index.cshtml
Normal file
@@ -0,0 +1,37 @@
|
||||
@model ReportsAdminIndexViewModel
|
||||
@using Orchard.Core.Reports.ViewModels
|
||||
<h1>@Html.TitleForPage(T("Manage Reports").ToString())</h1>
|
||||
@using(Html.BeginFormAntiForgeryPost()) {
|
||||
@Html.ValidationSummary()
|
||||
<fieldset>
|
||||
<table class="items" summary="@T("This is a table of the reports in your application")">
|
||||
<colgroup>
|
||||
<col id="Col1" />
|
||||
<col id="Col2" />
|
||||
<col id="Col3" />
|
||||
<col id="Col4" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">@T("Name")</th>
|
||||
<th scope="col">@T("Title")</th>
|
||||
<th scope="col">@T("Date")</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach (var report in Model.Reports) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(Html.Encode(report.ActivityName), "Display", new {id = report.ReportId})
|
||||
</td>
|
||||
<td>
|
||||
@report.Title
|
||||
</td>
|
||||
<td>
|
||||
@report.Utc.ToLocalTime().ToShortDateString() @report.Utc.ToLocalTime().ToShortTimeString()
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</fieldset>
|
||||
}
|
||||
@@ -69,7 +69,7 @@ namespace Orchard.Setup.Services {
|
||||
"Contents",
|
||||
//"ContentsLocation",
|
||||
"Dashboard",
|
||||
//"Reports",
|
||||
"Reports",
|
||||
//"Feeds",
|
||||
"HomePage",
|
||||
"Navigation",
|
||||
@@ -78,7 +78,7 @@ namespace Orchard.Setup.Services {
|
||||
//"Localization",
|
||||
"Routable",
|
||||
"Settings",
|
||||
//"XmlRpc",
|
||||
"XmlRpc",
|
||||
"Messaging",
|
||||
"Orchard.Users",
|
||||
"Orchard.Roles",
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
<None Include="Themes\Contoso\Views\HomePage\Home\Index.cshtml" />
|
||||
<None Include="Themes\Contoso\Views\Layout.ascx_" />
|
||||
<None Include="Themes\Contoso\Views\Layout.HomePage.ascx_" />
|
||||
<None Include="Themes\SafeMode\Views\DocumentZone.cshtml" />
|
||||
<None Include="Themes\TheAdmin\Styles\images\icons.psd" />
|
||||
<Content Include="Themes\ClassicDark\Content\Images\bodyBackgroundgrey.gif" />
|
||||
<Content Include="Themes\ClassicDark\Content\Images\sidebarBackground.gif" />
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
@DisplayChildren(Model)
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl" %>
|
||||
<div class="Zone Zone-<%:Model.ZoneName %>">
|
||||
<div class="Zone Zone-<%: (string) Model.ZoneName %>">
|
||||
<%foreach (var item in Model) {%><%:Display(item)%><%}%>
|
||||
</div><!-- Zone-<%:Model.ZoneName %> -->
|
||||
</div><!-- Zone-<%:(string)Model.ZoneName %> -->
|
||||
|
||||
Reference in New Issue
Block a user