From e2793985c64317c41353ee1ce6108a53e9af324a Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 1/15] Add a banner about adding a README file when PRs are disabled


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/themes/srcfpo/templates/repo_info.html b/pagure/themes/srcfpo/templates/repo_info.html
index ae5a619..ced9c05 100644
--- a/pagure/themes/srcfpo/templates/repo_info.html
+++ b/pagure/themes/srcfpo/templates/repo_info.html
@@ -347,6 +347,25 @@
 
               </div>
             </div>
+
+            {% if g.authenticated and g.repo_committer and not repo.is_fork
+              and not repo.settings.get('pull_requests', True) and not readme %}
+            <div class="row">
+              <div class="col">
+                <div class="alert alert-warning d-flex align-items-center font-size-09 py-2 px-2 mt-4">
+                  <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+                    <span aria-hidden="true">&times;</span>
+                    <span class="sr-only">Close</span>
+                  </button>
+                  <p>
+                    You appear to have turned off pull-request you may want to add
+                    a README file with instructions on how to contribute to this
+                    project. Thanks!
+                  </p>
+                </div>
+              </div>
+            </div>
+          {% endif %}
           </div>
       </div>
     {% if g.repo_obj and g.repo_obj.is_empty %}

From 84d895707514d17751566007c2b0e505781303f6 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 2/15] Add package description and upstream's URL to the page


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/themes/srcfpo/templates/repo_info.html b/pagure/themes/srcfpo/templates/repo_info.html
index ced9c05..37645e8 100644
--- a/pagure/themes/srcfpo/templates/repo_info.html
+++ b/pagure/themes/srcfpo/templates/repo_info.html
@@ -41,6 +41,13 @@
     padding-left: 33px;
     background: url(https://admin.fedoraproject.org/pkgdb/static/icon_koschei.png) 0 50% no-repeat;
   }
+  .projectinfo {
+    white-space: pre-wrap;
+    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
+    white-space: -pre-wrap;      /* Opera 4-6 */
+    white-space: -o-pre-wrap;    /* Opera 7 */
+    word-wrap: break-word;       /* Internet Explorer 5.5+ */
+  }
 </style>
 {% endblock %}
 
@@ -437,6 +444,24 @@ $(document).ready(function() {
         watchProjectForm.submit();
     });
 
+  {% if repo.namespace == 'rpms' %}
+    $.ajax({
+      url: 'https://apps.fedoraproject.org/mdapi/rawhide/pkg/{{ repo.name }}',
+      type: 'GET',
+      dataType: 'jsonp',
+      success: function(res) {
+        console.log(res);
+        $( ".projectinfo" ).text(res['description']);
+        if (res['url']){
+            var _p = $('.projectinfo');
+            $('.projectinfo').append(
+              ' (<a target="_blank" rel="noopener noreferrer" href="'
+              + res['url'] + '"a>upstream</a>)')
+        }
+      }
+    });
+  {% endif %}
+
 });
 </script>
 {% endblock %}

From b435c5b7496e455e84822f8b3f29d13d28f8d29d Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 3/15] Adjustment to the html indentation


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/themes/srcfpo/templates/repo_info.html b/pagure/themes/srcfpo/templates/repo_info.html
index 37645e8..dc6e22d 100644
--- a/pagure/themes/srcfpo/templates/repo_info.html
+++ b/pagure/themes/srcfpo/templates/repo_info.html
@@ -113,192 +113,182 @@
               {% if repo.description %}{{ repo.description | noJS | safe }}{% else %}-{% endif -%}
               {%- if repo.url %} &nbsp;| &nbsp;<a class="inline" href="{{ repo.url }}">{{ repo.url }}</a>{% endif %}
             </div>
-            <div class="btn-group">
-                {% if not g.repo_starred %}
+
+            <div class="row text-center mb-4">
+              <div class="col">
+
+                <div class="btn-group">
+                  {% if not g.repo_starred %}
+                      <a href="#" class="btn btn-sm btn-outline-primary font-weight-bold"
+                      onclick="$('#star_project').submit();">
+                        <i class="fa fa-star-o fa-fw"></i>Star
+                        <form method="POST" name="star_project" id="star_project"
+                        action="{{ url_for(
+                        'ui_ns.star_project',
+                        repo=repo.name,
+                        username=username,
+                        namespace=repo.namespace,
+                        star=1)}}">
+                        {{ g.forkbuttonform.csrf_token }}
+                        </form>
+                      </a>
+                        <a href="{{url_for(
+                                    'ui_ns.view_stargazers',
+                                    repo=repo.name,
+                                    username=repo.user.user if repo.is_fork else None,
+                                    namespace=repo.namespace,
+                        )}}" class="btn btn-sm btn-primary font-weight-bold">{{ repo.stargazers|length }}</a>
+                  {% else %}
                     <a href="#" class="btn btn-sm btn-outline-primary font-weight-bold"
-                    onclick="$('#star_project').submit();">
-                      <i class="fa fa-star-o fa-fw"></i>Star
-                      <form method="POST" name="star_project" id="star_project"
-                      action="{{ url_for(
-                      'ui_ns.star_project',
-                      repo=repo.name,
-                      username=username,
-                      namespace=repo.namespace,
-                      star=1)}}">
-                      {{ g.forkbuttonform.csrf_token }}
+                      onclick="$('#unstar_project').submit();">
+                      <form method="POST" name="unstar_project" id="unstar_project"
+                        action="{{ url_for(
+                        'ui_ns.star_project',
+                        repo=repo.name,
+                        username=username,
+                        namespace=repo.namespace,
+                        star=0)}}">
+                        {{ g.forkbuttonform.csrf_token }}
                       </form>
-                    </a>
-                      <a href="{{url_for(
-                                  'ui_ns.view_stargazers',
-                                  repo=repo.name,
-                                  username=repo.user.user if repo.is_fork else None,
-                                  namespace=repo.namespace,
-                      )}}" class="btn btn-sm btn-primary font-weight-bold">{{ repo.stargazers|length }}</a>
-                {% else %}
-                  <a href="#" class="btn btn-sm btn-outline-primary font-weight-bold"
-                    onclick="$('#unstar_project').submit();">
-                    <form method="POST" name="unstar_project" id="unstar_project"
-                      action="{{ url_for(
-                      'ui_ns.star_project',
-                      repo=repo.name,
-                      username=username,
-                      namespace=repo.namespace,
-                      star=0)}}">
-                      {{ g.forkbuttonform.csrf_token }}
-                    </form>
-                      <span class="fa fa-star text-warning"></span> Unstar</a>
-                      <a href="{{url_for(
-                                  'ui_ns.view_stargazers',
-                                  repo=repo.name,
-                                  username=repo.user.user if repo.is_fork else None,
-                                  namespace=repo.namespace,
-                      )}}" class="btn btn-sm btn-primary font-weight-bold">{{repo.stargazers|length}}</a>
-                {% endif %}
+                        <span class="fa fa-star text-warning"></span> Unstar</a>
+                        <a href="{{url_for(
+                                    'ui_ns.view_stargazers',
+                                    repo=repo.name,
+                                    username=repo.user.user if repo.is_fork else None,
+                                    namespace=repo.namespace,
+                        )}}" class="btn btn-sm btn-primary font-weight-bold">{{repo.stargazers|length}}</a>
+                  {% endif %}
                 </div>
 
                 <div class="btn-group">
-                    <a href="#" title="{{ watch_button_title }}" type="button"
-                            class="btn btn-sm dropdown-toggle btn-outline-primary font-weight-bold"
-                            data-toggle="dropdown" id="watch-button">
-                      <i class="fa {{ 'fa-eye-slash' if watch_button_text == 'Watch' else 'fa-eye text-success' }} fa-fw"></i>
-                      <span>{{watch_button_text}}</span>
-                    </a>
-                    <span class="btn btn-sm btn-primary font-weight-bold">{{num_watchers}}</span>
-                    <div class="dropdown-menu dropdown-menu-right watch-menu">
-                      <form method="POST" id="watch_project" name="watch_project"
+                  <a href="#" title="{{ watch_button_title }}" type="button"
+                          class="btn btn-sm dropdown-toggle btn-outline-primary font-weight-bold"
+                          data-toggle="dropdown" id="watch-button">
+                    <i class="fa {{ 'fa-eye-slash' if watch_button_text == 'Watch' else 'fa-eye text-success' }} fa-fw"></i>
+                    <span>{{watch_button_text}}</span>
+                  </a>
+                  <span class="btn btn-sm btn-primary font-weight-bold">{{num_watchers}}</span>
+                  <div class="dropdown-menu dropdown-menu-right watch-menu">
+                    <form method="POST" id="watch_project" name="watch_project"
                         action="{{ url_for('ui_ns.watch_repo',
                           repo=repo.name,
                           user=repo.user.user if repo.is_fork else None,
                           namespace=repo.namespace,
                           watch=0) }}">
