Browse Source

Added better url generatioin for user git host.

tags/2.0.3
Teknikode 4 years ago
parent
commit
24e89c02aa
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      Teknik/Areas/User/Views/User/Index.cshtml

+ 4
- 1
Teknik/Areas/User/Views/User/Index.cshtml View File

@@ -8,6 +8,9 @@
@if (!Model.Error)
{
bool OwnProfile = (Model.Username == User.Identity.Name || User.IsInRole("Admin"));
string gitHost = (string.IsNullOrEmpty(Model.Config.Host)) ? string.Empty : Model.Config.GitConfig.Host;
Uri gitUrl = new Uri(gitHost);
gitUrl = new Uri(gitUrl, Model.Username);
string pgpFingerprint = pgpFingerprint = string.Empty;
string pgpFingerprint64 = string.Empty;

@@ -81,7 +84,7 @@
<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>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>
<li class="list-group-item text-right"><span class="pull-left"><strong>Git</strong></span> <a href="@Model.Config.GitConfig.Host/@Model.Username">Public Repos</a></li>
<li class="list-group-item text-right"><span class="pull-left"><strong>Git</strong></span> <a href="@gitUrl.ToString()">Public Repos</a></li>
</ul>
@if (!string.IsNullOrEmpty(Model.UserSettings.Website))
{

Loading…
Cancel
Save