Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
mausch committed Jan 11, 2012
1 parent 21d003c commit 3250d4d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions QuartzNetWebConsole/Controllers/LogController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,16 @@ public override IResult Execute(HttpContextBase context) {

public KeyValuePair<string, Func<IEnumerable<LogEntry>, PaginationInfo, string, XDocument>> GetView(IEnumerable<string> qs) {
if (qs.Contains("rss"))
return Helpers.KV<string, Func<IEnumerable<LogEntry>, PaginationInfo, string, XDocument>>("application/rss+xml", (e, p, u) => new XDocument(Views.Views.LogRSS(u, e)));
return Helpers.KV<string, Func<IEnumerable<LogEntry>, PaginationInfo, string, XDocument>>(null, (e, p, u) => Helpers.XHTML(Views.Views.Log(e,p,u)));
return Helpers.KV("application/rss+xml", RSSView);
return Helpers.KV((string)null, XHTMLView);
}

public static readonly Func<IEnumerable<LogEntry>, PaginationInfo, string, XDocument> XHTMLView =
(entries, pagination, url) => Helpers.XHTML(Views.Views.Log(entries, pagination, url));

public static readonly Func<IEnumerable<LogEntry>, PaginationInfo, string, XDocument> RSSView =
(entries, pagination, url) => new XDocument(Views.Views.LogRSS(url, entries));

public int GetPageSize(NameValueCollection nv) {
try {
return int.Parse(nv["max"]);
Expand Down

0 comments on commit 3250d4d

Please sign in to comment.