-                        <a class="dropdown-item pl-2" id="watch_issues_button">
-                          <div class="media">
-                            <div class="align-self-center check-icon pr-2">
-                                <span class="fa fa-fw"></span>
-                            </div>
-                            <div class="media-body">
-                                Watch Issues and PRs
-                            </div>
+                      <a class="dropdown-item pl-2" id="watch_issues_button">
+                        <div class="media">
+                          <div class="align-self-center check-icon pr-2">
+                              <span class="fa fa-fw"></span>
                           </div>
-                        </a>
-                        <a class="dropdown-item pl-2" id="watch_commits_button">
-                          <div class="media">
-                              <div class="align-self-center check-icon pr-2">
-                                  <span class="fa fa-fw"></span>
-                              </div>
-                              <div class="media-body">
-                                  Watch Commits
-                              </div>
-                            </div>
-                        </a>
-                        <a class="dropdown-item pl-2" id="watch_issues_commits_button">
-                          <div class="media">
-                            <div class="align-self-center check-icon pr-2">
-                                <span class="fa fa-fw"></span>
-                            </div>
-                            <div class="media-body">
-                                Watch Issues, PRs, and Commits
-                            </div>
+                          <div class="media-body">
+                              Watch Issues and PRs
                           </div>
-                        </a>
-                        <a class="dropdown-item pl-2" id="unwatch_button">
-                          <div class="media">
+                        </div>
+                      </a>
+                      <a class="dropdown-item pl-2" id="watch_commits_button">
+                        <div class="media">
                             <div class="align-self-center check-icon pr-2">
                                 <span class="fa fa-fw"></span>
                             </div>
                             <div class="media-body">
-                                Unwatch
+                                Watch Commits
                             </div>
                           </div>
-                        </a>
-                        <a class="dropdown-item pl-2" id="reset_button">
-                          <div class="media">
-                            <div class="align-self-center check-icon pr-2">
-                                <span class="fa fa-fw"></span>
-                            </div>
-                            <div class="media-body">
-                                Reset watch status
-                            </div>
+                      </a>
+                      <a class="dropdown-item pl-2" id="watch_issues_commits_button">
+                        <div class="media">
+                          <div class="align-self-center check-icon pr-2">
+                              <span class="fa fa-fw"></span>
                           </div>
-                        </a>
-                        {{ g.forkbuttonform.csrf_token }}
-                      </form>
-                    </div>
-                  </div>
-                  <div class="btn-group">
-                      <a href="#" type="button"
-                              class="btn btn-sm dropdown-toggle btn-outline-primary font-weight-bold"
-                              data-toggle="dropdown">
-                        <i class="fa fa-users fa-fw"></i>
-                        <span>Members</span>
+                          <div class="media-body">
+                              Watch Issues, PRs, and Commits
+                          </div>
+                        </div>
                       </a>
-                      <span class="btn btn-sm btn-primary font-weight-bold">{{repo.contributors|length+1}}</span>
-                      <div class="dropdown-menu dropdown-menu-right" style="width:500px">
+                      <a class="dropdown-item pl-2" id="unwatch_button">
+                        <div class="media">
+                          <div class="align-self-center check-icon pr-2">
+                              <span class="fa fa-fw"></span>
+                          </div>
+                          <div class="media-body">
+                              Unwatch
+                          </div>
+                        </div>
+                      </a>
+                      <a class="dropdown-item pl-2" id="reset_button">
+                        <div class="media">
+                          <div class="align-self-center check-icon pr-2">
+                              <span class="fa fa-fw"></span>
+                          </div>
+                          <div class="media-body">
+                              Reset watch status
+                          </div>
+                        </div>
+                      </a>
+                      {{ g.forkbuttonform.csrf_token }}
+                    </form>
+                  </div>
+                </div>
+
+                <div class="btn-group">
+                  <a href="#" type="button"
+                    class="btn btn-sm dropdown-toggle btn-outline-primary font-weight-bold"
+                      data-toggle="dropdown">
+                    <i class="fa fa-users fa-fw"></i>
+                    <span>Members</span>
+                  </a>
+                  <span class="btn btn-sm btn-primary font-weight-bold">{{repo.contributors|length+1}}</span>
+                  <div class="dropdown-menu dropdown-menu-right" style="width:500px">
+                    <div>
+                      <div class="media p-2">
+                          <img class=" align-self-center mr-3" src="{{ repo.user.default_email | avatar_url }}" width=50px height=50px>
+                          <div class="media-body align-self-center">
+                            <h4 class="my-0 font-weight-bold">
+                              <a href="{{ url_for('ui_ns.view_user', username=repo.user)}}">{{ repo.user.user }}</a>
+                            </h4>
+                            {{ repo.user.fullname }}
+                          </div>
+                          <div class="mr-auto align-self-center">main admin</div>
+                      </div>
+                      {% for access in repo.contributors %}
+                        {% for user in repo.contributors[access] %}
+                          <div class="media p-2">
+                              <img class=" align-self-center mr-3" src="{{ user.default_email | avatar_url }}" width=50px height=50px>
+                              <div class="media-body align-self-center">
+                                <h4 class="my-0 font-weight-bold">
+                                  <a href="{{ url_for('ui_ns.view_user', username=user.user)}}">{{ user.user }}</a>
+                                </h4>
+                                {{ user.fullname }}
+                              </div>
+                              <div class="mr-auto align-self-center">{{ access }}</div>
+                          </div>
+                        {% endfor %}
+                      {% endfor %}
+                      {% for access in repo.contributor_groups %}
+                        {% for group in repo.contributor_groups[access] %}
                           <div>
-                              <div class="media p-2">
-                                  <img class=" align-self-center mr-3" src="{{ repo.user.default_email | avatar_url }}" width=50px height=50px>
-                                  <div class="media-body align-self-center">
-                                    <h4 class="my-0 font-weight-bold">
-                                      <a href="{{ url_for('ui_ns.view_user', username=repo.user)}}">{{ repo.user.user }}</a>
-                                    </h4>
-                                    {{ repo.user.fullname }}
-                                  </div>
-                                  <div class="mr-auto align-self-center">main admin</div>
+                            <a href="{{ url_for('ui_ns.view_group', group=group.group_name)}}">
+                              @{{ group.group_name }}
+                            </a>
+                            - {{ access }}
+                          </div>
+                          <div class="media p-2">
+                              <div class="media-body align-self-center">
+                                <h4 class="my-0 font-weight-bold">
+                                  <a href="{{ url_for('ui_ns.view_group', group=group.group_name)}}"> @{{ group.group_name }}</a>
+                                </h4>
                               </div>
-                              {% for access in repo.contributors %}
-                                {% for user in repo.contributors[access] %}
-                                  <div class="media p-2">
-                                      <img class=" align-self-center mr-3" src="{{ user.default_email | avatar_url }}" width=50px height=50px>
-                                      <div class="media-body align-self-center">
-                                        <h4 class="my-0 font-weight-bold">
-                                          <a href="{{ url_for('ui_ns.view_user', username=user.user)}}">{{ user.user }}</a>
-                                        </h4>
-                                        {{ user.fullname }}
-                                      </div>
-                                      <div class="mr-auto align-self-center">{{ access }}</div>
-                                  </div>
-                                {% endfor %}
-                              {% endfor %}
-                              {% for access in repo.contributor_groups %}
-                                {% for group in repo.contributor_groups[access] %}
-                                  <div>
-                                    <a href="{{ url_for('ui_ns.view_group', group=group.group_name)}}">
-                                      @{{ group.group_name }}
-                                    </a>
-                                    - {{ access }}
-                                  </div>
-                                  <div class="media p-2">
-                                      <div class="media-body align-self-center">
-                                        <h4 class="my-0 font-weight-bold">
-                                          <a href="{{ url_for('ui_ns.view_group', group=group.group_name)}}"> @{{ group.group_name }}</a>
-                                        </h4>
-                                      </div>
-                                      <div class="mr-auto align-self-center">{{ access }}</div>
-                                  </div>
-                                {% endfor %}
-                              {% endfor %}
-                            </div>
-                      </div>
-                    </div>
-                    {% if last_commits %}
-                    {% set commit = last_commits[0] %}
-                    <div class="alert alert-secondary bg-light d-flex align-items-center font-size-09 py-2 px-2 mt-4">
-                      <div>
-                        <a href="{{ url_for('ui_ns.view_commit',
-                          repo=repo.name,
-                          username=username,
-                          namespace=repo.namespace,
-                          commitid=commit.hex, branch=branchname) }}"
-                          class="notblue">
-                          <code style="font-size: 1em;background: #ddd;" class="py-1 px-2 font-weight-bold">{{ commit.hex|short }}</code>
-                          <span class="font-weight-bold">{{ commit.message.split('\n')[0] }}</span>
-                        </a>
-                      </div>
-                      <div class="ml-auto">
-                          <span><span class="font-weight-bold">{{ commit.author | author2avatar(20) | safe }} {{commit.author.name}}</span> committed {{ commit.commit_time|humanize }}</span>
+                              <div class="mr-auto align-self-center">{{ access }}</div>
+                          </div>
+                        {% endfor %}
+                      {% endfor %}
                       </div>
                     </div>
