#4992 Show the default branch in the project overview page
Merged 3 years ago by pingou. Opened 3 years ago by pingou.

file modified
+6 -1
@@ -501,6 +501,11 @@ 

    background: #ddd;

  }

  

+ .commit_branch {

+   font-size: 1em;

+   background: #ababab;

+ }

+ 

  .light_gray_bg {

    background-color:#ccc;

  }
@@ -549,4 +554,4 @@ 

  

  .api-doc .card-body h2.title {

    display: none;

- } 

\ No newline at end of file

+ }

@@ -279,7 +279,8 @@ 

                            namespace=repo.namespace,

                            commitid=commit.hex, branch=branchname) }}"

                            class="notblue">

-                           <code class="py-1 px-2 font-weight-bold commit_hash">{{ commit.hex|short }}</code>

+                           <code class="py-1 px-2 font-weight-bold commit_branch">{{ branchname }}</code><code

+                            class="py-1 px-2 font-weight-bold commit_hash">{{ commit.hex|short }}</code>

                            <span class="font-weight-bold">{{ commit.message.split('\n')[0] }}</span>

                          </a>

                        </div>

@@ -418,7 +418,8 @@ 

                  namespace=repo.namespace,

                  commitid=commit.hex, branch=branchname) }}"

                  class="notblue">

-                 <code class="py-1 px-2 font-weight-bold commit_hash">{{ commit.hex|short }}</code>

+                 <code class="py-1 px-2 font-weight-bold commit_branch">{{ branchname }}</code><code

+                 class="py-1 px-2 font-weight-bold commit_hash">{{ commit.hex|short }}</code>

                  <span class="font-weight-bold">{{ commit.message.split('\n')[0] }}</span>

                </a>

              </div>

@@ -2324,6 +2324,11 @@ 

                  '<a href="/testproject"><strong>testproject</strong></a>',

                  output_text,

              )

+             self.assertIn(

+                 '<code class="py-1 px-2 font-weight-bold '

+                 'commit_branch">master</code>',

+                 output_text,

+             )

  

          # After

          projects = pagure.lib.query.search_projects(self.session)
@@ -2492,6 +2497,11 @@ 

                  '<a href="/project_main"><strong>project_main</strong></a>',

                  output_text,

              )

+             self.assertIn(

+                 '<code class="py-1 px-2 font-weight-bold '

+                 'commit_branch">main</code>',

+                 output_text,

+             )

  

          # After

          projects = pagure.lib.query.search_projects(self.session)