From 42d27a5a7ba6a2eba63cf58c02b96b558f2a69aa Mon Sep 17 00:00:00 2001
From: Geoffrey Huntley
Date: Thu, 19 Jan 2017 20:18:02 +1100
Subject: [PATCH] hide description when bio is empty (#122)
---
a.out | 0
.../Views/Authors/ProfileCard.cshtml | 68 ++++++++++---------
2 files changed, 36 insertions(+), 32 deletions(-)
create mode 100644 a.out
diff --git a/a.out b/a.out
new file mode 100644
index 0000000..e69de29
diff --git a/src/Firehose.Web/Views/Authors/ProfileCard.cshtml b/src/Firehose.Web/Views/Authors/ProfileCard.cshtml
index 0c44641..5d466b2 100644
--- a/src/Firehose.Web/Views/Authors/ProfileCard.cshtml
+++ b/src/Firehose.Web/Views/Authors/ProfileCard.cshtml
@@ -13,43 +13,47 @@
- @if (Model is IWorkAtXamarinOrMicrosoft)
+ @if (!string.IsNullOrWhiteSpace(Model.ShortBioOrTagLine))
{
- @Model.FirstName @Model.LastName @Model.ShortBioOrTagLine at Microsoft
- }
- else
- {
- if (Model is IAmAXamarinMVP || Model is IAmAMicrosoftMVP)
+
+ if (Model is IWorkAtXamarinOrMicrosoft)
{
- @Model.FirstName @Model.LastName is
-
- 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 ";
- @Html.Raw(output)
-
- who @Model.ShortBioOrTagLine
+ @Model.FirstName @Model.LastName @Model.ShortBioOrTagLine at Microsoft
}
else
{
- @Model.FirstName @Model.LastName @Model.ShortBioOrTagLine
+ if (Model is IAmAXamarinMVP || Model is IAmAMicrosoftMVP)
+ {
+ @Model.FirstName @Model.LastName is
+
+ 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 ";
+ @Html.Raw(output)
+
+ who @Model.ShortBioOrTagLine
+ }
+ else
+ {
+ @Model.FirstName @Model.LastName @Model.ShortBioOrTagLine
+ }
}
}