summaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* [API] Get a single commit via Ref (#10915)65432020-04-071-1/+50
| | | | | | | | | * GET /repos/:owner/:repo/commits/:ref * add Validation Checks * Fix & Extend TEST * add two new tast cases
* Fix release counter on API repository info (#10968)65432020-04-061-1/+1
| | | | | | Use the same mechanism as the webpage for calculating the release count Fix #10946
* add request review from specific reviewers feature in pull request (#10756)赵智超2020-04-066-17/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add request review feature in pull request add a way to notify specific reviewers to review like github , by add or delet a special type review . The acton is is similar to Assign , so many code reuse the function and items of Assignee, but the meaning and result is different. The Permission style is is similar to github, that only writer can add a review request from Reviewers, but the poster can recall and remove a review request after a reviwer has revied even if he don't have Write Premission. only manager , the poster and reviewer of a request review can remove it. The reviewers can be requested to review contain all readers for private repo , for public, contain all writers and watchers. The offical Review Request will block merge if Reject can block it. an other change: add ui otify for Assignees. Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Signed-off-by: a1012112796 <1012112796@qq.com> * new change * add placeholder string * do some changes follow #10238 to add review requests num on lists also change icon for review requests to eye Co-authored-by: Lauris BH <lauris@nix.lv>
* Users should not be able to prohibit their own login (#10970)赵智超2020-04-061-1/+1
| | | | | | | | | | | | | | | | * ui: limit managers prohibit themself to login Because I think it's crazy and not reasonale , that if a user can prohibit themself to login. so suggest limit this choice on ui Signed-off-by: a1012112796 <1012112796@qq.com> * skip self Prohibit Login in post event handle * fix comment Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Change default charset for MySQL on install to utf8mb4 (#10989)zeripath2020-04-061-3/+3
| | | | | Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* fix merge box icon color bug (#10974)赵智超2020-04-051-2/+1
| | | | | that because need some space beturn ``text`` and color defines Signed-off-by: a1012112796 <1012112796@qq.com>
* Add titles and improve messages on sidebar menus (#10872)赵智超2020-04-045-89/+132
| | | | | | | | | | | | | | | | | | | * ui: add more message on sidebar menus * add title on the menus * show some message instead of hide choose bar when have nothing to choose * add simply filter for each menus * do same changes in mew_form.tmpl * remove some unusefull comments in mew_form.tmpl Signed-off-by: a1012112796 <1012112796@qq.com> * do review suggestions * add filter message on sidebar filter * change IsIssueWriter to HasIssuesOrPullsWritePermission Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Change review status icons on PR view style to Github style (#10737)赵智超2020-04-032-17/+20
| | | | | | | | | | | * change the icon of ApproveReview pr from "eye" to "check" like github * change the icon of RejectReview pr from "x" to "request-change" like github * add "-" after "{{" which need to be one line (TODO: may be not change all) Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add Organization Wide Labels (#10814)mrsdizzie2020-04-0110-164/+454
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add organization wide labels Implement organization wide labels similar to organization wide webhooks. This lets you create individual labels for organizations that can be used for all repos under that organization (so being able to reuse the same label across multiple repos). This makes it possible for small organizations with many repos to use labels effectively. Fixes #7406 * Add migration * remove comments * fix tests * Update options/locale/locale_en-US.ini Removed unused translation string * show org labels in issue search label filter * Use more clear var name * rename migration after merge from master * comment typo * update migration again after rebase with master * check for orgID <=0 per guillep2k review * fmt * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * remove unused code * Make sure RepoID is 0 when searching orgID per code review * more changes/code review requests * More descriptive translation var per code review * func description/delete comment when issue label deleted instead of hiding it * remove comment * only use issues in that repo when calculating number of open issues for org label on repo label page * Add integration test for IssuesSearch API with labels * remove unused function * Update models/issue_label.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Use subquery in GetLabelIDsInReposByNames * Fix tests to use correct orgID * fix more tests * IssuesSearch api now uses new BuildLabelNamesIssueIDsCondition. Add a few more tests as well * update comment for clarity * Revert previous code change now that we can use the new BuildLabelNamesIssueIDsCondition * Don't sort repos by date in IssuesSearch API After much debugging I've found a strange issue where in some cases MySQL will return a different result than other enigines if a query is sorted by a null collumn. For example with our integration test data where we don't set updated_unix in repository fixtures: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 45 Returns different results for MySQL than other engines. However, the similar query: SELECT `id`, `owner_id`, `owner_name`, `lower_name`, `name`, `description`, `website`, `original_service_type`, `original_url`, `default_branch`, `num_watches`, `num_stars`, `num_forks`, `num_issues`, `num_closed_issues`, `num_pulls`, `num_closed_pulls`, `num_milestones`, `num_closed_milestones`, `is_private`, `is_empty`, `is_archived`, `is_mirror`, `status`, `is_fork`, `fork_id`, `is_template`, `template_id`, `size`, `is_fsck_enabled`, `close_issues_via_commit_in_any_branch`, `topics`, `avatar`, `created_unix`, `updated_unix` FROM `repository` ORDER BY updated_unix DESC LIMIT 15 OFFSET 30 Returns the same results. This causes integration tests to fail on MySQL in certain cases but would never show up in a real installation. Since this API call always returns issues based on the optionally provided repo_priority_id or the issueID itself, there is no change to results by changing the repo sorting method used to get ids earlier in the function. * linter is back! * code review * remove now unused option * Fix newline at end of files * more unused code * update to master * check for matching ids before query * Update models/issue_label.go Co-Authored-By: 6543 <6543@obermui.de> * Update models/issue_label.go * update comments * Update routers/org/setting.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de>
* Add accordion to release list and compact non-latest (#10910)John Olheiser2020-03-311-23/+30
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Split dashboard elements into separate template files (#10885)mrsdizzie2020-03-303-117/+119
| | | | | | | | | | | | | | * Split dashboard elements into separate template files No code change just Move Heatmap and Repo list/search into separate template files (like feeds and navbar already are). This will let a user more easily replace dashboard.tmpl without regularly becoming out of sync with fixes or changes to the actual code. Fixes #10870 * End file with an empty line Co-authored-by: zeripath <art27@cantab.net>
* Add Matrix webhook (#10831)S7evinK2020-03-283-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Matrix webhook Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add template and related translations for Matrix hook Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add actual webhook routes and form Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Add missing file Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Update modules/webhook/matrix_test.go * Use stricter regex to replace URLs Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Escape url and text Signed-off-by: Till Faelligen <tfaelligen@gmail.com> * Remove unnecessary whitespace * Fix copy and paste mistake Co-Authored-By: Tulir Asokan <tulir@maunium.net> * Fix indention inconsistency * Use Authorization header instead of url parameter * Add raw commit information to webhook Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Tulir Asokan <tulir@maunium.net>
* Allow to set protected file patterns that can not be changed under no ↵Lauris BH2020-03-272-0/+17
| | | | | conditions (#10806) Co-Authored-By: zeripath <art27@cantab.net>
* Option to set default branch at repository creation (#10803)zeripath2020-03-263-2/+11
| | | | | | | | | | * Option to set default branch at repository creation * Handle template repos with non-default master branch * Add DefaultBranch handling on creation to API Fix #9542 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix milestone template (#10824)John Olheiser2020-03-251-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* move jquery-datetimepicker to npm/webpack (#10713)silverwind2020-03-173-9/+2
| | | | | | | | | - update to latest version and move to npm - adapt for api changes and css class rename - add specificity to arc-green rules as dependency css now loads later - use imports-loader to make it load correctly - fix some wrong paths in librejs Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* hide gear icon for user who can't use them on sidebar (#10750)赵智超2020-03-171-3/+9
| | | | | | | | | reason: If user can't choose the Assignees labels and Milestone It's not usefull to show a gear label , and it It will mislead the user into thinking that it's a BUG rather than thy don't have permission to chosse them. Signed-off-by: a1012112796 <1012112796@qq.com>
* fix miss spelling (#10721)Success Go2020-03-121-1/+1
|
* Remove old vendored dropzone from serviceworker (#10703)John Olheiser2020-03-111-2/+0
| | | | | | | * Remove dropzone from serviceworker * Remove CSS as well Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove svg preload (#10654)silverwind2020-03-091-1/+0
| | | | | | | | | | It triggers a warning in the Chrome console about it being unused, so I think preloading of SVG assets may not be supported properly in current browsers. Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* System-wide webhooks (#10546)James Lakin2020-03-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create system webhook column (and migration) * Create system webhook DB methods Based on the default webhook ones * Modify router to handle system webhooks and default ones * Remove old unused admin nav template * Adjust orgRepoCtx to differentiate system and default webhook URLs * Assign IsSystemWebhook when creating webhooks * Correctly use booleans for IsSystemWebhook * Use system webhooks when preparing webhooks for payload * Add UI and locale changes * Use router params to differentiate admin hook pages * Fix deleting admin webhooks and rename method * Add clarity to webhook docs * Revert "Remove old unused admin nav template" This reverts commit 191a20a7389fe5f6256b0ad6aafd04b9b0e295c5. * Rename WebHooksNewPost to GiteaHooksNewPost for clarity * Reintroduce blank line lost during merge conflict Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Move dropzone.js to npm/webpack (#10645)silverwind2020-03-073-7/+3
| | | | - unvendor dropzone and upgrade it from 4.2.0 to 5.7.0 - make `csrf` available on window.config
* Ensure Update button is enabled even when CI has failed (#10640)65432020-03-071-20/+20
| | | | | | | * ignore pull status * fix css * fix css
* Remove admin/nav.tmpl (#10633)James Lakin2020-03-061-17/+0
|
* Granular webhook events (#9626)John Olheiser2020-03-061-8/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add PR reviews and API coverage Signed-off-by: jolheiser <john.olheiser@gmail.com> * Split up events Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add migration and locale Signed-off-by: jolheiser <john.olheiser@gmail.com> * Format Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert IsPull Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix comments Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix tests Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix PR reviews Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix issue_comment Signed-off-by: jolheiser <john.olheiser@gmail.com> * Make fmt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Migrations Signed-off-by: jolheiser <john.olheiser@gmail.com> * Backwards compatible API Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix feishu Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move session commit Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add Approval Counts to pulls list (#10238)zeripath2020-03-063-4/+52
| | | | | | | | | * Add Approval Counts to pulls list Add simple approvals counts to pulls lists * Remove non-official counts * Add PR features to milestone_issues.tmpl
* Issue writers perms can modify issues (#10623)John Olheiser2020-03-061-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add restricted user filter to LDAP authentication (#10600)Lauris BH2020-03-052-0/+10
| | | | | | * Add restricted user filter to LDAP authentification * Fix unit test cases
* OAuth2: add Yandex provider (#8335) (#10564)Lauris BH2020-03-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | * OAuth2: add Yandex provider (#8335) * remove changes from locale ru-RU * fmt modules/auth/oauth2/oauth2.go Co-Authored-By: 6543 <6543@obermui.de> * fix fmt * Update templates/admin/auth/new.tmpl * fix fmt Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix templates (#10596)John Olheiser2020-03-042-2/+2
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove unnecessary parentheses in template (#10583)zeripath2020-03-031-1/+1
| | | | | | Fix #10552 Co-authored-by: Lauris BH <lauris@nix.lv>
* Logout POST action (#10582)John Olheiser2020-03-021-1/+1
| | | | | | | | * Change logout to POST * Update for redirect Signed-off-by: jolheiser <john.olheiser@gmail.com>
* nextcloud oauth (#10562)techknowlogick2020-03-021-0/+2
| | | Fix #7078
* Admin page for managing user e-mail activation (#10557)guillep2k2020-03-024-4/+130
| | | | | | | | | | | | | | | | | | | | | | | | * Implement mail activation admin panel * Add export comments * Fix another export comment * again... * And again! * Apply suggestions by @lunny * Add UI for user activated emails * Make new activation UI work * Fix lint * Prevent admin from self-deactivate; add modal Co-authored-by: zeripath <art27@cantab.net>
* Fix appearance of unsigned sha box in view_list (#10543)zeripath2020-02-291-4/+4
| | | | | | Unfortunately the fix in #10511 was slightly incorrect and placed the detail box at one level too far out. Signed-off-by: Andrew Thornton <art27@cantab.net>
* issue search on my related repositories (#9758)Brad Albright2020-02-291-28/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * adding search capability to user's issues dashboard * global issue search * placement of search bar on issues dashboard * fixed some bugs in the issue dashboard search * added unit test because IssueIDs option was added to UserIssueStatsOptions * some renaming of fields in the issue dashboard code to be more clear; also trying to fix issue of searching the right repos based on the filter * added unit test fro GetRepoIDsForIssuesOptions; fixed search lost on pagination; using shown issue status for open/close count; removed some debugging * fix issue with all count showing incorrectly * removed todo comment left in by mistake * typo pulling wrong count * fxied all count being off when selecting repositories * setting the opts.IsClosed after pulling repos to search, this is done so that the list of repo ids to serach for the keyword is not limited, we need to get all the issue ids for the shown issue stats * added "accessibleRepositoryCondition" check on the query to pull the repo ids to search for issues, this is an added protection to ensure we don't search repos the user does not have access to * added code so that in the issues search, we won't use an in clause of issues ids that goes over 1000 * fixed unit test * using 950 as the limit for issue search, removed unneeded group by in GetRepoIDsForIssuesOptions, showing search on pulls dashboard page too (not just issues) Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* adds API endpoints to manage OAuth2 Application (list/create/delete) (#10437)Gustavo Marin2020-02-291-1/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | * add API endpoint to create OAuth2 Application. * move endpoint to /user. Add swagger documentations and proper response type. * change json tags to snake_case. add CreateOAuth2ApplicationOptions to swagger docs. * change response status to Created (201) * add methods to list OAuth2 apps and delete an existing OAuth2 app by ID. * add APIFormat convert method and file header * fixed header * hide secret on oauth2 application list * add Created time to API response * add API integration tests for create/list/delete OAuth2 applications. Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Set correct content_type value for Gogs/Gitea webhooks (#9504) (#10456)Jeff Stein2020-02-282-41/+41
| | | | | The content_type value was defaulting to the string value of the ContentType, not the integer value as expected by the backend.
* head.tmpl og:image picture location (#10531)FreeCipher2020-02-281-1/+1
| | | og:image picture location
* Fix the signing icon in the view_list.tmpl page (#10511)zeripath2020-02-271-5/+5
| | | | | | | | | | | | | | | * Fix the view_list.tmpl page * fix-centerlock * Update web_src/less/_base.less as per @silverwind Co-Authored-By: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Org action fixes and form cleanup (#10512)John Olheiser2020-02-276-15/+26
| | | | | | | | * More org fixes * Move form action query to inputs Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Show Signer in commit lists and add basic trust (#10425)zeripath2020-02-273-47/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Show Signer in commit lists and add basic trust Show the avatar of the signer in the commit list pages as we do not enforce that the signer is an author or committer. This makes it clearer who has signed the commit. Also display commits signed by non-members differently from members and in particular make it clear when a non-member signer is different from the committer to help reduce the risk of spoofing. Signed-off-by: Andrew Thornton <art27@cantab.net> * ensure orange text and background is available Signed-off-by: Andrew Thornton <art27@cantab.net> * Update gpg_key.go * Update models/gpg_key.go * Apply suggestions from code review * Require team collaborators to have access to UnitTypeCode * as per @6543 * fix position of sha as per @silverwind * as per @guillep2k
* Add fluid-icon (#10491)silverwind2020-02-271-0/+1
| | | | | | | | | | | | This provides Firefox (and possible other browsers) with a high-resolution rich icon, in place of the previously removed apple-touch-icon without having to use that one as it lacks an alpha channel. This is the same method GH uses. https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/UI_considerations#Rich_icons Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: techknowlogick <matti@mdranta.net>
* Tweak language stats bar (#10487)silverwind2020-02-261-1/+1
| | | | | | | | | - Ensure bar does not overflow parent - Remove unneccessary borders/background - Fix shaky animation caused by JS animation miscalculation by setting fixed height on the summary box. Box itself is still shaky during animation, but better it then the whole page. Fixes: https://github.com/go-gitea/gitea/issues/10474
* Fix admin notices (#10480)John Olheiser2020-02-261-1/+4
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Change admin dashboard to POST (#10465)John Olheiser2020-02-251-44/+47
| | | | | | | | * Add form and convert to POST * Redirect for flash Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Change action GETs to POST (#10462)John Olheiser2020-02-258-28/+58
| | | | | | | | | | | | | | | | | | * Change action GETs to POST * submite = submit + smite * No more # href * Fix test * Match other tests * Explicit csrf Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* [API] enable paggination for ListRepoTags (#10454)65432020-02-251-0/+12
| | | | | | | | | | | | * enable paggination for repoTags * precalculate first, cut slice second * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Fixed wrong AppSubUrl in multiple templates (#10447)Philipp A. Beckmann2020-02-253-4/+4
| | | | | | | * Fixed wrong AppSubUrl in OAuth2 app edit page * Replaced all other occurrences of $.AppSubURL for support of sub-paths
* move vue and vue-calendar-heatmap to webpack (#10188)silverwind2020-02-233-12/+4
| | | | | | | | | | | | - unvendor vue and vue-calendar-heatmap - remove unused moment.js leftover from previous heatmap version - ensure webpack loads the full version of vue - fix vue devmode warning related to 'searchLimit' type I wanted to name the chunk heatmap.js but adblockers don't like that filename [1]. [1] https://github.com/easylist/easylist/blob/3899d5dff33216c0bc64f09ff15d376f346d3e33/easyprivacy/easyprivacy_general.txt#L2095