aboutsummaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Split some words from template to improve translation. (#11221)L0veSunshine2020-05-081-6/+6
| | | | | | | | | | | | * split some words from template * split some words from template * add " " to mustache expression * split some words from template Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add EventSource support (#11235)zeripath2020-05-071-0/+1
| | | | | | If the browser supports EventSource switch to use this instead of polling notifications. Signed-off-by: Andrew Thornton art27@cantab.net
* Change the style in admin notice content view from <p> to <pre> (#11301)赵智超2020-05-051-1/+1
| | | | | | That's because many notic have more than one lines. So I think pre is more better to used in here than p Signed-off-by: a1012112796 <1012112796@qq.com>
* Allow unauthenticated users to compare (#11240)Kyle Evans2020-05-043-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * routers: make /compare route available to unauthenticated users Remove some bits of the compare interface if the user isn't signed in. Notably, they don't need to see the "New Pull Request" button box nor the hidden form that would fail to submit due to the POST request continuing to require proper privileges. Follow-up commits will improve the UI a bit around this, removing some "Pull Request" verbiage in favor of "Compare." * ui: home: show "compare" button for unauthenticated users This change requires pulling in the BaseRepo unconditionally and recording if the pull request is in-fact not allowed (.PullRequestCtx.Allowed). If the user isn't allowed to create a pull request, either because this isn't a fork or same-fork branch PRs aren't allowed, then we'll name the button "Compare" instead of "Pull Request." * ui: branch list: use the new Compare language when available When viewing the branch listing as an unauthenticated user, you'll get "Pull Request" buttons. use the new "Compare" verbiage instead, which matches GitHub behavior when you can't issue a pull request from the branches. Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Sendmail should create a process on the gitea system and have a default ↵zeripath2020-05-031-0/+2
| | | | | | | | | | | | timeout (#11256) * Make sure that sendmail processes register with the process manager * Provide a timeout for these (initially of 5 minutes) * Add configurable value and tie in to documentation * Tie in to the admin config page. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix bug about comment attachment (#11272)Lunny Xiao2020-05-021-2/+2
|
* Show pull request selection even when unrelated branches (#11239)zeripath2020-05-021-1/+1
| | | | | | | | Fix #10525 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* API: Add pull review endpoints (#11224)65432020-05-021-1/+550
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * API: Added pull review read only endpoints * Update Structs, move Conversion, Refactor * refactor * lint & co * fix lint + refactor * add new Review state, rm unessesary, refacotr loadAttributes, convert patch to diff * add DeletePullReview * add paggination * draft1: Create & submit review * fix lint * fix lint * impruve test * DONT use GhostUser for loadReviewer * expose comments_count of a PullReview * infent GetCodeCommentsCount() * fixes * fix+impruve * some nits * Handle Ghosts :ghost: * add TEST for GET apis * complete TESTS * add HTMLURL to PullReview responce * code format as per @lafriks * update swagger definition * Update routers/api/v1/repo/pull_review.go Co-authored-by: David Svantesson <davidsvantesson@gmail.com> * add comments Co-authored-by: Thomas Berger <loki@lokis-chaos.de> Co-authored-by: David Svantesson <davidsvantesson@gmail.com>
* Remove last traces of has-emoji class (#11263)mrsdizzie2020-05-0120-57/+57
| | | | | | Now that emojify.js has been removed, get rid of all instances of has-emoji class that was only used for that. Support for rendering shortcodes should remain in all of these places so it should still work the same. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* Return issue subscription status from API subscribe (#10966)65432020-04-301-2/+8
| | | | | * [API] issue subscription indicate by http status * CI.restart()
* Fix creation of Organization repos by Users with max created personal repos ↵Andrew Bezold2020-04-301-0/+1
| | | | | | | | | | | | | | | | | (#11183) * Fix creation of Org repos Fix go-gitea#9269 * Change variable name to appease linter * Update PR with suggestions Add a note for user.CanCreateRepo() about failure assumptions Change repo.create help message Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add a 'this' to issue close/reopened messages (#11204)silverwind2020-04-301-2/+10
| | | | | | | | * add a 'this' to issue close/reopened messages * add 'this issue/pull request' and create new localization entries Co-authored-by: Lauris BH <lauris@nix.lv>
* Allow emoji short code in labels (#11250)mrsdizzie2020-04-306-21/+20
| | | | | | | | | | | | | | | | | | | | | * Allow emoji short code in labels As title, turn :alias: type short code into emojis when rendering labels to match previous behavior * Update models/issue_label.go Co-Authored-By: John Olheiser <john.olheiser@gmail.com> * render text in templates not code * remove has-emoji class 🧙‍♀️ * fix new issue form Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [API] ListIssues add filter for milestones (#10148)65432020-04-301-0/+6
| | | | | | | | | * Refactor Issue Filter Func * ListIssues add filter for milestones * as per @lafriks * documentation ...
* Fix submit review form (#11252)zeripath2020-04-301-1/+1
| | | | | | | | | | | | | | | | | * Fix submit review form Signed-off-by: Andrew Thornton <art27@cantab.net> * placate lint Signed-off-by: Andrew Thornton <art27@cantab.net> * try something different Signed-off-by: Andrew Thornton <art27@cantab.net> * Update web_src/less/_base.less Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Support unicode emojis and remove emojify.js (#11032)mrsdizzie2020-04-2811-97/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support unicode emojis and remove emojify.js This PR replaces all use of emojify.js and adds unicode emoji support to various areas of gitea. This works in a few ways: First it adds emoji parsing support into gitea itself. This allows us to * Render emojis from valid alias (:smile:) * Detect unicode emojis and let us put them in their own class with proper aria-labels and styling * Easily allow for custom "emoji" * Support all emoji rendering and features without javascript * Uses plain unicode and lets the system render in appropriate emoji font * Doesn't leave us relying on external sources for updates/fixes/features That same list of emoji is also used to create a json file which replaces the part of emojify.js that populates the emoji search tribute. This file is about 35KB with GZIP turned on and I've set it to load after the page renders to not hinder page load time (and this removes loading emojify.js also) For custom "emoji" it uses a pretty simple scheme of just looking for /emojis/img/name.png where name is something a user has put in the "allowed reactions" setting we already have. The gitea reaction that was previously hard coded into a forked copy of emojify.js is included and works as a custom reaction under this method. The emoji data sourced here is from https://github.com/github/gemoji which is the gem library Github uses for their emoji rendering (and a data source for other sites). So we should be able to easily render any emoji and :alias: that Github can, removing any errors from migrated content. They also update it as well, so we can sync when there are new unicode emoji lists released. I've included a slimmed down and slightly modified forked copy of https://github.com/knq/emoji to make up our own emoji module. The code is pretty straight forward and again allows us to have a lot of flexibility in what happens. I had seen a few comments about performance in some of the other threads if we render this ourselves, but there doesn't seem to be any issue here. In a test it can parse, convert, and render 1,000 emojis inside of a large markdown table in about 100ms on my laptop (which is many more emojis than will ever be in any normal issue). This also prevents any flickering and other weirdness from using javascript to render some things while using go for others. Not included here are image fall back URLS. I don't really think they are necessary for anything new being written in 2020. However, managing the emoji ourselves would allow us to add these as a feature later on if it seems necessary. Fixes: https://github.com/go-gitea/gitea/issues/9182 Fixes: https://github.com/go-gitea/gitea/issues/8974 Fixes: https://github.com/go-gitea/gitea/issues/8953 Fixes: https://github.com/go-gitea/gitea/issues/6628 Fixes: https://github.com/go-gitea/gitea/issues/5130 * add new shared function emojiHTML * don't increase emoji size in issue title * Update templates/repo/issue/view_content/add_reaction.tmpl Co-Authored-By: 6543 <6543@obermui.de> * Support for emoji rendering in various templates * Render code and review comments as they should be * Better way to handle mail subjects * insert unicode from tribute selection * Add template helper for plain text when needed * Use existing replace function I forgot about * Don't include emoji greater than Unicode Version 12 Only include emoji and aliases in JSON * Update build/generate-emoji.go * Tweak regex slightly to really match everything including random invisible characters. Run tests for every emoji we have * final updates * code review * code review * hard code gitea custom emoji to match previous behavior * Update .eslintrc Co-Authored-By: silverwind <me@silverwind.io> * disable preempt Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Make error pages translatable (#11163)65432020-04-272-4/+4
| | | | | | | * make error pages translatable * dont translate ":" * link need Safe
* Use AJAX for notifications table (#10961)zeripath2020-04-244-123/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use AJAX for notifications table Signed-off-by: Andrew Thornton <art27@cantab.net> * move to separate js Signed-off-by: Andrew Thornton <art27@cantab.net> * placate golangci-lint Signed-off-by: Andrew Thornton <art27@cantab.net> * Add autoupdating notification count Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix wipeall Signed-off-by: Andrew Thornton <art27@cantab.net> * placate tests Signed-off-by: Andrew Thornton <art27@cantab.net> * Try hidden Signed-off-by: Andrew Thornton <art27@cantab.net> * Try hide and hidden Signed-off-by: Andrew Thornton <art27@cantab.net> * More auto-update improvements Only run checker on pages that have a count Change starting checker to 10s with a back-off to 60s if there is no change Signed-off-by: Andrew Thornton <art27@cantab.net> * string comparison! Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @silverwind Signed-off-by: Andrew Thornton <art27@cantab.net> * add configurability as per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add documentation as per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net> * Use CSRF header not query Signed-off-by: Andrew Thornton <art27@cantab.net> * Further JS improvements Fix @etzelia update notification table request Fix @silverwind comments Co-Authored-By: silverwind <me@silverwind.io> Signed-off-by: Andrew Thornton <art27@cantab.net> * Simplify the notification count fns Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io>
* Fix submodule paths when AppSubUrl is not root (#11098)zeripath2020-04-221-1/+1
| | | | | | | | Fix submodule paths when AppSubUrl is not root Fix #11002 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add issue subscription check to API (#10967)65432020-04-211-0/+47
| | | | | | close #10962 Adds `GET /api/v1​/repos​/{owner}​/{repo}​/issues​/{index}​/subscriptions​/check` -> return a `WachInfo`
* Improve representation of attachments in issues (#11141)Matthias Schoettle2020-04-213-21/+25
| | | | | | | | | * Improves representation of attachments in issues to a list showing the file name and file size (see #6500 and #6089). Signed-off-by: Matthias Schoettle <git@mattsch.com> * Fixes indentation. Co-authored-by: zeripath <art27@cantab.net>
* Remove errant third curly brackets from account.tmpl and pull.tmpl and send ↵zeripath2020-04-192-2/+2
| | | | | | | | | | | | | | | account ID in account.tmpl (#11129) * Remove errant third } from account.tmpl Fix #11128 Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove errant third curly bracket from pull.tmpl Signed-off-by: Andrew Thornton <art27@cantab.net> * Update templates/user/settings/account.tmpl
* [API] Add branch delete (#11112)65432020-04-191-0/+41
| | | | | | | | | * use same process as in routers/repo/branch.go/deleteBranch * make sure default branch can not be deleted * remove IsDefaultBranch from UI process - it is worth its own pull * permissions
* consolidate author name across timeline (#11053)Sorien2020-04-192-61/+108
| | | | | | | | | * consolidate author name across timeline * Sync with master Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add single release page and latest redirect (#11102)John Olheiser2020-04-182-1/+5
| | | | | | | | | | | | | | | * Add single release and latest release routes Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update API and move latest search to models Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Add a way to mark Conversation (code comment) resolved (#11037)赵智超2020-04-183-9/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a way to mark Conversation (code comment) resolved mark Conversation is a way to mark a Conversation is stale or be solved. when it's marked as stale, will be hided like stale. all Pull Request writer , Offical Reviewers and poster can add or remove Conversation resolved mark. Signed-off-by: a1012112796 <1012112796@qq.com> * fix lint * Apply suggestions from code review * Add ResolveDoer * fix ui Co-Authored-By: Lauris BH <lauris@nix.lv> Co-Authored-By: 6543 <6543@obermui.de> * change IsResolved to an function Add permission check in UpdateResolveConversation * Apply suggestions from code review * change return error for permisson check * add default message for deleted user * get issue message from comment * add migration for ``ResolveDoerID`` column another change: * block mark pending review as resolved because it's not necessary Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> * change button color * resolve button size * fix code style * remove unusefull code Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* ui: fix status label on branches list vertical alignment (#11109)赵智超2020-04-173-5/+5
| | | | | change status icon for merged PR to git-merge Signed-off-by: a1012112796 <1012112796@qq.com>
* Prevent merge of outdated PRs on protected branches (#11012)65432020-04-163-1/+31
| | | | | | | | | | | | | | | | * Block PR on Outdated Branch * finalize * cleanup * fix typo and sentences thanks @guillep2k Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix and simplify some tmpl conditions (#11080)guillep2k2020-04-166-7/+7
|
* Add missing commit states to PR checks template (#11085)CirnoT2020-04-161-0/+4
| | | | | | | | | * Add missing commit states to PR checks template * Add separate translation strings for warning and error * Fix failure status string * Revert accidental change with whitespace
* Remove nonexistant serviceworker entries (#11091)silverwind2020-04-161-2/+0
|
* Fix merge dialog on protected branch with missing required statuses (#11074)65432020-04-151-3/+8
| | | | | It is possible for misconfigured protected branches to have required status checks that are not in any of the current statuses: Pending, Success, Error, Failure, or Warning - presumably because the CI has not contacted us as yet. Fix #10636 by adding case: missing StatusChecks when these are missing
* document 404 responce and meaning (#11073)65432020-04-151-0/+3
|
* Contents API should return 404 on not exist (#10323)zeripath2020-04-151-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Return 404 on not exist * swagger update and use git.IsErrNotExist * Handle delete too * Handle delete too x2 * Fix pr 10323 (#3) * fix TESTS * leafe a note for fututre * placate golangci-lint Signed-off-by: Andrew Thornton <art27@cantab.net> * Update integrations/api_repo_file_delete_test.go Co-Authored-By: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Cache PullRequest Divergence (#10914)65432020-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Cache PullRequest Divergence * only re-calc divergence if AddTestPullRequestTask() is exec * migrate already open pulls * finalize * take care of closed&not-merged+deleted-branch pull requests * fix nil pointer exeption Signed-off-by: 6543 <6543@obermui.de> * try this * no error its a warn * init gitea-repositories-meta * dont use gitDivergence type * CI.restart() * CI.restart() * CI.restart() * CI.restart() * check IsUserAllowedToUpdate independend from CommitsBehind
* ui: Change icon on title for merged PR to git-merge (#11064)赵智超2020-04-141-1/+1
| | | Signed-off-by: a1012112796 <1012112796@qq.com>
* ui: Add MergePull comment type instead of close for merge PR (#11058)赵智超2020-04-141-1/+13
| | | | | Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix language label vertical alignment (#11061)silverwind2020-04-132-2/+2
| | | Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* fix 404 and 500 image size in small size screen (#11043)赵智超2020-04-112-2/+2
| | | | | | | do it by define Semantic UI image class Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [Api] Check Notify (always return json) (#10059)65432020-04-101-3/+0
| | | | | | | * BEAKING: check return status based on struct not httpStatus * update Tests * CI.restart()
* Prettify Timeline (#10972)Sorien2020-04-113-142/+164
| | | Co-authored-by: mrsdizzie <info@mrsdizzie.com>
* remove package code.gitea.io/gitea/modules/git import out of models (#11025)65432020-04-101-2/+1
|
* Add Get/Update for api/v1/user/applications/oauth2 (#11008)Dan Molik2020-04-091-0/+58
| | | | | | | Add api methods for getting and updating user oauth2 applications. Signed-off-by: Dan Molik <dan@danmolik.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add git hook tooltip (#11030)John Olheiser2020-04-091-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix forked repo has no icon and language stat. (#10791)L0veSunshine2020-04-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update header.tmpl * Update _repository.less * Update pull.go * Update indexer.go * Update pull.go * Update pull.go * Update indexer.go * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat * fix forked repo doesn't have language stat Thanks the advice from lunny and 6543. * fix forked repo doesn't have language stat Modified as suggested by 6543. * fix forked repo doesn't have language stat simplify the function. * fix forked repo doesn't have language stat update the indexer after the loop Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* [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>