-                    {% endif %}
+                  </div>
+
+              </div>
+            </div>
+
             <div class="row text-center mb-4">
               <div class="col">
 
@@ -373,7 +363,27 @@
               </div>
             </div>
           {% endif %}
+
+          {% if last_commits %}
+          {% set commit = last_commits[0] %}
+          <div class="alert alert-secondary bg-light d-flex align-items-center font-size-09 py-2 px-2 mt-4">
+            <div>
+              <a href="{{ url_for('ui_ns.view_commit',
+                repo=repo.name,
+                username=username,
+                namespace=repo.namespace,
+                commitid=commit.hex, branch=branchname) }}"
+                class="notblue">
+                <code style="font-size: 1em;background: #ddd;" class="py-1 px-2 font-weight-bold">{{ commit.hex|short }}</code>
+                <span class="font-weight-bold">{{ commit.message.split('\n')[0] }}</span>
+              </a>
+            </div>
+            <div class="ml-auto">
+                <span><span class="font-weight-bold">{{ commit.author | author2avatar(20) | safe }} {{commit.author.name}}</span> committed {{ commit.commit_time|humanize }}</span>
+            </div>
           </div>
+          {% endif %}
+        </div>
       </div>
     {% if g.repo_obj and g.repo_obj.is_empty %}
         <div class="alert {% if category == 'error' %}alert-warning{% else %}alert-info{%endif%}" role="alert">

From 416a491b02a4d210a2889a36c8ad7225e86b7c62 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 4/15] Import the repo_branches template from the default theme into the srcfpo one


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/themes/srcfpo/templates/repo_branches.html b/pagure/themes/srcfpo/templates/repo_branches.html
new file mode 100644
index 0000000..5661f2f
--- /dev/null
+++ b/pagure/themes/srcfpo/templates/repo_branches.html
@@ -0,0 +1,186 @@
+{% extends "repo_master.html" %}
+
+{% block title %}Branches - {{
+    repo.namespace + '/' if repo.namespace }}{{ repo.name }}{% endblock %}
+{% set tag = "home" %}
+
+{% block repo %}
+<div class="row">
+  <div class="col">
+      {% block overviewtabs %}{{ super() }}{% endblock %}
+  </div>
+  <div class="col-10">
+    <h3 class="font-weight-bold">
+    Branches <span class="badge badge-secondary">{{g.branches|length}}</span>
+    </h3>
+    <div class="list-group">
+        {% if head %}
+        <div id="branch-{{ head }}" class="list-group-item">
+            <div class="row align-items-center">
+                <div class="col">
+                    <span class="fa fa-random fa-fw text-muted"></span>
+                    <a href="{{ url_for('ui_ns.view_tree',
+                        repo=repo.name,
+                        username=username,
+                        namespace=repo.namespace,
+                        identifier=head,
+                        branchname=head) }}"
+                        title="{{ head }}" data-toggle="tooltip"
+                        class="font-weight-bold">
+                        {{ head }}
+                    </a>
+                </div>
+                <div class="col-xs-auto pl-2">
+                    <button class="btn btn-outline-light bg-white border-white" title="this is the default branch for this project">
+                    <span class="fa fa-star fa-fw text-warning"></span>
+                    </button>
+                </div>
+            </div>
+        </div>
+        {% endif %}
+
+        {% for branch in g.branches if branch != head %}
+        <div id="branch-{{ branch | replace('/', '__')}}" class="list-group-item">
+                <div class="row align-items-center">
+                    <div class="col">
+                        <span class="fa fa-random fa-fw text-muted"></span>
+                        <a class="font-weight-bold" href="{{ url_for('ui_ns.view_tree',
+                            repo=repo.name,
+                            username=username,
+                            namespace=repo.namespace,
+                            identifier=branch,
+                            branchname=branch) }}"
+                            title="{{ branch }}" data-toggle="tooltip">{{ branch }}
+                        </a>
+                        <small class="text-muted commits_ahead_label"></small>
+                    </div>
+                    <div class="col-xs-auto pr-2">
+                            <div class="branch_del">
+                                <div class="btn-group">
+                                    <a class="btn btn-outline-primary" href="{{ url_for('ui_ns.view_tree',
+                                        repo=repo.name,
+                                        username=username,
+                                        namespace=repo.namespace,
+                                        identifier=branch,
+                                        branchname=branch) }}"
+                                        title="view code tree for this branch">
+                                    <i class="fa fa-fw fa-file-code-o"></i>
+                                    </a>
+                                    <a class="btn btn-outline-primary" href="{{ url_for('ui_ns.view_commits',
+                                        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>
+                                    </a>
+                                </div>
+                                {% if g.repo_committer and branch != head
+                                      and (
+                                        config.get('ALLOW_DELETE_BRANCH', True)
+                                        or repo.is_fork) %}
+                                    <form id="delete_branch_form-{{
+                                        branch | replace('/', '__') | replace('+', '___')
+                                        }}" action="{{
+                                        url_for('ui_ns.delete_branch',
+                                                repo=repo.name,
+                                                username=username,
+                                                namespace=repo.namespace,
+                                                branchname=branch)
+                                        }}" method="post" class="icon d-inline"
+                                        onsubmit="return confirm('Are you sure you want to remove the branch: {{ branch }}?\nThis cannot be un-done!');">
+                                        {{ g.confirmationform.csrf_token }}
+                                        <a title="Remove branch {{ branch }}" href="#"
+                                        class="btn btn-outline-danger"
+                                        onclick="$('#delete_branch_form-{{
+                                            branch | replace('/', '__') | replace('.', '\\\\.')
+                                            | replace('+', '___')
+                                            }}').submit();">
+                                        <i class="fa fa-trash"></i>
+                                        </a>
+                                    </form>
+                                {% endif %}
+                            </div>
+                    </div>
+                </div>
+            </div>
+        {% endfor %}
+        </div>
+  </div>
+</div>
+{% endblock %}
+
+{% block jscripts %}
+{{ super() }}
+<script type="text/javascript">
+$(function() {
+  {% if g.authenticated and g.repo_committer %}
+  $.ajax({
+    url: '{{ url_for("internal_ns.get_pull_request_ready_branch") }}' ,
+    type: 'POST',
+    data: {
+      namespace: "{{ repo.namespace if repo.namespace }}",
+      repo: "{{ repo.name }}",
+      repouser: "{{ repo.user.user if repo.is_fork else '' }}",
+      csrf_token: "{{ g.confirmationform.csrf_token.current_token }}",
+    },
+    dataType: 'json',
+    success: function(res) {
+      if (res.code == 'OK'){
+        console.log(res.message);
+        for (branch in res.message.new_branch){
+          var nb_commits = res.message.new_branch[branch]['commits']
+          var nb_target = res.message.new_branch[branch]['target_branch']
+          var url = "{{ url_for(
+            'ui_ns.new_request_pull',
+            repo=repo.name,
+            username=repo.user.user if repo.is_fork else None,
+            namespace=repo.namespace,
+            branch_to='',
+            branch_from='') }}";
+          url = url.slice(0, -2) + nb_target + '..' + branch
+
+          {% if repo.is_fork %}
+          html2 = ' \
+                <a class="btn btn-outline-primary border-white" data-toggle="tooltip" \
+                href="' + url + '" title="' + branch +' contains '
+                 + nb_commits.length + ' commit not in the upstream project '
+                 + nb_target + ' branch. Click to create new PR now.'
+                 + '"><i class="fa fa-fw fa-arrow-circle-down"></i> Open Pull Request</a> \
+                </div>';
+          {% else %}
+          html2 = ' \
+                <a class="btn btn-outline-primary border-white" data-toggle="tooltip" \
+                href="' + url + '" title="' + branch +' contains '
+                 + nb_commits.length + ' commit not in the ' + nb_target
+                 + ' branch. Click to create new PR now.'
+                 + '"><i class="fa fa-fw fa-arrow-circle-down"></i> Open Pull Request</a> \
+                </div>';
+          {%endif%}
+          var _b = branch.replace(/\./g, '\\.').replace('/', '__').replace('\+', '\\+');
+          $('#branch-' + _b + ' .branch_del').prepend(html2);
+          $('[data-toggle="tooltip"]').tooltip({placement : 'bottom'});
+          var commits_string = (nb_commits.length > 1) ? " commits" : " commit"
+          $('#branch-' + _b + ' .commits_ahead_label').append(nb_commits.length + commits_string + ' ahead');
+
+
+        }
+        for (branch in res.message.branch_w_pr){
+          var html = ' \
+              <a class="btn btn-outline-success border-white" data-toggle="tooltip" '
+               + 'href="{{ request.url_root }}' + res.message.branch_w_pr[branch]
+               + '"title="' + branch +' is already in an opened pull-request">'
+               + '<i class="fa fa-fw fa-arrow-circle-down"></i> Pull Request #' + res.message.branch_w_pr[branch].split('/').slice(-1)[0]  + ' </a> \
+              </div>';
+          $('#branch-' + branch.replace(/\./g, '\\.').replace('/', '__')
+            + ' .branch_del').prepend(html);
+          $('[data-toggle="tooltip"]').tooltip({placement : 'bottom'});
+        }
+      }
+    }
+  });
+  {% endif %}
+});
+</script>
+{% endblock %}

