63 lines
No EOL
2.8 KiB
Text
63 lines
No EOL
2.8 KiB
Text
@using Kreta.Web.Areas.Nyomtatvanyok.Models
|
|
@using Kreta.Web.Helpers
|
|
@using LinkExtensions = Kreta.Web.Helpers.LinkExtensions
|
|
|
|
<table style="width: 100%;" class="kendoNyomtatvanyokTabla">
|
|
@foreach (var item in ViewData.Model.Data)
|
|
{
|
|
if (item is TermekportalModel)
|
|
{
|
|
<tr style="padding: 10px;">
|
|
<td style="text-align: center; width: 50px;">
|
|
@{
|
|
var termekportalModel = (TermekportalModel) item;
|
|
string docType = termekportalModel.DocumentType;
|
|
switch (docType)
|
|
{
|
|
case "pdf":
|
|
@Html.KretaIcon("fa-file-pdf-o", new Dictionary<string, object> {{"style", "font-size: 22px; color: #DD0B0B;"}})
|
|
break;
|
|
case "link":
|
|
@Html.KretaIcon("fa-link", new Dictionary<string, object> {{"style", "font-size: 22px; color: #295497;"}})
|
|
break;
|
|
case "xls":
|
|
@Html.KretaIcon("fa-file-excel-o", new Dictionary<string, object> { { "style", "font-size: 22px; color: #049F13;" } })
|
|
break;
|
|
}
|
|
}
|
|
</td>
|
|
<td>
|
|
<div style="cursor: pointer;" onclick="window.open('@item.ActionLink', '_blank')">
|
|
@termekportalModel.Name
|
|
</div>
|
|
</td>
|
|
<td style="text-align: center; width: 50px;">
|
|
@{
|
|
if (!string.IsNullOrWhiteSpace(termekportalModel.ActionLink))
|
|
{
|
|
@LinkExtensions.KretaActionLink(Html, termekportalModel.Name, termekportalModel.ActionLink, "btn btn-default", "<i class='fa fa-external-link'></i>")
|
|
}
|
|
else
|
|
{
|
|
@LinkExtensions.KretaActionLink(Html, termekportalModel.Name, termekportalModel.ActionLink, "btn btn-default disabledItem", "<i class='fa fa-external-link'></i>")
|
|
}
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
else if (item is TermekLeirasModel)
|
|
{
|
|
var termekLeirasModel = (TermekLeirasModel) item;
|
|
<tr>
|
|
<td>
|
|
<h5 style="font-weight: bold; margin: 20px 0 0 10px">@termekLeirasModel.Title</h5>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p style="text-align: justify; margin: 20px">@(Html.Raw(termekLeirasModel.Description))</p>
|
|
</td>
|
|
</tr>
|
|
}
|
|
}
|
|
</table> |