rename fields

This commit is contained in:
Unknwon committed 2015-08-31 16:24:28 +09:00
1 parent cb381078ff
commit 1ca257ad9f
11 files changed
+93 -81

No files matched your search

+1
View File
@@ -462,6 +462,7 @@ issues.label_deletion_success = Label has been deleted successfully!
pulls.compare_changes = Compare Changes
pulls.compare_changes_desc = Compare two branches and make a pull request for changes.
pulls.no_results = No results found.
pulls.create = Create Pull Request
milestones.new = New Milestone
milestones.open_tab = %d Open
+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\xc4\x7d\xfd\x72\xdc\x48\x8e\xe7\xff\x7c\x0a\xb6\x37\x7c\xee\x8e\x90\xcb\xd1\xdd\x71\x1f\xd1\x61\xbb\x4f\x96\xda\x1f\xb3\x96\xa5\xb5\xe4\x99\x9b\x73\x38\xd8\xac\x22\x55\xc5\x71\x15\x59\x4d\xb2\x5c\xae\xd9\xd8\x88\x7b\x8d\x7b\xbd\x7b\x92\x03\x7e\x00\xf2\x83\x64\xc9\xf6\xec\xc6\xdd\x3f\x12\x2b\x13\xf9\x85\x44\x22\x01\x24\x12\x99\x6f\xb7\x59\x51\x76\x8b\xf4\x49\x7a\x9a\x6e\xf3\xaa\x5e\x97\x5d\x97\x76\xe5\xfa\xf6\xe1\xaa\xe9\xfa\xb2\x48\x5f\x54\x3d\xfd\x6e\x3f\x55\x8b\x32\x49\x56\xcd\xa6\x24\xd0\x97\xf4\x2f\x29\xf2\x6e\x35\x6f\xf2\xb6\xa0\x84\x73\xfb\x4e\xca\xcf\xdb\x75\xd3\x32\xd0\x6f\xf2\x95\xac\xca\xf5\x96\xcb\xd0\xbf\xa4\xab\x96\x75\x56\xd5\xf4\xf3\x9a\xbe\xd2\x57\x75\xd2\x35\x8b\x2a\x5f\x67\x41\x06\x12\x2c\xff\x97\xf4\xa7\xba\x48\xaf\xfb\x72\x9b\x3e\xee\x36\xf9\x7a\xfd\x34\xef\x50\xa4\x2f\xd3\x7c\xb1\x68\x76\x75\xff\xf8\x91\x64\x48\xe5\xcd\xae\xb7\xda\x2f\x77\xbd\xa4\xed\xb6\x96\xf4\x6e\x9b\xb4\xe5\xb2\xa2\x81\xb5\x94\xf4\x56\x3f\x93\x7d\x39\xef\xaa\x9e\x3b\xfd\x17\xf9\x4a\x3e\x95\x6d\x57\x35\xdc\x9f\x3f\xcb\x57\xb2\xcd\x97\x0c\x70\x45\xff\x92\xbe\xdc\x6c\xd7\x39\x0a\xdc\xe8\x67\xb2\xce\xeb\xe5\x4e\x60\x5e\xeb\x67\xb2\x68\x4b\xca\xca\xea\x72\x4f\xa9\x67\xf8\x91\xd2\x8f\xd9\x6c\x96\xec\x08\xa7\xd9\xb6\x6d\x6e\xab\x75\x99\xe5\x75\x91\x6d\x04\x6b\xef\x28\x3d\xd5\xf4\x94\xd2\x53\x4e\xc7\x30\xca\x82\x10\x94\xe5\x9d\x8e\x85\xa6\x86\xf0\x95\x77\x09\xaa\xaa\xf3\x8d\x95\xe6\xcf\xa4\xdc\xe4\xd5\x9a\x27\xe1\x21\x7f\x50\xe7\xbb\x6e\xdf\x60\xaa\xae\xf4\x93\x10\x91\xf5\x87\x6d\x09\x3c\x3c\xbc\xa1\xaf\x64\x91\x6f\xfb\xc5\x2a\xe7\xbe\xca\x57\x42\x40\xdb\x86\x10\xd2\xb4\x07\xc0\xd9\x8f\xa4\x69\x97\x79\x5d\xfd\x3d\xef\x05\x49\x97\xc1\xcf\x64\x53\xb5\x6d\xc3\xf8\xbd\xc0\x47\x42\x23\xce\xb8\x1e\x4a\x79\x43\x98\x08\x6a\xe1\x9c\x4d\xb5\x6c\x05\x95\x9c\x79\x81\x5f\x5c\x0b\xe7\xdd\x36\xed\x47\xcd\x78\xce\x9f\x83\xa2\xd4\x09\xcd\x8d\xdb\xcf\x6b\x42\xbe\xe6\x5e\xe0\x47\x04\xd0\x25\x79\xb1\x21\x54\x6e\xf3\xba\x64\x1c\x9d\xf2\x2f\xc2\x0b\xfd\x4a\x94\xa6\xb2\xae\xec\xfb\xaa\x5e\x32\xb2\x4f\x25\x29\xbd\xd6\xa4\x24\xc8\x73\x69\x87\x66\xe7\xa6\x93\xd2\xff\x4a\x3f\xd3\x2b\xf9\x29\x79\x41\x21\x64\xba\x92\x3c\x92\x2e\xbb\x2d\xcb\x42\xc6\xd2\xa5\xcf\xe9\x3b\xd9\xee\xd6\x6b\xc2\xda\x1f\xbb\xb2\xeb\xb9\xd0\x15\xfd\xa6\xf1\xcb\xef\xa4\xea\x3a\xfa\xa0\xe4\x57\xf8\x48\x68\xea\xea\x05\x06\x73\x86\x8f\x24\x79\xdf\x95\x79\xbb\x58\x7d\x48\xe4\x3f\xfa\xca\x1f\x4c\x7b\xc7\x26\x95\x09\x49\x89\x48\x5a\xb0\x06\x92\x45\x53\xf0\x8f\x33\xfa\x47\x55\x57\x75\xd7\xd3\x8a\xfb\x90\xe8\x07\x83\xc9\x97\x4c\x40\x5f\xf5\xc0\x82\x26\x62\xf9\x76\x3c\x83\xe9\xf3\xaa\xed\xfa\x87\x7d\x45\xc4\xfa\x76\x57\x27\x3c\x3e\x5a\x6d\x59\x31\x37\x26\xf4\xa2\x21\x14\x21\xb9\xa5\xf1\x5d\x1c\xae\xff\xe5\xf5\x49\x7a\x45\x9c\x68\xd9\x96\xf4\x9d\x52\x1d\xf4\x8f\xca\xfc\x3c\x4b\xa8\x94\xb5\x74\x9e\xf7\xf9\x3c\xef\x4a\x8f\x56\xce\x14\xea\x76\x79\xa0\x71\xe6\x6a\xe0\x60\x5d\x1f\x8d\x77\x6a\x85\x50\x1d\xba\xae\x5c\x1d\x6f\x78\x71\x51\x3a\x33\x35\x14\xbe\x5a\x97\x9c\x4e\x55\xa5\xaf\xde\xbc\xb9\x3c\x7f\x96\x96\xf5\xb2\xaa\xcb\x74\x5f\xf5\xab\x74\xd7\xdf\xfe\xb7\x6c\x59\xd6\x65\x4b\x3c\x6e\x51\xa5\xb4\xa6\x5a\xa2\x84\x94\x08\x5b\x06\x37\x4b\xba\x6e\x4d\x6b\x1f\xe8\xbd\xbe\x7e\x9d\x5e\x30\x8a\xb7\x79\xbf\x42\x47\xfa\x55\xd2\xfd\xb1\x66\x14\xb9\x06\x6f\x56\x65\x0a\x2a\x03\x50\x73\x6b\xf8\x48\x0b\xed\xe3\x2c\x29\xdb\x36\x23\xb6\xd4\x1f\x32\x2d\xac\xf5\x0d\x21\xa5\x0a\x22\x9d\xba\xe9\xd3\x79\x99\xa2\xcc\x2c\x49\xac\xc3\x86\xdd\xd3\xed\x76\x5d\x2d\x64\xad\xbf\x90\x3c\x8f\x68\xde\x41\x14\x4b\x21\x1c\x10\x65\x79\x01\xba\x88\x3d\xf3\x7a\x48\x23\x06\x82\xf2\xab\x92\x18\xe0\x6a\xb7\x14\xb6\xb7\x6e\x76\xc5\x77\xa0\x54\xeb\xbd\x27\xd4\xf4\x6d\x43\x1d\x06\x76\x1c\x80\x6f\xe2\x94\x28\x8e\x37\xad\xb6\xdc\x34\xc4\x57\x1c\xb1\x57\x44\x50\xfb\x8a\x32\x69\xa4\x5d\xfe\x89\xd6\x5b\xdf\xa4\xfd\xaa\xea\xd2\x82\x88\x6d\xc1\x15\xd3\xd2\xd8\xd1\x76\x21\x64\x41\x04\x2a\xa4\x61\x69\xf1\x1c\x00\x6a\xb3\x23\x6a\x5a\x51\x65\xbc\x19\xf1\xce\x49\x55\x4e\xf5\x13\x43\xa2\x7a\x40\xdf\x44\xb9\x0d\x71\x65\xe6\x9b\xe7\xf8\xd0\xdf\x61\xfd\xd4\xab\xfc\xf6\x96\x7a\xd5\x11\x55\xbc\x4c\x17\xeb\x86\x48\xea\xdd\xdb\xd7\x1d\x13\xcc\x2a\xdb\x36\x2d\xb6\x39\xca\xba\xa2\x4f\x97\x16\x20\x9a\x21\xea\xdd\x66\x4e\xbf\xf6\xab\x8a\x38\x00\xd0\xce\x25\x78\x37\xa7\x54\x6a\x62\xd7\xd1\x14\x9e\xa4\x44\xc2\x34\x02\x42\x19\x08\x80\xc7\x50\x54\x5d\x3e\xa7\xb9\x67\xf0\x5b\xda\xb6\x76\x2d\x91\xd5\xaa\xef\xb7\xd6\xf2\xcb\x9b\x9b\x2b\x69\xda\xa5\xde\xd5\x76\x1e\x50\x06\xe6\x60\xcd\x1b\x6f\x9d\x36\xf5\x0c\x44\xb2\x6b\xd7\x03\xfa\xa1\xb1\x5a\xce\x11\xbc\x70\x17\x1e\xf1\x9f\x6b\x8f\x1e\xe0\xb9\x23\xe9\x64\x0f\x6a\x22\x1c\x97\xd8\x00\x89\xa8\x9b\x2d\xd7\x1b\x50\xf5\xa5\x26\x78\x52\xc6\xa6\xe9\xf2\x65\xeb\xa4\x5c\xc8\x3e\x01\xfb\xdf\xd0\x80\x95\x8d\x5c\x5f\x10\x1a\xc0\x4b\x90\x7a\xdb\x36\x1b\x4a\x7d\x4e\xff\x7c\x82\xef\xfe\x05\xd7\x07\x98\xbc\x28\x88\xbf\x75\x27\xe9\xdb\xe7\x67\xe9\x7f\xfe\xf9\xa7\x9f\x66\xe9\xab\x9e\x57\x22\x13\xe7\xdf\x98\xa8\xe8\x53\xf6\x70\x07\x4a\x2c\xa3\x27\xba\xbLine truncated
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xc4\x7d\xfd\x72\xdc\x48\x8e\xe7\xff\x7c\x0a\xb6\x37\x7c\xee\x8e\x90\xcb\xd1\xdd\x71\x1f\xd1\x61\xbb\x4f\x96\xda\x1f\xb3\x96\xa5\xb5\xe4\x99\x9b\x73\x38\xd8\xac\x22\x55\xc5\x71\x15\x59\x4d\xb2\x5c\xae\xd9\xd8\x88\x7b\x8d\x7b\xbd\x7b\x92\x03\x7e\x00\xf2\x83\x64\xc9\xf6\xec\xc6\xdd\x3f\x12\x2b\x13\xf9\x85\x44\x22\x01\x24\x12\x99\x6f\xb7\x59\x51\x76\x8b\xf4\x49\x7a\x9a\x6e\xf3\xaa\x5e\x97\x5d\x97\x76\xe5\xfa\xf6\xe1\xaa\xe9\xfa\xb2\x48\x5f\x54\x3d\xfd\x6e\x3f\x55\x8b\x32\x49\x56\xcd\xa6\x24\xd0\x97\xf4\x2f\x29\xf2\x6e\x35\x6f\xf2\xb6\xa0\x84\x73\xfb\x4e\xca\xcf\xdb\x75\xd3\x32\xd0\x6f\xf2\x95\xac\xca\xf5\x96\xcb\xd0\xbf\xa4\xab\x96\x75\x56\xd5\xf4\xf3\x9a\xbe\xd2\x57\x75\xd2\x35\x8b\x2a\x5f\x67\x41\x06\x12\x2c\xff\x97\xf4\xa7\xba\x48\xaf\xfb\x72\x9b\x3e\xee\x36\xf9\x7a\xfd\x34\xef\x50\xa4\x2f\xd3\x7c\xb1\x68\x76\x75\xff\xf8\x91\x64\x48\xe5\xcd\xae\xb7\xda\x2f\x77\xbd\xa4\xed\xb6\x96\xf4\x6e\x9b\xb4\xe5\xb2\xa2\x81\xb5\x94\xf4\x56\x3f\x93\x7d\x39\xef\xaa\x9e\x3b\xfd\x17\xf9\x4a\x3e\x95\x6d\x57\x35\xdc\x9f\x3f\xcb\x57\xb2\xcd\x97\x0c\x70\x45\xff\x92\xbe\xdc\x6c\xd7\x39\x0a\xdc\xe8\x67\xb2\xce\xeb\xe5\x4e\x60\x5e\xeb\x67\xb2\x68\x4b\xca\xca\xea\x72\x4f\xa9\x67\xf8\x91\xd2\x8f\xd9\x6c\x96\xec\x08\xa7\xd9\xb6\x6d\x6e\xab\x75\x99\xe5\x75\x91\x6d\x04\x6b\xef\x28\x3d\xd5\xf4\x94\xd2\x53\x4e\xc7\x30\xca\x82\x10\x94\xe5\x9d\x8e\x85\xa6\x86\xf0\x95\x77\x09\xaa\xaa\xf3\x8d\x95\xe6\xcf\xa4\xdc\xe4\xd5\x9a\x27\xe1\x21\x7f\x50\xe7\xbb\x6e\xdf\x60\xaa\xae\xf4\x93\x10\x91\xf5\x87\x6d\x09\x3c\x3c\xbc\xa1\xaf\x64\x91\x6f\xfb\xc5\x2a\xe7\xbe\xca\x57\x42\x40\xdb\x86\x10\xd2\xb4\x07\xc0\xd9\x8f\xa4\x69\x97\x79\x5d\xfd\x3d\xef\x05\x49\x97\xc1\xcf\x64\x53\xb5\x6d\xc3\xf8\xbd\xc0\x47\x42\x23\xce\xb8\x1e\x4a\x79\x43\x98\x08\x6a\xe1\x9c\x4d\xb5\x6c\x05\x95\x9c\x79\x81\x5f\x5c\x0b\xe7\xdd\x36\xed\x47\xcd\x78\xce\x9f\x83\xa2\xd4\x09\xcd\x8d\xdb\xcf\x6b\x42\xbe\xe6\x5e\xe0\x47\x04\xd0\x25\x79\xb1\x21\x54\x6e\xf3\xba\x64\x1c\x9d\xf2\x2f\xc2\x0b\xfd\x4a\x94\xa6\xb2\xae\xec\xfb\xaa\x5e\x32\xb2\x4f\x25\x29\xbd\xd6\xa4\x24\xc8\x73\x69\x87\x66\xe7\xa6\x93\xd2\xff\x4a\x3f\xd3\x2b\xf9\x29\x79\x41\x21\x64\xba\x92\x3c\x92\x2e\xbb\x2d\xcb\x42\xc6\xd2\xa5\xcf\xe9\x3b\xd9\xee\xd6\x6b\xc2\xda\x1f\xbb\xb2\xeb\xb9\xd0\x15\xfd\xa6\xf1\xcb\xef\xa4\xea\x3a\xfa\xa0\xe4\x57\xf8\x48\x68\xea\xea\x05\x06\x73\x86\x8f\x24\x79\xdf\x95\x79\xbb\x58\x7d\x48\xe4\x3f\xfa\xca\x1f\x4c\x7b\xc7\x26\x95\x09\x49\x89\x48\x5a\xb0\x06\x92\x45\x53\xf0\x8f\x33\xfa\x47\x55\x57\x75\xd7\xd3\x8a\xfb\x90\xe8\x07\x83\xc9\x97\x4c\x40\x5f\xf5\xc0\x82\x26\x62\xf9\x76\x3c\x83\xe9\xf3\xaa\xed\xfa\x87\x7d\x45\xc4\xfa\x76\x57\x27\x3c\x3e\x5a\x6d\x59\x31\x37\x26\xf4\xa2\x21\x14\x21\xb9\xa5\xf1\x5d\x1c\xae\xff\xe5\xf5\x49\x7a\x45\x9c\x68\xd9\x96\xf4\x9d\x52\x1d\xf4\x8f\xca\xfc\x3c\x4b\xa8\x94\xb5\x74\x9e\xf7\xf9\x3c\xef\x4a\x8f\x56\xce\x14\xea\x76\x79\xa0\x71\xe6\x6a\xe0\x60\x5d\x1f\x8d\x77\x6a\x85\x50\x1d\xba\xae\x5c\x1d\x6f\x78\x71\x51\x3a\x33\x35\x14\xbe\x5a\x97\x9c\x4e\x55\xa5\xaf\xde\xbc\xb9\x3c\x7f\x96\x96\xf5\xb2\xaa\xcb\x74\x5f\xf5\xab\x74\xd7\xdf\xfe\xb7\x6c\x59\xd6\x65\x4b\x3c\x6e\x51\xa5\xb4\xa6\x5a\xa2\x84\x94\x08\x5b\x06\x37\x4b\xba\x6e\x4d\x6b\x1f\xe8\xbd\xbe\x7e\x9d\x5e\x30\x8a\xb7\x79\xbf\x42\x47\xfa\x55\xd2\xfd\xb1\x66\x14\xb9\x06\x6f\x56\x65\x0a\x2a\x03\x50\x73\x6b\xf8\x48\x0b\xed\xe3\x2c\x29\xdb\x36\x23\xb6\xd4\x1f\x32\x2d\xac\xf5\x0d\x21\xa5\x0a\x22\x9d\xba\xe9\xd3\x79\x99\xa2\xcc\x2c\x49\xac\xc3\x86\xdd\xd3\xed\x76\x5d\x2d\x64\xad\xbf\x90\x3c\x8f\x68\xde\x41\x14\x4b\x21\x1c\x10\x65\x79\x01\xba\x88\x3d\xf3\x7a\x48\x23\x06\x82\xf2\xab\x92\x18\xe0\x6a\xb7\x14\xb6\xb7\x6e\x76\xc5\x77\xa0\x54\xeb\xbd\x27\xd4\xf4\x6d\x43\x1d\x06\x76\x1c\x80\x6f\xe2\x94\x28\x8e\x37\xad\xb6\xdc\x34\xc4\x57\x1c\xb1\x57\x44\x50\xfb\x8a\x32\x69\xa4\x5d\xfe\x89\xd6\x5b\xdf\xa4\xfd\xaa\xea\xd2\x82\x88\x6d\xc1\x15\xd3\xd2\xd8\xd1\x76\x21\x64\x41\x04\x2a\xa4\x61\x69\xf1\x1c\x00\x6a\xb3\x23\x6a\x5a\x51\x65\xbc\x19\xf1\xce\x49\x55\x4e\xf5\x13\x43\xa2\x7a\x40\xdf\x44\xb9\x0d\x71\x65\xe6\x9b\xe7\xf8\xd0\xdf\x61\xfd\xd4\xab\xfc\xf6\x96\x7a\xd5\x11\x55\xbc\x4c\x17\xeb\x86\x48\xea\xdd\xdb\xd7\x1d\x13\xcc\x2a\xdb\x36\x2d\xb6\x39\xca\xba\xa2\x4f\x97\x16\x20\x9a\x21\xea\xdd\x66\x4e\xbf\xf6\xab\x8a\x38\x00\xd0\xce\x25\x78\x37\xa7\x54\x6a\x62\xd7\xd1\x14\x9e\xa4\x44\xc2\x34\x02\x42\x19\x08\x80\xc7\x50\x54\x5d\x3e\xa7\xb9\x67\xf0\x5b\xda\xb6\x76\x2d\x91\xd5\xaa\xef\xb7\xd6\xf2\xcb\x9b\x9b\x2b\x69\xda\xa5\xde\xd5\x76\x1e\x50\x06\xe6\x60\xcd\x1b\x6f\x9d\x36\xf5\x0c\x44\xb2\x6b\xd7\x03\xfa\xa1\xb1\x5a\xce\x11\xbc\x70\x17\x1e\xf1\x9f\x6b\x8f\x1e\xe0\xb9\x23\xe9\x64\x0f\x6a\x22\x1c\x97\xd8\x00\x89\xa8\x9b\x2d\xd7\x1b\x50\xf5\xa5\x26\x78\x52\xc6\xa6\xe9\xf2\x65\xeb\xa4\x5c\xc8\x3e\x01\xfb\xdf\xd0\x80\x95\x8d\x5c\x5f\x10\x1a\xc0\x4b\x90\x7a\xdb\x36\x1b\x4a\x7d\x4e\xff\x7c\x82\xef\xfe\x05\xd7\x07\x98\xbc\x28\x88\xbf\x75\x27\xe9\xdb\xe7\x67\xe9\x7f\xfe\xf9\xa7\x9f\x66\xe9\xab\x9e\x57\x22\x13\xe7\xdf\x98\xa8\xe8\x53\xf6\x70\x07\x4a\x2c\xa3\x27\xba\xbLine 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: 40295, mode: os.FileMode(420), modTime: time.Unix(1440998367, 0)}
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 40330, mode: os.FileMode(420), modTime: time.Unix(1441000364, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
+1 -1
View File
@@ -40,7 +40,7 @@ type RepoContext struct {
BranchName string
TagName string
TreeName string
CommitId string
CommitID string
RepoLink string
CloneLink models.CloneLink
CommitsCount int
+6 -6
View File
@@ -118,7 +118,7 @@ func RepoRef() macaron.Handler {
ctx.Handle(500, "GetCommitOfBranch", err)
return
}
ctx.Repo.CommitId = ctx.Repo.Commit.Id.String()
ctx.Repo.CommitID = ctx.Repo.Commit.Id.String()
ctx.Repo.IsBranch = true
} else {
@@ -149,7 +149,7 @@ func RepoRef() macaron.Handler {
ctx.Handle(500, "GetCommitOfBranch", err)
return
}
ctx.Repo.CommitId = ctx.Repo.Commit.Id.String()
ctx.Repo.CommitID = ctx.Repo.Commit.Id.String()
} else if ctx.Repo.GitRepo.IsTagExist(refName) {
ctx.Repo.IsTag = true
@@ -158,10 +158,10 @@ func RepoRef() macaron.Handler {
ctx.Handle(500, "GetCommitOfTag", err)
return
}
ctx.Repo.CommitId = ctx.Repo.Commit.Id.String()
ctx.Repo.CommitID = ctx.Repo.Commit.Id.String()
} else if len(refName) == 40 {
ctx.Repo.IsCommit = true
ctx.Repo.CommitId = refName
ctx.Repo.CommitID = refName
ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetCommit(refName)
if err != nil {
@@ -176,7 +176,7 @@ func RepoRef() macaron.Handler {
ctx.Repo.BranchName = refName
ctx.Data["BranchName"] = ctx.Repo.BranchName
ctx.Data["CommitId"] = ctx.Repo.CommitId
ctx.Data["CommitID"] = ctx.Repo.CommitID
ctx.Data["IsBranch"] = ctx.Repo.IsBranch
ctx.Data["IsTag"] = ctx.Repo.IsTag
ctx.Data["IsCommit"] = ctx.Repo.IsCommit
@@ -375,7 +375,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
}
ctx.Data["BranchName"] = ctx.Repo.BranchName
ctx.Data["CommitId"] = ctx.Repo.CommitId
ctx.Data["CommitID"] = ctx.Repo.CommitID
userAgent := ctx.Req.Header.Get("User-Agent")
ua := user_agent.New(userAgent)
+17 -17
View File
@@ -193,12 +193,12 @@ func Diff(ctx *middleware.Context) {
userName := ctx.Repo.Owner.Name
repoName := ctx.Repo.Repository.Name
commitId := ctx.Repo.CommitId
commitID := ctx.Repo.CommitID
commit := ctx.Repo.Commit
commit.CommitMessage = commit.CommitMessage
diff, err := models.GetDiffCommit(models.RepoPath(userName, repoName),
commitId, setting.Git.MaxGitDiffLines)
commitID, setting.Git.MaxGitDiffLines)
if err != nil {
ctx.Handle(404, "GetDiffCommit", err)
return
@@ -236,17 +236,17 @@ func Diff(ctx *middleware.Context) {
ctx.Data["Username"] = userName
ctx.Data["Reponame"] = repoName
ctx.Data["IsImageFile"] = isImageFile
ctx.Data["Title"] = commit.Summary() + " · " + base.ShortSha(commitId)
ctx.Data["Title"] = commit.Summary() + " · " + base.ShortSha(commitID)
ctx.Data["Commit"] = commit
ctx.Data["Author"] = models.ValidateCommitWithEmail(commit)
ctx.Data["Diff"] = diff
ctx.Data["Parents"] = parents
ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0
ctx.Data["SourcePath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "src", commitId)
ctx.Data["SourcePath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "src", commitID)
if commit.ParentCount() > 0 {
ctx.Data["BeforeSourcePath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "src", parents[0])
}
ctx.Data["RawPath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "raw", commitId)
ctx.Data["RawPath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "raw", commitID)
ctx.HTML(200, DIFF)
}
@@ -255,17 +255,17 @@ func CompareDiff(ctx *middleware.Context) {
ctx.Data["IsDiffCompare"] = true
userName := ctx.Repo.Owner.Name
repoName := ctx.Repo.Repository.Name
beforeCommitId := ctx.Params(":before")
afterCommitId := ctx.Params(":after")
beforeCommitID := ctx.Params(":before")
afterCommitID := ctx.Params(":after")
commit, err := ctx.Repo.GitRepo.GetCommit(afterCommitId)
commit, err := ctx.Repo.GitRepo.GetCommit(afterCommitID)
if err != nil {
ctx.Handle(404, "GetCommit", err)
return
}
diff, err := models.GetDiffRange(models.RepoPath(userName, repoName), beforeCommitId,
afterCommitId, setting.Git.MaxGitDiffLines)
diff, err := models.GetDiffRange(models.RepoPath(userName, repoName), beforeCommitID,
afterCommitID, setting.Git.MaxGitDiffLines)
if err != nil {
ctx.Handle(404, "GetDiffRange", err)
return
@@ -290,7 +290,7 @@ func CompareDiff(ctx *middleware.Context) {
return isImage
}
commits, err := commit.CommitsBeforeUntil(beforeCommitId)
commits, err := commit.CommitsBeforeUntil(beforeCommitID)
if err != nil {
ctx.Handle(500, "CommitsBeforeUntil", err)
return
@@ -299,17 +299,17 @@ func CompareDiff(ctx *middleware.Context) {
ctx.Data["Commits"] = commits
ctx.Data["CommitCount"] = commits.Len()
ctx.Data["BeforeCommitId"] = beforeCommitId
ctx.Data["AfterCommitId"] = afterCommitId
ctx.Data["BeforeCommitID"] = beforeCommitID
ctx.Data["AfterCommitID"] = afterCommitID
ctx.Data["Username"] = userName
ctx.Data["Reponame"] = repoName
ctx.Data["IsImageFile"] = isImageFile
ctx.Data["Title"] = "Comparing " + base.ShortSha(beforeCommitId) + "..." + base.ShortSha(afterCommitId) + " · " + userName + "/" + repoName
ctx.Data["Title"] = "Comparing " + base.ShortSha(beforeCommitID) + "..." + base.ShortSha(afterCommitID) + " · " + userName + "/" + repoName
ctx.Data["Commit"] = commit
ctx.Data["Diff"] = diff
ctx.Data["DiffNotAvailable"] = diff.NumFiles() == 0
ctx.Data["SourcePath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "src", afterCommitId)
ctx.Data["BeforeSourcePath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "src", beforeCommitId)
ctx.Data["RawPath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "raw", afterCommitId)
ctx.Data["SourcePath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "src", afterCommitID)
ctx.Data["BeforeSourcePath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "src", beforeCommitID)
ctx.Data["RawPath"] = setting.AppSubUrl + "/" + path.Join(userName, repoName, "raw", afterCommitID)
ctx.HTML(200, DIFF)
}
+41 -47
View File
@@ -190,39 +190,46 @@ func renderAttachmentSettings(ctx *middleware.Context) {
ctx.Data["AttachmentMaxFiles"] = setting.AttachmentMaxFiles
}
func RetrieveRepoMetas(ctx *middleware.Context, repo *models.Repository) []*models.Label {
if !ctx.Repo.IsAdmin() {
return nil
}
labels, err := models.GetLabelsByRepoID(repo.ID)
if err != nil {
ctx.Handle(500, "GetLabelsByRepoID: %v", err)
return nil
}
ctx.Data["Labels"] = labels
ctx.Data["OpenMilestones"], err = models.GetMilestones(repo.ID, -1, false)
if err != nil {
ctx.Handle(500, "GetMilestones: %v", err)
return nil
}
ctx.Data["ClosedMilestones"], err = models.GetMilestones(repo.ID, -1, true)
if err != nil {
ctx.Handle(500, "GetMilestones: %v", err)
return nil
}
ctx.Data["Assignees"], err = repo.GetAssignees()
if err != nil {
ctx.Handle(500, "GetAssignees: %v", err)
return nil
}
return labels
}
func NewIssue(ctx *middleware.Context) {
ctx.Data["Title"] = ctx.Tr("repo.issues.new")
ctx.Data["PageIsIssueList"] = true
ctx.Data["RequireDropzone"] = true
renderAttachmentSettings(ctx)
if ctx.Repo.IsAdmin() {
var (
repo = ctx.Repo.Repository
err error
)
ctx.Data["Labels"], err = models.GetLabelsByRepoID(repo.ID)
if err != nil {
ctx.Handle(500, "GetLabelsByRepoID: %v", err)
return
}
ctx.Data["OpenMilestones"], err = models.GetMilestones(repo.ID, -1, false)
if err != nil {
ctx.Handle(500, "GetMilestones: %v", err)
return
}
ctx.Data["ClosedMilestones"], err = models.GetMilestones(repo.ID, -1, true)
if err != nil {
ctx.Handle(500, "GetMilestones: %v", err)
return
}
ctx.Data["Assignees"], err = repo.GetAssignees()
if err != nil {
ctx.Handle(500, "GetAssignees: %v", err)
return
}
RetrieveRepoMetas(ctx, ctx.Repo.Repository)
if ctx.Written() {
return
}
ctx.HTML(200, ISSUE_NEW)
@@ -240,16 +247,18 @@ func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
milestoneID int64
assigneeID int64
attachments []string
err error
)
if ctx.Repo.IsAdmin() {
labels := RetrieveRepoMetas(ctx, repo)
if ctx.Written() {
return
}
// Check labels.
labelIDs = base.StringsToInt64s(strings.Split(form.LabelIDs, ","))
labelIDMark := base.Int64sToMap(labelIDs)
labels, err := models.GetLabelsByRepoID(repo.ID)
if err != nil {
ctx.Handle(500, "GetLabelsByRepoID: %v", err)
return
}
hasSelected := false
for i := range labels {
if labelIDMark[labels[i].ID] {
@@ -264,16 +273,6 @@ func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
// Check milestone.
milestoneID = form.MilestoneID
if milestoneID > 0 {
ctx.Data["OpenMilestones"], err = models.GetMilestones(repo.ID, -1, false)
if err != nil {
ctx.Handle(500, "GetMilestones: %v", err)
return
}
ctx.Data["ClosedMilestones"], err = models.GetMilestones(repo.ID, -1, true)
if err != nil {
ctx.Handle(500, "GetMilestones: %v", err)
return
}
ctx.Data["Milestone"], err = repo.GetMilestoneByID(milestoneID)
if err != nil {
ctx.Handle(500, "GetMilestoneByID: %v", err)
@@ -285,11 +284,6 @@ func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
// Check assignee.
assigneeID = form.AssigneeID
if assigneeID > 0 {
ctx.Data["Assignees"], err = repo.GetAssignees()
if err != nil {
ctx.Handle(500, "GetAssignees: %v", err)
return
}
ctx.Data["Assignee"], err = repo.GetAssigneeByID(assigneeID)
if err != nil {
ctx.Handle(500, "GetAssigneeByID: %v", err)
+16 -5
View File
@@ -99,15 +99,13 @@ func ForkPost(ctx *middleware.Context, form auth.CreateRepoForm) {
repo, err := models.ForkRepository(ctxUser, forkRepo, form.RepoName, form.Description)
if err != nil {
ctx.Data["Err_RepoName"] = true
switch {
case models.IsErrRepoAlreadyExist(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.settings.new_owner_has_same_repo"), FORK, &form)
case models.IsErrNameReserved(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), FORK, &form)
case models.IsErrNamePatternNotAllowed(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), FORK, &form)
default:
ctx.Handle(500, "ForkPost", err)
@@ -120,7 +118,12 @@ func ForkPost(ctx *middleware.Context, form auth.CreateRepoForm) {
}
func CompareAndPullRequest(ctx *middleware.Context) {
// Get compare information.
ctx.Data["Title"] = ctx.Tr("repo.pulls.compare_changes")
ctx.Data["PageIsComparePull"] = true
repo := ctx.Repo.Repository
// Get compare branch information.
infos := strings.Split(ctx.Params("*"), "...")
if len(infos) != 2 {
ctx.Handle(404, "CompareAndPullRequest", nil)
@@ -144,7 +147,7 @@ func CompareAndPullRequest(ctx *middleware.Context) {
// TODO: add organization support
// Check if current user has fork of repository.
headRepo, has := models.HasForkedRepo(ctx.User.Id, ctx.Repo.Repository.ID)
headRepo, has := models.HasForkedRepo(ctx.User.Id, repo.ID)
if !has {
ctx.Handle(404, "HasForkedRepo", nil)
return
@@ -162,6 +165,14 @@ func CompareAndPullRequest(ctx *middleware.Context) {
}
ctx.Data["HeadBranches"] = headBranches
// Setup information for new form.
RetrieveRepoMetas(ctx, ctx.Repo.Repository)
if ctx.Written() {
return
}
// Get diff information.
ctx.HTML(200, COMPARE_PULL)
}
+1 -1
View File
@@ -10,7 +10,7 @@
</form>
</div>
{{else if .IsDiffCompare}}
<a href="{{$.RepoLink}}/commit/{{.BeforeCommitId}}" class="ui green sha label">{{ShortSha .BeforeCommitId}}</a> ... <a href="{{$.RepoLink}}/commit/{{.AfterCommitId}}" class="ui green sha label">{{ShortSha .AfterCommitId}}</a>
<a href="{{$.RepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{ShortSha .BeforeCommitID}}</a> ... <a href="{{$.RepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{ShortSha .AfterCommitID}}</a>
{{end}}
</h4>
<div class="ui attached table segment">
+3 -1
View File
@@ -24,6 +24,7 @@
<span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span>
<div class="ui right">
<div class="ui horizontal list">
{{if .Parents}}
<div class="item">
{{.i18n.Tr "repo.diff.parent"}}
</div>
@@ -32,8 +33,9 @@
<a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSha .}}</a>
{{end}}
</div>
{{end}}
<div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
<div class="item"><span class="ui blue sha label">{{ShortSha .CommitId}}</span></div>
<div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
</div>
</div>
</div>
+4
View File
@@ -18,7 +18,11 @@
{{template "repo/issue/comment_tab" .}}
<div class="text right">
<button class="ui green button">
{{if .PageIsComparePull}}
{{.i18n.Tr "repo.pulls.create"}}
{{else}}
{{.i18n.Tr "repo.issues.create"}}
{{end}}
</button>
</div>
</div>
+1 -1
View File
@@ -13,7 +13,7 @@
{{end}}
{{if not .ReadmeInList}}
{{if not .IsCommit}}
<a class="right" href="{{.RepoLink}}/src/{{.CommitId}}/{{EscapePound .TreeName}}">
<a class="right" href="{{.RepoLink}}/src/{{.CommitID}}/{{EscapePound .TreeName}}">
<button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_permalink"}}</button>
</a>
{{end}}