1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Added better url generatioin for user git host.

This commit is contained in:
Uncled1023 2016-05-15 01:06:27 -07:00
parent c96351ae06
commit 24e89c02aa

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))
{