From 242e16a4aaca00f9c429e7ed3759793b1a4c38be Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 5/15] Grey out branches when they are retired


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/themes/srcfpo/templates/repo_branches.html b/pagure/themes/srcfpo/templates/repo_branches.html
index 5661f2f..5cc54cd 100644
--- a/pagure/themes/srcfpo/templates/repo_branches.html
+++ b/pagure/themes/srcfpo/templates/repo_branches.html
@@ -4,6 +4,17 @@
     repo.namespace + '/' if repo.namespace }}{{ repo.name }}{% endblock %}
 {% set tag = "home" %}
 
+{% block header %}
+<style>
+.disabled_branch a {
+  color: #818a91;
+}
+.disabled_branch .new_pr_btn {
+  display: none;
+}
+</style>
+{% endblock %}
+
 {% block repo %}
 <div class="row">
   <div class="col">
@@ -114,7 +125,47 @@
 {% block jscripts %}
 {{ super() }}
 <script type="text/javascript">
+function disable_branches(){
+  function get_branches(_url){
+    $.ajax({
+      url: _url,
+      type: 'GET',
+      dataType: 'json',
+      success: function(res) {
+        for (branch in res.results){
+          branch = res.results[branch];
+          var _it = $('#branch-' + branch.name);
+          _it.addClass('disabled_branch');
+          if (branch.name == 'master') {
+            var _t = $('.projectinfo');
+            html = ' \
+                <div class="small label label-sm label-danger" data-toggle="tooltip" \
+                 title="This package has been retired">Retired on Fedora</div>';
+            _t.append(html);
+          }
+        }
+        if (res.next){
+          get_branches(res.next);
+        }
+      }
+    })
+  }
+  var _ns = '{{ repo.namespace }}';
+  if (_ns == 'rpms') {
+    _ns = 'rpm';
+  } else if (_ns == 'modules') {
+    _ns = 'modules';
+  }
+  var _url = 'https://pdc.fedoraproject.org/rest_api/v1/component-branches/'
+        + '?active=false&type=' + _ns + '&global_component={{ repo.name }}';
+  get_branches(_url);
+}
+
 $(function() {
+  {% if not repo.is_fork %}
+  disable_branches();
+  {% endif %}
+
   {% if g.authenticated and g.repo_committer %}
   $.ajax({
     url: '{{ url_for("internal_ns.get_pull_request_ready_branch") }}' ,

From b61d07e7c8a6ca75077e4271b234592841a391da Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 6/15] Indentation fixes


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/templates/userprofile_master.html b/pagure/templates/userprofile_master.html
index 59a3475..64921f9 100644
--- a/pagure/templates/userprofile_master.html
+++ b/pagure/templates/userprofile_master.html
@@ -13,86 +13,87 @@
 
 {% block content %}
 <div class="bg-light border border-top-0 pt-2">
-    <div class="container">
-        <div class="media my-4">
-          {{ user.default_email | avatar(64, css_class="align-self-center mr-3") | safe }}
-          <div class="media-body align-self-center">
-            <h3 class="mb-0 font-weight-bold">{{ username }}</h3>
-            <div title="{{ user.created.strftime('%Y-%m-%d') }}">
-              {{user.fullname}} &bull; <span class="text-muted">Joined {{ user.created | humanize }}</span>
-            </div>
+  <div class="container">
+      <div class="media my-4">
+        {{ user.default_email | avatar(64, css_class="align-self-center mr-3") | safe }}
+        <div class="media-body align-self-center">
+          <h3 class="mb-0 font-weight-bold">{{ username }}</h3>
+          <div title="{{ user.created.strftime('%Y-%m-%d') }}">
+            {{user.fullname}} &bull; <span class="text-muted">Joined {{
+              user.created | humanize }}</span>
           </div>
         </div>
-    </div>
+      </div>
   </div>
+</div>
 <div class="container">
-    <div class="row">
+  <div class="row">
     <div class="col">
         <ul class="nav nav-tabs nav-sidetabs flex-column">
           <li class="nav-item text-dark">
-              <a class="nav-link d-flex align-items-center {{'active' if select=='overview'}}"
-                 href="{{ url_for('ui_ns.view_user', username=user.username) }}">
-                  <span>
-                      <i class="fa fa-fw text-muted fa-user"></i>
-                      <span class="d-none d-md-inline">Overview&nbsp;</span>
-                  </span>
-              </a>
+            <a class="nav-link d-flex align-items-center {{'active' if select=='overview'}}"
+              href="{{ url_for('ui_ns.view_user', username=user.username) }}">
+              <span>
+                <i class="fa fa-fw text-muted fa-user"></i>
+                <span class="d-none d-md-inline">Overview&nbsp;</span>
+              </span>
+            </a>
           </li>
           <li class="nav-item text-dark">
-              <a class="nav-link d-flex align-items-center {{'active' if select=='projects'}}"
-                 href="{{ url_for('ui_ns.userprofile_projects', username=user.username) }}">
-                  <span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          {{ repos_length }}
-                      </span>
-                  </div>
-              </a>
+            <a class="nav-link d-flex align-items-center {{'active' if select=='projects'}}"
+              href="{{ url_for('ui_ns.userprofile_projects', username=user.username) }}">
+              <span>
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  {{ repos_length }}
+                </span>
+              </div>
+            </a>
           </li>
           <li class="nav-item text-dark">
-              <a class="nav-link d-flex align-items-center {{'active' if select=='forks'}}"
-                 href="{{ url_for('ui_ns.userprofile_forks', username=user.username) }}">
-                  <span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          {{ forks_length }}
-                      </span>
-                  </div>
-              </a>
+            <a class="nav-link d-flex align-items-center {{'active' if select=='forks'}}"
+              href="{{ url_for('ui_ns.userprofile_forks', username=user.username) }}">
+              <span>
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  {{ forks_length }}
+                </span>
+              </div>
+            </a>
           </li>
           <li class="nav-item text-dark">
-              <a class="nav-link d-flex align-items-center {{'active' if select=='groups'}}"
-                 href="{{ url_for('ui_ns.userprofile_groups', username=user.username) }}">
-                  <span>
-                      <i class="fa fa-fw text-muted fa-users"></i>
-                      <span class="d-none d-md-inline">Groups&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          {{ user.groups | length }}
-                      </span>
-                  </div>
-              </a>
+            <a class="nav-link d-flex align-items-center {{'active' if select=='groups'}}"
+             href="{{ url_for('ui_ns.userprofile_groups', username=user.username) }}">
+              <span>
+                <i class="fa fa-fw text-muted fa-users"></i>
+                <span class="d-none d-md-inline">Groups&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  {{ user.groups | length }}
+                </span>
+              </div>
+            </a>
           </li>
           <li class="nav-item text-dark">
-              <a class="nav-link d-flex align-items-center {{'active' if select=='starred'}}"
-                 href="{{ url_for('ui_ns.userprofile_starred', username=user.username) }}">
-                  <span>
-                      <i class="fa fa-fw text-muted fa-star"></i>
-                      <span class="d-none d-md-inline">Starred&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          {{ user.stars | length }}
-                      </span>
-                  </div>
-              </a>
+            <a class="nav-link d-flex align-items-center {{'active' if select=='starred'}}"
+              href="{{ url_for('ui_ns.userprofile_starred', username=user.username) }}">
+              <span>
+                <i class="fa fa-fw text-muted fa-star"></i>
+                <span class="d-none d-md-inline">Starred&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  {{ user.stars | length }}
+                </span>
+              </div>
+            </a>
           </li>
         </ul>
     </div>
@@ -101,6 +102,6 @@
     {% block userprofile_content %}
     {% endblock %}
     </div>
-    </div>
+  </div>
 </div>
 {% endblock %}

From 0765d3db295d2a2fd6084c7caf63ee6fcc87bf5a Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 7/15] More html indentation fixes


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/templates/userprofile_overview.html b/pagure/templates/userprofile_overview.html
index 69d5fa8..9edf44c 100644
--- a/pagure/templates/userprofile_overview.html
+++ b/pagure/templates/userprofile_overview.html
@@ -6,46 +6,46 @@
 
 {% block userprofile_content %}
 <div class="row mt-4">
-        <div class="col-12">
-            {% if owned_repos %}
-            <h4><strong>Top Projects</strong></h4>
-            <div class="row">
-                {% for repo in owned_repos %}
-                <div class="col-4">
-                    <div class="border mt-3 p-3">
-                        {% if repo.avatar_email %}
-                        <img src="{{ repo.avatar_email | avatar_url }}" width=20 height=20 />&nbsp;
-                        {% else %}
-                        <span class="fa fa-fw fa-calendar-o fa-rotate-270 mr-1 text-semimuted"></span>
-                        {% endif %}
-                        <a href="{{url_for(
-                        'ui_ns.view_repo',
-                        repo=repo.name,
-                        username=repo.user.username if repo.is_fork else None,
-                        namespace=repo.namespace)}}">
-                        <strong>{{ repo.namespace + '/' if repo.namespace }}{{ repo.name }}</strong>
-                        </a>
-                        <div class="ellipsis">
-                            <small>{{repo.description}}</small>
-                        </div>
-                    </div>
-                </div>
-              {% endfor %}
-            </div>
-            <div class="row">
-                <div class="col align-self-end text-right">
-                    <a href="#">view all {{repos_length}} projects</a>
-                </div>
-            </div>
+  <div class="col-12">
+      {% if owned_repos %}
+      <h4><strong>Top Projects</strong></h4>
+      <div class="row">
+        {% for repo in owned_repos %}
+        <div class="col-4">
+          <div class="border mt-3 p-3">
+            {% if repo.avatar_email %}
+            <img src="{{ repo.avatar_email | avatar_url }}" width=20 height=20 />&nbsp;
+            {% else %}
+            <span class="fa fa-fw fa-calendar-o fa-rotate-270 mr-1 text-semimuted"></span>
             {% endif %}
