summaryrefslogtreecommitdiffstats
path: root/templates/repo
Commit message (Collapse)AuthorAgeFilesLines
* Add a migrate service type switch page (#12697)Lunny Xiao2020-09-095-23/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a migrat service type switch page * Improve translations * remove images * Fix images * remove extra create repo button on dashboard * Follow reviewers' opinions * Fix frontend lint * Remove wrong submit file * Fix tests * Adjust the size of image * Apply suggestions from code review Co-authored-by: 赵智超 <1012112796@qq.com> * Remove username and password from migration of github/gitlab * Improve docs * Improve interface docs Co-authored-by: 赵智超 <1012112796@qq.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* File header tweaks, add CSS helpers (#12635)silverwind2020-09-081-9/+5
| | | | | | | | | - replace two instances of fontawesome with octicons - add new "class" optional argument to "svg" helper - add many new CSS helpers and move their import to the end for increaseed precedence Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Change/remove a branch of an open issue (#9080)Vedran2020-09-081-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add field with isIssueWriter to front end * Make branch field editable * Switch frontend to form and POST from javascript * Add /issue/id/ref endpoint to routes * Use UpdateIssueTitle model to change ref in backend * Removed crossreference check and adding comments on branch change * Use ref returned from POST to update the field * Prevent calling loadRepo from models/ * Branch/tag refreshed without page reload * Remove filter for empty branch name * Add clear option to tag list as well * Delete button translation and coloring * Fix for not showing selected branch name in new issue * Check that branch is not being changed on a PR * Change logic * Notification when changing issue ref * Fix for renamed permission parameter * Fix for failing build * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Gitea <gitea@fake.local> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Compare SSH_DOMAIN when parsing submodule URLs (#12753)mrsdizzie2020-09-071-1/+1
| | | | | Right now we only compare the hostname from a submodule with the prefixURL it is viewed from to check if the submodule is hosted on the same Gitea instance. This adds an additional check to compare it against SSH_DOMAIN as well since the same Gitea instance might have a different hostname for SSH and if the submodule uses that hostname we should also detect that and link to the proper DOMAIN value. Fixes #12747, #9756
* ui: Show git-pull-request icon for closed pull request (#12742)赵智超2020-09-062-3/+3
| | | | | As title, I think it's more reasonable, and it's the same as GH. Signed-off-by: a1012112796 <1012112796@qq.com>
* Add Created & Updated to Milestone (#12662)65432020-09-051-0/+1
| | | | | | | | | * Add Created and Updated to Milestone table and expose via API * Expose to UI - To Overloaded ?!? * fix unit test Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* UI: Inform user what meaning hourglass on reviews has (#12713)65432020-09-041-1/+1
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove duplicate logic in initListSubmits (#12660)赵智超2020-09-022-5/+5
| | | | | | | | | | | | | | | | | | * Remove duplicate logic in initListSubmits Using the same logic to handle Choosing reviewers and assignees as choosing label. It's the first step of #10926. Signed-off-by: a1012112796 <1012112796@qq.com> * fix choose block * fix nit * try fix bug * simple code Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Do not disable commit changes button on repost (#12644)zeripath2020-08-291-0/+1
| | | | | | | | If the user has pressed commit changes and the post has failed - do not disable the commit changes button. Fix #12072 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Escape more things that are passed through str2html (#12622)zeripath2020-08-284-7/+7
| | | | | | | | | | | | | | * Escape more things that are passed through str2html Signed-off-by: Andrew Thornton <art27@cantab.net> * Bloody editors! Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Update routers/user/oauth.go Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Git migration UX (#12619)John Olheiser2020-08-281-57/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial work Signed-off-by: jolheiser <john.olheiser@gmail.com> * Implementation Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix gitlab and token cloning Signed-off-by: jolheiser <john.olheiser@gmail.com> * Imports and JS Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Linting Signed-off-by: jolheiser <john.olheiser@gmail.com> * Generate swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> * Move mirror toggle and rename options Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix ellipsis in files table (#12617)silverwind2020-08-271-4/+4
| | | | | | | Turns out text ellispsis does not work in combination with flexbox and while wrapping in a display:block can help in some cases, I could not get this to work properly so this changes the truncate to inline-block again and reduces the clickable area to just vertical expansion from the links.
* Fix file table overflows (#12603)silverwind2020-08-261-28/+30
| | | | | | | | | - Fix overflow regression from https://github.com/go-gitea/gitea/pull/12553. - Fix submodule columns stretching the table - Refactor template to share more HTML nodes - Introduce CSS helper classes Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix emoji replacements, make emoji images consistent (#12567)silverwind2020-08-231-1/+1
| | | | | | | - Fix emoji not being replaced in issue title change text - Make the image attributes consistent, add alt, remove align Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix signing.wont_sign.%!s(<nil>) if Require Signing commits but not signed ↵zeripath2020-08-231-4/+4
| | | | | | | | | | | | | | | | | | | | | in (#12581) signing.wont_sign.%!s(<nil>) will be displayed if the repository needs signed commits but the user is not logged in. This is displayed because of complicated logic in the the template repo/issue/view_content/pull.tmpl and a shortcut in the code of routers/repo/issue.go This PR adds a default value of notsignedin if users are not signed in, which although our templates will not show will prevent custom templates from showing the above. It also fixes the template to avoid showing signing errors if the user is not authorized to sign. Replaces #12564 Close #12564 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Increase clickable area on files table links (#12553)silverwind2020-08-231-29/+23
|
* 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>
* 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-168-2/+468
| | | | | | | | | | | | | 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>
* 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>
* 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 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
* Fix milestone links (#12405)zeripath2020-08-021-1/+1
| | | | | | | The milestone pages links should direct to the milestone pages Fix #10215 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix clone panel in wiki position not always align right (#12326)Gary Wang2020-07-291-3/+3
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Disable search box autofocus on issue/pr pages (#12229)silverwind2020-07-261-1/+1
| | | | | | 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-1713-29/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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>
* 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
* 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-016-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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>
* Use label to describe repository type (#11891)Cirno the Strongest2020-06-221-3/+17
| | | | | | | | | | | | | | | | | | | * 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>
* 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
* Update Fomantic-UI to 2.8.6 and remove old workarounds (#11933)Cirno the Strongest2020-06-171-2/+2
| | | | Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Global default branch setting (#11918)techknowlogick2020-06-172-2/+3
| | | | | | | | | * Global default branch setting * add to app.ini example per @silverwind * update per @lunny Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Fix double divider on issue sidebar (#11919)Cirno the Strongest2020-06-171-3/+1
|
* UI: Fix wrong closing tag (#11910)65432020-06-161-1/+1
| | | | | | | | | * rm wrong closing tag * Update templates/repo/sub_menu.tmpl Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Make repository size unclickable on repo summary bar (#11887)Cirno the Strongest2020-06-151-1/+1
| | | Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Rework blame template and styling (#11885)Cirno the Strongest2020-06-152-45/+31
| | | | | | | * Rework blame template and styling * cleanup template and add missing NumLines Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Better align items using flex within review request box (#11879)Cirno the Strongest2020-06-151-42/+46
| | | | | | | | * Better align items using flex within review request box * use justify-content Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>