]> git.ipfire.org Git - pbs.git/commitdiff
repos: Adjust breadcrumbs for user repositories
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 25 Jun 2022 14:10:06 +0000 (14:10 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 25 Jun 2022 14:10:06 +0000 (14:10 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/repos/builds.html
src/templates/repos/show.html

index fc55dce607afe81528522b4dcb0747e4abd66a78..9f06fde23f2effc9519b3b8edd7fe9113814faec 100644 (file)
@@ -8,20 +8,26 @@
                        <li>
                                <a href="/">{{ _("Home") }}</a>
                        </li>
-                       <li>
-                               <a href="/distros">{{ _("Distributions") }}</a>
-                       </li>
-                       <li>
-                               <a href="/distros/{{ distro.slug }}">{{ distro }}</a>
-                       </li>
+                       {% if repo.owner %}
+                               <li>
+                                       <a href="/users">{{ _("Users") }}</a>
+                               </li>
+                               <li>
+                                       <a href="/users/{{ repo.owner.name }}">{{ repo.owner }}</a>
+                               </li>
+                       {% else %}
+                               <li>
+                                       <a href="/distros">{{ _("Distributions") }}</a>
+                               </li>
+                               <li>
+                                       <a href="/distros/{{ distro.slug }}">{{ distro }}</a>
+                               </li>
+                       {% end %}
                        <li>
                                {{ _("Repositories") }}
                        </li>
                        <li>
-                               <a href="/distros/{{ distro.slug }}/repos/{{ repo.slug }}">{{ repo }}</a>
-                       </li>
-                       <li>
-                               <span class="show-for-sr">{{ _("Current") }}: </span> {{ _("Builds") }}
+                               <span class="show-for-sr">{{ _("Current") }}: </span> {{ repo }}
                        </li>
                </ul>
        </nav>
index 1110742fff8c3a1889788dd723aa87f254683b7a..312e462b820e49fd1e7551f2ab70f77cf0a62b99 100644 (file)
@@ -8,12 +8,21 @@
                        <li>
                                <a href="/">{{ _("Home") }}</a>
                        </li>
-                       <li>
-                               <a href="/distros">{{ _("Distributions") }}</a>
-                       </li>
-                       <li>
-                               <a href="/distros/{{ distro.slug }}">{{ distro }}</a>
-                       </li>
+                       {% if repo.owner %}
+                               <li>
+                                       <a href="/users">{{ _("Users") }}</a>
+                               </li>
+                               <li>
+                                       <a href="/users/{{ repo.owner.name }}">{{ repo.owner }}</a>
+                               </li>
+                       {% else %}
+                               <li>
+                                       <a href="/distros">{{ _("Distributions") }}</a>
+                               </li>
+                               <li>
+                                       <a href="/distros/{{ distro.slug }}">{{ distro }}</a>
+                               </li>
+                       {% end %}
                        <li>
                                {{ _("Repositories") }}
                        </li>
@@ -33,7 +42,7 @@
                </div>
        {% end %}
 
-       <a class="secondary small expanded button" href="/distros/{{ distro.slug }}/repos/{{ repo.slug }}.repo">
+       <a class="secondary small expanded button" href="{% if repo.owner %}/users/{{ repo.owner.name }}{% else %}/distros/{{ distro.slug }}{% end %}/repos/{{ repo.slug }}.repo">
                {{ _("Download Configuration") }}
        </a>