-            <h4 class="mt-4"><strong>Activity</strong></h4>
-            <div class="row">
-                <div class="col-12">
-                    <div class="w-100 border py-4 pl-3">
-                {{ render_activity_graph(username, _class="mx-auto") }}
-                    </div>
-                </div>
+            <a href="{{url_for(
+            'ui_ns.view_repo',
+            repo=repo.name,
+            username=repo.user.username if repo.is_fork else None,
+            namespace=repo.namespace)}}">
+            <strong>{{ repo.namespace + '/' if repo.namespace }}{{ repo.name }}</strong>
+            </a>
+            <div class="ellipsis">
+                <small>{{repo.description}}</small>
             </div>
+          </div>
+        </div>
+        {% endfor %}
+      </div>
+      <div class="row">
+        <div class="col align-self-end text-right">
+          <a href="#">view all {{repos_length}} projects</a>
+        </div>
+      </div>
+      {% endif %}
+      <h4 class="mt-4"><strong>Activity</strong></h4>
+      <div class="row">
+        <div class="col-12">
+          <div class="w-100 border py-4 pl-3">
+            {{ render_activity_graph(username, _class="mx-auto") }}
+          </div>
         </div>
       </div>
+  </div>
+</div>
 {% endblock %}

From 5c592958f3a3cb70b49679b447a24de8977dc304 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 8/15] Import the userprofile_master template from the default theme into the srcfpo one


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/themes/srcfpo/templates/userprofile_master.html b/pagure/themes/srcfpo/templates/userprofile_master.html
new file mode 100644
index 0000000..64921f9
--- /dev/null
+++ b/pagure/themes/srcfpo/templates/userprofile_master.html
@@ -0,0 +1,107 @@
+{% extends "master.html" %}
+
+{% block title %}User {{username}}{% endblock %}
+
+{% block header %}
+  <link href="{{ url_for('static', filename='vendor/selectize/selectize.bootstrap3.css') }}"
+  rel="stylesheet" />
+{% endblock %}
+
+
+{% from "_render_repo.html" import render_repos_as_card, render_activity_graph %}
+
+
+{% block content %}
+<div class="bg-light border border-top-0 pt-2">
+  <div class="container">
+      <div class="media my-4">
+        {{ user.default_email | avatar(64, css_class="align-self-center mr-3") | safe }}
+        <div class="media-body align-self-center">
+          <h3 class="mb-0 font-weight-bold">{{ username }}</h3>
+          <div title="{{ user.created.strftime('%Y-%m-%d') }}">
+            {{user.fullname}} &bull; <span class="text-muted">Joined {{
+              user.created | humanize }}</span>
+          </div>
+        </div>
+      </div>
+  </div>
+</div>
+<div class="container">
+  <div class="row">
+    <div class="col">
+        <ul class="nav nav-tabs nav-sidetabs flex-column">
+          <li class="nav-item text-dark">
+            <a class="nav-link d-flex align-items-center {{'active' if select=='overview'}}"
+              href="{{ url_for('ui_ns.view_user', username=user.username) }}">
+              <span>
+                <i class="fa fa-fw text-muted fa-user"></i>
+                <span class="d-none d-md-inline">Overview&nbsp;</span>
+              </span>
+            </a>
+          </li>
+          <li class="nav-item text-dark">
+            <a class="nav-link d-flex align-items-center {{'active' if select=='projects'}}"
+              href="{{ url_for('ui_ns.userprofile_projects', username=user.username) }}">
+              <span>
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  {{ repos_length }}
+                </span>
+              </div>
+            </a>
+          </li>
+          <li class="nav-item text-dark">
+            <a class="nav-link d-flex align-items-center {{'active' if select=='forks'}}"
+              href="{{ url_for('ui_ns.userprofile_forks', username=user.username) }}">
+              <span>
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  {{ forks_length }}
+                </span>
+              </div>
+            </a>
+          </li>
+          <li class="nav-item text-dark">
+            <a class="nav-link d-flex align-items-center {{'active' if select=='groups'}}"
+             href="{{ url_for('ui_ns.userprofile_groups', username=user.username) }}">
+              <span>
+                <i class="fa fa-fw text-muted fa-users"></i>
+                <span class="d-none d-md-inline">Groups&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  {{ user.groups | length }}
+                </span>
+              </div>
+            </a>
+          </li>
+          <li class="nav-item text-dark">
+            <a class="nav-link d-flex align-items-center {{'active' if select=='starred'}}"
+              href="{{ url_for('ui_ns.userprofile_starred', username=user.username) }}">
+              <span>
+                <i class="fa fa-fw text-muted fa-star"></i>
+                <span class="d-none d-md-inline">Starred&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  {{ user.stars | length }}
+                </span>
+              </div>
+            </a>
+          </li>
+        </ul>
+    </div>
+
+    <div class="col-9">
+    {% block userprofile_content %}
+    {% endblock %}
+    </div>
+  </div>
+</div>
+{% endblock %}

From 6fbfa488b58d9a8e277677b17dfb5916e948ef0b Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 9/15] Customize the userprofile_master template for the srcfpo one


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/themes/srcfpo/templates/userprofile_master.html b/pagure/themes/srcfpo/templates/userprofile_master.html
index 64921f9..c2ff8ae 100644
--- a/pagure/themes/srcfpo/templates/userprofile_master.html
+++ b/pagure/themes/srcfpo/templates/userprofile_master.html
@@ -21,6 +21,9 @@
           <div title="{{ user.created.strftime('%Y-%m-%d') }}">
             {{user.fullname}} &bull; <span class="text-muted">Joined {{
               user.created | humanize }}</span>
+          {% if config['FAS_URL'] %} &bull; (<a href="{{ config['FAS_URL'].rstrip('/') }}/user/view/{{ username }}">fas</a>){%
+          endif %}
+          <img src="https://apps.fedoraproject.org/calendar/api/{{ username }}/shield/vacation?connector=on&always=0" alt="" />
           </div>
         </div>
       </div>

