Browse Source

Modified public view of profile to not make the email a link when the user is not logged in.

pull/111/head
Teknikode 5 years ago
parent
commit
820aa7038a
  1. 6
      Teknik/Areas/User/Views/User/ViewProfile.cshtml

6
Teknik/Areas/User/Views/User/ViewProfile.cshtml

@ -88,14 +88,14 @@ @@ -88,14 +88,14 @@
{
<li class="list-group-item text-right"><span class="pull-left"><strong>Public Key</strong></span> <a href="#" data-toggle="modal" data-target="#pgpSignature">@pgpFingerprint64.AddStringAtInterval(4, " ")</a></li>
}
@if (!string.IsNullOrEmpty(Model.Email))
@if (!string.IsNullOrEmpty(Model.Email) && Model.Config.EmailConfig.Enabled)
{
<li class="list-group-item text-right"><span class="pull-left"><strong>Email</strong></span> <a href="mailto:@Model.Email">@Model.Email</a></li>
<li class="list-group-item text-right"><span class="pull-left"><strong>Email</strong></span> @(Html.Raw(User.Identity.IsAuthenticated ? $"<a href=\"mailto:{Model.Email}\">{Model.Email}</a>" : $"{Model.Username} at {Model.Config.EmailConfig.Domain}"))</li>
}
<li class="list-group-item text-right"><span class="pull-left"><strong>Blog</strong></span> <a href="@Url.SubRouteUrl("blog", "Blog.Blog", new { username = Model.Username })" id="blog_title">@(string.IsNullOrEmpty(Model.BlogSettings.Title) ? string.Format("{0}'s Blog", Model.Username) : Model.BlogSettings.Title)</a></li>
@if (!string.IsNullOrEmpty(gitFullUrl))
{
<li class="list-group-item text-right"><span class="pull-left"><strong>Git</strong></span> <a href="@gitFullUrl">Public Repos</a></li>
<li class="list-group-item text-right"><span class="pull-left"><strong>Git</strong></span> <a href="@gitFullUrl">Public Repos</a></li>
}
</ul>
@if (!string.IsNullOrEmpty(Model.UserSettings.Website))

Loading…
Cancel
Save