From b0ee4178ba28da83efd104fa344a933be339b8a3 Mon Sep 17 00:00:00 2001
From: Slavek Kabrda <bkabrda@redhat.com>
Date: Sep 20 2018 10:36:04 +0000
Subject: Fix arguments to several occurences of view_tree and view_commits in templates


---

diff --git a/pagure/templates/file.html b/pagure/templates/file.html
index eb07051..300bc43 100644
--- a/pagure/templates/file.html
+++ b/pagure/templates/file.html
@@ -42,8 +42,7 @@
                       repo=repo.name,
                       username=username,
                       namespace=repo.namespace,
-                      identifier=branch,
-                      branchname=branch) }}">
+                      identifier=branch) }}">
                       <span class="fa fa-random fa-fw"></span> <span class="{{'font-weight-bold' if branchname == branch}}">{{ branch }}</span>
                   </a>
               {% endfor %}
diff --git a/pagure/templates/repo_branches.html b/pagure/templates/repo_branches.html
index 5661f2f..8d71212 100644
--- a/pagure/templates/repo_branches.html
+++ b/pagure/templates/repo_branches.html
@@ -23,8 +23,7 @@
                         repo=repo.name,
                         username=username,
                         namespace=repo.namespace,
-                        identifier=head,
-                        branchname=head) }}"
+                        identifier=head) }}"
                         title="{{ head }}" data-toggle="tooltip"
                         class="font-weight-bold">
                         {{ head }}
@@ -48,8 +47,7 @@
                             repo=repo.name,
                             username=username,
                             namespace=repo.namespace,
-                            identifier=branch,
-                            branchname=branch) }}"
+                            identifier=branch) }}"
                             title="{{ branch }}" data-toggle="tooltip">{{ branch }}
                         </a>
                         <small class="text-muted commits_ahead_label"></small>
@@ -61,8 +59,7 @@
                                         repo=repo.name,
                                         username=username,
                                         namespace=repo.namespace,
-                                        identifier=branch,
-                                        branchname=branch) }}"
+                                        identifier=branch) }}"
                                         title="view code tree for this branch">
                                     <i class="fa fa-fw fa-file-code-o"></i>
                                     </a>
diff --git a/pagure/templates/repo_master.html b/pagure/templates/repo_master.html
index 1d2a236..ef37ad1 100644
--- a/pagure/templates/repo_master.html
+++ b/pagure/templates/repo_master.html
@@ -531,8 +531,7 @@ $("#pr-button").one("click",
       repo=repo.name,
       username=username,
       namespace=repo.namespace,
-      identifier=branchname,
-      branchname=branchname) }}">
+      identifier=branchname) }}">
       <i class="fa fa-file-code-o text-muted fa-fw"></i>&nbsp;Files
     </a>
     <a class=
diff --git a/pagure/templates/repo_pull_request.html b/pagure/templates/repo_pull_request.html
index a4decd6..6c01606 100644
--- a/pagure/templates/repo_pull_request.html
+++ b/pagure/templates/repo_pull_request.html
@@ -106,7 +106,7 @@
                     username=pull_request.project_from.user.user
                       if pull_request.project_from.is_fork else None,
                     namespace=repo.namespace,
-                    branchname=pull_request.branch_from)
+                    identifier=pull_request.branch_from)
                   }}"
                   class="badge badge-secondary badge-pill border border-secondary"
                   style="font-size:1em">
@@ -119,7 +119,7 @@
                       username=pull_request.project.user.user
                       if pull_request.project.is_fork else None,
                       namespace=repo.namespace,
-                      branchname=pull_request.branch)
+                      identifier=pull_request.branch)
                       }}"
                 class="badge badge-secondary badge-pill border border-secondary"
                 style="font-size:1em">
diff --git a/pagure/themes/srcfpo/templates/repo_branches.html b/pagure/themes/srcfpo/templates/repo_branches.html
index 5cc54cd..80645ff 100644
--- a/pagure/themes/srcfpo/templates/repo_branches.html
+++ b/pagure/themes/srcfpo/templates/repo_branches.html
@@ -34,8 +34,7 @@
                         repo=repo.name,
                         username=username,
                         namespace=repo.namespace,
-                        identifier=head,
-                        branchname=head) }}"
+                        identifier=head) }}"
                         title="{{ head }}" data-toggle="tooltip"
                         class="font-weight-bold">
                         {{ head }}
@@ -59,8 +58,7 @@
                             repo=repo.name,
                             username=username,
                             namespace=repo.namespace,
-                            identifier=branch,
-                            branchname=branch) }}"
+                            identifier=branch) }}"
                             title="{{ branch }}" data-toggle="tooltip">{{ branch }}
                         </a>
                         <small class="text-muted commits_ahead_label"></small>
@@ -72,8 +70,7 @@
                                         repo=repo.name,
                                         username=username,
                                         namespace=repo.namespace,
-                                        identifier=branch,
-                                        branchname=branch) }}"
+                                        identifier=branch) }}"
                                         title="view code tree for this branch">
                                     <i class="fa fa-fw fa-file-code-o"></i>
                                     </a>
@@ -81,7 +78,6 @@
                                         repo=repo.name,
                                         username=username,
                                         namespace=repo.namespace,
-                                        identifier=branch,
                                         branchname=branch) }}"
                                         title="view commit list for this branch">
                                     <i class="fa fa-fw fa-list-alt"></i>