From 9b9980c75aca815bfffedd045b4e2597d9c04d10 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 10/15] Fix link to the koschei icon


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/themes/srcfpo/templates/repo_info.html b/pagure/themes/srcfpo/templates/repo_info.html
index dc6e22d..0daec76 100644
--- a/pagure/themes/srcfpo/templates/repo_info.html
+++ b/pagure/themes/srcfpo/templates/repo_info.html
@@ -39,7 +39,7 @@
   }
   a.koschei button {
     padding-left: 33px;
-    background: url(https://admin.fedoraproject.org/pkgdb/static/icon_koschei.png) 0 50% no-repeat;
+    background: url(https://apps.fedoraproject.org/img/icons/koschei-24.png) 0 50% no-repeat;
   }
   .projectinfo {
     white-space: pre-wrap;

From aa057ef73bf37d6168e5bfe06d9a9b83f731e6ed Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 11/15] Fix link in the drop-down for members


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html
index 0e14e02..088703e 100644
--- a/pagure/templates/repo_info.html
+++ b/pagure/templates/repo_info.html
@@ -203,14 +203,14 @@
                         <i class="fa fa-users fa-fw"></i>
                         <span>Members</span>
                       </a>
-                      <span class="btn btn-sm btn-primary font-weight-bold">{{repo.contributors|length+1}}</span>
+                      <span class="btn btn-sm btn-primary font-weight-bold">{{ repo.contributors|length+1 }}</span>
                       <div class="dropdown-menu dropdown-menu-right" style="width:500px">
                           <div>
                               <div class="media p-2">
                                   <img class=" align-self-center mr-3" src="{{ repo.user.default_email | avatar_url }}" width=50px height=50px>
                                   <div class="media-body align-self-center">
                                     <h4 class="my-0 font-weight-bold">
-                                      <a href="{{ url_for('ui_ns.view_user', username=repo.user)}}">{{ repo.user.user }}</a>
+                                      <a href="{{ url_for('ui_ns.view_user', username=repo.user.user)}}">{{ repo.user.user }}</a>
                                     </h4>
                                     {{ repo.user.fullname }}
                                   </div>
diff --git a/pagure/themes/srcfpo/templates/repo_info.html b/pagure/themes/srcfpo/templates/repo_info.html
index 0daec76..46f0073 100644
--- a/pagure/themes/srcfpo/templates/repo_info.html
+++ b/pagure/themes/srcfpo/templates/repo_info.html
@@ -237,14 +237,14 @@
                     <i class="fa fa-users fa-fw"></i>
                     <span>Members</span>
                   </a>
-                  <span class="btn btn-sm btn-primary font-weight-bold">{{repo.contributors|length+1}}</span>
+                  <span class="btn btn-sm btn-primary font-weight-bold">{{ repo.contributors|length+1 }}</span>
                   <div class="dropdown-menu dropdown-menu-right" style="width:500px">
                     <div>
                       <div class="media p-2">
                           <img class=" align-self-center mr-3" src="{{ repo.user.default_email | avatar_url }}" width=50px height=50px>
                           <div class="media-body align-self-center">
                             <h4 class="my-0 font-weight-bold">
-                              <a href="{{ url_for('ui_ns.view_user', username=repo.user)}}">{{ repo.user.user }}</a>
+                              <a href="{{ url_for('ui_ns.view_user', username=repo.user.user)}}">{{ repo.user.user }}</a>
                             </h4>
                             {{ repo.user.fullname }}
                           </div>

From 4e89a51ca848a10c8670a127c85e1f0e28b4eeb1 Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 12/15] More indentation fixes in the html


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/pagure/templates/userdash_master.html b/pagure/templates/userdash_master.html
index 088cae0..5f2b32f 100644
--- a/pagure/templates/userdash_master.html
+++ b/pagure/templates/userdash_master.html
@@ -11,104 +11,103 @@
 
 {% block content %}
 <div class="container">
-    <div class="row">
+  <div class="row">
     <div class="col userdash-tabs">
-        <ul class="nav nav-tabs nav-sidetabs flex-column">
-            <li class="pl-3 pb-3 font-weight-bold">
-                {{ g.fas_user.username | avatar(20) | safe }} {{g.fas_user.username}}
-            </li>
-            <li class="pr-2 py-3 font-size-09">
-                <form action="{{url_for('ui_ns.search')}}" id="userdash_searchform">
-                    <select id="userdash-search" name="term" placeholder="find projects &amp; forks"></select>
-                    <input type="hidden" name="direct" readonly value="1">
-                </form>
-            </li>
-            <li class="nav-item text-dark">
-                <a class="nav-link d-flex align-items-center {{'active' if select=='projects'}}"
-                   href="{{ url_for('ui_ns.index')}}">
-                    <span>
-                        <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
-                        <span class="d-none d-md-inline">Projects&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            {{ userdash_counts['repos_length'] }}
-                        </span>
-                    </div>
-                </a>
-            </li>
+      <ul class="nav nav-tabs nav-sidetabs flex-column">
+        <li class="pl-3 pb-3 font-weight-bold">
+            {{ g.fas_user.username | avatar(20) | safe }} {{g.fas_user.username}}
+        </li>
 
-            {% if userdash_counts['forks_length'] > 0 %}
-            <li class="nav-item text-dark">
-                <a class="nav-link d-flex align-items-center {{'active' if select=='forks'}}"
-                   href="{{ url_for('ui_ns.userdash_forks')}}">
-                    <span>
-                        <i class="fa fa-fw text-muted fa-code-fork"></i>
-                        <span class="d-none d-md-inline">Forks&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            {{ userdash_counts['forks_length'] }}
-                        </span>
-                    </div>
-                </a>
-            </li>
-            {% endif %}
+        <li class="pr-2 py-3 font-size-09">
+          <form action="{{url_for('ui_ns.search')}}" id="userdash_searchform">
+            <select id="userdash-search" name="term" placeholder="find projects &amp; forks"></select>
+            <input type="hidden" name="direct" readonly value="1">
+          </form>
+        </li>
 
-            <li class="mt-4"></li>
+        <li class="nav-item text-dark">
+          <a class="nav-link d-flex align-items-center {{'active' if select=='projects'}}"
+            href="{{ url_for('ui_ns.index')}}">
+            <span>
+              <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
+              <span class="d-none d-md-inline">Projects&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                {{ userdash_counts['repos_length'] }}
+              </span>
+            </div>
+          </a>
+        </li>
 
+        {% if userdash_counts['forks_length'] > 0 %}
+        <li class="nav-item text-dark">
+          <a class="nav-link d-flex align-items-center {{'active' if select=='forks'}}"
+            href="{{ url_for('ui_ns.userdash_forks')}}">
+            <span>
+              <i class="fa fa-fw text-muted fa-code-fork"></i>
+              <span class="d-none d-md-inline">Forks&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                {{ userdash_counts['forks_length'] }}
+              </span>
+            </div>
+          </a>
+        </li>
+        {% endif %}
 
-            <li class="nav-item text-dark">
-                <a class="nav-link d-flex align-items-center {{'active' if select=='activity'}}"
-                   href="{{ url_for('ui_ns.userdash_activity')}}">
-                    <span>
-                        <i class="fa fa-fw text-muted fa-users"></i>
-                        <span class="d-none d-md-inline">Activity&nbsp;</span>
-                    </span>
-                </a>
-            </li>
-
+        <li class="mt-4"></li>
 
-            {% if userdash_counts['groups_length'] > 0 %}
-            <li class="nav-item text-dark">
-                <a class="nav-link d-flex align-items-center {{'active' if select=='groups'}}"
-                   href="{{ url_for('ui_ns.userdash_groups')}}">
-                    <span>
-                        <i class="fa fa-fw text-muted fa-users"></i>
-                        <span class="d-none d-md-inline">Groups&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            {{ userdash_counts['groups_length'] }}
-                        </span>
-                    </div>
-                </a>
-            </li>
-            {% endif %}
+        <li class="nav-item text-dark">
+          <a class="nav-link d-flex align-items-center {{'active' if select=='activity'}}"
+            href="{{ url_for('ui_ns.userdash_activity')}}">
+            <span>
+              <i class="fa fa-fw text-muted fa-users"></i>
+              <span class="d-none d-md-inline">Activity&nbsp;</span>
+            </span>
+          </a>
+        </li>
 
+        {% if userdash_counts['groups_length'] > 0 %}
+        <li class="nav-item text-dark">
+          <a class="nav-link d-flex align-items-center {{'active' if select=='groups'}}"
+            href="{{ url_for('ui_ns.userdash_groups')}}">
+            <span>
+              <i class="fa fa-fw text-muted fa-users"></i>
+              <span class="d-none d-md-inline">Groups&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                {{ userdash_counts['groups_length'] }}
+              </span>
+            </div>
+          </a>
+        </li>
+        {% endif %}
 
-            <li class="nav-item text-dark">
-                <a class="nav-link d-flex align-items-center {{'active' if select=='watchlist'}}"
-                   href="{{ url_for('ui_ns.userdash_watchlist')}}">
-                    <span>
-                        <i class="fa fa-fw text-muted fa-eye"></i>
-                        <span class="d-none d-md-inline">Watchlist&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            {{ userdash_counts['watchlist_length'] }}
-                        </span>
-                    </div>
-                </a>
-            </li>
-        </ul>
+        <li class="nav-item text-dark">
+          <a class="nav-link d-flex align-items-center {{'active' if select=='watchlist'}}"
+            href="{{ url_for('ui_ns.userdash_watchlist')}}">
+            <span>
+              <i class="fa fa-fw text-muted fa-eye"></i>
+              <span class="d-none d-md-inline">Watchlist&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                {{ userdash_counts['watchlist_length'] }}
+              </span>
+            </div>
+          </a>
+        </li>
+      </ul>
     </div>
 
     <div class="col-9">
-    {% block userdash %}
-    {% endblock %}
-    </div>
+      {% block userdash %}
+      {% endblock %}
     </div>
+  </div>
 </div>
 {% endblock %}
 
@@ -131,25 +130,25 @@ $('#userdash-search').selectize({
     },
     options: [
         {% for repo in search_data %}
-        {% set displayname = "" %}
-        {% if repo.is_fork %}{% set displayname = displayname+repo.user.user+"/" %}{%endif%}
-        {% if repo.namespace %}{% set displayname = displayname+repo.namespace+"/" %}{%endif%}
-        {% set displayname = displayname+repo.name %}
-        {% if repo.fullname[:6] == "forks/" %}
-            {% set repo_fullname = "fork/"+repo.fullname[6:] %}
-        {% else %}
-            {% set repo_fullname = repo.fullname %}
-        {% endif %}
-        {repo_fullname: '{{repo_fullname}}', repo_displayname: '{{displayname}}', is_fork: '{{repo.is_fork}}'},
-        {% endfor %}
+      {% set displayname = "" %}
+      {% if repo.is_fork %}{% set displayname = displayname+repo.user.user+"/" %}{%endif%}
+      {% if repo.namespace %}{% set displayname = displayname+repo.namespace+"/" %}{%endif%}
+      {% set displayname = displayname+repo.name %}
+      {% if repo.fullname[:6] == "forks/" %}
+          {% set repo_fullname = "fork/"+repo.fullname[6:] %}
+      {% else %}
+          {% set repo_fullname = repo.fullname %}
+      {% endif %}
+      {repo_fullname: '{{repo_fullname}}', repo_displayname: '{{displayname}}', is_fork: '{{repo.is_fork}}'},
+      {% endfor %}
     ],
     render: {
-        option: function(item, escape) {
-            return '<div>' +
-                (item.is_fork == "True" ? '<span class="fa fa-fw fa-code-fork"></span>' : '<i class="fa fa-fw fa-calendar-o fa-rotate-270"></i> ') +
-                '<span class="label">' + escape(item.repo_displayname) + '</span>' +
-            '</div>';
-        }
+      option: function(item, escape) {
+        return '<div>' +
+          (item.is_fork == "True" ? '<span class="fa fa-fw fa-code-fork"></span>' : '<i class="fa fa-fw fa-calendar-o fa-rotate-270"></i> ') +
+          '<span class="label">' + escape(item.repo_displayname) + '</span>' +
+        '</div>';
+      }
     },
 });
 </script>

