aboutsummaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
...
* Add 'Copy path' button to file view (#32584)silverwind2024-11-212-1/+2
| | | | Also adds a tooltip which is replicated to the same button in the diff box. Fixes: https://github.com/go-gitea/gitea/issues/32583
* Improve issue sidebar UI (#32587)wxiaoguang2024-11-214-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. remove duplicate dividers 2. align reviewer items 3. merge & remove unused CSS styles Before: <details> ![image](https://github.com/user-attachments/assets/1b3121ee-b5fa-4fe9-b0f2-344d96dc5fbc) ![image](https://github.com/user-attachments/assets/ba8b97e6-114d-488c-adee-48f6c7a3b580) </details> After: <details> ![image](https://github.com/user-attachments/assets/978eab3e-a5d7-4b68-90ce-079b61994d25) ![image](https://github.com/user-attachments/assets/a8b58a27-dd05-4c8d-be60-816439ce77c6) ![image](https://github.com/user-attachments/assets/b7e6a16c-bf98-4465-a805-9f4a642d366e) </details>
* Supplement and Improvement for #32558 (#32585)Kerwin Bryant2024-11-211-1/+3
| | | | Thank you for @wxiaoguang's reminders and suggestions: https://github.com/go-gitea/gitea/pull/32558#discussion_r1849972913
* make search box in issue sidebar dropdown list always show when scrolling ↵a10121127962024-11-215-72/+82
| | | | | | | | | (#32576) as title, replace #31597 after #32460 --------- Signed-off-by: a1012112796 <1012112796@qq.com>
* Optimize installation-page experience (#32558)Kerwin Bryant2024-11-201-1/+1
| | | | | | ![3000-gogitea-gitea-kiagpwhqbx1 ws-us116 gitpod io_ (1)](https://github.com/user-attachments/assets/7f9ff835-7122-420e-83a9-218a1b9c7030) Highlight the path of the configuration file with a label-style emphasis and provide a quick copy button.
* Fix some places which doesn't repsect org full name setting (#32243)Lunny Xiao2024-11-182-2/+2
| | | Partially fix #31345
* Refactor find forks and fix possible bugs that weak permissions check (#32528)Lunny Xiao2024-11-181-3/+5
| | | | | | | | | | | - Move models/GetForks to services/FindForks - Add doer as a parameter of FindForks to check permissions - Slight performance optimization for get forks API with batch loading of repository units - Add tests for forking repository to organizations --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix and refactor markdown rendering (#32522)wxiaoguang2024-11-161-1/+1
|
* Fix large image overflow in comment page (#31740)charles2024-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | Close #31709 52px is calculate by avatar size in templates\repo\issue\view_content\comments.tmpl ```html <img src="{{.Poster.AvatarLink $.Context}}" width="40" height="40"> ``` + ```css .ui.comments .comment > .avatar ~ .content { margin-left: 12px; } ``` ![圖片](https://github.com/user-attachments/assets/bf15f4d4-1574-46f6-9f5e-1fbdbf1a98b0) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix incorrect project page CSS class (#32510)wxiaoguang2024-11-151-1/+1
| | | Otherwise milestone JS would run on this page and cause errors
* Refactor render system (#32492)wxiaoguang2024-11-141-4/+4
| | | | | | | | | | | | | | | | | | | There were too many patches to the Render system, it's really difficult to make further improvements. This PR clears the legacy problems and fix TODOs. 1. Rename `RenderContext.Type` to `RenderContext.MarkupType` to clarify its usage. 2. Use `ContentMode` to replace `meta["mode"]` and `IsWiki`, to clarify the rendering behaviors. 3. Use "wiki" mode instead of "mode=gfm + wiki=true" 4. Merge `renderByType` and `renderByFile` 5. Add more comments ---- The problem of "mode=document": in many cases it is not set, so many non-comment places use comment's hard line break incorrectly
* Refactor sidebar assignee&milestone&project selectors (#32465)wxiaoguang2024-11-1110-285/+151
| | | | | | | | | | | | | | | | | | | Follow #32460 Now the code could be much clearer than before and easier to maintain. A lot of legacy code is removed. Manually tested. This PR is large enough, that fine tunes could be deferred to the future if there is no bug found or design problem. Screenshots: <details> ![image](https://github.com/user-attachments/assets/35f4ab7b-1bc0-4bad-a73c-a4569328303c) </details>
* Refactor sidebar label selector (#32460)wxiaoguang2024-11-108-84/+79
| | | Introduce `issueSidebarLabelsData` to handle all sidebar labels related data.
* Add reviewers selection to new pull request (#32403)Calvin K2024-11-095-85/+113
| | | | | | | | | | Users could add reviewers when creating new PRs. --------- Co-authored-by: splitt3r <splitt3r@users.noreply.github.com> Co-authored-by: Sebastian Sauer <sauer.sebastian@gmail.com> Co-authored-by: bb-ben <70356237+bboerben@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix issue sidebar (#32455)wxiaoguang2024-11-093-14/+13
| | | | | | | | | | | | | | | | | | | | | Fix #32453 Major changes: * revert the `<div class="divider"></div>` in `templates/repo/issue/branch_selector_field.tmpl` (it was removed by mistake in ##32444) * remove incorrect `<div class="inline field">` in `templates/repo/issue/sidebar/allow_maintainer_edit.tmpl` * use `gt-ellipsis` to replace the "title" class in the dependency list, then `.repository .issue-content-right .ui.list .title` could be removed * remove the "relaxed" from dependency list, then there is no padding, then `.repository .issue-content-right .ui.list .dependency` could be removed (`white-space` doesn't have effect either because there is `gt-ellipsis`) * remove dead code `.repository .issue-content-right #deadlineForm input ` The fixed UI should be the same as before.
* Refactor language menu and dom utils (#32450)wxiaoguang2024-11-081-4/+4
| | | | | 1. Make `queryElem*` functions could correctly handle TS types 2. Remove some legacy jQuery $ calls (introduce fomanticQuery for Fomantic UI only) 3. Fix some TS typing problems
* Refactor issue page info (#32445)wxiaoguang2024-11-083-11/+6
| | | Fix a longstanding TODO since 2021 (#14826) / 2018 (#2531)
* Split issue sidebar into small templates (#32444)wxiaoguang2024-11-0815-676/+675
| | | Only move code
* Support quote selected comments to reply (#32431)wxiaoguang2024-11-075-14/+14
| | | | | | | | | Many existing tests were quite hacky, these could be improved later. <details> ![image](https://github.com/user-attachments/assets/93aebb4f-9de5-4cb8-910b-50c64cbcd25a) </details>
* Move AddCollabrator and CreateRepositoryByExample to service layer (#32419)Lunny Xiao2024-11-071-1/+1
| | | | | | - [x] Move `CreateRepositoryByExample` to service layer - [x] Move `AddCollabrator` to service layer - [x] Add a new parameter for `AddCollabrator` so that changing mode immediately after that will become unnecessary.
* Include file extension checks in attachment API (#32151)Kemal Zebari2024-11-061-0/+9
| | | | | | From testing, I found that issue posters and users with repository write access are able to edit attachment names in a way that circumvents the instance-level file extension restrictions using the edit attachment APIs. This snapshot adds checks for these endpoints.
* Fix milestone deadline and date related problems (#32339)Lunny Xiao2024-11-053-36/+23
| | | | | | | | | Use zero instead of 9999-12-31 for deadline Fix #32291 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Refactor RepoRefByType (#32413)wxiaoguang2024-11-051-4/+4
| | | | | 1. clarify the "filepath" could(should) contain "{ref}" 2. remove unclear RepoRefLegacy and RepoRefAny, use RepoRefUnknown to guess 3. by the way, avoid using AppURL
* Refactor template ctx and render utils (#32422)wxiaoguang2024-11-0543-121/+121
| | | Clean up the templates
* Refactor DateUtils and merge TimeSince (#32409)wxiaoguang2024-11-0466-105/+105
| | | Follow #32383 and #32402
* Add some handy markdown editor features (#32400)wxiaoguang2024-11-041-1/+14
| | | | | | | | | There were some missing features from EasyMDE: 1. H1 - H3 style 2. Auto add task list 3. Insert a table And added some tests
* Replace DateTime with proper functions (#32402)wxiaoguang2024-11-024-7/+9
| | | | | | | | | Follow #32383 This PR cleans up the "Deadline" usages in templates, make them call `ParseLegacy` first to get a `Time` struct then display by `DateUtils`. Now it should be pretty clear how "deadline string" works, it makes it possible to do further refactoring and correcting.
* Replace DateTime with DateUtils (#32383)wxiaoguang2024-11-0229-35/+35
|
* Fix the missing menu in organization project view page (#32313)yp053272024-10-301-5/+9
| | | | | | | | | | | | | | | | | | | | | | | #29248 didn't modify the view page. The class name is not good enough, so this is a quick fix. Before: org: ![image](https://github.com/user-attachments/assets/3e26502d-66b4-4043-ab03-003ba7391487) user: ![image](https://github.com/user-attachments/assets/9b22b90c-d63c-4228-acad-4d9fb20590ac) After: org: ![image](https://github.com/user-attachments/assets/21bf98a7-8a5b-4dc6-950a-88f529e36450) user: (no change) ![image](https://github.com/user-attachments/assets/fea0dcae-3625-44e8-bb9e-4c3733da8764) Co-authored-by: Giteabot <teabot@gitea.io>
* remove unused call to $.HeadRepo in view_title template (#32317)Rowan Bohde2024-10-301-1/+1
| | | | | | | | | | | | This is only populated in [`ParseCompareInfo`](https://github.com/search?q=repo%3Ago-gitea%2Fgitea%20%20.Data%5B%22HeadRepo%22%5D&type=code) which is called in two handlers: * [`CompareAndPullRequestPost`](https://github.com/go-gitea/gitea/blob/9206fbb55fd28f21720072fce6a36cc22277934c/routers/web/repo/pull.go#L1246) - a JSON post handler that doesn't render templates * [`CompareDiff`](https://github.com/go-gitea/gitea/blob/9206fbb55fd28f21720072fce6a36cc22277934c/routers/web/repo/compare.go#L706) - which can render `diff/box.tmpl` and `diff/compare.tmpl`
* Suggestions for issues (#32327)Anbraten2024-10-291-1/+1
| | | closes #16872
* Make admins adhere to branch protection rules (#32248)Tim2024-10-233-1/+20
| | | | | | | | | | | | This introduces a new flag `BlockAdminMergeOverride` on the branch protection rules that prevents admins/repo owners from bypassing branch protection rules and merging without approvals or failing status checks. Fixes #17131 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Add `DISABLE_ORGANIZATIONS_PAGE` and `DISABLE_CODE_PAGE` settings for ↵Zettat1232024-10-221-2/+4
| | | | | | | | | | | | explore pages and fix an issue related to user search (#32288) These settings can allow users to only display the repositories explore page. Thanks to yp05327 and wxiaoguang ! --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* API: enhance SearchIssues swagger docs (#32208)65432024-10-191-17/+41
| | | | | | | this will result in better api clients generated out of the openapi docs ... for SearchIssues --- *Sponsored by Kithara Software GmbH*
* Fix dropdown content overflow (#31610)charles2024-10-131-9/+31
| | | | | | | | | close #31602 ![圖片](https://github.com/go-gitea/gitea/assets/30816317/43722917-bc5e-4e06-b0de-db52552a20df) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Move admin routers from /admin to /-/admin (#32189)Lunny Xiao2024-10-1016-41/+41
| | | | | | | Resolve #32181 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* update git book link to v2 (#32221)Ehsan Shirvanian2024-10-091-1/+1
| | | | | | Fix the dead link `https://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository` for empty repositories to help how to clone the repository to `https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository` which is v2 of the git book. This also updates download git links
* Allow filtering PRs by poster in the ListPullRequests API (#32209)65432024-10-071-6/+19
| | | | | | as title --- *Sponsored by Kithara Software GmbH*
* Enhance USER_DISABLED_FEATURES to allow disabling change username or full ↵Zisu Zhang2024-10-051-3/+6
| | | | | | | | | | | | | | | name (#31959) Fix #31958 Enhanced `USER_DISABLED_FEATURES`(also `EXTERNAL_USER_DISABLE_FEATURES`) option in `[admin]` section. Added following values: - `change_username`: Disable change username - `change_full_name`: Disable change full name --- Progress: - [x] Update code - [x] Update translations
* Fix javascript error when an anonymous user visiting migration page (#32144)Lunny Xiao2024-10-021-1/+1
| | | | | | | | | | | | This PR fixes javascript errors when an anonymous user visits the migration page. It also makes task view checking more restrictive. The router moved from `/user/task/{id}/status` to `/username/reponame/-/migrate/status` because it's a migrate status. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Support repo license (#24872)yp053272024-10-012-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Close #278 Close #24076 ## Solutions: - Use [google/licenseclassifier](https://github.com/google/licenseclassifier/) Test result between [google/licensecheck](https://github.com/google/licensecheck) and [go-license-detector](https://github.com/go-enry/go-license-detector): https://github.com/go-gitea/gitea/pull/24872#issuecomment-1560361167 Test result between [google/licensecheck](https://github.com/google/licensecheck) and [google/licenseclassifier](https://github.com/google/licenseclassifier/): https://github.com/go-gitea/gitea/pull/24872#issuecomment-1576092178 - Generate License Convert Name List to avoid import license templates with same contents Gitea automatically get latest license data from[ spdx/license-list-data](https://github.com/spdx/license-list-data). But unfortunately, some license templates have same contents. #20915 [click here to see the list](https://github.com/go-gitea/gitea/pull/24872#issuecomment-1584141684) So we will generate a list of these license templates with same contents and create a new file to save the result when using `make generate-license`. (Need to decide the save path) - Save License info into a new table `repo_license` Can easily support searching repo by license in the future. ## Screen shot Single License: ![image](https://github.com/go-gitea/gitea/assets/18380374/41260bd7-0b4c-4038-8592-508706cffa9f) Multiple Licenses: ![image](https://github.com/go-gitea/gitea/assets/18380374/34ce2f73-7e18-446b-9b96-ecc4fb61bd70) Triggers: - [x] Push commit to default branch - [x] Create repo - [x] Mirror repo - [x] When Default Branch is changed, licenses should be updated Todo: - [x] Save Licenses info in to DB when there's a change to license file in the commit - [x] DB Migration - [x] A nominal test? - [x] Select which library to use(https://github.com/go-gitea/gitea/pull/24872#issuecomment-1560361167) - [x] API Support - [x] Add repo license table - ~Select license in settings if there are several licenses(Not recommended)~ - License board(later, not in this PR) ![image](https://github.com/go-gitea/gitea/assets/18380374/2c3c3bf8-bcc2-4c6d-8ce0-81d1a9733878) --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Denys Konovalov <kontakt@denyskon.de> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: 6543 <m.huber@kithara.com> Co-authored-by: a1012112796 <1012112796@qq.com> Co-authored-by: techknowlogick <techknowlogick@gitea.com>
* Display head branch more comfortable on pull request view (#32000)Lunny Xiao2024-09-241-2/+7
| | | | | | | | | | This PR do some minor improvements for head branch display on pull request view UI. - [x] Remove the link if the head branch has been deleted with a tooltip, so that users will not result in a 404 page - [x] Display a label if this pull request is an agit based one. ![图片](https://github.com/user-attachments/assets/872f26b6-f1cf-4427-9e41-e3a5b176dfa4)
* Fix template bug of pull request view (#32072)Lunny Xiao2024-09-241-1/+1
| | | Caused by #31924
* Allow set branch protection in an empty repository (#32095)Lunny Xiao2024-09-242-17/+13
|
* Fix bug in getting merged pull request by commit (#32079)Zettat1232024-09-241-1/+1
|
* Fix Bug in Issue/pulls list (#32081)cloudchamb3r2024-09-241-2/+2
| | | | | | | | | | | | | | | | fix #32080 ## After ### for opened issues <img width="1199" alt="Screenshot 2024-09-19 at 6 29 31 PM" src="https://github.com/user-attachments/assets/86cf48ad-5e4b-4dcb-8abe-4d7fd74e0aec"> ### for closed issues <img width="1208" alt="Screenshot 2024-09-19 at 6 29 37 PM" src="https://github.com/user-attachments/assets/a16bc545-bfcf-49a4-be52-3e7334910482"> ### for all issues <img width="1340" alt="Screenshot 2024-09-20 at 12 07 12 PM" src="https://github.com/user-attachments/assets/b2309c8f-e59d-44e9-ae3b-bf54e1196169">
* Fix rename branch permission bug (#32066)Lunny Xiao2024-09-221-1/+1
| | | | | | The previous implementation requires admin permission to rename branches which should be write permission. Fix #31993
* Set manual `tabindex`es on login page (#31689)silverwind2024-09-201-5/+7
| | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/31686. A more elborate manual tabindex numbering could be done, but I think it's not really worth the extra effort and such stuff could easily break during refactors. Includes another small tweak to un-stretch the`<a>` element so it's only as large as it needs to be and this change also made the margin unneeded.
* Included tag search capabilities (#32045)Bruno Sofiato2024-09-181-4/+12
| | | | | | | | | | | | | | | | | | | | | Resolves #31998 The first screenshot shows the tag page without any filter being applied: ![image](https://github.com/user-attachments/assets/eac0e51c-9e48-42b2-bb1c-a25896ca40cb) The second one, shows the page when the given filter returns no tag: ![image](https://github.com/user-attachments/assets/98df191e-1a7b-4947-b0ef-4987a0293c3e) The last one shows a single tag being filtered: ![image](https://github.com/user-attachments/assets/79c7e05e-8c86-4f06-b17e-15818b7b9291) Signed-off-by: Bruno Sofiato <bruno.sofiato@gmail.com>
* Add option to filter board cards by labels and assignees (#31999)Lauris BH2024-09-121-0/+76
| | | | | | | | | | | | | | | Works in both organization and repository project boards Fixes #21846 Replaces #21963 Replaces #27117 ![image](https://github.com/user-attachments/assets/1837ace8-3de2-444f-a153-e166bd0da2c0) **Note** that implementation was made intentionally to work same as in issue list so that URL can be bookmarked for quick access with predefined filters in URL