144 Commits (c8093a13ff89834d587556a292c4c8cbfdb700a5)

Author SHA1 Message Date
Lunny Xiao a67c06ce90 Sanitize credentials in mirror form (#9975) 4 years ago
John Olheiser 74a6add4d9 Template Repositories (#8768)
* Start work on templates

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Continue work

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix IsTemplate vs IsGenerated

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix tabs vs spaces

* Tabs vs Spaces

* Add templates to API & start adding tests

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix integration tests

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Remove unused User

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move template tests to existing repos

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Minor re-check updates and cleanup

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* make fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Test cleanup

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix optionalbool

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* make fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Test fixes and icon change

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add new user and repo for tests

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix tests (finally)

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update meta repo with env variables

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move generation to create page

Combine with repo create template
Modify API search to prioritize owner for repo

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix tests and coverage

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix swagger and JS lint

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix API searching for own private repos

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Change wording

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix repo search test. User had a private repo that didn't show up

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Another search test fix

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Clarify git content

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Feedback updates

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Add topics WIP

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Finish adding topics

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Update locale

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago
guillep2k eb8975dcce Add nofollow to sign in links (#8509) 5 years ago
Lunny Xiao f2a3abc683
Move migrating repository from frontend to backend (#6200)
* move migrating to backend

* add loading image when migrating and fix tests

* fix format

* fix lint

* add redis task queue support and improve docs

* add redis vendor

* fix vet

* add database migrations and fix app.ini sample

* add comments for task section on app.ini.sample

* Update models/migrations/v84.go

Co-Authored-By: lunny <xiaolunwen@gmail.com>

* Update models/repo.go

Co-Authored-By: lunny <xiaolunwen@gmail.com>

* move migrating to backend

* add loading image when migrating and fix tests

* fix fmt

* add redis task queue support and improve docs

* fix fixtures

* fix fixtures

* fix duplicate function on index.js

* fix tests

* rename repository statuses

* check if repository is being create when SSH request

* fix lint

* fix template

* some improvements

* fix template

* unified migrate options

* fix lint

* fix loading page

* refactor

* When gitea restart, don't restart the running tasks because we may have servel gitea instances, that may break the migration

* fix js

* Update models/repo.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* fix tests

* rename ErrTaskIsNotExist to ErrTaskDoesNotExist

* delete release after add one on tests to make it run happy

* fix tests

* fix tests

* improve codes

* fix lint

* fix lint

* fix migrations
5 years ago
Lunny Xiao 7ff783b732
Move mirror to a standalone package from models (#7486)
* move mirror to a standalone package

* fix mirror address in template

* fix tests

* fix lint

* fix comment

* fix tests

* fix tests

* fix vendor

* fix fmt

* fix lint

* remove wrong file submitted

* fix conflict

* remove unrelated changes

* fix go mod

* fix tests

* clean go mod

* make vendor work

* make vendor work

* fix tests

* remove duplicated test
5 years ago
jaqra 0c47fe2d77 [fix #7384] make show private icon when repo avatar set (#8144) 5 years ago
Cherrg 3c3f74988a ui fixes - compare view and archieved repo issues (#7345)
* add 'repo archived - comment/pull not possible' message

affects #7304

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* add navbar to compare view

Signed-off-by: Michael Gnehr <michael@gnehr.de>

* remove wrong if else

Signed-off-by: Michael Gnehr <michael@gnehr.de>
5 years ago
Sergey Dryabzhinsky 3fd18838aa Repository avatars (#6986)
* Repository avatars

- first variant of code from old work for gogs
- add migration 87
- add new option in app.ini
- add en-US locale string
- add new class in repository.less

* Add changed index.css, remove unused template name

* Update en-us doc about configuration options

* Add comments to new functions, add new option to docker app.ini

* Add comment for lint

* Remove variable, not needed

* Fix formatting

* Update swagger api template

* Check if avatar exists

* Fix avatar link/path checks

* Typo

* TEXT column can't have a default value

* Fixes:

- remove old avatar file on upload
- use ID in name of avatar file - users may upload same files
- add simple tests

* Fix fmt check

* Generate PNG instead of "static" GIF

* More informative comment

* Fix error message

* Update avatar upload checks:

- add file size check
- add new option
- update config docs
- add new string to en-us locale

* Fixes:

- use FileHEader field for check file size
- add new test - upload big image

* Fix formatting

* Update comments

* Update log message

* Removed wrong style - not needed

* Use Sync2 to migrate

* Update repos list view

- bigger avatar
- fix html blocks alignment

* A little adjust avatar size

* Use small icons for explore/repo list

* Use new cool avatar preparation func by @lafriks

* Missing changes for new function

* Remove unused import, move imports

* Missed new option definition in app.ini

Add file size check in user/profile avatar upload

* Use smaller field length for Avatar

* Use session to update repo DB data, update DeleteAvatar - use session too

* Fix err variable definition

* As suggested @lafriks - return as soon as possible, code readability
5 years ago
John Olheiser 608781f880 Fix fork button (#6223) 5 years ago
John Olheiser d26d249748 Minor UI tweaks (#5980)
* Remove all CommitStatus when a repo is deleted

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Minor UI tweaks (#5782)
Added 'No License' option
Added link and octicon change for external issue trackers
Reset password now notifies right away if the code is invalid

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* More UI tweaks
More info in PR

* Generate stylesheet for arc-green

* Make gofmt work

* Change PR integration since the button is changed

* Rebase

* Generate stylesheet

* UI updates
Made the PR button a "basic" button
Vertically centered the issue checkboxes
Labels will update only once after modal is closed

* Commit to reference related issues
Resolves #5782
Resolves #5861
Addresses original question in #5993

* Change the comment wording since PR button is no longer little and green.

* Revert changes that made Windows work

* Regenerate stylesheet

* Regenerate stylesheets

* make generate-stylesheets

* Update integration again, changed button style

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Added ID to PR button
Changed integration to use the ID to avoid breaking in the future

* Added missing semi-colons

* Added back distinction between issue actions and filters (overlooked it before)
Moved action button over next to other action dropdowns

* Remove extra tab formatting in list.tmpl

* Remove more formatting from GoLand

* Replace hardcoded "No License" with i18n license helper.
5 years ago
silverwind acaf5c96fe UI: Repo header tweaks (#5945)
* UI: Repo header tweaks

- Use basic buttons on the header buttons, matching gogs
- Make 'Manage topic' text smaller, remove margin-left with no topics
present
- Move various inline styles to CSS
- Use flexbox on header title and buttons

* fix indentation

* reverse media query wrapping

* fix inconsisten whitespace
5 years ago
silverwind af22df8314 UI: Better support for long repo names (#5932)
* UI: Make long repo names wrap less often

* also adjust news feed column widths
5 years ago
kolaente 0b510725c9 Feature: Archive repos (#5009) 6 years ago
zeripath 07802a2bc5 Refactor repo.isBare to repo.isEmpty #5629 (#5714)
* Refactor repo.isBare to repo.isEmpty #5629

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove Sync call
6 years ago
Lanre Adelowo abb364f442 allow user fork repo even when as a guest.. This will prompt the user to login and if authentication was successful, the user will be redirected to fork the repo (#5690) 6 years ago
Lunny Xiao eabbddcd98
Restrict permission check on repositories and fix some problems (#5314)
* fix units permission problems

* fix some bugs and merge LoadUnits to repoAssignment

* refactor permission struct and add some copyright heads

* remove unused codes

* fix routes units check

* improve permission check

* add unit tests for permission

* fix typo

* fix tests

* fix some routes

* fix api permission check

* improve permission check

* fix some permission check

* fix tests

* fix tests

* improve some permission check

* fix some permission check

* refactor AccessLevel

* fix bug

* fix tests

* fix tests

* fix tests

* fix AccessLevel

* rename CanAccess

* fix tests

* fix comment

* fix bug

* add missing unit for test repos

* fix bug

* rename some functions

* fix routes check
6 years ago
nubenum 756eafaaf6 Fix some issues with special chars in branch names (#3767)
Signed-off-by: Robin Durner <github@nubenum.de>
6 years ago
Lauris BH 5ae8408725 Fix starring icon after semantic ui update (#4628) 6 years ago
cezar97 51ba3df5ff Add `noreferrer` to rel='noopener` for <a> tags (#4328) 6 years ago
Fluf 9033eaeec1 Only show "You cannot fork a repository you own" when needed (#4130) 6 years ago
Ambrose Chua 3a6f3c8c11 Fix code tab link when viewing tags (#3908)
Signed-off-by: Ambrose Chua <ambrose@chua.family>
6 years ago
kolaente 7cc96de6cf Fix for UI broke when a repo is starred & watched (#3630) (#3810) 6 years ago
Bwko daf70d3a4e Use the active branch for the code tab (#3720) 6 years ago
Alberto González Palomo 45c264f681 Templates for extra links in top navbar and repo tool tabs. (#3308)
These templates add content to the top navbar
and to the repository page.
This way we do not have to copy and modify the whole
template, and re-modify it after upgrading Gitea if
it changes.

Signed-off-by: Alberto González Palomo <bugs@sentido-labs.com>
7 years ago
Morgan Bazalgette 8ef1711055 Make the space for repo actions wider on repo header (#3312) 7 years ago
Morgan Bazalgette 3d3faa2624 Responsive view (#2750)
* Viewport meta tag

* responsive: dashboard

* responsive: issues page

* responsive: Explore page

* responsive: navbar, and some navbar css refactoring

* responsive: button for collapsing navbar in mobile view

* Mark the hamburger button as active when pressed

* better homepage for responsive views

* Bring back jump class in navbar

The class was necessary, because this way the
dropdown doesn't assume the contents of the
selected item.

* make repository homes responsive

* Make file view page responsive

* Make forms look good on responsive views

* make commits and commit diff view responsive

* issues and PRs

* responsive wiki

* Don't place auto-init far off the page

* Minor changes to amend broken stuff

minor improvements

- make login/sign up in navbar stackable
- make navbar in explore and sign in not stackable

Change selected class in TestPullCompare

Fix typo that happened when rebasing

fix dashboard on org view

improve profile UI

Use clearing on file diff to fix broken UI caused by floating elements

remove unresolved merge conflict, and | Sanitize

Fix repo home not loading
7 years ago
Sandro Santilli 7e59587173 Open external tracker in blank window, consistently with wiki (#3227)
Closes #3216
7 years ago
Bwko 3ab580c8d6 Add branch overiew page (#2108)
* Add branch overiew page

* fix changed method name on sub menu

* remove unused code
7 years ago
Lauris BH 1ec4dc6c1d Fix so that user can still fork his own repository to owned organizations (#2699)
* Fix so that user can still fork his own repository to his organizations

* Fix to only use owned organizations

* Add integration test for forking own repository to owned organization
7 years ago
Lauris BH f42dbdbae5 Add Activity page to repository (#2674)
* Add Activity page to repository

* Add request data for activity

* Add issue data for activity

* Add user unit right checks

* Add releases to activity

* Log repository unit loading error
7 years ago
Jonas Östanbäck 3fecf94086 Open external wiki in new window (#2489) 7 years ago
Lauris BH edb95faba2 Fix releases to be counted from database not tags (#2389) 7 years ago
Ethan Koenig f29458bd3a EnableUnit() -> UnitEnabled() (#2242) 7 years ago
Bwko 8f171210b9 Revert "Add ability to fork your own repos (#761)" (#2193) 7 years ago
Lauris BH f33e6ae09e Remove unit types commits and settings (#2161)
* Remove unit types commits and settings

* Can not limit units in administrator teams

* Limit changing units only to teams with read and write access mode

* Small code optimization
7 years ago
Patrick G 9d8fba62b3 Smaller watch, star, and fork buttons (#2052) 7 years ago
Bo-Yi Wu 1c3bd436cc feat: Only use issue and wiki on repo. (#1297) 7 years ago
Patrick G efbb895ebe Cleaner ui for admin, repo settings, and user settings page (#1269) (#1270) 7 years ago
Lunny Xiao 8a421b1fd7 Add units concept for modulable functions of a repository (#742)
* Add units concept for modulable functions of a repository

* remove unused comment codes & fix lints and tests

* remove unused comment codes

* use struct config instead of map

* fix lint

* rm wrong files

* fix tests
7 years ago
Bwko e08421017c Add ability to fork your own repos (#761) 8 years ago
Bwko 5ab85372da Added rel="noopener" to target="_blank" hrefs (#327)
* Added rel="noopener" to target="_blank" hrefs

* Replaced gogs.io/docs with docs.gitea.io
8 years ago
Rémy Boulanouar 8dc49dc114 Implementation of the feature to redirect to an external issue tracker 8 years ago
Unknwon 2f105f3979 #2162 completely disable builtin issue tracker when enable external tracker 8 years ago
Unknwon 971e2c3bd6 Upgrade octicon to 4.3.0 8 years ago
Unknwon 7ca5f8f119 models/repo: remove redundant info for some repo methods
RepoLink -> Link, RepoRelLink -> RelLink, FullRepoLink -> FullLink
8 years ago
Richard Mahn 7796c9e122 Fixes #3263 - Change for Fontawesome icons to not conflict withs semantic-ui (#3267) 8 years ago
Josh Frye 275464e7fb Use relative url when showing forked from 8 years ago
Download-Fritz a467184e13 #2505 Allow to fork and disallow to create PRs for mirrors. 8 years ago
chriswatt d710b5e791 Fix when repo is empty 8 years ago
chriswatt c47866b34a Add grey bg to tabs on repo page 8 years ago
chriswatt a881f776d0 Make commits tab active when on diff page 9 years ago
Unknwon 7509fa2c33 improve get commits performance 9 years ago
Unknwon 120cd4e471 #1984 Better mirror repo management 9 years ago
Adam Strzelecki da2585c11e Indent all templates with tabs
This commit improves templates readability, since all of them use consistent
indent with all template command blocks indented too.

1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks
   such as {{if}} {{with}}

2. Cleans all trailing white-space

3. Adds trailing last line-break to each file
9 years ago
Unknwon e538ff2770 fix #1829 and fix #890 9 years ago
Unknwon ec2423ad7c more UI minor fixes 9 years ago
Adam Strzelecki 2580e7b57e UI: Always show menu on repo pages
Merges repo/sidebar.tmpl with repo/header.tmpl and makes every repo page use
middleware.RepoRef() necessary to display information on this menu.
9 years ago
Adam Strzelecki 3eae4ecde7 UI: Make repository menu divide header and content
This is more inline with way GitHub looks like and feels much more natural and
in style with rest of the interface.
9 years ago
Unknwon 951037c0ae remove test code 9 years ago
Unknwon 7046df6028 UI fix 9 years ago
Unknwon 1db3ae6601 UI fix 9 years ago
Steven Oud 280fde9b7c added links to forks/watchers/stars in new layout header 9 years ago
Unknwon 119dec51f2 Mirror repository should not allow fork 9 years ago
Unknwon c0a899b151 css fix 9 years ago
Unknwon 670ade9a61 #1206 does not allow fork bare repo 9 years ago
Unknwon 2881456421 new webhooks list UI 9 years ago
Unknwon 133b19d0c5 finish view comments on issue page 9 years ago
Unknwon 33f33e055a fix on #1466 9 years ago
Gogs 009d716a02 modified repo header 9 years ago
Unknwon 17de3ab0a3 add migrate from issue.label_ids to issue_label 9 years ago
Unknwon a79586cc54 Merge branch 'develop' of github.com:gogits/gogs into feature/pull_request2
# Conflicts:
#	modules/bindata/bindata.go
#	public/css/gogs.min.css
#	templates/repo/header.tmpl
9 years ago
Unknwon 7372042441 list view: issue, label, milestone 9 years ago
Unknwon dea3a8c6a4 WIP: create PR - choose branch 9 years ago
Unknwon 9db4acc62e improve fork process 9 years ago
Unknwon 4447a20f87 UI: issues - finish basic frame 9 years ago
Peter Smit ed89b39984 Updating context and fixing permission issues
The boolean flags in the repo context have been replaced with mode and two methods

Also, the permissions have been brought more in line with https://help.github.com/articles/permission-levels-for-an-organization-repository/ , Admin Team members are able to change settings of their repositories.
9 years ago
Stefan-Code e5d6f4ce56 Changes to repo-header-download-drop, different repo-clone-url input behaviour 10 years ago
Unknwon 2a2596fe61 able to disable SSH for #883 10 years ago
Unknwon 4f360d8f08 Fix #617 and update Germeny locale 10 years ago
Unknwon e0de6cb5ad work on #616 and update locales 10 years ago
Unknwon 35977cd34c continue work on #255 10 years ago
Unknwon 4e7eb5be9d Work on #5 fork and fix #608 10 years ago
Unknwon a342d58d7e Able to fork repo to individuals 10 years ago
evolvedlight 29ac3980ff More changes 10 years ago
evolvedlight c9e5e38fcf Initial cut of git fork 10 years ago
Unknwon 063aacd436 UI: Use tooltip not alert when copy clone URL 10 years ago
Unknwon 7ba9257a7f Add suburl support 10 years ago
Martin van Beurden 0055cbd365 Allow Gogs to run from a suburl behind a reverse proxy. e.g. http://mydomain.com/gogs/
Conflicts:
	modules/setting/setting.go

Conflicts:
	templates/repo/release/list.tmpl
	templates/user/dashboard/dashboard.tmpl

Conflicts:
	routers/repo/setting.go
10 years ago
Unknwon 7027ac9308 Fix #461 10 years ago
Unknwon c5ce33047e Mirror fix and hide missing pages for 0.5 release 10 years ago
Unknwon 676bd764fa UI: SSH/HTTPS address switch and copy 10 years ago
Unknwon 5fbf8531e6 Finish new home page of organization 10 years ago
Unknwon e8c9bb2c66 Finish new collaboration page 10 years ago
Unknwon 755eec745f Finish new repo settings page 10 years ago