summary refs log tree commit diff stats
path: root/ganarchy/templating/templates.py
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2022-02-06 01:09:01 -0300
committerSoniEx2 <endermoneymod@gmail.com>2022-02-06 01:09:01 -0300
commitbfa3622c23c4bc574e6e51bdd8c196604ebcd172 (patch)
tree15aaede87b4d230dc8ead67a4c11d8ec206c19a6 /ganarchy/templating/templates.py
parenta51c18000cdf4e623d4a46246bcc6d5b1f47e917 (diff)
Attempt to add pinned repos
Diffstat (limited to 'ganarchy/templating/templates.py')
-rw-r--r--ganarchy/templating/templates.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/ganarchy/templating/templates.py b/ganarchy/templating/templates.py
index 1e9c074..1574d7c 100644
--- a/ganarchy/templating/templates.py
+++ b/ganarchy/templating/templates.py
@@ -70,7 +70,7 @@ def get_template_loader():
 
 {%- for project in database.list_projects() %}
 [projects.{{project}}]
-{%- for repo_url, branch, _head_commit in database.list_repobranches(project) %}
+{%- for repo_url, branch, _head_commit, _pinned in database.list_repobranches(project) %}
 {%- if database.should_repo_federate(project, repo_url, branch) %}
 "{{repo_url|tomle}}".{% if not branch %}HEAD{% else %}"{{branch|tomle}}"{% endif %} = { active=true }
 {%- endif %}
@@ -108,8 +108,15 @@ def get_template_loader():
         <h1>{{ project_title|e }}</h1>
         <p>Tracking <span id="project_commit"><a href="web+ganarchy:{{ project_commit }}">{{ project_commit }}</a></span></p>
         <div id="project_body"><p>{{ project_body|e|replace("\n\n", "</p><p>") }}</p></div>
+        <h2>Pinned repos</h2>
         <ul>
-        {% for url, msg, img, branch in repos -%}
+        {% for url, msg, img, branch in pinned_repos -%}
+            <li><a href="{{ url|e }}">{{ url|e }}</a>{% if branch %} <span class="branchname">[{{ branch|e }}]</span>{% endif %}: {{ msg|e }}</li>
+        {% endfor -%}
+        </ul>
+        <h2>Additional repos</h2>
+        <ul>
+        {% for url, msg, img, branch in unpinned_repos -%}
             <li><a href="{{ url|e }}">{{ url|e }}</a>{% if branch %} <span class="branchname">[{{ branch|e }}]</span>{% endif %}: {{ msg|e }}</li>
         {% endfor -%}
         </ul>