hide description when bio is empty (#122)
This commit is contained in:
Родитель
b95f468d30
Коммит
42d27a5a7b
|
@ -13,43 +13,47 @@
|
|||
</p>
|
||||
|
||||
<p class="description">
|
||||
@if (Model is IWorkAtXamarinOrMicrosoft)
|
||||
@if (!string.IsNullOrWhiteSpace(Model.ShortBioOrTagLine))
|
||||
{
|
||||
<text>@Model.FirstName @Model.LastName @Model.ShortBioOrTagLine at Microsoft</text>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model is IAmAXamarinMVP || Model is IAmAMicrosoftMVP)
|
||||
|
||||
if (Model is IWorkAtXamarinOrMicrosoft)
|
||||
{
|
||||
<text>@Model.FirstName @Model.LastName is</text>
|
||||
|
||||
var output = string.Empty;
|
||||
var xamarinMvpModel = Model as IAmAXamarinMVP;
|
||||
if (xamarinMvpModel != null)
|
||||
{
|
||||
output += "a Xamarin";
|
||||
}
|
||||
if (Model is IAmAXamarinMVP && Model is IAmAMicrosoftMVP)
|
||||
{
|
||||
output += " and Microsoft";
|
||||
}
|
||||
else
|
||||
{
|
||||
var microsoftMvpModel = Model as IAmAMicrosoftMVP;
|
||||
if (microsoftMvpModel != null)
|
||||
{
|
||||
output += "a Microsoft";
|
||||
}
|
||||
}
|
||||
|
||||
output += " MVP ";
|
||||
<text>@Html.Raw(output)</text>
|
||||
|
||||
<text>who @Model.ShortBioOrTagLine</text>
|
||||
<text>@Model.FirstName @Model.LastName @Model.ShortBioOrTagLine at Microsoft</text>
|
||||
}
|
||||
else
|
||||
{
|
||||
<text>@Model.FirstName @Model.LastName @Model.ShortBioOrTagLine</text>
|
||||
if (Model is IAmAXamarinMVP || Model is IAmAMicrosoftMVP)
|
||||
{
|
||||
<text>@Model.FirstName @Model.LastName is</text>
|
||||
|
||||
var output = string.Empty;
|
||||
var xamarinMvpModel = Model as IAmAXamarinMVP;
|
||||
if (xamarinMvpModel != null)
|
||||
{
|
||||
output += "a Xamarin";
|
||||
}
|
||||
if (Model is IAmAXamarinMVP && Model is IAmAMicrosoftMVP)
|
||||
{
|
||||
output += " and Microsoft";
|
||||
}
|
||||
else
|
||||
{
|
||||
var microsoftMvpModel = Model as IAmAMicrosoftMVP;
|
||||
if (microsoftMvpModel != null)
|
||||
{
|
||||
output += "a Microsoft";
|
||||
}
|
||||
}
|
||||
|
||||
output += " MVP ";
|
||||
<text>@Html.Raw(output)</text>
|
||||
|
||||
<text>who @Model.ShortBioOrTagLine</text>
|
||||
}
|
||||
else
|
||||
{
|
||||
<text>@Model.FirstName @Model.LastName @Model.ShortBioOrTagLine</text>
|
||||
}
|
||||
}
|
||||
}
|
||||
</p>
|
||||
|
|
Загрузка…
Ссылка в новой задаче