From 75b0c3c26a38e6943b5174a58933babd505f595c Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 13/15] Fixes the unit-tests for the changes in the HTML


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/tests/test_pagure_flask_api_ui_private_repo.py b/tests/test_pagure_flask_api_ui_private_repo.py
index 86c2f68..99f6506 100644
--- a/tests/test_pagure_flask_api_ui_private_repo.py
+++ b/tests/test_pagure_flask_api_ui_private_repo.py
@@ -436,28 +436,37 @@ class PagurePrivateRepotest(tests.Modeltests):
 
         output = self.app.get('/user/foo?repopage=abc&forkpage=def')
         self.assertEqual(output.status_code, 200)
+        output_text = output.get_data(as_text=True)
         self.assertIn(
-            """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-            output.get_data(as_text=True))
+                """<span>
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
         self.assertIn(
-            """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-            output.get_data(as_text=True))
+                """<span>
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
+        self.assertIn(
+                """<span>
+                <i class="fa fa-fw text-muted fa-users"></i>
+                <span class="d-none d-md-inline">Groups&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
         # Add a private project
         item = pagure.lib.model.Project(
@@ -486,28 +495,37 @@ class PagurePrivateRepotest(tests.Modeltests):
 
         output = self.app.get('/user/foo')
         self.assertEqual(output.status_code, 200)
+        output_text = output.get_data(as_text=True)
         self.assertIn(
-            """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          1
-                      </span>
-                  </div>""",
-            output.get_data(as_text=True))
+                """<span>
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  1
+                </span>
+              </div>""", output_text)
         self.assertIn(
-            """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-            output.get_data(as_text=True))
+                """<span>
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
+        self.assertIn(
+                """<span>
+                <i class="fa fa-fw text-muted fa-users"></i>
+                <span class="d-none d-md-inline">Groups&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
         user = tests.FakeUser(username='foo')
         with tests.user_set(self.app.application, user):
@@ -515,36 +533,34 @@ class PagurePrivateRepotest(tests.Modeltests):
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          1
-                      </span>
-                  </div>""",
-                output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  1
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-                output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-users"></i>
-                      <span class="d-none d-md-inline">Groups&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-users"></i>
+                <span class="d-none d-md-inline">Groups&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
         user.username = 'pingou'
         with tests.user_set(self.app.application, user):
@@ -552,36 +568,34 @@ class PagurePrivateRepotest(tests.Modeltests):
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          1
-                      </span>
-                  </div>""",
-                output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  1
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-                output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-users"></i>
-                      <span class="d-none d-md-inline">Groups&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-users"></i>
+                <span class="d-none d-md-inline">Groups&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
         # Check pingou has 0 projects
         user.username = 'pingou'
@@ -835,41 +849,38 @@ class PagurePrivateRepotest(tests.Modeltests):
             self.assertEqual(output.status_code, 200)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-                output.get_data(as_text=True))
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output.get_data(as_text=True))
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-                output.get_data(as_text=True))
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output.get_data(as_text=True))
 
             # Shows on the front page
             output = self.app.get('/dashboard/projects')
             self.assertEqual(output.status_code, 200)
             self.assertIn(
                 """<span>
-                        <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
-                        <span class="d-none d-md-inline">Projects&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            1
-                        </span>
-                    </div>""",
-                output.get_data(as_text=True))
+              <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
+              <span class="d-none d-md-inline">Projects&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                1
+              </span>
+            </div>""", output.get_data(as_text=True))
 
             self.set_up_git_repo(new_project=None, branch_from='feature')
             project = pagure.lib._get_project(self.session, 'pmc')
diff --git a/tests/test_pagure_flask_ui_app.py b/tests/test_pagure_flask_ui_app.py
index 1745da9..481c2f4 100644
--- a/tests/test_pagure_flask_ui_app.py
+++ b/tests/test_pagure_flask_ui_app.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 
 """
- (c) 2015-2017 - Copyright Red Hat Inc
+ (c) 2015-2018 - Copyright Red Hat Inc
 
  Authors:
    Pierre-Yves Chibon <pingou@pingoured.fr>
@@ -84,26 +84,24 @@ class PagureFlaskApptests(tests.Modeltests):
         output_text = output.get_data(as_text=True)
         self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          3
