Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix routing and blob display bugs #613

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lkho
Copy link
Contributor

@lkho lkho commented Nov 15, 2016

No description provided.

<a href="@Url.RouteUrl("RepositoryBlame", new { id = ViewBag.ID, encodedName = PathEncoder.Encode(Model.TreeName), encodedPath = PathEncoder.Encode(Model.Path, allowSlash: true) })"><i class="fa fa-comments"></i> @Resources.Repository_Tree_Blame</a>
<a href="@Url.RouteUrl("RepositoryHistory", new { id = ViewBag.ID, encodedName = PathEncoder.Encode(Model.TreeName), encodedPath = PathEncoder.Encode(Model.Path, allowSlash: true) })"><i class="fa fa-history"></i> @Resources.Repository_Tree_History</a>
<a href="@Url.RouteUrl("RepositoryRaw", new { id = ViewBag.ID, encodedName = PathEncoder.Encode(Model.TreeName), encodedPath = PathEncoder.Encode(Model.Path, allowSlash: true), display = true })"><i class="fa fa-file-text"></i> @Resources.Repository_Tree_RawDisplay</a>
<a href="@Url.RouteUrl("RepositoryRaw", new { id = ViewBag.ID, encodedName = PathEncoder.Encode(Model.TreeName), encodedPath = PathEncoder.Encode(Model.Path, allowSlash: true) })"><i class="fa fa-download"></i> @Resources.Repository_Tree_Download</a>
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this isn't really fixing a bug - it's just renaming a bunch of actions to include the controller name within the action name - what was the motivation here?

</div>
}
@if (Model.IsImage)
{
<img class="fileImage" alt="@Model.Name" src="@Url.Action("Raw", new { encodedPath = PathEncoder.Encode(Model.Path, allowSlash: true) })" />
<img class="fileImage" alt="@Model.Name" src="@Url.RouteUrl("RepositoryRaw", new { id = ViewBag.ID, encodedName = PathEncoder.Encode(Model.TreeName), encodedPath = PathEncoder.Encode(Model.Path, allowSlash: true) })" />
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, thanks - I'll commit this outside this PR while we get the rest sorted.

@willdean
Copy link
Collaborator

Thanks very much for this stuff - there are some problems with just merging as it is however:

  • It seems to be a mix of bug fixes and stylistic changes
  • Changing the URLs breaks the automated test
  • It's not always clear what the bugs are that are being fixed are - 68c1cc3 is definitely a real fix to a real problem, but I couldn't repro it here on a quick test with a .png file - could you expand on what this fixes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants