]> source.dussan.org Git - gitea.git/commitdiff
#1078 not show bin when rename a file
authorUnknwon <u@gogs.io>
Tue, 3 Nov 2015 14:52:17 +0000 (09:52 -0500)
committerUnknwon <u@gogs.io>
Tue, 3 Nov 2015 14:52:17 +0000 (09:52 -0500)
gogs.go
modules/base/template.go
public/config.codekit
public/css/gogs.css
public/less/_repository.less
templates/.VERSION
templates/repo/diff_box.tmpl

diff --git a/gogs.go b/gogs.go
index 9f0793692264247b1463e6979ea59e50b674e6ec..343ee5aa4e818d6ddd6244c8f3abe6a422f3b1a2 100644 (file)
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
        "github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.6.22.1102 Beta"
+const APP_VER = "0.6.22.1103 Beta"
 
 func init() {
        runtime.GOMAXPROCS(runtime.NumCPU())
index 0fd1af755c3752ee97708ed66a47a463a6ea0e61..ff743e957db1663d7f52a519c33b7d11ce7f814d 100644 (file)
@@ -263,7 +263,7 @@ func ActionContent2Commits(act Actioner) *PushCommits {
 
 func DiffTypeToStr(diffType int) string {
        diffTypes := map[int]string{
-               1: "add", 2: "modify", 3: "del",
+               1: "add", 2: "modify", 3: "del", 4: "rename",
        }
        return diffTypes[diffType]
 }
index ecec2484c3bfa9a3fee89626db9e333756a3a8de..59d0c333e6433367a550b7f0a8b48dec599186a0 100644 (file)
@@ -5,7 +5,7 @@
        "\/css\/dropzone-4.0.1.css": {
                "fileType": 16,
                "ignore": 0,
-               "ignoreWasSetByUser": 0,
+               "ignoreWasSetByUser": 1,
                "inputAbbreviatedPath": "\/css\/dropzone-4.0.1.css",
                "outputAbbreviatedPath": "No Output Path",
                "outputPathIsOutsideProject": 0,
                "outputPathIsOutsideProject": 0,
                "outputPathIsSetByUser": 0
                },
-       "\/css\/semantic-2.1.3.min.css": {
+       "\/css\/semantic-2.1.5.min.css": {
                "fileType": 16,
                "ignore": 0,
                "ignoreWasSetByUser": 0,
-               "inputAbbreviatedPath": "\/css\/semantic-2.1.3.min.css",
+               "inputAbbreviatedPath": "\/css\/semantic-2.1.5.min.css",
                "outputAbbreviatedPath": "No Output Path",
                "outputPathIsOutsideProject": 0,
                "outputPathIsSetByUser": 0
                "outputStyle": 1,
                "syntaxCheckerStyle": 1
                },
-       "\/js\/libs\/clipboard-1.3.1.min.js": {
+       "\/js\/libs\/clipboard-1.5.3.min.js": {
                "fileType": 64,
                "ignore": 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,
                "outputPathIsSetByUser": 0,
                "outputStyle": 1,
                "outputPathIsSetByUser": 0,
                "processed": 0
                },
-       "\/js\/semantic-2.1.3.min.js": {
+       "\/js\/semantic-2.1.5.min.js": {
                "fileType": 64,
                "ignore": 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,
                "outputPathIsSetByUser": 0,
                "outputStyle": 1,
index 45223cb4141a9ff4aad29b21145feb24a4c7ed50..8448d618fe2cdfe888bdb5d4d2239c3595e818ad 100755 (executable)
@@ -2288,6 +2288,10 @@ ol.linenums {
 .repository .diff-file-box .code-diff tbody tr:hover pre {
   background-color: transparent !important;
 }
+.repository .diff-file-box.file-content img {
+  max-width: 100%;
+  padding: 5px 5px 0 5px;
+}
 .repository .code-view {
   overflow: auto;
   overflow-x: auto;
index 7fdec66f9f2dedcfcbabc4f2a32db07e4bd16fa1..9035d558e4a2583e43c317f71c61052c4c5c3afa 100644 (file)
           }
         }
       }
+    }
+    &.file-content {
+       img {
+               max-width: 100%;
+               padding: 5px 5px 0 5px;
+       }
     }
        }
        .code-view {
index 2b9408d0cf4ae934f779c24bf9cee65eff6b5d52..364e36fc769ec99307a1c60388242cb99495d70f 100644 (file)
@@ -1 +1 @@
-0.6.22.1102 Beta
\ No newline at end of file
+0.6.22.1103 Beta
\ No newline at end of file
index e5314343102c4c9af8693726747fc42d57416393..a1d106b7f271b33ea477e16727d2c1fb2d0e1ee2 100644 (file)
     </div>
   </h4>
   <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}}
   </div>
 </div>