-                      </span>
-                  </div>""",
-                output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  3
+                </span>
+              </div>""", output_text)
         self.assertIn(
-            """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-            output_text)
+                """<span>
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
     def test_view_user(self):
         """ Test the view_user endpoint. """
@@ -113,26 +111,24 @@ class PagureFlaskApptests(tests.Modeltests):
         output_text = output.get_data(as_text=True)
         self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-                output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
         self.assertIn(
-            """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-            output_text)
+                """<span>
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
         tests.create_projects(self.session)
         self.gitrepos = tests.create_projects_git(
@@ -143,26 +139,24 @@ class PagureFlaskApptests(tests.Modeltests):
         output_text = output.get_data(as_text=True)
         self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          3
-                      </span>
-                  </div>""",
-                output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  3
+                </span>
+              </div>""", output_text)
         self.assertIn(
-            """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""",
-            output_text)
+                """<span>
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
         self.assertNotIn(
             '<a class="page-link" href="#" tabindex="-1">page 1 of 2</a>',
             output_text)
diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py
index 5ed28cc..94c217d 100644
--- a/tests/test_pagure_flask_ui_repo.py
+++ b/tests/test_pagure_flask_ui_repo.py
@@ -3355,12 +3355,15 @@ index 0000000..fb7093d
                 '<span class="btn btn-outline-secondary disabled opacity-100 '
                 'border-0 ml-auto font-weight-bold">6 projects</span>', output_text)
             self.assertIn(
-'                        <span class="d-none d-md-inline">Forks&nbsp;</span>\n'
-'                    </span>\n'
-'                    <div class="ml-auto">\n'
-'                        <span class="badge badge-secondary">\n'
-'                            1',
-                output_text)
+                """<span>
+              <i class="fa fa-fw text-muted fa-code-fork"></i>
+              <span class="d-none d-md-inline">Forks&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                1
+              </span>
+            </div>""", output_text)
 
             output = self.app.post(
                 '/fork/pingou/test3/delete', follow_redirects=True)
@@ -3464,24 +3467,24 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          2
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  2
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
             # Only git repo
             item = pagure.lib.model.Project(
@@ -3500,24 +3503,24 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          2
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  2
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
             # Only git and doc repo
             item = pagure.lib.model.Project(
@@ -3536,24 +3539,24 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          2
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  2
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
             # All repo there
             item = pagure.lib.model.Project(
@@ -3580,24 +3583,17 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                        <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
-                        <span class="d-none d-md-inline">Projects&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            3
-                        </span>
-                    </div>""", output_text)
+              <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
+              <span class="d-none d-md-inline">Projects&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                3
+              </span>
+            </div>""", output_text)
             self.assertNotIn(
-                """<span>
-                        <i class="fa fa-fw text-muted fa-code-fork"></i>
-                        <span class="d-none d-md-inline">Forks&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            0
-                        </span>
-                    </div>""", output_text)
+                """<span class="d-none d-md-inline">Forks&nbsp;</span>""",
+                output_text)
 
             # add issues
             repo = pagure.lib.get_authorized_project(self.session, 'test')
@@ -3687,48 +3683,41 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                        <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
-                        <span class="d-none d-md-inline">Projects&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            3
-                        </span>
-                    </div>""", output_text)
+              <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
+              <span class="d-none d-md-inline">Projects&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                3
+              </span>
+            </div>""", output_text)
             self.assertNotIn(
-                """<span>
-                        <i class="fa fa-fw text-muted fa-code-fork"></i>
-                        <span class="d-none d-md-inline">Forks&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            0
-                        </span>
-                    </div>""", output_text)
+                """<span class="d-none d-md-inline">Forks&nbsp;</span>""",
+                output_text)
 
             output = self.app.post('/test/delete', follow_redirects=True)
             self.assertEqual(output.status_code, 200)
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          2
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  2
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
             repo = pagure.lib.get_authorized_project(self.session, 'test')
             self.assertEqual(repo, None)
@@ -3761,24 +3750,24 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                        <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
-                        <span class="d-none d-md-inline">Projects&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            2
-                        </span>
-                    </div>""", output_text)
+              <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
+              <span class="d-none d-md-inline">Projects&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                2
+              </span>
+            </div>""", output_text)
             self.assertIn(
                 """<span>
-                        <i class="fa fa-fw text-muted fa-code-fork"></i>
-                        <span class="d-none d-md-inline">Forks&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            1
-                        </span>
-                    </div>""", output_text)
+              <i class="fa fa-fw text-muted fa-code-fork"></i>
+              <span class="d-none d-md-inline">Forks&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                1
+              </span>
+            </div>""", output_text)
 
             output = self.app.post(
                 '/fork/pingou/test3/delete', follow_redirects=True)
@@ -3786,24 +3775,24 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          2
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  2
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
     @patch.dict('pagure.config.config', {'TICKETS_FOLDER': None})
     @patch('pagure.lib.notify.send_email', MagicMock(return_value=True))
@@ -3829,24 +3818,17 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                        <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
-                        <span class="d-none d-md-inline">Projects&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            3
-                        </span>
-                    </div>""", output_text)
+              <i class="fa fa-calendar-o fa-rotate-270 fa-fw text-muted"></i>
+              <span class="d-none d-md-inline">Projects&nbsp;</span>
+            </span>
+            <div class="ml-auto">
+              <span class="badge badge-secondary">
+                3
+              </span>
+            </div>""", output_text)
             self.assertNotIn(
-                """<span>
-                        <i class="fa fa-fw text-muted fa-code-fork"></i>
-                        <span class="d-none d-md-inline">Forks&nbsp;</span>
-                    </span>
-                    <div class="ml-auto">
-                        <span class="badge badge-secondary">
-                            0
-                        </span>
-                    </div>""", output_text)
+                """<span class="d-none d-md-inline">Forks&nbsp;</span>""",
+                output_text)
 
             # Delete the project
             output = self.app.post('/test/delete', follow_redirects=True)
@@ -3856,24 +3838,24 @@ index 0000000..fb7093d
             # Check deletion worked
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          2
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  2
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
     @patch('pagure.lib.notify.send_email')
     @patch('pagure.decorators.admin_session_timedout')
@@ -3955,24 +3937,24 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
             # Check after
             repo = pagure.lib.get_authorized_project(self.session, 'test')
@@ -4076,24 +4058,24 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
             # Check after
             repo = pagure.lib.get_authorized_project(self.session, 'test')
@@ -4186,24 +4168,24 @@ index 0000000..fb7093d
             output_text = output.get_data(as_text=True)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
-                      <span class="d-none d-md-inline">Projects&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-calendar-o fa-rotate-270"></i>
+                <span class="d-none d-md-inline">Projects&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
             self.assertIn(
                 """<span>
-                      <i class="fa fa-fw text-muted fa-code-fork"></i>
-                      <span class="d-none d-md-inline">Forks&nbsp;</span>
-                  </span>
-                  <div class="ml-auto">
-                      <span class="badge badge-secondary">
-                          0
-                      </span>
-                  </div>""", output_text)
+                <i class="fa fa-fw text-muted fa-code-fork"></i>
+                <span class="d-none d-md-inline">Forks&nbsp;</span>
+              </span>
+              <div class="ml-auto">
+                <span class="badge badge-secondary">
+                  0
+                </span>
+              </div>""", output_text)
 
             # Check after
             repo = pagure.lib.get_authorized_project(self.session, 'test')

From 5b0719d31c8d6b38ef68c5303de9ea93981e3d5a Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 24 2018 14:30:41 +0000
Subject: [PATCH 14/15] Add a -theme-srcfpo subpackage


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/files/pagure.spec b/files/pagure.spec
index 066cc0d..62a2e4f 100644
--- a/files/pagure.spec
+++ b/files/pagure.spec
@@ -100,6 +100,15 @@ This package provides the web interface assets for styling
 a Pagure server with the same look and feel as Pagure.io.
 
 
+%package            theme-srcfpo
+Summary:            Web interface theme used for src.fedoraproject.org
+BuildArch:          noarch
+Requires:           %{name} = %{version}-%{release}
+%description        theme-srcfpo
+This package provides the web interface assets for styling
+a Pagure server with the same look and feel as src.fedoraproject.org.
+
+
 %package            milters
 Summary:            Milter to integrate pagure with emails
 BuildArch:          noarch
@@ -378,6 +387,7 @@ sed -e "s/pythonX.Y/python%{python3_version}/g" -i $RPM_BUILD_ROOT/%{_sysconfdir
 %{_datadir}/pagure/alembic/
 %{python_sitelib}/pagure/
 %exclude %{python_sitelib}/pagure/themes/pagureio
+%exclude %{python_sitelib}/pagure/themes/srcfpo
 %{python_sitelib}/pagure*.egg-info
 %{_bindir}/pagure-admin
 %{_unitdir}/pagure_worker.service
@@ -385,11 +395,17 @@ sed -e "s/pythonX.Y/python%{python3_version}/g" -i $RPM_BUILD_ROOT/%{_sysconfdir
 %{_unitdir}/pagure_api_key_expire_mail.service
 %{_unitdir}/pagure_api_key_expire_mail.timer
 
+
 %files theme-pagureio
 %license LICENSE
 %{python_sitelib}/pagure/themes/pagureio/
 
 
+%files theme-srcfpo
+%license LICENSE
+%{python2_sitelib}/pagure/themes/srcfpo/
+
+
 %files milters
 %license LICENSE
 %attr(755,postfix,postfix) %dir %{_localstatedir}/run/pagure

From 708ab2206c5333de79a99db37c2b27b97a3aa95e Mon Sep 17 00:00:00 2001
From: Pierre-Yves Chibon <pingou@pingoured.fr>
Date: Aug 27 2018 07:16:31 +0000
Subject: [PATCH 15/15] Add the dist-git logo to the srcfpo theme


Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>

---

diff --git a/files/pagure.spec b/files/pagure.spec
index 62a2e4f..e29cbcf 100644
--- a/files/pagure.spec
+++ b/files/pagure.spec
@@ -403,7 +403,7 @@ sed -e "s/pythonX.Y/python%{python3_version}/g" -i $RPM_BUILD_ROOT/%{_sysconfdir
 
 %files theme-srcfpo
 %license LICENSE
-%{python2_sitelib}/pagure/themes/srcfpo/
+%{python_sitelib}/pagure/themes/srcfpo/
 
 
 %files milters
diff --git a/pagure/themes/srcfpo/static/pagure-logo.png b/pagure/themes/srcfpo/static/pagure-logo.png
index 6c542af..0c1e914 100644
Binary files a/pagure/themes/srcfpo/static/pagure-logo.png and b/pagure/themes/srcfpo/static/pagure-logo.png differ

