aboutsummaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Refactor i18n, use Locale to provide i18n/translation related functions (#18648)wxiaoguang2022-02-0826-40/+40
| | | | | | | | * remove unnecessary web context data fields, and unify the i18n/translation related functions to `Locale` * in development, show an error if a translation key is missing * remove the unnecessary loops `for _, lang := range translation.AllLangs()` for every request, which improves the performance slightly * use `ctx.Locale.Language()` instead of `ctx.Data["Lang"].(string)` * add more comments about how the Locale/LangType fields are used
* fix commits_list_small.tmpl (#18641)a10121127962022-02-061-2/+2
| | | Signed-off-by: a1012112796 <1012112796@qq.com>
* comments on migrated issues/prs must link to the comment ID (#18630)singuliere2022-02-061-1/+1
| | | | | | Instead of the issue ID which is not a valid anchor. Signed-off-by: singuliere <singuliere@autistici.org>
* Ensure that blob-excerpt links work for wiki (#18587)zeripath2022-02-053-12/+12
| | | | | | | | It appears that the blob-excerpt links do not work on the wiki - likely since their introduction. This PR adds support for the wiki on these links. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add dropdown icon to template loading dropdown (#18564)fnetX (aka fralix)2022-02-031-6/+1
| | | | | | Fixes #15679 and the dupe of it: Fixes #16364. Also removes a comment that links to a gogs forum thread.
* Fix review excerpt (#18502)confusedsushi2022-02-011-12/+9
| | | | | | | | | | | | | | | | | Currently the "File Changed" tab of a PR is somehow broken. This is also true for the current release 1.16.0. When you are on the "File Changed" tab, and want to look at code excerpt before or after the code changes, the layout breaks. You can test this on try.gitea.io here: https://try.gitea.io/testnotexisting/magic_enum/pulls/2/files The problem occurs for the unified view and for the split view. Kind of the same problem was there for commenting a line of code, this was fixed in #18321 and #18403. For consistency, I changed the solution of #18321, I removed the ``colspan`` and instead added a ``<td>``. The goal was to have code similarly with the split view. Also the separator line in the split view was in the wrong column, this was fixed too.* more consistent unified review comment Fix #18516 Co-authored-by: Andrew Thornton <art27@cantab.net>
* Use "read" value for General Access (#18496)Gusted2022-02-011-1/+1
| | | | | | | | | | - Currently the `.Team.AccessMode` is being used when editing a team, if you want to admin -> General Access, the value of General Access is "admin" which is incorrect. - Resolves #18483 (First bug mentioned) Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Allow to filter repositories by language in explore, user and organization ↵Lauris BH2022-01-282-11/+14
| | | | repositories lists (#18430)
* Automatically pause queue if index service is unavailable (#15066)Lauris BH2022-01-274-48/+68
| | | | | | * Handle keyword search error when issue indexer service is not available * Implement automatic disabling and resume of code indexer queue
* Fix broken oauth2 authentication source edit page (#18412)zeripath2022-01-261-0/+4
| | | | | | | | | | It appears that there was a broken merge of the edit.tmpl page during the merge of #16594 - I am not entirely sure how this happened as the PR was correct. This PR fixes the broken template. Fix #18388 Signed-off-by: Andrew Thornton <art27@cantab.net>
* API: Return primary language and repository language stats API URL (#18396)Lauris BH2022-01-251-0/+8
|
* Fix commit's time (#18375)Gusted2022-01-252-2/+6
| | | | | | | | | | | | | | | | | * Fix commit's time - Use the Committer's `when` as the CommitDate will be modified when the commit is being moved around in the git tree(e.g. being rebased on top of newer commits). The Author's `when` is created once and never touched again. * Update templates/repo/view_list.tmpl * Commmt unstaged * Add fallback Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Refactor webhooks i18n (#18380)wxiaoguang2022-01-2412-22/+23
|
* Add packagist webhook (#18224)Dr. Tobias Quathamer2022-01-236-1/+33
| | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Pause queues (#15928)zeripath2022-01-221-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start adding mechanism to return unhandled data Signed-off-by: Andrew Thornton <art27@cantab.net> * Create pushback interface Signed-off-by: Andrew Thornton <art27@cantab.net> * Add Pausable interface to WorkerPool and Manager Signed-off-by: Andrew Thornton <art27@cantab.net> * Implement Pausable and PushBack for the bytefifos Signed-off-by: Andrew Thornton <art27@cantab.net> * Implement Pausable and Pushback for ChannelQueues and ChannelUniqueQueues Signed-off-by: Andrew Thornton <art27@cantab.net> * Wire in UI for pausing Signed-off-by: Andrew Thornton <art27@cantab.net> * add testcases and fix a few issues Signed-off-by: Andrew Thornton <art27@cantab.net> * fix build Signed-off-by: Andrew Thornton <art27@cantab.net> * prevent "race" in the test Signed-off-by: Andrew Thornton <art27@cantab.net> * fix jsoniter mismerge Signed-off-by: Andrew Thornton <art27@cantab.net> * fix conflicts Signed-off-by: Andrew Thornton <art27@cantab.net> * fix format Signed-off-by: Andrew Thornton <art27@cantab.net> * Add warnings for no worker configurations and prevent data-loss with redis/levelqueue Signed-off-by: Andrew Thornton <art27@cantab.net> * Use StopTimer Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add config options to hide issue events (#17414)qwerty2872022-01-212-742/+842
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add config option to hide issue events Adds a config option `HIDE_ISSUE_EVENTS` to hide most issue events (changed labels, milestones, projects...) on the issue detail page. If this is true, only the following events (comment types) are shown: * plain comments * closed/reopned/merged * reviews * Make configurable using a list * Add docs * Add missing newline * Fix merge issues * Allow changes per user settings * Fix lint * Rm old docs * Apply suggestions from code review * Use bitsets * Rm comment * fmt * Fix lint * Use variable/constant to provide key * fmt * fix lint * refactor * Add a prefix for user setting key * Add license comment * Add license comment * Update services/forms/user_form_hidden_comments.go Co-authored-by: Gusted <williamzijl7@hotmail.com> * check len == 0 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Propagate context and ensure git commands run in request context (#17868)zeripath2022-01-1912-21/+23
| | | | | | | | | This PR continues the work in #17125 by progressively ensuring that git commands run within the request context. This now means that the if there is a git repo already open in the context it will be used instead of reopening it. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Left-Align text in Unicode warning boxes (#18331)silverwind2022-01-191-2/+2
| | | | | | Wrapped text is more readable when left-aligned. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: zeripath <art27@cantab.net>
* Only warn on bidi but still escape non-bidi (#18333)zeripath2022-01-191-1/+1
| | | | | Fix #18324 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix incorrect OAuth message (#18332)wxiaoguang2022-01-191-2/+2
| | | | | As the title, Fix #18327
* Fix PR comments UI (#18323)wxiaoguang2022-01-191-15/+46
| | | | | Closes: * Review comment cannot be edited #17768 * Changing PR Comment Resolved State Disables Further Changes #18315
* Fix commit links on compare page (#18310)Gusted2022-01-181-5/+6
| | | | | | | | | * Fix commit links on compare page - Use the correct repo link for each commit(the headrepo). As for compare pages were baserepo != headrepo, it wouldn't have the correct link. Co-authored-by: zeripath <art27@cantab.net>
* Add MirrorUpdated field to Repository API type (#18267)Peter Gardfjäll2022-01-181-0/+5
| | | | | Add the last update time to the repository api type. Close #18266
* Handle missing default branch better in owner/repo/branches page (#18290)zeripath2022-01-161-34/+32
| | | | | | | This PR more nicely handles a missing default branch in owner/repo/branches Fix #18265 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove accidental debugging in blob_excerpt.tmpl (#18287)zeripath2022-01-161-2/+2
| | | | | | | | | | | * Remove accidental debugging in blob_excerpt.tmpl Unfortunately it appears that a small bit of debugging code was left in blob_excerpt.tmpl This breaks diff expansion causing #18281. Fix #18281 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Webauthn nits (#18284)zeripath2022-01-152-11/+1
| | | | | | | This contains some additional fixes and small nits related to #17957 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Support webauthn (#17957)Lunny Xiao2022-01-147-71/+57
| | | | | | | Migrate from U2F to Webauthn Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix release link broken (#18252)Lunny Xiao2022-01-131-1/+1
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix purple color in suggested label colors (#18241)silverwind2022-01-111-1/+1
| | | | This looks like a typo that was introduced when these colors were added, causing what is supposed to be purple show up as green.
* Prevent NPE when viewing non-rendered files (#18234)zeripath2022-01-111-16/+18
| | | | | Fix #18231 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix collobration template (#18232)Lunny Xiao2022-01-111-2/+2
|
* Fix various typos (#18219)luzpaz2022-01-102-3/+3
| | | | | Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby,te,unknwon` Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* In the Organization member page, 2fa column is too narrow for Simplified ↵capvor2022-01-091-2/+2
| | | | | Chinese and Chinese Traditional. (#18213) Expand 2fa column and Narrow the last column.
* Fix new team (#18212)Lunny Xiao2022-01-081-3/+3
| | | fix regression from #17811
* Fix mermaid rendering in milestone dashboard (#18202)silverwind2022-01-071-1/+1
| | | Fixes: https://github.com/go-gitea/gitea/issues/18200
* Add warning for BIDI characters in page renders and in diffs (#17562)zeripath2022-01-0711-48/+178
| | | | | | | | | | | | Fix #17514 Given the comments I've adjusted this somewhat. The numbers of characters detected are increased and include things like the use of U+300 to make à instead of à and non-breaking spaces. There is a button which can be used to escape the content to show it. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Gwyneth Morgan <gwymor@tilde.club> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add replay of webhooks. (#18191)KN4CK3R2022-01-052-1/+9
|
* Load EasyMDE/CodeMirror dynamically, remove RequireEasyMDE (#18069)wxiaoguang2022-01-052-11/+0
| | | This PR makes frontend load EasyMDE/CodeMirror dynamically, and removes `RequireEasyMDE`.
* Team permission allow different unit has different permission (#17811)Lunny Xiao2022-01-053-28/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Team permission allow different unit has different permission * Finish the interface and the logic * Fix lint * Fix translation * align center for table cell content * Fix fixture * merge * Fix test * Add deprecated * Improve code * Add tooltip * Fix swagger * Fix newline * Fix tests * Fix tests * Fix test * Fix test * Max permission of external wiki and issues should be read * Move team units with limited max level below units table * Update label and column names * Some improvements * Fix lint * Some improvements * Fix template variables * Add permission docs * improve doc * Fix fixture * Fix bug * Fix some bug * fix * gofumpt * Integration test for migration (#18124) integrations: basic test for Gitea {dump,restore}-repo This is a first step for integration testing of DumpRepository and RestoreRepository. It: runs a Gitea server, dumps a repo via DumpRepository to the filesystem, restores the repo via RestoreRepository from the filesystem, dumps the restored repository to the filesystem, compares the first and second dump and expects them to be identical The verification is trivial and the goal is to add more tests for each topic of the dump. Signed-off-by: Loïc Dachary <loic@dachary.org> * Team permission allow different unit has different permission * Finish the interface and the logic * Fix lint * Fix translation * align center for table cell content * Fix fixture * merge * Fix test * Add deprecated * Improve code * Add tooltip * Fix swagger * Fix newline * Fix tests * Fix tests * Fix test * Fix test * Max permission of external wiki and issues should be read * Move team units with limited max level below units table * Update label and column names * Some improvements * Fix lint * Some improvements * Fix template variables * Add permission docs * improve doc * Fix fixture * Fix bug * Fix some bug * Fix bug Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Aravinth Manivannan <realaravinth@batsense.net>
* Fix bug (#18168)Lunny Xiao2022-01-031-1/+1
|
* Refactor auth package (#17962)Lunny Xiao2022-01-026-4/+4
|
* Unify and simplify TrN for i18n (#18141)wxiaoguang2022-01-029-36/+51
| | | | | Refer: https://github.com/go-gitea/gitea/pull/18135#issuecomment-1003246099 Now we have a unique and simple `TrN`, and make the fix of PR #18135 also use the better `TrN` logic.
* Add API to get issue/pull comments and events (timeline) (#17403)qwerty2872022-01-011-0/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API to get issue/pull comments and events (timeline) Adds an API to get both comments and events in one endpoint with all required data. Closes go-gitea/gitea#13250 * Fix swagger * Don't show code comments (use review api instead) * fmt * Fix comment * Time -> TrackedTime * Use var directly * Add logger * Fix lint * Fix test * Add comments * fmt * [test] get issue directly by ID * Update test * Add description for changed refs * Fix build issues + lint * Fix build * Use string enums * Update swagger * Support `page` and `limit` params * fmt + swagger * Use global slices Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Allow admin to associate missing LFS objects for repositories (#18143)wxiaoguang2022-01-011-1/+1
| | | | | | | This PR reworked the Find pointer files feature in Settings -> LFS page. When a LFS object is missing from database but exists in LFS content store, admin can associate it to the repository by clicking the Associate button. This PR is not perfect (because the LFS module itself should be improved too), it's just a nice-to-have feature to help users recover their LFS repositories (eg: database was lost / table was truncated)
* Use conditions but not repo ids as query condition (#16839)Lunny Xiao2021-12-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use conditions but not repo ids as query condition * Improve the performance of pulls/issue * Remove duplicated code * fix lint * Fix bug * Fix stats * More fixes * Fix build * Fix lint * Fix test * Fix build * Adjust the logic * Merge * Fix conflicts * improve the performance * Add comments for the query conditions functions * Some improvements
* Handle invalid issues (#18111)Gusted2021-12-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | * Handle invalid issues - When you hover over a issue reference, and the issue doesn't exist, it will just hang on the loading animation. - This patch fixes that by showing them the pop-up with a "Error occured" message. * Add I18N * refactor * fix comment for lint * fix unit test for i18n * fix unit test for i18n * add comments Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* - name: new parameter in CreateForkOption to give the forked repository (#18066)Aravinth Manivannan2021-12-241-0/+8
| | | | | | | | | | | a custom name, intended to be used when there's a name conflict - When a fork request results in a name conflict, HTTP 409: Conflict is returned instead of 500 - API documentation for the above mentioned changes Signed-off-by: realaravinth <realaravinth@batsense.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Improve interface when comparing a branch which has created a pull request ↵Lunny Xiao2021-12-241-2/+16
| | | | | | | | (#17911) * Improve interface when comparing a branch which has created a pull request * Take the note back
* Add API to manage repo tranfers (#17963)qwerty2872021-12-231-0/+101
|
* Add API to get file commit history (#17652)qwerty2872021-12-221-1/+7
| | | | | | Adds an API endpoint `api/v1/repos/{owner}/{repo}/git/history/{filepath}` to get the commits affecting the given file or directory. Closes https://github.com/go-gitea/gitea/issues/16206 and closes https://github.com/go-gitea/gitea/issues/16703