Bladeren bron

Changed user 'Index' to be 'ViewProfile' to better match what it actually is.

tags/2.0.6
Teknikode 4 jaren geleden
bovenliggende
commit
17573b5fd3

+ 1
- 1
Teknik/Areas/Admin/Views/Admin/UserInfo.cshtml Bestand weergeven

@@ -4,6 +4,6 @@

<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<a href="@Url.SubRouteUrl("user", "User.Index", new { username = Model.Username })">@Model.Username</a>
<a href="@Url.SubRouteUrl("user", "User.ViewProfile", new { username = Model.Username })">@Model.Username</a>
</div>
</div>

+ 1
- 1
Teknik/Areas/Blog/Views/Blog/Comment.cshtml Bestand weergeven

@@ -7,7 +7,7 @@
<div class="col-sm-8 col-sm-offset-2">
<div class="post-comment">
<p class="post-comment-meta text-muted">
<a href="@Url.SubRouteUrl("user", "User.Index", new { username = Model.User.Username })">@Model.User.Username</a> replied at <time datetime="@Model.DatePosted.ToString("s")">@Model.DatePosted.ToString("hh:mm:ss tt") on @Model.DatePosted.ToString("MMMM dd, yyyy")</time>
<a href="@Url.SubRouteUrl("user", "User.ViewProfile", new { username = Model.User.Username })">@Model.User.Username</a> replied at <time datetime="@Model.DatePosted.ToString("s")">@Model.DatePosted.ToString("hh:mm:ss tt") on @Model.DatePosted.ToString("MMMM dd, yyyy")</time>
@if (Model.User.Username == User.Identity.Name || User.IsInRole("Admin"))
{
<br />

+ 1
- 1
Teknik/Areas/Blog/Views/Blog/Post.cshtml Bestand weergeven

@@ -11,7 +11,7 @@
@if (!Model.System)
{
<text>
by <a href="@Url.SubRouteUrl("user", "User.Index", new { username = Model.Blog.User.Username })">@Model.Blog.User.Username</a>
by <a href="@Url.SubRouteUrl("user", "User.ViewProfile", new { username = Model.Blog.User.Username })">@Model.Blog.User.Username</a>
</text>
}
@if (Model.Blog.User.Username == User.Identity.Name || User.IsInRole("Admin"))

+ 2
- 2
Teknik/Areas/Home/Views/Home/Index.cshtml Bestand weergeven

@@ -110,7 +110,7 @@
</div>
</div>
</a>
<a href="@Url.SubRouteUrl("user", "User.Index")">
<a href="@Url.SubRouteUrl("user", "User.ViewProfile")">
<div class="col-md-3 text-center">
<br />
<i class="fa fa-sitemap fa-5x"></i>
@@ -230,7 +230,7 @@
<h2 class="blog-post-title-sm text-left"><a href="@Url.SubRouteUrl("blog", "Blog.Post", new { username = post.Blog.User.Username, id = post.BlogPostId })" id="title_@post.BlogPostId">@Html.Markdown(post.Title)</a>
</h2>
<p class="blog-post-meta-sm text-left text-muted">
Posted on <time datetime="@post.DatePosted.ToString("s")">@post.DatePosted.ToString("MMMM dd, yyyy")</time> by <a href="@Url.SubRouteUrl("user", "User.Index", new { username = post.Blog.User.Username })">@post.Blog.User.Username</a>
Posted on <time datetime="@post.DatePosted.ToString("s")">@post.DatePosted.ToString("MMMM dd, yyyy")</time> by <a href="@Url.SubRouteUrl("user", "User.ViewProfile", new { username = post.Blog.User.Username })">@post.Blog.User.Username</a>
</p>
</div>
</div>

+ 1
- 1
Teknik/Areas/Podcast/Views/Podcast/Comment.cshtml Bestand weergeven

@@ -7,7 +7,7 @@
<div class="col-sm-8 col-sm-offset-2">
<div class="post-comment">
<p class="post-comment-meta text-muted">
<a href="@Url.SubRouteUrl("user", "User.Index", new { username = Model.User.Username })">@Model.User.Username</a> replied at <time datetime="@Model.DatePosted.ToString("s")">@Model.DatePosted.ToString("hh:mm:ss tt") on @Model.DatePosted.ToString("MMMM dd, yyyy")</time>
<a href="@Url.SubRouteUrl("user", "User.ViewProfile", new { username = Model.User.Username })">@Model.User.Username</a> replied at <time datetime="@Model.DatePosted.ToString("s")">@Model.DatePosted.ToString("hh:mm:ss tt") on @Model.DatePosted.ToString("MMMM dd, yyyy")</time>
@if (Model.User.Username == User.Identity.Name || User.IsInRole("Admin"))
{
<br />

+ 1
- 1
Teknik/Areas/User/Controllers/UserController.cs Bestand weergeven

@@ -28,7 +28,7 @@ namespace Teknik.Areas.Users.Controllers
// GET: Profile/Profile
[TrackPageView]
[AllowAnonymous]
public ActionResult Index(string username)
public ActionResult ViewProfile(string username)
{
if (string.IsNullOrEmpty(username))
{

+ 2
- 2
Teknik/Areas/User/UserAreaRegistration.cs Bestand weergeven

@@ -84,11 +84,11 @@ namespace Teknik.Areas.Users
new[] { typeof(Controllers.UserController).Namespace }
);
context.MapSubdomainRoute(
"User.Index", // Route name
"User.ViewProfile", // Route name
new List<string>() { "user" }, // Subdomains
new List<string>() { config.Host }, // domains
"u/{username}", // URL with parameters
new { controller = "User", action = "Index", username = UrlParameter.Optional }, // Parameter defaults
new { controller = "User", action = "ViewProfile", username = UrlParameter.Optional }, // Parameter defaults
new[] { typeof(Controllers.UserController).Namespace }
);
context.MapSubdomainRoute(

Teknik/Areas/User/Views/User/Index.cshtml → Teknik/Areas/User/Views/User/ViewProfile.cshtml Bestand weergeven


+ 1
- 1
Teknik/Areas/User/Views/User/_LoginPartial.cshtml Bestand weergeven

@@ -15,7 +15,7 @@
<a href="@Url.SubRouteUrl("blog", "Blog.Blog", new { username = User.Identity.Name })">Blog</a>
</li>
<li>
<a href="@Url.SubRouteUrl("user", "User.Index", new { username = User.Identity.Name })">Profile</a>
<a href="@Url.SubRouteUrl("user", "User.ViewProfile", new { username = User.Identity.Name })">Profile</a>
</li>
<li>
<a href="@Url.SubRouteUrl("user", "User.Settings")">Settings</a>

+ 1
- 1
Teknik/Teknik.csproj Bestand weergeven

@@ -477,7 +477,7 @@
<Content Include="Areas\Contact\Views\Contact\Index.cshtml" />
<Content Include="Areas\User\Views\web.config" />
<Content Include="Areas\User\Views\_ViewStart.cshtml" />
<Content Include="Areas\User\Views\User\Index.cshtml" />
<Content Include="Areas\User\Views\User\ViewProfile.cshtml" />
<Content Include="Areas\Blog\Views\Blog\Posts.cshtml" />
<Content Include="Areas\Blog\Views\Blog\Post.cshtml" />
<Content Include="Areas\Blog\Views\Blog\ViewPost.cshtml" />

Laden…
Annuleren
Opslaan