mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-07-14 05:28:39 +00:00
Fixes https://codeberg.org/forgejo/forgejo/issues/12082 by reverting commit dd968f147d.
## Checklist
The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. All work and communication must conform to Forgejo's [AI Agreement](https://codeberg.org/forgejo/governance/src/branch/main/AIAgreement.md). There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).
### Tests for Go changes
(can be removed for JavaScript changes)
- I added test coverage for Go changes...
- [ ] in their respective `*_test.go` for unit tests.
- [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I ran...
- [ ] `make pr-go` before pushing
### Tests for JavaScript changes
(can be removed for Go changes)
- I added test coverage for JavaScript changes...
- [ ] in `web_src/js/*.test.js` if it can be unit tested.
- [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).
### Documentation
- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [ ] I did not document these changes and I do not expect someone else to do it.
### Release notes
- [ ] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.
- [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.
*The decision if the pull request will be shown in the release notes is up to the mergers / release team.*
The content of the `release-notes/<pull request number>.md` file will serve as the basis for the release notes. If the file does not exist, the title of the pull request will be used instead.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12088
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Co-authored-by: Henry Catalini Smith <henry@catalinismith.se>
Co-committed-by: Henry Catalini Smith <henry@catalinismith.se>
This commit is contained in:
parent
a1be012c4a
commit
86898a7d05
4 changed files with 9 additions and 19 deletions
|
|
@ -52,10 +52,6 @@
|
|||
"relativetime.1week": "last week",
|
||||
"relativetime.1month": "last month",
|
||||
"relativetime.1year": "last year",
|
||||
"repo.files.caption": "Repository files (latest commit first)",
|
||||
"repo.files.filename": "Filename",
|
||||
"repo.files.last_commit_message": "Latest commit message",
|
||||
"repo.files.last_commit_date": "Latest commit date",
|
||||
"repo.issues.filter_poster.hint": "Filter by the author",
|
||||
"repo.issues.filter_assignee.hint": "Filter by assigned user",
|
||||
"repo.issues.filter_reviewers.hint": "Filter by user who reviewed",
|
||||
|
|
|
|||
|
|
@ -1,23 +1,17 @@
|
|||
<table id="repo-files-table" class="ui single line table tw-mt-0" {{if .HasFilesWithoutLatestCommit}}hx-indicator="tr.notready td.message span" hx-trigger="load" hx-swap="morph" hx-post="{{.LastCommitLoaderURL}}"{{end}}>
|
||||
<caption class="tw-sr-only">
|
||||
{{ctx.Locale.Tr "repo.files.caption"}}
|
||||
</caption>
|
||||
<thead class="tw-sr-only">
|
||||
<th>{{ctx.Locale.Tr "repo.files.filename"}}</th>
|
||||
<th>{{ctx.Locale.Tr "repo.files.last_commit_message"}}</th>
|
||||
<th>{{ctx.Locale.Tr "repo.files.last_commit_date"}}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<thead>
|
||||
<tr class="commit-list">
|
||||
<td class="tw-overflow-hidden" colspan="2">
|
||||
<th class="tw-overflow-hidden" colspan="2">
|
||||
<div class="tw-flex">
|
||||
<div class="latest-commit">
|
||||
{{template "repo/latest_commit" .}}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text grey right age">{{if .LatestCommit}}{{if .LatestCommit.Committer}}{{DateUtils.TimeSince .LatestCommit.Committer.When}}{{end}}{{end}}</td>
|
||||
</th>
|
||||
<th class="text grey right age">{{if .LatestCommit}}{{if .LatestCommit.Committer}}{{DateUtils.TimeSince .LatestCommit.Committer.When}}{{end}}{{end}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{if .HasParentPath}}
|
||||
<tr class="has-parent">
|
||||
<td colspan="3"><a class="muted" href="{{.BranchLink}}{{if .ParentPath}}{{PathEscapeSegments .ParentPath}}{{end}}">{{svg "octicon-reply" 16 "tw-mr-2"}}..</a></td>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ func testViewRepo(t *testing.T) {
|
|||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
files := htmlDoc.doc.Find("#repo-files-table > tbody > tr:not(.commit-list)")
|
||||
files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR")
|
||||
|
||||
type file struct {
|
||||
fileName string
|
||||
|
|
@ -1039,7 +1039,7 @@ func TestRepoFilesList(t *testing.T) {
|
|||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
filesList := htmlDoc.Find("#repo-files-table tbody tr:not(.commit-list)").Map(func(_ int, s *goquery.Selection) string {
|
||||
filesList := htmlDoc.Find("#repo-files-table tbody tr").Map(func(_ int, s *goquery.Selection) string {
|
||||
return s.AttrOr("data-entryname", "")
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ td .commit-summary {
|
|||
max-width: calc(calc(min(100vw, 1280px)) - 145px - calc(2 * var(--page-margin-x)));
|
||||
}
|
||||
|
||||
.repo-files-table-latest-commit-row td {
|
||||
.repository.file.list #repo-files-table thead th {
|
||||
font-weight: var(--font-weight-normal);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue