|
<%@ Control Language="C#" Inherits="DNA.Mvc.DynamicUI.WidgetViewUserControl<DNA.Mvc.OpenAPI.Rss.RssChannel>" %>
<%:Ajax.RenderAutoSettingForm(PropertyDescriptors, IDPrefix, IsDesignMode)%>
<% if (Model.Items.Count > 0)
{ %>
<table style="width: 100%;" cellpadding="5px">
<% if ((bool)UserData["ShowFeedInfo"])
{ %>
<tr>
<td>
<table>
<tr>
<td valign="middle">
<% if (!string.IsNullOrEmpty(Model.Image.ImageUrl))
{ %>
<% if (!string.IsNullOrEmpty(Model.Image.NavigateUrl))
{ %>
<a href="<%:Model.Image.NavigateUrl %>" target="_blank">
<%} %>
<img src="<%:Model.Image.ImageUrl %>" alt="logo" />
<% if (!string.IsNullOrEmpty(Model.Image.NavigateUrl))
{ %></a><%} %>
</td>
<%} %>
<td valign="top">
<h2>
<% if (!string.IsNullOrEmpty(Model.Link))
{ %>
<a href="<%:Model.Link %>" target="_blank">
<%} %>
<%:Model.Title%>
<% if (!string.IsNullOrEmpty(Model.Link))
{ %></a><%} %>
</h2>
<div>
<%:Model.Description%></div>
<div>
<%:Model.Copyright %>
</div>
</td>
</tr>
</table>
</td>
</tr>
<%} %>
<%
int _rows = (int)UserData["Rows"];
var i = 0;
foreach (var item in Model.Items)
{
if (_rows > 0)
{
if (i >= _rows)
break;
}
%>
<tr>
<td valign="top">
<h3 class="ui-title" style="margin-top: 0px;">
<a href="<%:item.Link %>" target="_blank">
<%:item.Title %></a>
</h3>
<div style="padding: 5px;">
<%:string.IsNullOrEmpty(item.Description) ? MvcHtmlString.Empty : MvcHtmlString.Create(item.Description)%>
</div>
</td>
</tr>
<tr>
<td>
<%:Html.ImageLinkList()
.Options(opts =>
{
opts.CssClass = "ui-helper-reset";
opts.ItemCssStyleText = "float:left;margin-right:5px;";
opts.ImageCssStyleText = "float:left;margin-right:5px;";
opts.TitleCssStyleText = "float:left;padding-top:2px;";
})
.Items(items => {
if (!string.IsNullOrEmpty(item.Author))
{
items.Add("Post by:");
items.Add(item.Author, "");
}
if (item.Categories.Count > 0)
{
items.Add("Categories:");
foreach (var c in item.Categories)
items.Add(c.Text,"",c.Domain);
}
items.Add("published:");
items.Add(item.PubDate);
})
.Render()
%>
</td>
</tr>
<%
i++;
}
%>
</table>
<%}
else
{ %>
<div class="ui-state-highlight ui-corner-all" style="padding: 15px; margin-top: 5px;">
<%:Html.Global("Feed_Empty") %>
<% if ((HttpContext.Current.User.IsWebOwner()) && (string.IsNullOrEmpty(UserData["Url"] as string)) && !IsDesignMode)
{
%>
<div style="margin-top: 5px;">
Please <a href="javascript:void(0);" onclick="location=location+'?design=true&returnUrl='+location;">
<u>toggle</u></a> the page design mode and set the Url of feed to enable this
subscription.
</div>
<%} %>
<% if ((HttpContext.Current.User.IsWebOwner()) && (string.IsNullOrEmpty(UserData["Url"] as string) && IsDesignMode))
{ %>
Open the feed
<%:GenVerbLink("<u>setting</u>", WidgetVerbs.Settings)%>
an set the url to enable the feed subscription.
<%} %>
</div>
<%} %>
<%:Html.StartupScripts() %>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
In 1999, I started programming using Delphi, VB, VJ.From 2002 I started with .NET using C#.Since 2005 when i had became an EIP product manager I was focus on EIP and CMS technique. In 2008 i established dotnetage.com and started to shared my ideas and projects online. I believe "No shared no grow"
www.dotnetage.com