Browse Source

#1078 not show bin when rename a file

tags/v0.9.99
Unknwon 8 years ago
parent
commit
0af035c37e

+ 1
- 1
gogs.go View File

"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"
) )


const APP_VER = "0.6.22.1102 Beta"
const APP_VER = "0.6.22.1103 Beta"


func init() { func init() {
runtime.GOMAXPROCS(runtime.NumCPU()) runtime.GOMAXPROCS(runtime.NumCPU())

+ 1
- 1
modules/base/template.go View File



func DiffTypeToStr(diffType int) string { func DiffTypeToStr(diffType int) string {
diffTypes := map[int]string{ diffTypes := map[int]string{
1: "add", 2: "modify", 3: "del",
1: "add", 2: "modify", 3: "del", 4: "rename",
} }
return diffTypes[diffType] return diffTypes[diffType]
} }

+ 9
- 9
public/config.codekit View File

"\/css\/dropzone-4.0.1.css": { "\/css\/dropzone-4.0.1.css": {
"fileType": 16, "fileType": 16,
"ignore": 0, "ignore": 0,
"ignoreWasSetByUser": 0,
"ignoreWasSetByUser": 1,
"inputAbbreviatedPath": "\/css\/dropzone-4.0.1.css", "inputAbbreviatedPath": "\/css\/dropzone-4.0.1.css",
"outputAbbreviatedPath": "No Output Path", "outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0, "outputPathIsOutsideProject": 0,
"outputPathIsOutsideProject": 0, "outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0 "outputPathIsSetByUser": 0
}, },
"\/css\/semantic-2.1.3.min.css": {
"\/css\/semantic-2.1.5.min.css": {
"fileType": 16, "fileType": 16,
"ignore": 0, "ignore": 0,
"ignoreWasSetByUser": 0, "ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/css\/semantic-2.1.3.min.css",
"inputAbbreviatedPath": "\/css\/semantic-2.1.5.min.css",
"outputAbbreviatedPath": "No Output Path", "outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0, "outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0 "outputPathIsSetByUser": 0
"outputStyle": 1, "outputStyle": 1,
"syntaxCheckerStyle": 1 "syntaxCheckerStyle": 1
}, },
"\/js\/libs\/clipboard-1.3.1.min.js": {
"\/js\/libs\/clipboard-1.5.3.min.js": {
"fileType": 64, "fileType": 64,
"ignore": 0, "ignore": 0,
"ignoreWasSetByUser": 0, "ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/js\/libs\/clipboard-1.3.1.min.js",
"outputAbbreviatedPath": "\/js\/libs\/min\/clipboard-1.3.1.min-min.js",
"inputAbbreviatedPath": "\/js\/libs\/clipboard-1.5.3.min.js",
"outputAbbreviatedPath": "\/js\/libs\/min\/clipboard-1.5.3.min-min.js",
"outputPathIsOutsideProject": 0, "outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0, "outputPathIsSetByUser": 0,
"outputStyle": 1, "outputStyle": 1,
"outputPathIsSetByUser": 0, "outputPathIsSetByUser": 0,
"processed": 0 "processed": 0
}, },
"\/js\/semantic-2.1.3.min.js": {
"\/js\/semantic-2.1.5.min.js": {
"fileType": 64, "fileType": 64,
"ignore": 0, "ignore": 0,
"ignoreWasSetByUser": 0, "ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/js\/semantic-2.1.3.min.js",
"outputAbbreviatedPath": "\/js\/min\/semantic-2.1.3.min-min.js",
"inputAbbreviatedPath": "\/js\/semantic-2.1.5.min.js",
"outputAbbreviatedPath": "\/js\/min\/semantic-2.1.5.min-min.js",
"outputPathIsOutsideProject": 0, "outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0, "outputPathIsSetByUser": 0,
"outputStyle": 1, "outputStyle": 1,

+ 4
- 0
public/css/gogs.css View File

.repository .diff-file-box .code-diff tbody tr:hover pre { .repository .diff-file-box .code-diff tbody tr:hover pre {
background-color: transparent !important; background-color: transparent !important;
} }
.repository .diff-file-box.file-content img {
max-width: 100%;
padding: 5px 5px 0 5px;
}
.repository .code-view { .repository .code-view {
overflow: auto; overflow: auto;
overflow-x: auto; overflow-x: auto;

+ 6
- 0
public/less/_repository.less View File

} }
} }
} }
}
&.file-content {
img {
max-width: 100%;
padding: 5px 5px 0 5px;
}
} }
} }
.code-view { .code-view {

+ 1
- 1
templates/.VERSION View File

0.6.22.1102 Beta
0.6.22.1103 Beta

+ 29
- 27
templates/repo/diff_box.tmpl View File

</div> </div>
</h4> </h4>
<div class="ui attached table segment"> <div class="ui attached table segment">
{{$isImage := (call $.IsImageFile $file.Name)}}
{{if $isImage}}
<div class="center">
<img src="{{$.RawPath}}/{{EscapePound .Name}}">
</div>
{{else}}
<div class="file-body file-code code-view code-diff">
<table>
<tbody>
{{range .Sections}}
{{range $k, $line := .Lines}}
<tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
<td class="lines-num lines-num-old">
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
</td>
<td class="lines-num lines-num-new">
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
</td>
<td class="lines-code">
<pre>{{$line.Content}}</pre>
</td>
</tr>
{{end}}
{{end}}
</tbody>
</table>
</div>
{{if not $file.IsRenamed}}
{{$isImage := (call $.IsImageFile $file.Name)}}
{{if and $isImage}}
<div class="center">
<img src="{{$.RawPath}}/{{EscapePound .Name}}">
</div>
{{else}}
<div class="file-body file-code code-view code-diff">
<table>
<tbody>
{{range .Sections}}
{{range $k, $line := .Lines}}
<tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
<td class="lines-num lines-num-old">
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
</td>
<td class="lines-num lines-num-new">
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
</td>
<td class="lines-code">
<pre>{{$line.Content}}</pre>
</td>
</tr>
{{end}}
{{end}}
</tbody>
</table>
</div>
{{end}}
{{end}} {{end}}
</div> </div>
</div> </div>

Loading…
Cancel
Save