Showing 3 changed files with 28 additions and 12 deletions
+4 -4
templates/compare.html.ep
... ...
@@ -259,8 +259,8 @@
259 259
   
260 260
   # commit_body args
261 261
   my %commit_body_args = (
262
-    user => $base_user_id,
263
-    project => $base_project_id,
262
+    user => $target_user_id,
263
+    project => $target_project->{id},
264 264
     rep_info => $work_rep_info,
265 265
     rev => $end_commit_id,
266 266
     from_rev => $start_commit_id
... ...
@@ -674,12 +674,12 @@
674 674
                 </span>
675 675
               </div>
676 676
               <div class="compare-commits-commit-title">
677
-                <a style="color:#333" href="<%= url_for("/$base_user_id/$base_project_id/commit/$commit->{id}") %>">
677
+                <a style="color:#333" href="<%= url_for("/$target_user_id/$target_project->{id}/commit/$commit->{id}") %>">
678 678
                   <%= $commit->{title_short} %>
679 679
                 </a>
680 680
               </div>
681 681
               <div class="compare-commits-commit-id">
682
-                <a href="<%= url_for("/$base_user_id/$base_project_id/commit/$commit->{id}") %>">
682
+                <a href="<%= url_for("/$target_user_id/$target_project->{id}/commit/$commit->{id}") %>">
683 683
                   <%= substr($commit->{id}, 0, 7) %>
684 684
                 </a>
685 685
               </div>
+20 -4
templates/include/commit_body.html.ep
... ...
@@ -54,6 +54,14 @@
54 54
     $total_add_line_count += $blob_diff->{add_line_count};
55 55
     $total_delete_line_count += $blob_diff->{delete_line_count};
56 56
   }
57
+  
58
+  # diff_tree arguments
59
+  my %diff_tree_args = (
60
+    rev => $rev,
61
+    from_rev => $from_rev,
62
+    diff_trees => $diff_trees
63
+  );
64
+  
57 65
 %>
58 66
 
59 67
 %= javascript begin
... ...
@@ -87,15 +95,23 @@
87 95
 </div>
88 96
 
89 97
 <div id="diff_tree" style="display:none">
90
-  <%= include '/include/diff_tree', id => $rev, from_id => $from_rev,
91
-    diff_trees => $diff_trees %>
98
+  %= include '/include/diff_tree', %diff_tree_args;
92 99
 </div>
93 100
 
94 101
 % my $num = 0;
95 102
 % for my $file (sort keys %$diff_trees_h) {
103
+  <%
104
+    # blob_diff_body arguments
105
+    my $blob_diff = $blob_diffs_h->{$file};
106
+    my %blob_diff_body_args = (
107
+      user => $user_id,
108
+      project => $project_id,
109
+      blob_diff => $blob_diff,
110
+      diff_tree => $diff_trees_h->{$file}
111
+    );
112
+  %>
96 113
   <div id="diff-<%= $num %>">
97
-    % my $blob_diff = $blob_diffs_h->{$file};
98
-    %= include '/include/blob_diff_body', blob_diff => $blob_diff, diff_tree => $diff_trees_h->{$file};
114
+    %= include '/include/blob_diff_body', %blob_diff_body_args;
99 115
   </div>
100 116
   % $num++;
101 117
 % }
+4 -4
templates/pull.html.ep
... ...
@@ -303,8 +303,8 @@
303 303
   
304 304
   # commit_body args
305 305
   my %commit_body_args = (
306
-    user => $base_user_id,
307
-    project => $base_project_id,
306
+    user => $target_user_id,
307
+    project => $target_project->{id},
308 308
     rep_info => $work_rep_info,
309 309
     rev => $end_commit_id,
310 310
     from_rev => $start_commit_id
... ...
@@ -429,12 +429,12 @@
429 429
                     </span>
430 430
                   </div>
431 431
                   <div class="compare-commits-commit-title">
432
-                    <a style="color:#333" href="<%= url_for("/$base_user_id/$base_project_id/commit/$commit->{id}") %>">
432
+                    <a style="color:#333" href="<%= url_for("/$target_user_id/$target_project->{id}/commit/$commit->{id}") %>">
433 433
                       <%= $commit->{title_short} %>
434 434
                     </a>
435 435
                   </div>
436 436
                   <div class="compare-commits-commit-id">
437
-                    <a href="<%= url_for("/$base_user_id/$base_project_id/commit/$commit->{id}") %>">
437
+                    <a href="<%= url_for("/$target_user_id/$target_project->{id}/commit/$commit->{id}") %>">
438 438
                       <%= substr($commit->{id}, 0, 7) %>
439 439
                     </a>
440 440
                   </div>