summaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Hide 'New Project board' button for users that are not signed in (#12547)wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf2020-08-223-84/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | * hide: 'New Project board' button * there is no reason to show the button for users that are not signed in * update template: specifies the condition together with another one as per lafriks' suggestion in the comment * chore: add proper user authorization check * chore: also hide button if repo is archived * chore: show project board edit/delete menu to authorized users only * chore: drop the redundant IsSigned check * CanWriteIssues and CanWritePulls implies (and requires) signed in user * Add CanWriteProjects and properly assert permissions Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add placeholder text for "Add SSH/GPG Key" forms (#12533)Bagas Sanjaya2020-08-202-2/+2
| | | | | | | | | | | | * Add placeholder text for "Add SSH/GPG Key" forms This commit add placeholder text for both Add SSH key and Add GPG key forms. * Localize placeholders Changes requested by @zeripath Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Show 2FA info on Admin Pannel: Users List (#12515)65432020-08-202-1/+3
|
* Milestone Issue/Pull List: Add octicons type (#12499)65432020-08-171-1/+27
| | | | | | | | | * add octicons based on issue type (pull|issue) * handle IsRead again * short code Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Kanban board (#8346)Lanre Adelowo2020-08-1612-3/+547
| | | | | | | | | | | | | Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com> Co-authored-by: Kerry <flatline-studios@users.noreply.github.com> Co-authored-by: Jaqra <jaqra@hotmail.com> Co-authored-by: Kyle Evans <kevans91@users.noreply.github.com> Co-authored-by: Tsakiridis Ilias <TsakiDev@users.noreply.github.com> Co-authored-by: Ilias Tsakiridis <ilias.tsakiridis@outlook.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix bug preventing transfer to private organization (#12497)zeripath2020-08-161-1/+1
| | | | | | | | | | | | | | | | | * Fix bug preventing transfer to private organization The code assessing whether a private organization was visible to a user before allowing transfer was incorrect due to testing membership the wrong way round This PR fixes this issue and renames the function performing the test to be clearer. Further looking at the API for transfer repository - no testing was performed to ensure that the acting user could actually see the new owning organization. Signed-off-by: Andrew Thornton <art27@cantab.net> * change IsUserPartOfOrg everywhere
* Add placeholder text for send testing email button in admin/config (#12452)Bagas Sanjaya2020-08-101-1/+1
| | | | | | | | | | | | | | | | * Add placeholder text for send testing email button in admin/config * Change placeholder text to expecting email address * Localize placeholder text * Apply suggestion from @silverwind ok Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Do not show arrows on comment diffs on pull comment pages (#12434)zeripath2020-08-081-66/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Do not show arrows on comment diffs on pull comment pages Prior to this PR it was possible that an expansion arrow could be displayed on comment diffs displayed on the comments pages of pulls These arrows would not successfully work because they were not attached to a commit id - nor can they necessarily be. This PR prevents these from being shown. Fix #10851 Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @silverwind Signed-off-by: Andrew Thornton <art27@cantab.net> * one more indentation fix Signed-off-by: Andrew Thornton <art27@cantab.net> * one more indentation fix Signed-off-by: Andrew Thornton <art27@cantab.net>
* Render the git graph on the server (#12333)zeripath2020-08-061-11/+34
| | | | | | | | | | | | | Rendering the git graph on the server means that we can properly track flows and switch from the Canvas implementation to a SVG implementation. * This implementation provides a 16 limited color selection * The uniqued color numbers are also provided * And there is also a monochrome version *In addition is a hover highlight that allows users to highlight commits on the same flow. Closes #12209 Signed-off-by: Andrew Thornton art27@cantab.net Co-authored-by: silverwind <me@silverwind.io>
* Add SVG favicon (#12437)silverwind2020-08-061-1/+2
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Remove librejs header in <head> (#12439)silverwind2020-08-061-33/+0
| | | | | | | | | | | | For the sake of performance and simplicity, remove this seemingly useless license header. It's related to LibreJS which we already pretty much killed of in an earlier commit [1]. Initially added in [2]. Note that the StaticUrlPrefix here was never actually correctly resolved and has rendered including the template fences. [1] https://github.com/go-gitea/gitea/pull/11810 [2] https://github.com/go-gitea/gitea/commit/a915a09e4f8edc7734c9374ad9f9a51b39241ee3 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* In issue comments, put issue participants also in completion list when ↵Andreas Shimokawa2020-08-061-4/+8
| | | | | | hitting @ (#12433) Previous behaviour was only to have completion for project members
* UserProfile Page: Render Description (#12415)65432020-08-051-3/+2
| | | | | | | | | | | | | * If Description contain more that one line render it * simpler ... * only render if description exists * Fix NPE in tests * Update routers/user/profile.go Co-authored-by: zeripath <art27@cantab.net>
* Match GH with Commit page (#12425)techknowlogick2020-08-051-5/+5
| | | Co-authored-by: zeripath <art27@cantab.net>
* Prevent empty div when editing comment (#12404)zeripath2020-08-041-2/+2
| | | | | | | | * Prevent empty div when editing comment The template for attachments needs to remove whitespace and return empty when there are no attachments. Fix #10220
* Add API to update pr headBranch (#12419)赵智超2020-08-041-0/+53
| | | | | * [API] Add update pr headBranch api Signed-off-by: a1012112796 <1012112796@qq.com>
* Add loading spinners and mermaid error handling (#12358)silverwind2020-08-041-3/+1
| | | | | - Add loading spinners on editor and mermaid renderers - Add error handling and inline error box for mermaid - Fix Mermaid rendering by using the .init api
* Add TOTP header to Swagger Documentation (#12402)65432020-08-021-0/+9
|
* Fix milestone links (#12405)zeripath2020-08-022-2/+2
| | | | | | | The milestone pages links should direct to the milestone pages Fix #10215 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add action feed for new release (#12324)赵智超2020-07-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add action feed for new release Signed-off-by: a1012112796 <1012112796@qq.com> * fix lint * Apply suggestions from code review * Add ReleaseID to the action table * Remove error message * Fold the attachments download list * remove attchment download list * simplify code * fix create release from existing tag * simplify ui * translation change * fix test Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Move jquery-minicolors to npm/webpack (#12305)silverwind2020-07-292-7/+0
| | | | | | | | | | | | | | | | | | | | * Move jquery-minicolors to npm/webpack - Unvendor and add as npm dependency - Removed unneeded backend variable - Fixed existing bug where picker would previously initizalize to the same green color when editing a label. There was probably a version bump because the previous version was over 3 years old but it seems to be compatible. * use file-loader * trailing comma and comment update * misc tweaks Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix clone panel in wiki position not always align right (#12326)Gary Wang2020-07-291-3/+3
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add name filter to API for GetMilestoneList (#12336)65432020-07-281-0/+6
| | | | | | | | | Adds a name filter to the API for GetMilestoneList Includes a small refactor: merge GetMilestones and GetMilestonesByRepoID Close #12260 Needed for https://gitea.com/gitea/go-sdk/issues/383 and https://gitea.com/gitea/tea/pulls/149
* Disable search box autofocus on issue/pr pages (#12229)silverwind2020-07-262-2/+2
| | | | | | Various pages like the issue list autofocus their search box which I find rather intrusive because more often than not I don't want to type into the search box, it's distracting if the focus jumps after page load. Disable this behaviour. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update Octicons to v10 (#12240)silverwind2020-07-1720-47/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update Octicons to v10 Besides a few renames, these icons are no longer present in v10 that we've used, so had to change: file-symlink-directory -> file-submodule internal-repo -> repo repo-force-push -> repo-push repo-template-private -> repo-template Fixes: https://github.com/go-gitea/gitea/issues/11889 Ref: https://github.com/primer/octicons/releases/tag/v10.0.0 * add custom sliders svg for removed octicon-settings * apply suggestion * fix triangles and use play on admin dashboard * add custom mirror svg * add missing build files * unify custom svgs * move to octicon-repo-clone to gitea-mirror * use octicon-x on conflicts * tweak timeline icons * tweak comment buttons * update settings icon to octicons v1 * switch to octicon-mirror and octicon-tools * replace two wiki buttons with octicons * remove whitespace in svg sources * Fix filepath basename on Windows for SVG bindata (#12241) * move octicons to devDependencies * move back to dependencies * move svgo to devDependencies again Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [ui] Link to pr list page on sidebar when view pr (#12256)赵智超2020-07-161-3/+3
| | | | | | | Fix #12254 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* fix: add type=text for user_name (password manager) (#12250)Tchoupinax2020-07-156-6/+6
| | | | | | | | | * fix: add type=text for user_name (password manager) * Update templates/user/auth/reset_passwd.tmpl Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com> Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
* Replace code fold icons with octicons (#12222)silverwind2020-07-133-56/+81
| | | | | | | | - replace font-awesome icons with octicons - clean up js and css surrounding the code expansion and file folding - fix hover color on arc-green - tweak diff line number colors Co-authored-by: zeripath <art27@cantab.net>
* Fix repolist icons (#12228)silverwind2020-07-131-4/+4
| | | Fixes: https://github.com/go-gitea/gitea/issues/12226
* Extend Notifications API and return pinned notifications by default (#12164)zeripath2020-07-121-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Extend notifications API and return pinned notifications in notifications list Signed-off-by: Andrew Thornton <art27@cantab.net> * fix swagger Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix swagger again Signed-off-by: Andrew Thornton <art27@cantab.net> * fix test Signed-off-by: Andrew Thornton <art27@cantab.net> * remove spurious debugs * as per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update models/notification.go * as per @6543 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Make copy/paste work for source code (#12191)mrsdizzie2020-07-084-5/+5
| | | | | | | | | | | | | | | * Make copy/paste work for source code Fix regression casued by #12047 so copy/paste works properly in all browsers. Fixes #12184 Also while looking at this I saw a small display issue for blame view. I think #12023 was merged into original PR through an update branch before #12047 was merged and made one of the css ruules not apply anymore. * use pseudo-element to prevent copying of comment + symbol even when not visually selected * remove added newline here should not be necessary anymore * make sure empty line is newline so there is something to select and copy
* Fix U2F button icon (#12167)silverwind2020-07-071-1/+1
| | | | | Previously this used a USB icon which required a separate font file used nowhere else so replace it with a octicon and fix the background color on arc-green too.
* Fonts rework (#12114)silverwind2020-07-061-1/+0
| | | | | | | | | | | | | - Use system fonts only for text to avoid FOUT - Move font-awesome to npm/webpack - Move NotoColorEmoji to web_src - Remove presumably unneccesary 'PT Sans Narrow' - Simplify webpack import exclusions Fixes: https://github.com/go-gitea/gitea/issues/11818 Fixes: https://github.com/go-gitea/gitea/pull/11814 Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
* Multiple small admin dashboard fixes (#12153)zeripath2020-07-052-5/+6
| | | | | | | | | * Remove spurious spacing between Maintenance Operations and its table on dashboard * Prevent (EXTRA string) comments in Task headers * Redirect tasks started from monitor page back to monitor * Fix #12107 - redirects from process cancel should use AppSubUrl * When wrapping queues set the name correctly Signed-off-by: Andrew Thornton <art27@cantab.net>
* templates/repo/empty.tmpl : fix repo setup instructions (#12122)Andreas Shimokawa2020-07-031-1/+1
| | | Co-authored-by: codeberg <codeberg@codeberg.org>
* Provide option to unlink a fork (#11858)zeripath2020-07-021-34/+75
| | | | | | | | | | | | | | | | | | | | | | * Provide option to unlink a fork Fix #4566 Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-authored-by: techknowlogick <matti@mdranta.net> * Add check that user can create repo Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @cirnoT Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
* Server-side syntax highlighting for all code (#12047)mrsdizzie2020-07-017-19/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Server-side syntax hilighting for all code This PR does a few things: * Remove all traces of highlight.js * Use chroma library to provide fast syntax hilighting directly on the server * Provide syntax hilighting for diffs * Re-style both unified and split diffs views * Add custom syntax hilighting styling for both regular and arc-green Fixes #7729 Fixes #10157 Fixes #11825 Fixes #7728 Fixes #3872 Fixes #3682 And perhaps gets closer to #9553 * fix line marker * fix repo search * Fix single line select * properly load settings * npm uninstall highlight.js * review suggestion * code review * forgot to call function * fix test * Apply suggestions from code review suggestions from @silverwind thanks Co-authored-by: silverwind <me@silverwind.io> * code review * copy/paste error * Use const for highlight size limit * Update web_src/less/_repository.less Co-authored-by: Lauris BH <lauris@nix.lv> * update size limit to 1MB and other styling tweaks * fix highlighting for certain diff sections * fix test * add worker back as suggested Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lauris BH <lauris@nix.lv>
* Use custom SVGs for commit signing lock icon (#12017)Cirno the Strongest2020-06-282-12/+6
| | | | | | | | | | | | * Use custom SVGs for commit signing lock icon * missing spans * editorconfig * xmlns and remove aria-hidden Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Move fomantic and jQuery to main webpack bundle (#11997)silverwind2020-06-272-7/+3
| | | | | | | | | | | | | | This saves around 3 MB binary size by not including useless fomantic files in the build. Also, this allows us to move jQuery into the main bundle as well which eliminates a few HTTP requests. Also included are webpack config changes: - split less and css loaders to speed up compliation - enable css sourcemaps - switch css minfier plugin to cssnano-webpack-plugin which works better for sourcemaps than the previous plugin Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix swagger docs for /repos/issues (#12069)Cirno the Strongest2020-06-271-0/+9
| | | Co-authored-by: Lauris BH <lauris@nix.lv>
* Show description on individual milestone view (#12055)mrsdizzie2020-06-251-1/+3
| | | | | Fixes #12043 Co-authored-by: Lauris BH <lauris@nix.lv>
* Add org avatar on top of internal repo icon (#11895)Cirno the Strongest2020-06-261-18/+21
| | | | | | | | | | | | | | | | | * Add org avatar on top of internal repo icon * add color for arc-green * use wrapper div to avoid negative margins * rename class and move div * move div to icon tmpl * remove unnecessary margin for lock octicon * fix label align together with #11891 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Use Fomantic's fluid padded for blame full width (#12023)Cirno the Strongest2020-06-251-2/+2
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [UI] Sortable Tables Header By Click (#7980)65432020-06-244-13/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | * [UI] Sortable Tables Header By Click * get rid of padding above header * restart CI * fix lint * convert getArrow JS to SortArrow go func * addopt SortArrow funct * suggestions from @silverwind - tablesort.js Co-authored-by: silverwind <me@silverwind.io> * Update web_src/js/features/tablesort.js Co-authored-by: silverwind <me@silverwind.io> * Update web_src/js/features/tablesort.js Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io>
* Use label to describe repository type (#11891)Cirno the Strongest2020-06-222-9/+36
| | | | | | | | | | | | | | | | | | | * Use label instead of icon to describe repository type when repo avatar is set * header_icon is not longer duplicated; move out of separate template * handle archived case too * use everywhere * public template -> template * bring back separate icon in better form * definitely was overthinking this * 32 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix sticky diff stats container (#12002)Cirno the Strongest2020-06-221-4/+4
| | | | | | | | | | | | | * Fix sticky diff stats container * Use pure CSS sticky instead of Fomantic's JS * add border color to arc-green * add slight padding on sides * make linter happy Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* API: Move AllowedReactions endpoint into GetGenneralUI endpoint + creat new ↵65432020-06-221-10/+30
| | | | | | | | | | | | | swagger section settings (#11854) * move Setting function into its own package * swagger add&use new section "settings" * move api AllowedReactions into general UI-Settings endpoint * prepare TEST * lint
* Fix missing styling for dropdown icon on review button (#11998)Cirno the Strongest2020-06-221-1/+1
| | | | | | | | * Fix missing styling for dropdown icon on review button * Remove unnecessary span element Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Use octicons for all repo header buttons (#11890)Cirno the Strongest2020-06-221-3/+4
| | | | | | | | * Use octicons for all repo header buttons * ensure margin isn't set on any other svg outside repo buttons Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Handle multiple merges in gitgraph.js (#11996)zeripath2020-06-201-33/+31
| | | | | | | | | | | | | * Handle multiple merges in gitgraph.js There is a bug in web_src/js/vendor/gitgraph.js whereby it fails to handle multiple merges in a single commit correctly. This PR adds changes to make this work. Fix #11981 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update web_src/js/vendor/gitgraph.js