aboutsummaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Fix duplicate ID when deleting repo (#28520)David Øvrelid2023-12-192-4/+4
| | | | | | | | There is an accessibility issue in the interface when attempting to delete a repository. When I click on "Delete repository," a dialog box appears, requiring confirmation to proceed with the repository deletion. However, when I press the "Repo name" label, the wrong input field gains focus. The focused field is located behind the dialog and is intended for renaming the repository.
* chore(api): support ignore password if login source type is LDAP for ↵Bo-Yi Wu2023-12-191-2/+1
| | | | | | | | | | | | creating user API (#28491) - Modify the `Password` field in `CreateUserOption` struct to remove the `Required` tag - Update the `v1_json.tmpl` template to include the `email` field and remove the `password` field --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Improve the prompt for "ssh-keygen sign" (#28509)wxiaoguang2023-12-181-1/+1
| | | | | Close #28505, ref: * https://github.com/go-gitea/gitea/pull/20112#issuecomment-1165423026 * https://github.com/go-gitea/gitea/issues/28505#issuecomment-1860048116
* Add option to disable ambiguous unicode characters detection (#28454)wxiaoguang2023-12-171-3/+3
| | | | | | | | * Close #24483 * Close #28123 * Close #23682 * Close #23149 (maybe more)
* Remove duplicate option in admin screen and now-unused translation keys (#28492)The Magician2023-12-171-2/+0
| | | | | | | | | | | | | Resolves https://github.com/go-gitea/gitea/issues/28451. This change follows the recommendation by wxiaoguang to remove the "Disable Minimum Key Size Check" from the "Service Configuration" section of the UI, because this option belongs to the "SSH Configuration" section of the administration menu and already has a functioning indicator in that section of the UI. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove unnecessary forgot password link in delete user section (#28355)yp053272023-12-151-1/+0
| | | | | | | | | Before: <img width="458" alt="image" src="https://github.com/go-gitea/gitea/assets/18380374/92815496-38cc-4bb9-9182-1509a72b07f6"> After: ![image](https://github.com/go-gitea/gitea/assets/18380374/d96ed908-47ad-44cc-a624-4c10fa8c8c86)
* Deprecate query string auth tokens (#28390)Jack Hay2023-12-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Changes - Add deprecation warning to `Token` and `AccessToken` authentication methods in swagger. - Add deprecation warning header to API response. Example: ``` HTTP/1.1 200 OK ... Warning: token and access_token API authentication is deprecated ... ``` - Add setting `DISABLE_QUERY_AUTH_TOKEN` to reject query string auth tokens entirely. Default is `false` ## Next steps - `DISABLE_QUERY_AUTH_TOKEN` should be true in a subsequent release and the methods should be removed in swagger - `DISABLE_QUERY_AUTH_TOKEN` should be removed and the implementation of the auth methods in question should be removed ## Open questions - Should there be further changes to the swagger documentation? Deprecation is not yet supported for security definitions (coming in [OpenAPI Spec version 3.2.0](https://github.com/OAI/OpenAPI-Specification/issues/2506)) - Should the API router logger sanitize urls that use `token` or `access_token`? (This is obviously an insufficient solution on its own) --------- Co-authored-by: delvh <dev.lh@web.de>
* Let `curl` write the content to file (#28427)KN4CK3R2023-12-121-1/+1
|
* Improve text in Security settings (#28393)Panagiotis "Ivory" Vasilopoulos2023-12-082-0/+3
| | | | | | | | - en-US: Rename "Scratch Tokens" to "single-use recovery keys". Longer, but clearer. - Improve titles - TOTP: Improve description - TOTP: Inform user about Scratch Tokens to encourage TOTP usage - WebAuthn: Add loss of access warning
* Include public repos in doer's dashboard for issue search (#28304)Jason Song2023-12-071-50/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will fix #28268 . <img width="1313" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/cb1e07d5-7a12-4691-a054-8278ba255bfc"> <img width="1318" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/4fd60820-97f1-4c2c-a233-d3671a5039e9"> ## :warning: BREAKING :warning: But need to give up some features: <img width="1312" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/281c0d51-0e7d-473f-bbed-216e2f645610"> However, such abandonment may fix #28055 . ## Backgroud When the user switches the dashboard context to an org, it means they want to search issues in the repos that belong to the org. However, when they switch to themselves, it means all repos they can access because they may have created an issue in a public repo that they don't own. <img width="286" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/182dcd5b-1c20-4725-93af-96e8dfae5b97"> It's a confusing design. Think about this: What does "In your repositories" mean when the user switches to an org? Repos belong to the user or the org? Whatever, it has been broken by #26012 and its following PRs. After the PR, it searches for issues in repos that the dashboard context user owns or has been explicitly granted access to, so it causes #28268. ## How to fix it It's not really difficult to fix it. Just extend the repo scope to search issues when the dashboard context user is the doer. Since the user may create issues or be mentioned in any public repo, we can just set `AllPublic` to true, which is already supported by indexers. The DB condition will also support it in this PR. But the real difficulty is how to count the search results grouped by repos. It's something like "search issues with this keyword and those filters, and return the total number and the top results. **Then, group all of them by repo and return the counts of each group.**" <img width="314" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/5206eb20-f8f5-49b9-b45a-1be2fcf679f4"> Before #26012, it was being done in the DB, but it caused the results to be incomplete (see the description of #26012). And to keep this, #26012 implement it in an inefficient way, just count the issues by repo one by one, so it cannot work when `AllPublic` is true because it's almost impossible to do this for all public repos. https://github.com/go-gitea/gitea/blob/1bfcdeef4cca0f5509476358e5931c13d37ed1ca/modules/indexer/issues/indexer.go#L318-L338 ## Give up unnecessary features We may can resovle `TODO: use "group by" of the indexer engines to implement it`, I'm sure it can be done with Elasticsearch, but IIRC, Bleve and Meilisearch don't support "group by". And the real question is, does it worth it? Why should we need to know the counts grouped by repos? Let me show you my search dashboard on gitea.com. <img width="1304" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/2bca2d46-6c71-4de1-94cb-0c9af27c62ff"> I never think the long repo list helps anything. And if we agree to abandon it, things will be much easier. That is this PR. ## TODO I know it's important to filter by repos when searching issues. However, it shouldn't be the way we have it now. It could be implemented like this. <img width="1316" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/99ee5f21-cbb5-4dfe-914d-cb796cb79fbe"> The indexers support it well now, but it requires some frontend work, which I'm not good at. So, I think someone could help do that in another PR and merge this one to fix the bug first. Or please block this PR and help to complete it. Finally, "Switch dashboard context" is also a design that needs improvement. In my opinion, it can be accomplished by adding filtering conditions instead of "switching".
* Issue fixes for RSS feed improvements (#28380)Panagiotis "Ivory" Vasilopoulos2023-12-072-4/+4
| | | | | | Follow-up for #28368 - Just replace button with an a-element with the button class - Remove useless link-action class from template/org/home.tmpl
* Fix margin in server signed signature verification view (#28379)Lauris BH2023-12-071-1/+1
| | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/165205/e2e2256d-03c5-4ab8-8ed9-08ef68571a43) After: ![image](https://github.com/go-gitea/gitea/assets/165205/804132ef-18f9-4ab8-949d-f6c71e7f4d24)
* Improve RSS feed icons (#28368)Panagiotis "Ivory" Vasilopoulos2023-12-064-10/+19
| | | | | | | | | | | | | | | | | | | | - The RSS Feed icons were placed in a proper button, so that it does not look "inconsistent". This also makes the problem of the button being improperly aligned go away. - The icon that shows on user profiles has not been modified because of a lack of better implementation ideas. - Where applicable, the RSS Feed icon was put directly next to the Follow button (right menu), as both functionalities effectively share the same purpose. - Despite the attempt at achieving less inconsistency, a conscious decision to not add any text to those buttons was made, opting for tooltips instead. "Make it present, but not too annoying." - A special exception was made for the Releases pages (which contains text, not a tooltip), where an RSS feed would be particularly beneficial to users. The fact that the RSS functionality is explicitly optional was taken into account, and these improvements were made with public-facing instances (where the feature works best) in mind.
* Fix the runs will not be displayed bug when the main branch have no ↵Lunny Xiao2023-12-061-1/+1
| | | | workflows but other branches have (#28359)
* Remove deprecated query condition in ListReleases (#28339)Nanguan Lin2023-12-051-6/+0
| | | | | | | | | | | | | close #24057 call stack: https://github.com/go-gitea/gitea/blob/25faee3c5f5be23c99b3b7e50418fc0dbad7a41b/routers/api/v1/repo/release.go#L154 https://github.com/go-gitea/gitea/blob/ec1feedbf582b05b6a5e8c59fb2457f25d053ba2/routers/api/v1/utils/page.go#L13-L18 https://github.com/go-gitea/gitea/blob/ec1feedbf582b05b6a5e8c59fb2457f25d053ba2/services/convert/utils.go#L15-L22 ## :warning: Breaking :warning: (though it's not caused by this PR) Do not use `per_page` to specify pagination; use `limit` instead
* Refactor template empty checks (#28351)KN4CK3R2023-12-0411-23/+23
|
* Keep profile tab when clicking on Language (#28320)JakobDev2023-12-011-1/+1
| | | Fixes https://codeberg.org/Codeberg/Community/issues/1355
* Use full width for project boards (#28225)Denys Konovalov2023-11-273-53/+59
| | | Inspired by #28182
* Fix link to `Code` tab on wiki commits (#28041)JakobDev2023-11-271-1/+1
| | | | | | | | Fixes https://codeberg.org/forgejo/forgejo/issues/1759 If you are bowing another branch than the default branch and click n the Code tab, it will take you to the root of the branch. The `BranchName` variable is also set when viewing a Wiki commit, so we also need to check if we are on a Wiki.
* Use full width for PR comparison (#28182)Nanguan Lin2023-11-231-2/+2
| | | | | | | | | | | | Follow-up #22844 close #28142 Before ![ksnip_20231123-183906](https://github.com/go-gitea/gitea/assets/70063547/78428a22-b0a0-45f9-9458-7fd5ec73aa29) After ![full](https://github.com/go-gitea/gitea/assets/70063547/047242cf-9d6c-4b3a-9f92-54102740c27e) Co-authored-by: Giteabot <teabot@gitea.io>
* Fix missing buttons (#28179)Nanguan Lin2023-11-231-0/+4
| | | | | | | | | | | | fix #28173 regression #25948 That PR is supposed to only change the style but somehow delete a code snippet. See the diff(https://github.com/go-gitea/gitea/pull/25948/files#diff-7c36d66fe058f4ff9f2beaac73cf710dca45b350d0dd98daf806828a4745fe62L125-L129) for details. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Revert "Fix EOL handling in web editor" (#28101)Nanguan Lin2023-11-221-4/+3
| | | | Reverts go-gitea/gitea#27141 close #28097
* Fix swagger title (#28164)yp053272023-11-221-1/+1
| | | | ![image](https://github.com/go-gitea/gitea/assets/18380374/380859b2-a643-42fd-b53e-78c93c05c826) Don't know why there's a `.` behind. 🤔
* Do not display search box when there's no packages yet (#28146)yp053272023-11-211-0/+2
| | | | | | | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/3012f544-7ff5-4ccb-ac80-ce24d50abe97) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/4084312a-9ac0-4103-8c93-ea178ae24493) ![image](https://github.com/go-gitea/gitea/assets/18380374/3c47d175-0735-476d-8979-da2bc0a4fc95) ![image](https://github.com/go-gitea/gitea/assets/18380374/033c6a81-d1f7-4426-8063-5793d0b47462)
* Add guide page to actions when there's no workflows (#28145)yp053272023-11-212-0/+12
| | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/599d40c1-9b8d-4189-9286-c9c36fb780dd) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/848a73d1-aaec-478f-93a7-adcc7ee18907)
* Fix empty action run title (#28113)Lunny Xiao2023-11-211-1/+1
| | | Fix #27901
* Add edit option for README.md (#28071)JakobDev2023-11-201-0/+3
| | | | | | | Fix #28059 ![grafik](https://github.com/go-gitea/gitea/assets/15185051/07adc216-954e-486b-bfda-df3bc15f2089)
* Remove autofocus in search box (#28033)yp053272023-11-2012-12/+12
| | | | Mentioned here: https://github.com/go-gitea/gitea/pull/27982#issuecomment-1807923026
* Fix project counter in organization/individual profile (#28068)yp053272023-11-182-0/+6
| | | | | | | | | | | | | | Fix #28052 Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/5f299983-4b38-4d68-ac0e-4be3c62c0558) ![image](https://github.com/go-gitea/gitea/assets/18380374/f0e12afd-483b-4882-80e9-0261beb3fe0c) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/47cccb7b-bb35-4a7d-9c5b-83133be0323a) ![image](https://github.com/go-gitea/gitea/assets/18380374/77825c0c-4bf2-4762-83a2-1a5a173cc22d)
* Fix Show/hide filetree button on small displays (#27881)sebastian-sauer2023-11-171-2/+2
| | | | | | | the gt-df's display:flex !important did override the display:none on small displays --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve PR diff view on mobile (#27883)sebastian-sauer2023-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Show diff stats only on large screens these are already shown in tabs, so no need for this duplicate information on small screens ![image](https://github.com/go-gitea/gitea/assets/1135157/1287839d-7490-42eb-a17e-d526dc0bfd9e) ![image](https://github.com/go-gitea/gitea/assets/1135157/e9dcd89d-ed4d-4945-a7aa-4e6fc6d9c3a2) 2. Hide viewed files information on small screens Github does the same and this gives us more free space on small screens ![image](https://github.com/go-gitea/gitea/assets/1135157/e90b042f-fffb-4f79-a5ae-cd480c9d8334) ![image](https://github.com/go-gitea/gitea/assets/1135157/d2480ffe-58f2-4694-8ae1-a2ab0aae14d4) 3. Review bar now doesn't wrap so we don't need the 77px even on very small screens (the sticky headers are still working) ![image](https://github.com/go-gitea/gitea/assets/1135157/42b19b2b-73ef-4b88-8680-c555879b363b)
* Add word break to the repo list in admin settings page (#28034)yp053272023-11-141-2/+2
| | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/ed464937-e20d-4f5b-b997-e86c2d96469d) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/471e77b3-516e-4ae9-b901-0cf8745eb9aa)
* Improve profile for Organizations (#27982)yp053272023-11-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes some problems in #27955: - autofocus of the search box before: if access the home page will jump to the search box ![image](https://github.com/go-gitea/gitea/assets/18380374/7f100e8d-2bd6-4563-85ba-d6008ffc71d7) after: will not jump to the search box ![image](https://github.com/go-gitea/gitea/assets/18380374/9aab382c-8ebe-4d18-b990-4adbb6c341ad) - incorrect display of overview tab before: ![image](https://github.com/go-gitea/gitea/assets/18380374/b24c79e8-9b79-4576-9276-43bd19172043) after: ![image](https://github.com/go-gitea/gitea/assets/18380374/7aab5827-f086-4874-bd84-39bd81b872f3) - improve the permission check to the private profile repo In #26295, we simply added access control to the private profile. But if user have access to the private profile repo , we should also display the profile. - add a button which can jump to the repo list? I agree @wxiaoguang 's opinion here: https://github.com/go-gitea/gitea/pull/27955#issuecomment-1803178239 But it seems that this feature is sponsored. So can we add a button which can quickly jump to the repo list or just move profile to the `overview` page? --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix the wrong oauth2 name (#27993)Lunny Xiao2023-11-112-2/+2
| | | | Fix #27989 Regression #27798
* Add Profile Readme for Organisations (#27955)65432023-11-091-0/+3
| | | | | | | | | | | | | | | | | https://blog.gitea.com/release-of-1.20.0/#-user-profile-readme-23260 (#23260) did introduce Profile Readme for Users. This makes it usable for Organisations: ![image](https://github.com/go-gitea/gitea/assets/24977596/464ab58b-a952-414b-8a34-6deaeb4f7d35) --- *Sponsored by Kithara Software GmbH* --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Use flex-container on user dashboard (#27956)silverwind2023-11-082-6/+6
| | | | | | | | Same as https://github.com/go-gitea/gitea/pull/26046 but for user dashboard, the sidebar got a bit smaller and there is less padding between sections. <img width="1265" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/0c8d2faa-03ec-4515-a4f2-0a106ef2a928">
* Add word-break to repo description in home page (#27924)yp053272023-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In #25315, @denyskon fixed UI on mobile view. But for the repo description, on desktop view there's no word-break. So maybe we can just add `gt-word-break` to fix it on both mobile view and desktop view. Before: desktop view: ![image](https://github.com/go-gitea/gitea/assets/18380374/a7659f5b-fbe9-400a-8cc2-cca44778556e) mobile view: ![image](https://github.com/go-gitea/gitea/assets/18380374/611f1b81-58ac-4213-b165-5c73e24ca79e) After: desktop view: ![image](https://github.com/go-gitea/gitea/assets/18380374/f21bf3a7-f6aa-457d-9bfa-5c57659c68b1) mobile view(almost same?) ![image](https://github.com/go-gitea/gitea/assets/18380374/ad2d1a4d-1172-402c-b5fc-5e910657847d) --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix rendering assignee changed comments without assignee (#27927)Sebastian Brückner2023-11-071-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | When an assignee changed event comment is rendered, most of it is guarded behind the assignee ID not being 0. However, if it is 0, that results in quite broken rendering for that comment and the next one. This can happen, for example, when repository data imported from outside of Gitea is incomplete. This PR makes sure comments with an assignee ID of 0 are not rendered at all. --- Screenshot before: <img width="272" alt="Bildschirm­foto 2023-11-05 um 20 12 18" src="https://github.com/go-gitea/gitea/assets/42910/7d629d76-fee4-4fe5-9e3a-bf524050cead"> The comments in this screenshot are: 1. A regular text comment 2. A user being unassigned 3. A user being assigned 4. The title of the PR being changed Comments 2 and 3 are rendered without any text, which indents the next comment and does not leave enough vertical space. Co-authored-by: Giteabot <teabot@gitea.io>
* Add word break to release title (#27942)yp053272023-11-071-1/+1
| | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/74c925e0-15ae-4602-8b56-0b69f54a5e7a) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/027c34ef-0cbc-4156-a198-44bf5dd924e2)
* Fix edit topic UI (#27925)yp053272023-11-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: desktop view: ![image](https://github.com/go-gitea/gitea/assets/18380374/c04d8730-5dac-4318-9643-72801da0ca16) mobile view: ![image](https://github.com/go-gitea/gitea/assets/18380374/187220d3-1fcc-4db8-9cf8-ee88fe92d989) after click `Save` btn: ![image](https://github.com/go-gitea/gitea/assets/18380374/c3242470-7e6f-4ddc-a2ac-d896bbd39529) ![image](https://github.com/go-gitea/gitea/assets/18380374/82e03ba5-a6d2-4437-b074-387e7ad5b6ba) refresh the page, you will see that `gt-m-0` is missing after save topic: ![image](https://github.com/go-gitea/gitea/assets/18380374/26914820-9363-483c-af70-78b76de47523) After: desktop view: ![image](https://github.com/go-gitea/gitea/assets/18380374/12d878e1-351e-4983-b3d9-5216e9f30a19) mobile view: ![image](https://github.com/go-gitea/gitea/assets/18380374/4adf9b0f-977b-4bbc-a42f-b9bfb2d648dd) after click `Save` btn: ![image](https://github.com/go-gitea/gitea/assets/18380374/064c911e-d074-4432-8a55-8ff8ddb93989)
* Show correct commit sha when viewing single commit diff (#27916)sebastian-sauer2023-11-061-1/+1
| | | | | | Show the correct sha when viewing a single commit. ![image](https://github.com/go-gitea/gitea/assets/1135157/5f39a84e-11ed-4700-b40b-eb9da6e91bec)
* Remove "tabindex" from some form buttons (#27892)Earl Warren2023-11-032-7/+7
| | | | | | | | Remove the "tabindex" from some form buttons on the "diff box" / "issue view content" page, let the browser use the default tab order. --------- Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor Find Sources and fix bug when view a user who belongs to an ↵Lunny Xiao2023-11-032-8/+6
| | | | | | | | | | | | unactive auth source (#27798) The steps to reproduce it. First, create a new oauth2 source. Then, a user login with this oauth2 source. Disable the oauth2 source. Visit users -> settings -> security, 500 will be displayed. This is because this page only load active Oauth2 sources but not all Oauth2 sources.
* Add `Hide/Show all checks` button to commit status check (#26284)yp053272023-11-028-41/+57
| | | | | | | | | | | | | | | | | | | | | | | | | Step one for a GitHub like commit status check ui: ![image](https://github.com/go-gitea/gitea/assets/18380374/22953b88-1f91-4d19-bc57-ad92d33fa11f) ![image](https://github.com/go-gitea/gitea/assets/18380374/78572a49-c9b0-472b-86a8-8293197e807b) ![image](https://github.com/go-gitea/gitea/assets/18380374/bc5c8d1c-2ab5-4b03-b8c6-20c34b86d856) Step two: ![image](https://github.com/go-gitea/gitea/assets/18380374/938b359e-8823-4192-b82d-55fa40b986fd) ![image](https://github.com/go-gitea/gitea/assets/18380374/2de5bb8f-40f5-462a-8d6d-bac13a32bc2a) The design now will list all commit status checks which takes too much space. This is a pre-improve for #26247 --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Display issue task list on project cards (#27865)KN4CK3R2023-11-021-0/+7
| | | | | | | | Display the issue task list on project cards. ![grafik](https://github.com/go-gitea/gitea/assets/1666336/e6cb3196-8980-403c-9795-3a7b03fbfb3c) Co-authored-by: Giteabot <teabot@gitea.io>
* Clean up template locale usage (#27856)wxiaoguang2023-10-311-10/+10
| | | | | | | | | | | | | | | | | After many refactoring PRs for the "locale" and "template context function", now the ".locale" is not needed for web templates any more. This PR does a clean up for: 1. Remove `ctx.Data["locale"]` for web context. 2. Use `ctx.Locale` in `500.tmpl`, for consistency. 3. Add a test check for `500 page` locale usage. 4. Remove the `Str2html` and `DotEscape` from mail template context data, they are copy&paste errors introduced by #19169 and #16200 . These functions are template functions (provided by the common renderer), but not template data variables. 5. Make email `SendAsync` function mockable (I was planning to add more tests but it would make this PR much too complex, so the tests could be done in another PR)
* Fix package webhook (#27839)Lunny Xiao2023-10-311-0/+4
| | | | | | | Fix #23742 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Always use whole user name as link (#27815)Denys Konovalov2023-10-301-5/+1
| | | | | | | | | | | | | Starting from #25790 this shared template only linked the username of the user if both display name and username were shown. I experienced myself always trying to click on the display name - I think it is annoying for others too. After: ![grafik](https://github.com/go-gitea/gitea/assets/47871822/a0e82127-b773-4ca4-890f-d18422a7bef2) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/79efcf93-2f50-4fc4-ba15-afc6174be48c)
* Fix display member unit in the menu bar if there are no hidden members in ↵yp053272023-10-301-6/+6
| | | | | | | | | | | | | | | | | public org (#27795) Follow #26363. I missed that org templates also using `templates/user/overview/header.tmpl`. You can confirm this problem in https://gitea.com/gitea/-/projects with anonymous access. Before: (no login) ![image](https://github.com/go-gitea/gitea/assets/18380374/e285565c-ca65-4b18-9ff7-434c6367c13a) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/81e7532a-c458-4552-8d75-6896538e42cb)
* Allow pull requests Manually Merged option to be used by non-admins (#27780)Brecht Van Lommel2023-10-301-3/+3
| | | | | | | | | | | | Currently this feature is only available to admins, but there is no clear reason why. If a user can actually merge pull requests, then this seems fine as well. This is useful in situations where direct pushes to the repository are commonly done by developers. --------- Co-authored-by: delvh <dev.lh@web.de>