You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

421 lines
20 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. {{template "repo/nav" .}}
  4. {{template "repo/toolbar" .}}
  5. <div id="body" class="container" data-page="repo">
  6. <div id="source">
  7. <div class="panel panel-info diff-box diff-head-box">
  8. <div class="panel-heading">
  9. <a class="pull-right btn btn-primary btn-sm" href="{{.SourcePath}}">Browse Source</a>
  10. <h4>{{.Commit.Message}}</h4>
  11. </div>
  12. <div class="panel-body">
  13. <span class="pull-right">
  14. commit <span class="label label-default sha">{{.ShortSha}}</span>
  15. </span>
  16. <p class="author">
  17. <img class="avatar" src="{{AvatarLink .Commit.Author.Email}}" alt=""/>
  18. <a class="name" href="#"><strong>{{.Commit.Author.Name}}</strong></a>
  19. <span class="time">{{TimeSince .Commit.Author.When}}</span>
  20. </p>
  21. </div>
  22. </div>
  23. <div class="diff-detail-box diff-box">
  24. <a class="pull-right btn btn-default" data-toggle="collapse" data-target="#diff-files">Show Diff Stats</a>
  25. <p class="showing">
  26. <i class="fa fa-retweet"></i>
  27. <strong> {{.Diff.NumFiles}} changed files</strong> with <strong>{{.Diff.TotalAddition}} additions</strong> and <strong>{{.Diff.TotalDeletion}} deletions</strong>.
  28. </p>
  29. <ol class="detail-files collapse" id="diff-files">
  30. {{range .Diff.Files}}
  31. <li>
  32. <div class="diff-counter count pull-right">
  33. <span class="add" data-line="{{.Addition}}">{{.Addition}}</span>
  34. <span class="bar">
  35. <span class="pull-left add"></span>
  36. <span class="pull-left del"></span>
  37. </span>
  38. <span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span>
  39. </div>
  40. <!-- todo finish all file status, now modify, add, delete and rename -->
  41. <span class="status {{DiffTypeToStr .Type}}" data-toggle="tooltip" data-placement="right" title="{{DiffTypeToStr .Type}}">&nbsp;</span>
  42. <a class="file" href="#diff-1">{{.Name}}</a>
  43. </li>
  44. {{end}}
  45. </ol>
  46. </div>
  47. {{range .Diff.Files}}
  48. <div class="panel panel-default diff-file-box diff-box file-content" id="diff-2">
  49. <div class="panel-heading">
  50. <div class="diff-counter count pull-left">
  51. <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
  52. <span class="bar">
  53. <span class="pull-left add"></span>
  54. <span class="pull-left del"></span>
  55. </span>
  56. <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
  57. </div>
  58. <a class="btn btn-default btn-sm pull-right" href="{{$.SourcePath}}/{{.Name}}">View File</a>
  59. <span class="file">{{.Name}}</span>
  60. </div>
  61. {{$isImage := (call $.IsImageFile .Name)}}
  62. <div class="panel-body file-body file-code code-view code-diff">
  63. {{if $isImage}}
  64. <div class="text-center">
  65. <img src="{{$.RawPath}}/{{.Name}}">
  66. </div>
  67. {{else}}
  68. <table>
  69. <tbody>
  70. {{range .Sections}}
  71. {{range .Lines}}
  72. <tr class="{{DiffLineTypeToStr .Type}}-code nl-1 ol-1">
  73. <td class="lines-num lines-num-old">
  74. <span rel="L1">{{if .LeftIdx}}{{.LeftIdx}}{{end}}</span>
  75. </td>
  76. <td class="lines-num lines-num-new">
  77. <span rel="L1">{{if .RightIdx}}{{.RightIdx}}{{end}}</span>
  78. </td>
  79. <td class="lines-code">
  80. <pre>{{.Content}}</pre>
  81. </td>
  82. </tr>
  83. {{end}}
  84. {{end}}
  85. <!-- <tr class="same-code nl-2 ol-2">
  86. <td class="lines-num lines-num-old">
  87. <span rel="L1">2</span>
  88. </td>
  89. <td class="lines-num lines-num-new">
  90. <span rel="L1">2</span>
  91. </td>
  92. <td class="lines-code">
  93. <pre> "github.com/youtube/vitess/go/bson"</pre>
  94. </td>
  95. </tr>
  96. <tr class="same-code nl-3 ol-3">
  97. <td class="lines-num lines-num-old">
  98. <span rel="L3">3</span>
  99. </td>
  100. <td class="lines-num lines-num-new">
  101. <span rel="L3">3</span>
  102. </td>
  103. <td class="lines-code">
  104. <pre> "github.com/youtube/vitess/go/bson"</pre>
  105. </td>
  106. </tr>
  107. <tr class="add-code nl-4 ol-0">
  108. <td class="lines-num lines-num-old">
  109. <span rel="add">+</span>
  110. </td>
  111. <td class="lines-num lines-num-new">
  112. <span rel="L4">4</span>
  113. </td>
  114. <td class="lines-code">
  115. <pre> "github.com/youtube/vitess/go/bson"</pre>
  116. </td>
  117. </tr>
  118. <tr class="add-code nl-5 ol-0">
  119. <td class="lines-num lines-num-old">
  120. <span rel="add">+</span>
  121. </td>
  122. <td class="lines-num lines-num-new">
  123. <span rel="L5">5</span>
  124. </td>
  125. <td class="lines-code">
  126. <pre> "github.com/youtube/vitess/go/bson"</pre>
  127. </td>
  128. </tr>
  129. <tr class="del-code nl-0 ol-4">
  130. <td class="lines-num lines-num-old">
  131. <span rel="L4">4</span>
  132. </td>
  133. <td class="lines-num lines-num-new">
  134. <span rel="del">-</span>
  135. </td>
  136. <td class="lines-code">
  137. <pre> "github.com/youtube/vitess/go/bson"</pre>
  138. </td>
  139. </tr>
  140. <tr class="del-code nl-0 ol-5">
  141. <td class="lines-num lines-num-old">
  142. <span rel="L5">5</span>
  143. </td>
  144. <td class="lines-num lines-num-new">
  145. <span rel="del">-</span>
  146. </td>
  147. <td class="lines-code">
  148. <pre> "github.com/youtube/vitess/go/bson"</pre>
  149. </td>
  150. </tr>
  151. <tr class="del-code nl-0 ol-6">
  152. <td class="lines-num lines-num-old">
  153. <span rel="L6">6</span>
  154. </td>
  155. <td class="lines-num lines-num-new">
  156. <span rel="del">-</span>
  157. </td>
  158. <td class="lines-code">
  159. <pre> "github.com/youtube/vitess/go/bson"</pre>
  160. </td>
  161. </tr>
  162. <tr class="del-code nl-0 ol-7">
  163. <td class="lines-num lines-num-old">
  164. <span rel="L7">7</span>
  165. </td>
  166. <td class="lines-num lines-num-new">
  167. <span rel="del">-</span>
  168. </td>
  169. <td class="lines-code">
  170. <pre> "github.com/youtube/vitess/go/bson"</pre>
  171. </td>
  172. </tr>
  173. <tr class="same-code nl-6 ol-8">
  174. <td class="lines-num lines-num-old">
  175. <span rel="L8">8</span>
  176. </td>
  177. <td class="lines-num lines-num-new">
  178. <span rel="L6">6</span>
  179. </td>
  180. <td class="lines-code">
  181. <pre> "github.com/youtube/vitess/go/bson"</pre>
  182. </td>
  183. </tr>
  184. <tr class="same-code nl-7 ol-9">
  185. <td class="lines-num lines-num-old">
  186. <span rel="L1">9</span>
  187. </td>
  188. <td class="lines-num lines-num-new">
  189. <span rel="L1">7</span>
  190. </td>
  191. <td class="lines-code">
  192. <pre> "github.com/youtube/vitess/go/bson"</pre>
  193. </td>
  194. </tr>
  195. <tr class="same-code nl-8 ol-10">
  196. <td class="lines-num lines-num-old">
  197. <span rel="L1">10</span>
  198. </td>
  199. <td class="lines-num lines-num-new">
  200. <span rel="L1">8</span>
  201. </td>
  202. <td class="lines-code">
  203. <pre> "github.com/youtube/vitess/go/bson"</pre>
  204. </td>
  205. </tr> -->
  206. </tbody>
  207. </table>
  208. {{end}}
  209. </div>
  210. </div>
  211. {{end}}
  212. <!-- <div class="panel panel-default diff-file-box diff-box file-content">
  213. <div class="panel-heading">
  214. <div class="diff-counter count pull-left">
  215. <span class="add" data-line="2">+ 2</span>
  216. <span class="bar">
  217. <span class="pull-left add"></span>
  218. <span class="pull-left del"></span>
  219. </span>
  220. <span class="del" data-line="4">- 4</span>
  221. </div>
  222. <a class="btn btn-default btn-sm pull-right" href="#">View File</a>
  223. <span class="file">data/test/bson_test/simple_type.go</span>
  224. </div>
  225. <div class="panel-body file-body file-code code-view code-diff">
  226. <table>
  227. <tbody>
  228. <tr class="same-code nl-1 ol-1">
  229. <td class="lines-num lines-num-old">
  230. <span rel="L1">1</span>
  231. </td>
  232. <td class="lines-num lines-num-new">
  233. <span rel="L1">1</span>
  234. </td>
  235. <td class="lines-code">
  236. <pre> "github.com/youtube/vitess/go/bson"</pre>
  237. </td>
  238. </tr>
  239. <tr class="same-code nl-2 ol-2">
  240. <td class="lines-num lines-num-old">
  241. <span rel="L1">2</span>
  242. </td>
  243. <td class="lines-num lines-num-new">
  244. <span rel="L1">2</span>
  245. </td>
  246. <td class="lines-code">
  247. <pre> "github.com/youtube/vitess/go/bson"</pre>
  248. </td>
  249. </tr>
  250. <tr class="same-code nl-3 ol-3">
  251. <td class="lines-num lines-num-old">
  252. <span rel="L3">3</span>
  253. </td>
  254. <td class="lines-num lines-num-new">
  255. <span rel="L3">3</span>
  256. </td>
  257. <td class="lines-code">
  258. <pre> "github.com/youtube/vitess/go/bson"</pre>
  259. </td>
  260. </tr>
  261. <tr class="add-code nl-4 ol-0">
  262. <td class="lines-num lines-num-old">
  263. <span rel="add">+</span>
  264. </td>
  265. <td class="lines-num lines-num-new">
  266. <span rel="L4">4</span>
  267. </td>
  268. <td class="lines-code">
  269. <pre> "github.com/youtube/vitess/go/bson"</pre>
  270. </td>
  271. </tr>
  272. <tr class="add-code nl-5 ol-0">
  273. <td class="lines-num lines-num-old">
  274. <span rel="add">+</span>
  275. </td>
  276. <td class="lines-num lines-num-new">
  277. <span rel="L5">5</span>
  278. </td>
  279. <td class="lines-code">
  280. <pre> "github.com/youtube/vitess/go/bson"</pre>
  281. </td>
  282. </tr>
  283. <tr class="del-code nl-0 ol-4">
  284. <td class="lines-num lines-num-old">
  285. <span rel="L4">4</span>
  286. </td>
  287. <td class="lines-num lines-num-new">
  288. <span rel="del">-</span>
  289. </td>
  290. <td class="lines-code">
  291. <pre> "github.com/youtube/vitess/go/bson"</pre>
  292. </td>
  293. </tr>
  294. <tr class="del-code nl-0 ol-5">
  295. <td class="lines-num lines-num-old">
  296. <span rel="L5">5</span>
  297. </td>
  298. <td class="lines-num lines-num-new">
  299. <span rel="del">-</span>
  300. </td>
  301. <td class="lines-code">
  302. <pre> "github.com/youtube/vitess/go/bson"</pre>
  303. </td>
  304. </tr>
  305. <tr class="del-code nl-0 ol-6">
  306. <td class="lines-num lines-num-old">
  307. <span rel="L6">6</span>
  308. </td>
  309. <td class="lines-num lines-num-new">
  310. <span rel="del">-</span>
  311. </td>
  312. <td class="lines-code">
  313. <pre> "github.com/youtube/vitess/go/bson"</pre>
  314. </td>
  315. </tr>
  316. <tr class="del-code nl-0 ol-7">
  317. <td class="lines-num lines-num-old">
  318. <span rel="L7">7</span>
  319. </td>
  320. <td class="lines-num lines-num-new">
  321. <span rel="del">-</span>
  322. </td>
  323. <td class="lines-code">
  324. <pre> "github.com/youtube/vitess/go/bson"</pre>
  325. </td>
  326. </tr>
  327. <tr class="same-code nl-6 ol-8">
  328. <td class="lines-num lines-num-old">
  329. <span rel="L8">8</span>
  330. </td>
  331. <td class="lines-num lines-num-new">
  332. <span rel="L6">6</span>
  333. </td>
  334. <td class="lines-code">
  335. <pre> "github.com/youtube/vitess/go/bson"</pre>
  336. </td>
  337. </tr>
  338. <tr class="same-code nl-7 ol-9">
  339. <td class="lines-num lines-num-old">
  340. <span rel="L1">9</span>
  341. </td>
  342. <td class="lines-num lines-num-new">
  343. <span rel="L1">7</span>
  344. </td>
  345. <td class="lines-code">
  346. <pre> "github.com/youtube/vitess/go/bson"</pre>
  347. </td>
  348. </tr>
  349. <tr class="same-code nl-8 ol-10">
  350. <td class="lines-num lines-num-old">
  351. <span rel="L1">10</span>
  352. </td>
  353. <td class="lines-num lines-num-new">
  354. <span rel="L1">8</span>
  355. </td>
  356. <td class="lines-code">
  357. <pre> "github.com/youtube/vitess/go/bson"</pre>
  358. </td>
  359. </tr>
  360. <tr class="ellipsis-code">
  361. <td class="text-center lines-ellipsis" colspan="2">
  362. <i class="fa fa-ellipsis-h"></i>
  363. </td>
  364. <td class="lines-code">
  365. <pre> "github.com/youtube/vitess/go/bson"</pre>
  366. </td>
  367. </tr>
  368. <tr class="same-code nl-8 ol-10">
  369. <td class="lines-num lines-num-old">
  370. <span rel="L1">10</span>
  371. </td>
  372. <td class="lines-num lines-num-new">
  373. <span rel="L1">8</span>
  374. </td>
  375. <td class="lines-code">
  376. <pre> "github.com/youtube/vitess/go/bson"</pre>
  377. </td>
  378. </tr>
  379. <tr class="same-code nl-8 ol-10">
  380. <td class="lines-num lines-num-old">
  381. <span rel="L1">10</span>
  382. </td>
  383. <td class="lines-num lines-num-new">
  384. <span rel="L1">8</span>
  385. </td>
  386. <td class="lines-code">
  387. <pre> "github.com/youtube/vitess/go/bson"</pre>
  388. </td>
  389. </tr>
  390. </tbody>
  391. </table>
  392. </div>
  393. </div>
  394. <div class="panel panel-default diff-file-box diff-box file-content">
  395. <div class="panel-heading">
  396. <div class="diff-counter count pull-left">
  397. <span class="add" data-line="0">BIN</span>
  398. <span class="bar">
  399. <span class="pull-left add"></span>
  400. <span class="pull-left del"></span>
  401. </span>
  402. <span class="del" data-line="1"></span>
  403. </div>
  404. <a class="btn btn-default btn-sm pull-right" href="#">View File</a>
  405. <span class="file">data/test/bson_test/simple_type.png</span>
  406. </div>
  407. <div class="panel-body file-body file-code code-view code-bin">
  408. <table>
  409. <tbody>
  410. <tr class="text-center"><td><img src="http://1.gravatar.com/avatar/f72f7454ce9d710baa506394f68f4132?s=200" alt=""/></td></tr>
  411. </tbody>
  412. </table>
  413. </div>
  414. </div> -->
  415. </div>
  416. </div>
  417. {{template "base/footer" .}}