#2063 Ability to delete repo from admin panel

This commit is contained in:
Unknwon committed 2015-12-05 17:39:29 -05:00
1 parent 978dc00305
commit ca8ce793d1
10 files changed
+52 -7

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](public/img/gogs-large-resize.png)
##### Current version: 0.7.32 Beta
##### Current version: 0.7.33 Beta
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|
+2 -1
View File
@@ -267,7 +267,8 @@ func runWeb(ctx *cli.Context) {
})
m.Group("/repos", func() {
m.Get("", admin.Repositories)
m.Get("", admin.Repos)
m.Post("/delete", admin.DeleteRepo)
})
m.Group("/auths", func() {
+1
View File
@@ -582,6 +582,7 @@ settings.delete_notices_2 = - This operation will permanently delete the everyth
settings.delete_notices_fork_1 = - If this repository is public, all forks will be became independent after deletion.
settings.delete_notices_fork_2 = - If this repository is private, all forks will be removed at the same time.
settings.delete_notices_fork_3 = - If you want to keep all forks after deletion, please change visibility of this repository to public first.
settings.deletion_success = Repository has been deleted successfully!
settings.update_settings_success = Repository options has been updated successfully.
settings.transfer_owner = New Owner
settings.make_transfer = Make Transfer
+1 -1
View File
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.7.32.1205 Beta"
const APP_VER = "0.7.33.1205 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
+2 -2
View File
@@ -4364,7 +4364,7 @@ func confLocaleLocale_deDeIni() (*asset, error) {
return a, nil
}
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x7d\xfd\x72\xdc\x46\xae\xef\xff\x7c\x0a\xc6\x5b\x2e\x27\x55\xf2\xa4\x92\x9c\xfb\x51\xa9\x38\xb9\x8a\x1d\x7f\x9c\x63\x59\x3a\x96\xb2\x7b\xf7\xa6\x5c\x13\x6a\x48\x8d\x78\x3c\x43\xce\x92\x1c\xcb\xda\xad\x7d\x83\xfb\x00\xf7\xf9\xee\x93\x5c\xe0\x07\xa0\x1b\x4d\x72\x24\x7b\xcf\xd6\xf5\x1f\x16\xa7\x1b\xfd\x8d\x46\x03\x68\x00\x5d\xec\x76\xcb\xb2\xea\x57\xf9\x93\xfc\x38\xdf\x15\x75\xb3\xa9\xfa\x3e\xef\xab\xcd\xd5\xe3\xeb\xb6\x1f\xaa\x32\x7f\x51\x0f\xf4\xbb\xfb\x50\xaf\xaa\x2c\xbb\x6e\xb7\x15\x81\xbe\xa4\x3f\x59\x59\xf4\xd7\x97\x6d\xd1\x95\x94\xf0\xcc\xbe\xb3\xea\xe3\x6e\xd3\x76\x0c\xf4\x8b\x7c\x65\xd7\xd5\x66\xc7\x65\xe8\x4f\xd6\xd7\xeb\x66\x59\x37\xf4\xf3\x9c\xbe\xf2\x57\x8d\xa4\xb4\xfb\xc1\x92\x4e\xf7\x83\xa4\xed\x77\x96\xf4\xeb\x2e\xeb\xaa\x75\x4d\xbd\xe9\x28\xe9\xad\x7e\x66\x37\xd5\x65\x5f\x0f\xdc\xd2\x9f\xe4\x2b\xfb\x50\x75\x7d\xdd\x72\xed\x7f\x94\xaf\x6c\x57\xac\x19\xe0\x8c\xfe\x64\x43\xb5\xdd\x6d\x0a\x14\xb8\xd0\xcf\x6c\x53\x34\xeb\xbd\xc0\xbc\xd6\xcf\x6c\xd5\x55\x94\xb5\x6c\xaa\x1b\x4a\x7d\x8a\x1f\x8b\xc5\x22\xdb\xd3\x24\x2c\x77\x5d\x7b\x55\x6f\xaa\x65\xd1\x94\xcb\xad\x0c\xf3\x57\x4a\xcf\x35\x3d\xa7\xf4\x9c\xd3\x31\x84\xaa\xa4\xa1\x2e\x8b\x5e\xc7\x41\x73\x49\x23\x2f\xfa\x0c\x55\x35\xc5\xd6\x4a\xf3\x67\x56\x6d\x8b\x7a\xc3\xb3\xc6\x7f\xa9\xdf\x7d\x7f\xd3\x62\x6a\xcf\xf4\x93\xe6\x60\x39\xdc\xee\x2a\x4c\xc1\xe3\x0b\xfa\xca\x56\xc5\x6e\x58\x5d\x17\xdc\x4d\xf9\xca\x08\x68\xd7\xd2\x5c\xb4\xdd\x2d\xe0\xec\x47\xd6\x76\xeb\xa2\xa9\xff\x5a\x0c\x32\x3f\xa7\xee\x67\xb6\xad\xbb\xae\xe5\xa9\x3d\xc1\x47\x46\x23\x5f\x72\x3d\x94\xf2\x86\x26\xc1\xd5\xc2\x39\xdb\x7a\xdd\xc9\x2c\x72\xe6\x09\x7e\x71\x2d\x9c\x77\xd5\x76\xef\x35\xe3\x39\x7f\x8e\x8a\x52\x27\x34\x37\x6d\xbf\x68\x68\xde\x35\xf7\x04\x3f\x12\x80\x3e\x2b\xca\x2d\xcd\xe4\xae\x68\x2a\x9e\xa2\x63\xfe\x45\xf3\x42\xbf\xb2\x62\xb5\x6a\xf7\xcd\xb0\xec\xab\x61\xa8\x9b\x35\xcf\xf5\xb1\x24\xe5\xe7\x9a\x94\xb9\xbc\x90\x76\xdb\xee\xc3\x6a\x52\xfa\x9f\xe9\x67\x7e\x26\x3f\x25\xcf\x15\x42\x66\x28\xc9\x23\xe9\x97\x57\x55\x55\xca\x58\xfa\xfc\x39\x7d\x67\xbb\xfd\x66\x43\xb3\xf6\x97\x7d\xd5\x0f\x5c\xe8\x8c\x7e\xd3\xf8\xe5\x77\x56\xf7\x3d\x7d\x50\xf2\x2b\x7c\x64\xb4\x74\xcd\x0a\x83\x79\x8a\x8f\x2c\xfb\xad\xaf\x8a\x6e\x75\xfd\x2e\x93\xbf\xe8\x2b\x7f\x30\xea\x1d\x5a\x54\xc6\x23\xc5\x21\x69\xc1\x1a\xc8\x56\x6d\xc9\x3f\x9e\xd2\x1f\xaa\xba\x6e\xfa\xa1\xd8\x6c\xde\x65\xfa\xc1\x60\xf2\x25\x0b\x30\xd4\x03\x66\x41\x13\xf3\xf3\xa1\xda\xf5\xbc\x82\xf9\xf3\xba\xeb\x87\xc7\x43\x4d\xb8\xfa\x76\xdf\x64\x65\xbb\x7a\x4f\xbb\x80\x77\x34\x5a\x7e\x75\x95\xd3\x64\x3d\xa2\x7d\xd0\xed\x9b\x86\xa6\x27\x7f\xd1\xd2\x94\x51\x33\x35\xb5\xff\x0c\xd0\x47\xf9\x6e\x53\x15\x3d\x81\x54\x45\x99\xff\x50\xe4\x43\xd1\xad\xab\xe1\xc9\x83\xe5\x25\xed\xbe\xf7\x0f\xf2\xeb\xae\xba\x7a\xf2\xe0\x61\xff\xe0\xc7\x17\x7b\x2a\xb6\xa9\x9b\xaa\xff\xe1\xeb\xe2\xc7\x7c\x55\x50\x0e\x4d\xe3\x6d\x7e\x59\x5d\xf1\x66\xa3\xb6\x72\xc2\xf2\x66\xcd\x1b\xed\x76\xb8\xe6\x06\x09\x13\xe8\xa3\xcf\x79\xa7\x7f\x91\xf1\x02\x10\x25\x58\x96\x97\x46\xd5\xd0\x21\x24\x77\xb4\x00\x27\xb7\xe7\xff\xfe\xfa\x28\x3f\x23\xd2\xb6\xee\x2a\x7c\xd3\x7f\x54\xe2\xbb\x9c\x46\x7b\x51\x3f\xfb\x79\x91\x51\x59\x9b\x90\x67\xc5\x50\x5c\x72\xdf\xc3\xea\x73\xa6\x6c\xc2\x90\x87\xad\xc8\xc4\x12\x84\xb1\x1f\x92\x65\x99\xdb\xc8\x54\x87\xee\xfe\x50\xc7\x1b\x26\x01\x94\x1e\x66\xf6\x4c\xe6\x8c\xaa\xca\x5f\xbd\x79\x73\xfa\xec\xe7\xbc\x6a\xd6\x34\x33\xf9\x4d\x3d\x5c\xe7\xfb\xe1\xea\xbf\x2f\xd7\x55\x53\x75\xc5\x66\xb9\xaa\x79\x52\x3a\x42\xd8\x9c\x66\x49\x86\xb8\xc8\xfa\x7e\x43\x14\x0a\x58\x70\x7e\xfe\x3a\x3f\x61\x4c\xd8\x15\xc3\x35\x3a\x32\x5c\x67\xfd\x5f\x36\x3c\x51\xa1\xc1\x8b\xeb\x2a\xc7\x66\x00\x50\x7b\x35\x9e\x97\xbc\xd4\xbe\x2e\xb2\xaa\xeb\x96\x44\x40\x87\x5b\x9e\x66\xad\xf3\x10\xb4\x54\x47\xd8\xde\xb4\x03\x2d\x63\x8e\x72\x52\x45\xdd\x7c\x28\x36\x75\x49\x93\x1d\x27\x24\x2d\x8b\xc4\xb2\xa5\x75\xe3\xd2\x84\x99\xed\x0d\x86\x5a\xac\x88\xfe\xf7\xf9\x83\xc5\x03\x10\xdc\x07\x8f\x1f\x2c\xb2\xa6\x5d\x0a\x95\x60\xd2\x5c\xd6\x7d\x71\x49\x64\x5a\x8e\x8d\xce\xa8\xde\x9f\x19\x7f\xa4\x2b\x0a\x91\x27\x10\x3c\xb7\x7c\x14\xe1\x04\x60\xe4\x2a\x88\x5e\x83\xd8\x28\x99\xf1\x63\x37\x9a\x14\xd6\x57\xc8\x52\x48\x98\x8c\x39\xb3\x05\x33\xec\x3a\xde\xed\x36\xf5\x4a\x9a\x7e\x21\x79\x11\xd1\xf8\x60\xd6\x49\xf1\x70\x40\x14\xcb\x73\xe8\x42\xbd\x66\xb2\x95\x27\x74\x1e\xe5\xaf\x2b\xda\x39\xd7\xfb\xb5\x1c\x4e\x9b\x76\x5f\x7e\x01\x82\x62\x2b\x17\xe9\x49\xfe\xb6\xa5\x0e\x03\x3b\x02\x40\x6c\xe2\x98\x08\x03\xf3\x02\x5d\xb5\x6d\x07\x9e\x38\x2d\x56\xd3\xf2\xdc\xd4\x94\x49\x23\xed\x8b\x0f\x44\x16\x87\x56\xb6\x64\x49\x5b\x6e\xc5\x15\x13\x05\xdb\xd3\x81\x2e\xdb\x82\xe8\x88\x6c\x0d\x4b\x4b\x71\x10\x50\xdb\x3d\xed\xa6\x6b\xaa\x8c\x27\x9e\x19\x12\xaa\x72\xae\x9f\x18\x12\xd5\x83\x5d\x4e\x3b\xb7\xa5\xc3\x93\x17\xfa\x19\x3e\xf4\xb7\xaf\x9f\x7a\x55\x5c\x5d\x51\xaf\x7a\xda\x15\x2f\xf3\xd5\xa6\xa5\x2d\xf5\xeb\xdb\xd7\x3d\x6f\x98\xeb\xe5\xae\xed\xc0\x88\x50\xd6\x19\x7d\x86\x34\x37\xd1\x0c\xd1\xec\xb7\x97\xf4\xeb\xe6\xba\x26\x42\x8d\x69\xe7\x12\xcc\x24\x51\x2Line truncated
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x7d\xfd\x72\xdc\x46\xae\xef\xff\x7c\x0a\xc6\x5b\x2e\x27\x55\xf2\xa4\x92\x9c\xfb\x51\xa9\x38\xb9\x8a\x1d\x7f\x9c\x63\x59\x3a\x96\xb2\x7b\xf7\xa6\x5c\x13\x6a\x48\x8d\x78\x3c\x43\xce\x92\x1c\xcb\xda\xad\x7d\x83\xfb\x00\xf7\xf9\xee\x93\x5c\xe0\x07\xa0\x1b\x4d\x72\x24\x7b\xcf\xd6\xf5\x1f\x16\xa7\x1b\xfd\x8d\x46\x03\x68\x00\x5d\xec\x76\xcb\xb2\xea\x57\xf9\x93\xfc\x38\xdf\x15\x75\xb3\xa9\xfa\x3e\xef\xab\xcd\xd5\xe3\xeb\xb6\x1f\xaa\x32\x7f\x51\x0f\xf4\xbb\xfb\x50\xaf\xaa\x2c\xbb\x6e\xb7\x15\x81\xbe\xa4\x3f\x59\x59\xf4\xd7\x97\x6d\xd1\x95\x94\xf0\xcc\xbe\xb3\xea\xe3\x6e\xd3\x76\x0c\xf4\x8b\x7c\x65\xd7\xd5\x66\xc7\x65\xe8\x4f\xd6\xd7\xeb\x66\x59\x37\xf4\xf3\x9c\xbe\xf2\x57\x8d\xa4\xb4\xfb\xc1\x92\x4e\xf7\x83\xa4\xed\x77\x96\xf4\xeb\x2e\xeb\xaa\x75\x4d\xbd\xe9\x28\xe9\xad\x7e\x66\x37\xd5\x65\x5f\x0f\xdc\xd2\x9f\xe4\x2b\xfb\x50\x75\x7d\xdd\x72\xed\x7f\x94\xaf\x6c\x57\xac\x19\xe0\x8c\xfe\x64\x43\xb5\xdd\x6d\x0a\x14\xb8\xd0\xcf\x6c\x53\x34\xeb\xbd\xc0\xbc\xd6\xcf\x6c\xd5\x55\x94\xb5\x6c\xaa\x1b\x4a\x7d\x8a\x1f\x8b\xc5\x22\xdb\xd3\x24\x2c\x77\x5d\x7b\x55\x6f\xaa\x65\xd1\x94\xcb\xad\x0c\xf3\x57\x4a\xcf\x35\x3d\xa7\xf4\x9c\xd3\x31\x84\xaa\xa4\xa1\x2e\x8b\x5e\xc7\x41\x73\x49\x23\x2f\xfa\x0c\x55\x35\xc5\xd6\x4a\xf3\x67\x56\x6d\x8b\x7a\xc3\xb3\xc6\x7f\xa9\xdf\x7d\x7f\xd3\x62\x6a\xcf\xf4\x93\xe6\x60\x39\xdc\xee\x2a\x4c\xc1\xe3\x0b\xfa\xca\x56\xc5\x6e\x58\x5d\x17\xdc\x4d\xf9\xca\x08\x68\xd7\xd2\x5c\xb4\xdd\x2d\xe0\xec\x47\xd6\x76\xeb\xa2\xa9\xff\x5a\x0c\x32\x3f\xa7\xee\x67\xb6\xad\xbb\xae\xe5\xa9\x3d\xc1\x47\x46\x23\x5f\x72\x3d\x94\xf2\x86\x26\xc1\xd5\xc2\x39\xdb\x7a\xdd\xc9\x2c\x72\xe6\x09\x7e\x71\x2d\x9c\x77\xd5\x76\xef\x35\xe3\x39\x7f\x8e\x8a\x52\x27\x34\x37\x6d\xbf\x68\x68\xde\x35\xf7\x04\x3f\x12\x80\x3e\x2b\xca\x2d\xcd\xe4\xae\x68\x2a\x9e\xa2\x63\xfe\x45\xf3\x42\xbf\xb2\x62\xb5\x6a\xf7\xcd\xb0\xec\xab\x61\xa8\x9b\x35\xcf\xf5\xb1\x24\xe5\xe7\x9a\x94\xb9\xbc\x90\x76\xdb\xee\xc3\x6a\x52\xfa\x9f\xe9\x67\x7e\x26\x3f\x25\xcf\x15\x42\x66\x28\xc9\x23\xe9\x97\x57\x55\x55\xca\x58\xfa\xfc\x39\x7d\x67\xbb\xfd\x66\x43\xb3\xf6\x97\x7d\xd5\x0f\x5c\xe8\x8c\x7e\xd3\xf8\xe5\x77\x56\xf7\x3d\x7d\x50\xf2\x2b\x7c\x64\xb4\x74\xcd\x0a\x83\x79\x8a\x8f\x2c\xfb\xad\xaf\x8a\x6e\x75\xfd\x2e\x93\xbf\xe8\x2b\x7f\x30\xea\x1d\x5a\x54\xc6\x23\xc5\x21\x69\xc1\x1a\xc8\x56\x6d\xc9\x3f\x9e\xd2\x1f\xaa\xba\x6e\xfa\xa1\xd8\x6c\xde\x65\xfa\xc1\x60\xf2\x25\x0b\x30\xd4\x03\x66\x41\x13\xf3\xf3\xa1\xda\xf5\xbc\x82\xf9\xf3\xba\xeb\x87\xc7\x43\x4d\xb8\xfa\x76\xdf\x64\x65\xbb\x7a\x4f\xbb\x80\x77\x34\x5a\x7e\x75\x95\xd3\x64\x3d\xa2\x7d\xd0\xed\x9b\x86\xa6\x27\x7f\xd1\xd2\x94\x51\x33\x35\xb5\xff\x0c\xd0\x47\xf9\x6e\x53\x15\x3d\x81\x54\x45\x99\xff\x50\xe4\x43\xd1\xad\xab\xe1\xc9\x83\xe5\x25\xed\xbe\xf7\x0f\xf2\xeb\xae\xba\x7a\xf2\xe0\x61\xff\xe0\xc7\x17\x7b\x2a\xb6\xa9\x9b\xaa\xff\xe1\xeb\xe2\xc7\x7c\x55\x50\x0e\x4d\xe3\x6d\x7e\x59\x5d\xf1\x66\xa3\xb6\x72\xc2\xf2\x66\xcd\x1b\xed\x76\xb8\xe6\x06\x09\x13\xe8\xa3\xcf\x79\xa7\x7f\x91\xf1\x02\x10\x25\x58\x96\x97\x46\xd5\xd0\x21\x24\x77\xb4\x00\x27\xb7\xe7\xff\xfe\xfa\x28\x3f\x23\xd2\xb6\xee\x2a\x7c\xd3\x7f\x54\xe2\xbb\x9c\x46\x7b\x51\x3f\xfb\x79\x91\x51\x59\x9b\x90\x67\xc5\x50\x5c\x72\xdf\xc3\xea\x73\xa6\x6c\xc2\x90\x87\xad\xc8\xc4\x12\x84\xb1\x1f\x92\x65\x99\xdb\xc8\x54\x87\xee\xfe\x50\xc7\x1b\x26\x01\x94\x1e\x66\xf6\x4c\xe6\x8c\xaa\xca\x5f\xbd\x79\x73\xfa\xec\xe7\xbc\x6a\xd6\x34\x33\xf9\x4d\x3d\x5c\xe7\xfb\xe1\xea\xbf\x2f\xd7\x55\x53\x75\xc5\x66\xb9\xaa\x79\x52\x3a\x42\xd8\x9c\x66\x49\x86\xb8\xc8\xfa\x7e\x43\x14\x0a\x58\x70\x7e\xfe\x3a\x3f\x61\x4c\xd8\x15\xc3\x35\x3a\x32\x5c\x67\xfd\x5f\x36\x3c\x51\xa1\xc1\x8b\xeb\x2a\xc7\x66\x00\x50\x7b\x35\x9e\x97\xbc\xd4\xbe\x2e\xb2\xaa\xeb\x96\x44\x40\x87\x5b\x9e\x66\xad\xf3\x10\xb4\x54\x47\xd8\xde\xb4\x03\x2d\x63\x8e\x72\x52\x45\xdd\x7c\x28\x36\x75\x49\x93\x1d\x27\x24\x2d\x8b\xc4\xb2\xa5\x75\xe3\xd2\x84\x99\xed\x0d\x86\x5a\xac\x88\xfe\xf7\xf9\x83\xc5\x03\x10\xdc\x07\x8f\x1f\x2c\xb2\xa6\x5d\x0a\x95\x60\xd2\x5c\xd6\x7d\x71\x49\x64\x5a\x8e\x8d\xce\xa8\xde\x9f\x19\x7f\xa4\x2b\x0a\x91\x27\x10\x3c\xb7\x7c\x14\xe1\x04\x60\xe4\x2a\x88\x5e\x83\xd8\x28\x99\xf1\x63\x37\x9a\x14\xd6\x57\xc8\x52\x48\x98\x8c\x39\xb3\x05\x33\xec\x3a\xde\xed\x36\xf5\x4a\x9a\x7e\x21\x79\x11\xd1\xf8\x60\xd6\x49\xf1\x70\x40\x14\xcb\x73\xe8\x42\xbd\x66\xb2\x95\x27\x74\x1e\xe5\xaf\x2b\xda\x39\xd7\xfb\xb5\x1c\x4e\x9b\x76\x5f\x7e\x01\x82\x62\x2b\x17\xe9\x49\xfe\xb6\xa5\x0e\x03\x3b\x02\x40\x6c\xe2\x98\x08\x03\xf3\x02\x5d\xb5\x6d\x07\x9e\x38\x2d\x56\xd3\xf2\xdc\xd4\x94\x49\x23\xed\x8b\x0f\x44\x16\x87\x56\xb6\x64\x49\x5b\x6e\xc5\x15\x13\x05\xdb\xd3\x81\x2e\xdb\x82\xe8\x88\x6c\x0d\x4b\x4b\x71\x10\x50\xdb\x3d\xed\xa6\x6b\xaa\x8c\x27\x9e\x19\x12\xaa\x72\xae\x9f\x18\x12\xd5\x83\x5d\x4e\x3b\xb7\xa5\xc3\x93\x17\xfa\x19\x3e\xf4\xb7\xaf\x9f\x7a\x55\x5c\x5d\x51\xaf\x7a\xda\x15\x2f\xf3\xd5\xa6\xa5\x2d\xf5\xeb\xdb\xd7\x3d\x6f\x98\xeb\xe5\xae\xed\xc0\x88\x50\xd6\x19\x7d\x86\x34\x37\xd1\x0c\xd1\xec\xb7\x97\xf4\xeb\xe6\xba\x26\x42\x8d\x69\xe7\x12\xcc\x24\x51\x2Line truncated
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
return bindataRead(
@@ -4379,7 +4379,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 47469, mode: os.FileMode(420), modTime: time.Unix(1449339530, 0)}
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 47539, mode: os.FileMode(420), modTime: time.Unix(1449354453, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
+21 -1
View File
@@ -9,6 +9,7 @@ import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/middleware"
"github.com/gogits/gogs/modules/setting"
)
@@ -17,7 +18,7 @@ const (
REPOS base.TplName = "admin/repo/list"
)
func Repositories(ctx *middleware.Context) {
func Repos(ctx *middleware.Context) {
ctx.Data["Title"] = ctx.Tr("admin.repositories")
ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminRepositories"] = true
@@ -39,3 +40,22 @@ func Repositories(ctx *middleware.Context) {
ctx.Data["Total"] = total
ctx.HTML(200, REPOS)
}
func DeleteRepo(ctx *middleware.Context) {
repo, err := models.GetRepositoryByID(ctx.QueryInt64("id"))
if err != nil {
ctx.Handle(500, "GetRepositoryByID", err)
return
}
if err := models.DeleteRepository(repo.MustOwner().Id, repo.ID); err != nil {
ctx.Handle(500, "DeleteRepository", err)
return
}
log.Trace("Repository deleted: %s/%s", repo.MustOwner().Name, repo.Name)
ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success"))
ctx.JSON(200, map[string]interface{}{
"redirect": setting.AppSubUrl + "/admin/repos",
})
}
+4
View File
@@ -36,6 +36,7 @@ func parseLoginSource(ctx *middleware.Context, u *models.User, sourceID int64, l
u.LoginName = loginName
}
// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#create-a-new-user
func CreateUser(ctx *middleware.Context, form api.CreateUserOption) {
u := &models.User{
Name: form.Username,
@@ -71,6 +72,7 @@ func CreateUser(ctx *middleware.Context, form api.CreateUserOption) {
ctx.JSON(201, to.ApiUser(u))
}
// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#edit-an-existing-user
func EditUser(ctx *middleware.Context, form api.EditUserOption) {
u := user.GetUserByParams(ctx)
if ctx.Written() {
@@ -119,6 +121,7 @@ func EditUser(ctx *middleware.Context, form api.EditUserOption) {
ctx.JSON(200, to.ApiUser(u))
}
// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#delete-a-user
func DeleteUser(ctx *middleware.Context) {
u := user.GetUserByParams(ctx)
if ctx.Written() {
@@ -139,6 +142,7 @@ func DeleteUser(ctx *middleware.Context) {
ctx.Status(204)
}
// https://github.com/gogits/go-gogs-client/wiki/Administration-Users#create-a-public-key-for-user
func CreatePublicKey(ctx *middleware.Context, form api.CreateKeyOption) {
u := user.GetUserByParams(ctx)
if ctx.Written() {
+2
View File
@@ -185,6 +185,8 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) {
return
}
log.Trace("Repository deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name)
ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success"))
ctx.Redirect(ctx.Repo.Owner.DashboardLink())
}
}
+1 -1
View File
@@ -1 +1 @@
0.7.32.1205 Beta
0.7.33.1205 Beta
+17
View File
@@ -20,6 +20,7 @@
<th>{{.i18n.Tr "admin.repos.stars"}}</th>
<th>{{.i18n.Tr "admin.repos.issues"}}</th>
<th>{{.i18n.Tr "admin.users.created"}}</th>
<th>{{.i18n.Tr "admin.notices.op"}}</th>
</tr>
</thead>
<tbody>
@@ -33,6 +34,7 @@
<td>{{.NumStars}}</td>
<td>{{.NumIssues}}</td>
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="trash icon text red"></i></a></td>
</tr>
{{end}}
</tbody>
@@ -66,4 +68,19 @@
</div>
</div>
</div>
<div class="ui small basic delete modal">
<div class="ui icon header">
<i class="trash icon"></i>
{{.i18n.Tr "repo.settings.delete"}}
</div>
<div class="content">
<p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
<p>{{.i18n.Tr "repo.settings.delete_notices_2"}}</p>
<p>{{.i18n.Tr "repo.settings.delete_notices_fork_1"}}</p>
<p>{{.i18n.Tr "repo.settings.delete_notices_fork_2"}}</p>
<p>{{.i18n.Tr "repo.settings.delete_notices_fork_3"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
{{template "base/footer" .}}